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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-WARN-top-navigation-without-user-gesture.html

Issue 2617313002: Add deprecation message for top navigations from sandbox w/ 'allow-top-navigation' but no gesture (Closed)
Patch Set: Add the deprecation message to fix the broken tests in LayoutTests/fast/frames/. Created 3 years, 11 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: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-WARN-top-navigation-without-user-gesture.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-WARN-top-navigation-without-user-gesture.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-WARN-top-navigation-without-user-gesture.html
new file mode 100644
index 0000000000000000000000000000000000000000..8498dc9155425cf2056760673ce625192be393d3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-WARN-top-navigation-without-user-gesture.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ testRunner.setDumpConsoleMessages(true);
+ testRunner.waitUntilDone();
+}
+
+if (window.internals)
+ internals.runtimeFlags.setFramebustingNeedsSameOriginOrUserGesture = true;
+
+window.addEventListener("message", e => {
+ if (e.data == "PASS")
+ testRunner.notifyDone();
+ else
+ testRunner.testFailed("'top.location' didn't throw.");
+});
+</script>
+</head>
+<body>
+<iframe sandbox='allow-top-navigation allow-scripts' src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html"></iframe>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698