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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/top-navigate-in-onmessage.html

Issue 2467993002: Document user gesture state should be able to propagate over postMessage (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/top-navigate-in-onmessage.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/top-navigate-in-onmessage.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/top-navigate-in-onmessage.html
new file mode 100644
index 0000000000000000000000000000000000000000..0e4cfaf00183ff1a19d05041474b152d2bfe0074
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/top-navigate-in-onmessage.html
@@ -0,0 +1,15 @@
+<body>
+<script>
+function navigate(e) {
+ // double-nested setTimeout() to ensure that the UserGesturToken
+ // isn't active when the navigation is triggered.
+ setTimeout(function() {
+ setTimeout(function() {
+ top.location = "http://127.0.0.1:8000/navigation/resources/pass-and-notify-done.html";
+ }, 0);
+ }, 0);
+}
+
+window.addEventListener("message", navigate, false);
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698