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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html

Issue 2694013005: Cleanup blink-side PlzNavigate logic (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="/js-test-resources/js-test.js"></script> 3 <script src="/js-test-resources/js-test.js"></script>
4 <body> 4 <body>
5 <p id="description"></p> 5 <p id="description"></p>
6 <p id="console"></p> 6 <p id="console"></p>
7 <iframe src="data:text/html,"></iframe> 7 <iframe src="data:text/html,"></iframe>
8 <script> 8 <script>
9 description('Tests that isolated worlds do not allow cross-origin frame access') ; 9 description('Tests that isolated worlds do not allow cross-origin frame access') ;
10 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
11 11
12 if (window.testRunner) { 12 if (window.testRunner) {
13 window.addEventListener('message', function(event) { 13 window.addEventListener('message', function(event) {
14 var message = JSON.parse(event.data); 14 var message = JSON.parse(event.data);
15 switch (message.type) { 15 switch (message.type) {
16 case 'debug': 16 case 'debug':
17 debug(message.message); 17 debug(message.message);
18 break; 18 break;
19 case 'finish': 19 case 'finish':
20 finishJSTest(); 20 finishJSTest();
21 break; 21 break;
22 } 22 }
23 }); 23 });
24 24
25 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123'); 25 window.onload = function() {
26 var iframe = document.getElementsByTagName('iframe')[0]; 26 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123');
27 iframe.focus(); 27 var iframe = document.getElementsByTagName('iframe')[0];
28 iframe.src = 'http://127.0.0.1:8080/security/resources/cross-frame-iframe-fo r-parent-isolated-world.html'; 28 iframe.focus();
29 iframe.src = 'http://127.0.0.1:8080/security/resources/cross-frame-iframe- for-parent-isolated-world.html';
30 }
29 } else { 31 } else {
30 testFailed('Test depends on LayoutTestController and must be run by DRT'); 32 testFailed('Test depends on LayoutTestController and must be run by DRT');
31 } 33 }
32 </script> 34 </script>
33 </body> 35 </body>
34 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698