1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-01 02:48:44 +01:00
CanvasBlocker/test/test.html

106 lines
3.4 KiB
HTML
Raw Normal View History

2017-01-31 20:59:57 +01:00
<!DOCTYPE html>
2017-08-13 23:44:31 +02:00
<script src="firstPossibleCall.js"></script>
2017-01-31 20:59:57 +01:00
<html>
<head>
2019-09-04 00:30:20 +02:00
<title>Canvas test</title>
2019-02-20 08:13:37 +01:00
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="testIcon.svg" type="image/png" rel="icon">
<link href="testIcon.svg" type="image/png" rel="shortcut icon">
2020-11-21 13:58:32 +01:00
<link rel="stylesheet" href="../default.css" type="text/css">
<style type="text/css">
.hash {
font-size: 70%;
}
</style>
2017-01-31 20:59:57 +01:00
</head>
<body>
2019-09-04 00:30:20 +02:00
<h1>Canvas test</h1>
<h2>Expected result</h2>
<ul>
<li>all the hashes should be equal for each test</li>
<li>the hash before and after the "/" do not have to match</li>
<li>if "refresh" is clicked the hash must not change</li>
<li>upon page reload the hash changes (depending on CanvasBlocker settings - e.g. not in the stealth preset)</li>
2019-09-04 00:30:20 +02:00
</ul>
<h2>Tests</h2>
2017-01-31 20:59:57 +01:00
<div id="top">
2019-09-04 00:30:20 +02:00
<h3>top Test</h3>
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
2017-04-23 00:25:33 +02:00
<button>refresh</button>
2017-01-31 20:59:57 +01:00
</div>
2020-10-26 14:17:34 +01:00
<div id="getImageDataTest">
<h3>getimageData Test</h3>
<canvas class="display"></canvas><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
<button>refresh</button>
</div>
2017-01-31 20:59:57 +01:00
<div id="iframe">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test. Thanks to DocumentRoot.</h3>
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
2017-01-31 20:59:57 +01:00
<iframe sandbox="allow-same-origin" style="display:none"></iframe>
2017-04-23 00:25:33 +02:00
<button>refresh</button>
2017-01-31 20:59:57 +01:00
</div>
</div>
<div id="iframe2">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test 2 - with URL</h3>
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
<iframe src="?" sandbox="allow-same-origin" style="display:none"></iframe>
<button>refresh</button>
</div>
</div>
<div id="iframe3">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test 3 - violating SOP</h3>
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
2020-03-12 23:01:42 +01:00
<iframe src="//example.org" style="display:none"></iframe>
<button>refresh</button>
</div>
2019-05-22 23:46:56 +02:00
<div id="iframe4">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test 4 - different access 1</h3>
2019-05-22 23:46:56 +02:00
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
<button>refresh</button>
</div>
<div id="iframe5">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test 5 - different access 2</h3>
2019-05-22 23:46:56 +02:00
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
<button>refresh</button>
</div>
<div id="iframe6">
2019-09-04 00:30:20 +02:00
<h3>iFrame Test 6 - different access 3</h3>
2019-05-22 23:46:56 +02:00
<img class="display"><br>
Hash: <span class="hash"></span> (isPointInPath: <span class="isPointInPath"></span>)
<button>refresh</button>
</div>
2019-12-02 22:57:11 +01:00
<div id="windowOpen">
<h3>window.open Test</h3>
<img class="display"><br>
Hash: <span class="hash"><i>click anywhere to populate</i></span> (isPointInPath: <span class="isPointInPath"></span>)
<button>refresh</button>
</div>
<div id="blob">
<h3>blob Test</h3>
<img class="display"><br>
Hash: <span class="hash"></span>
<button>refresh</button>
</div>
<div id="offscreen">
<h3>offscreen Test</h3>
<img class="display"><br>
Hash: <span class="hash"></span>
<button>refresh</button>
</div>
<div id="offscreenWorker">
<h3>offscreen Worker Test</h3>
<img class="display"><br>
Hash: <span class="hash"></span>
<button>refresh</button>
</div>
2020-01-06 15:15:04 +01:00
<script src="testAPI.js"></script>
<script src="canvasAPI.js"></script>
2017-08-13 23:44:31 +02:00
<script src="test.js"></script>
2017-01-31 20:59:57 +01:00
</body></html>