| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Cache Storage: Verify access in sandboxed iframes</title> | 2 <title>Cache Storage: Verify access in sandboxed iframes</title> |
| 3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_
worker/#cache-storage"> | 3 <link rel="help" href="https://slightlyoff.github.io/ServiceWorker/spec/service_
worker/#cache-storage"> |
| 4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script src="/resources/testharness-helpers.js"></script> | |
| 7 <script> | 6 <script> |
| 8 | 7 |
| 9 function load_iframe(src, sandbox) { | 8 function load_iframe(src, sandbox) { |
| 10 return new Promise(function(resolve, reject) { | 9 return new Promise(function(resolve, reject) { |
| 11 var iframe = document.createElement('iframe'); | 10 var iframe = document.createElement('iframe'); |
| 12 iframe.onload = function() { resolve(iframe); }; | 11 iframe.onload = function() { resolve(iframe); }; |
| 13 | 12 |
| 14 iframe.sandbox = sandbox; | 13 iframe.sandbox = sandbox; |
| 15 iframe.src = src; | 14 iframe.src = src; |
| 16 | 15 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 .then(function(message) { | 56 .then(function(message) { |
| 58 assert_equals( | 57 assert_equals( |
| 59 message.result, 'denied', | 58 message.result, 'denied', |
| 60 'Access should be denied if sandbox lacks allow-same-origin'); | 59 'Access should be denied if sandbox lacks allow-same-origin'); |
| 61 assert_equals(message.name, 'SecurityError', | 60 assert_equals(message.name, 'SecurityError', |
| 62 'Failure should be a SecurityError'); | 61 'Failure should be a SecurityError'); |
| 63 }); | 62 }); |
| 64 }, 'Sandboxed iframe without allow-same-origin is denied access'); | 63 }, 'Sandboxed iframe without allow-same-origin is denied access'); |
| 65 | 64 |
| 66 </script> | 65 </script> |
| OLD | NEW |