2020-01-06 15:15:04 +01:00
|
|
|
/* globals testAPI, canvasAPI*/
|
2019-12-16 19:27:28 +01:00
|
|
|
const addLine = function(){
|
2019-12-14 21:22:18 +01:00
|
|
|
"use strict";
|
|
|
|
|
2019-12-16 19:27:28 +01:00
|
|
|
const output = document.getElementById("results");
|
2019-12-14 21:22:18 +01:00
|
|
|
return function(text){
|
2019-12-16 19:27:28 +01:00
|
|
|
const line = document.createElement("div");
|
2019-12-14 21:22:18 +01:00
|
|
|
line.textContent = text;
|
|
|
|
output.appendChild(line);
|
|
|
|
};
|
|
|
|
}();
|
|
|
|
|
|
|
|
addLine("window name at start: " + window.name);
|
|
|
|
window.name = "CanvasBlocker CSP test";
|
|
|
|
addLine("window name after set: " + window.name);
|
2019-12-16 19:27:28 +01:00
|
|
|
(async function(){
|
2019-12-14 21:22:18 +01:00
|
|
|
"use strict";
|
|
|
|
|
2020-01-06 15:15:04 +01:00
|
|
|
const hashValue = await testAPI.hash(canvasAPI.fingerprint(window).url);
|
2019-12-16 19:27:28 +01:00
|
|
|
addLine("canvas hash: " + hashValue);
|
|
|
|
}());
|