<!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> <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>