mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
parent
692b4616e2
commit
ec128796e3
18 changed files with 328 additions and 3 deletions
40
test/textMetricsTest.html
Normal file
40
test/textMetricsTest.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>TextMetrics test</title>
|
||||
<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">
|
||||
<style>
|
||||
.hash {
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>TextMetrics test</h1>
|
||||
<h2>Expected result</h2>
|
||||
<ul>
|
||||
<li>the hashes are different to the hashes when CanvasBlocker is disabled</li>
|
||||
<li>the number of differences stays the same when CanvasBlocker is disabled</li>
|
||||
<li>if "refresh" is clicked nothing must change</li>
|
||||
<li>upon page reload the hashes change (depending on CanvasBlocker settings - e.g. not in the stealth preset)</li>
|
||||
</ul>
|
||||
<h2>Tests</h2>
|
||||
<div id="tests">
|
||||
<div class="test" id="measureText">
|
||||
<h3 class="title">measureText</h3>
|
||||
Hashes: <span class="hashes"><table>
|
||||
<tr>
|
||||
<td>all:</td>
|
||||
<td class="hash all"></td>
|
||||
</tr>
|
||||
</table></span><br>
|
||||
Number of differences: <span class="differences"></span><br>
|
||||
<button class="refresh">refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<script src="testAPI.js"></script>
|
||||
<script src="textMetricsTest.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue