mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
ec128796e3
Fixes #448
40 lines
1.1 KiB
HTML
40 lines
1.1 KiB
HTML
<!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> |