mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 04:40:20 +01:00
Added iFrame tests
This commit is contained in:
parent
1b76df7cbc
commit
af5365b4eb
@ -102,5 +102,6 @@
|
||||
</div>
|
||||
<script src="testAPI.js"></script>
|
||||
<script src="canvasAPI.js"></script>
|
||||
<script src="iframeAPI.js"></script>
|
||||
<script src="test.js"></script>
|
||||
</body></html>
|
12
test/test.js
12
test/test.js
@ -157,4 +157,14 @@ async function offscreenTest(){
|
||||
await offscreenCanvas.toBlob();
|
||||
|
||||
return {url: await testAPI.readBlob(blob)};
|
||||
}
|
||||
}
|
||||
|
||||
iframeAPI.forEachMethod(async function(windowToUse, name){
|
||||
"use strict";
|
||||
const {url, imageData, isPointInPath} = canvasAPI.fingerprint(windowToUse);
|
||||
const hashes = await Promise.all([
|
||||
testAPI.hash(url),
|
||||
imageData? testAPI.hash(imageData.data): ""
|
||||
]);
|
||||
console.log(name, hashes[0], "/", hashes[1], isPointInPath);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user