Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: LayoutTests/http/tests/security/xssAuditor/window-open-block-mode.html

Issue 301163006: Add schedulePageBlock() to navigation scheduler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix omission. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698