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

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

Issue 2696703010: Rename the flag of 'allow-top-navigation-with-user-activation' to 'allow-top-navigation-by-user-act… (Closed)
Patch Set: Change the tests to be testharness-based for the merging into web-platform-tests. Created 3 years, 10 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-ALLOWED-top-navigation-with-user-gesture.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html
index 375c979e37dcce9a6fbf2ff5de3b57963f427790..a244f8a3ee271132b5ccbe70b3d0d551c39b05bc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html
@@ -3,6 +3,8 @@
<style>
iframe { width: 400px; height: 200px;}
</style>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
@@ -17,12 +19,17 @@
// Because the iframe is cross-origin, it can't get the offsets itself, so leak them.
frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "*");
}
+ test(function() {
+ window.addEventListener("message", e => {
+ assert_equals(e.data, "PASS", "The message says 'PASS' instead of 'FAIL'");
+ });
+ }, "The sandboxed iframe posted a message saying the test was in the state of 'PASS'.");
</script>
</head>
<body onload="loaded();">
- <p>This tests that an iframe in sandbox with 'allow-top-navigation-with-user-activation'
+ <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-activation'
can navigate the top level page, if it is trigged by a user gesture.</p>
<h4>DOMAIN</h4>
- <iframe id="i" sandbox="allow-scripts allow-top-navigation-with-user-activation" src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html"></iframe>
+ <iframe id="i" sandbox="allow-scripts allow-top-navigation-by-user-activation" src="resources/iframe-that-performs-parent-navigation.html"></iframe>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698