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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: Test. Created 4 years, 1 month 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: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html
index c661318f3f28d53bb46cb3040828871de6d98e09..98aba2f0aefebc88006c550fdde0274d73886761 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html
@@ -5,6 +5,7 @@ if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.setDumpConsoleMessages(false);
+ testRunner.waitUntilDone();
}
// Ensure a user gesture happened in the main frame, but not in the iframe.
@@ -13,6 +14,13 @@ if (window.eventSender) {
eventSender.mouseDown(0, 0);
eventSender.mouseUp(0, 0);
}
+
+window.addEventListener("message", e => {
+ if (e.data == "PASS")
+ setTimeout(_ => { testRunner.notifyDone(); }, 500); // Give the schedule blocking navigation time to fire.
+ else
+ testRunner.testFailed("'top.location' didn't throw.");
+});
</script>
<iframe src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html"></iframe>
</body>

Powered by Google App Engine
This is Rietveld 408576698