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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.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
Index: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html
new file mode 100644
index 0000000000000000000000000000000000000000..743db2ed3e66370d1319d88477797b0eec82eca9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-ALLOWED-top-navigation-after-postMessage.html
@@ -0,0 +1,25 @@
+<html>
+<body>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window.onload = function() {
+ if (window.eventSender) {
+ var b = document.getElementById("b");
+ eventSender.mouseMoveTo(b.offsetLeft + 2, b.offsetTop + 2);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+}
+
+function test() {
+ window.frames[0].postMessage('run test', '*');
+}
+</script>
+<button id="b" onclick="test();">Perform test</button>
+<iframe src="http://localhost:8000/security/frameNavigation/resources/top-navigate-in-onmessage.html"></iframe>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698