OLD | NEW |
1 <body> | 1 <body> |
2 This tests an isolated script's ability to XHR a blob that is in its security or
igin, which is not the same as the document's security origin.<br> | 2 This tests an isolated script's ability to XHR a blob that is in its security or
igin, which is not the same as the document's security origin.<br> |
3 We pass if there are no console errors. | 3 We pass if there are no console errors. |
4 <script> | 4 <script> |
5 if (!window.testRunner) { | 5 if (!window.testRunner) { |
6 document.body.appendChild(document.createTextNode("This test requires window
.testRunner")); | 6 document.body.appendChild(document.createTextNode("This test requires window
.testRunner")); |
7 } else { | 7 } else { |
8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
9 testRunner.setIsolatedWorldSecurityOrigin(1, "chrome-extension://123"); | 9 // Can't use chrome-extension:// since it's an unknown scheme and |
10 testRunner.evaluateScriptInIsolatedWorld(1, "var xhr = new XMLHttpRequest();
xhr.open('GET', 'blob:chrome-extension://123/456789', false); xhr.send();"); | 10 // will fail validation in content/ land; so pretend that |
| 11 // gopher://adblskgasgf is a chrome extension origin. |
| 12 testRunner.setIsolatedWorldSecurityOrigin(1, "gopher://adblskgasgf"); |
| 13 testRunner.evaluateScriptInIsolatedWorld(1, "var xhr = new XMLHttpRequest();
xhr.open('GET', 'blob:gopher://adblskgasgf/456789', false); xhr.send();"); |
11 } | 14 } |
12 </script> | 15 </script> |
13 </body> | 16 </body> |
OLD | NEW |