1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-09 22:58:52 +01:00
CanvasBlocker/test/textMetricsTest.html

43 lines
1.4 KiB
HTML
Raw Normal View History

<!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">
2020-11-21 13:58:32 +01:00
<link rel="stylesheet" href="../default.css" type="text/css">
<style>
.hash {
font-family: monospace;
2020-11-21 13:58:32 +01:00
font-size: 70%;
}
</style>
</head>
<body>
<h1>TextMetrics test</h1>
<h2>Expected result</h2>
<ol>
<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>
<li>Firefox 68 does only offer integer precision in TextMetrics and therefore less fingerprinting potential. CanvasBlocker only changes values if they are no integer and therefore point 1 and 4 are not true in Firefox 68.</li>
</ol>
<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>