| Index: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-parent-navigation-change-with-gesture.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-parent-navigation-change-with-gesture.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-parent-navigation-change-with-gesture.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f7ae3b341cf00bab8d91707bed5d007529c5b6b0
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-ALLOWED-parent-navigation-change-with-gesture.html
|
| @@ -0,0 +1,28 @@
|
| +<html>
|
| +<head>
|
| + <style>
|
| + iframe { width: 400px; height: 200px;}
|
| + </style>
|
| + <script>
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| + }
|
| +
|
| + function loaded()
|
| + {
|
| + document.getElementsByTagName('h4')[0].innerHTML = document.domain;
|
| + var iframe = document.getElementById("i");
|
| + // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates.
|
| + // 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}, "*");
|
| + }
|
| + </script>
|
| +</head>
|
| +<body onload="loaded();">
|
| + <p>This tests that documents can navigate the location of any of it's parent-frames regardless of domain, if a
|
| + user gesture is present.</p>
|
| + <h4>DOMAIN</h4>
|
| + <iframe id="i" sandbox="allow-scripts allow-top-navigation" src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html"></iframe>
|
| +</body>
|
| +</html>
|
|
|