mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Added iFrame tests
This commit is contained in:
parent
1b76df7cbc
commit
af5365b4eb
@ -102,5 +102,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="testAPI.js"></script>
|
<script src="testAPI.js"></script>
|
||||||
<script src="canvasAPI.js"></script>
|
<script src="canvasAPI.js"></script>
|
||||||
|
<script src="iframeAPI.js"></script>
|
||||||
<script src="test.js"></script>
|
<script src="test.js"></script>
|
||||||
</body></html>
|
</body></html>
|
10
test/test.js
10
test/test.js
@ -158,3 +158,13 @@ async function offscreenTest(){
|
|||||||
|
|
||||||
return {url: await testAPI.readBlob(blob)};
|
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