| Index: LayoutTests/http/tests/security/xssAuditor/window-open-block-mode.html
|
| diff --git a/LayoutTests/http/tests/security/xssAuditor/window-open-block-mode.html b/LayoutTests/http/tests/security/xssAuditor/window-open-block-mode.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7aba7a46cbb69cf735669df153631e34732d74c5
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/xssAuditor/window-open-block-mode.html
|
| @@ -0,0 +1,29 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.setXSSAuditorEnabled(true);
|
| + testRunner.setCanOpenWindows();
|
| + testRunner.setCloseRemainingWindowsWhenComplete(true);
|
| + testRunner.dumpBackForwardList();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<p>Test that under x-xss-protection mode=block that the block page URL is added on top of the existing page
|
| +instead of replacing it. Test passes if the second window has a two-item back-forward list.</p>
|
| +<div id="console"></div>
|
| +<script>
|
| +var w = window.open("/security/xssAuditor/resources/echo-intertag.pl?q=<scr" + "ipt>alert(/xss/)</scr" + "ipt>&enable-full-block=1");
|
| +if (!w) {
|
| + document.getElementById("console").textContent = "Failed to open window. Check for popup blocking.";
|
| +}
|
| +if (window.testRunner) {
|
| + setInterval(function () { try { w.contentDocument } catch (e) { testRunner.notifyDone(); }}, 20);
|
| +}
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|