1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added window.open test

For #431
This commit is contained in:
kkapsner 2020-01-21 22:45:28 +01:00
parent d547917b43
commit 29e61ada25
3 changed files with 34 additions and 0 deletions

View File

@ -24,5 +24,6 @@
<li><a href="settingsLoading.php">Settings loading</a></li> <li><a href="settingsLoading.php">Settings loading</a></li>
<li><a href="iframeTest.html">Iframe protection</a></li> <li><a href="iframeTest.html">Iframe protection</a></li>
<li><a href="cspTest.php">CSP test</a></li> <li><a href="cspTest.php">CSP test</a></li>
<li><a href="window.open-test.html">window.open test</a></li>
</ul> </ul>
</body></html> </body></html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>window.open 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>
#testLink {
text-decoration: underline;
color: blue;
cursor: pointer;
}
</style>
</head>
<body>
<h1>window.open test</h1>
<h2>Expected result</h2>
<ul>
<li>after clicking the link a new tab or window opens</li>
<li>the notifications for that new tab are displayed in that tab</li>
<li>this tab does not report any faking</li>
<li>the new tab keeps working after you navigate in this tab or close this tab</li>
</ul>
<h3>test</h3>
<div id="testLink">click me</div>
<script src="window.open-test.js"></script>
</body></html>

5
test/window.open-test.js Normal file
View File

@ -0,0 +1,5 @@
document.getElementById("testLink").addEventListener("click", function(){
"use strict";
window.open("./audioTest.html", "_blank");
});