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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-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 window.jsTestIsAsync = true; 9 window.jsTestIsAsync = true;
10 if (document.location.hostname == '127.0.0.1') { 10 if (document.location.hostname == '127.0.0.1') {
11 document.location.hostname = 'subdomain.example.test'; 11 document.location.hostname = 'subdomain.example.test';
12 } else { 12 } else {
13 description('Tests that isolated worlds do not allow cross-origin frame acce ss'); 13 description('Tests that isolated worlds do not allow cross-origin frame acce ss');
14 14
15 if (window.testRunner) { 15 if (window.testRunner) {
16 window.addEventListener('message', function(event) { 16 window.addEventListener('message', function(event) {
17 var message = JSON.parse(event.data); 17 var message = JSON.parse(event.data);
18 switch (message.type) { 18 switch (message.type) {
19 case 'debug': 19 case 'debug':
20 debug(message.message); 20 debug(message.message);
21 break; 21 break;
22 case 'finish': 22 case 'finish':
23 finishJSTest(); 23 finishJSTest();
24 break; 24 break;
25 } 25 }
26 }); 26 });
27 27
28 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123'); 28 window.onload = function() {
29 var iframe = document.getElementsByTagName('iframe')[0]; 29 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123') ;
30 iframe.focus(); 30 var iframe = document.getElementsByTagName('iframe')[0];
31 document.domain = 'example.test'; 31 iframe.focus();
32 iframe.src = 'http://subdomain.example.test:8000/security/resources/cros s-frame-iframe-for-parent-isolated-world.html'; 32 document.domain = 'example.test';
33 iframe.src = 'http://subdomain.example.test:8000/security/resources/cr oss-frame-iframe-for-parent-isolated-world.html';
34 }
33 } else { 35 } else {
34 testFailed('Test depends on LayoutTestController and must be run by DRT' ); 36 testFailed('Test depends on LayoutTestController and must be run by DRT' );
35 } 37 }
36 } 38 }
37 </script> 39 </script>
38 </body> 40 </body>
39 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698