| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="../resources/get-host-info.js"></script> | 4 <script src="../resources/get-host-info.js"></script> |
| 5 <script src="resources/test-helpers.js"></script> | 5 <script src="resources/test-helpers.js"></script> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 var host_info = get_host_info(); | 8 var host_info = get_host_info(); |
| 9 | 9 |
| 10 function worker_for_origins(origins) { | 10 function worker_for_origins(origins) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 .then(frame => new Promise(resolve => { | 110 .then(frame => new Promise(resolve => { |
| 111 var channel = new MessageChannel(); | 111 var channel = new MessageChannel(); |
| 112 frame.contentWindow.postMessage('ping', '*', [channel.port1]); | 112 frame.contentWindow.postMessage('ping', '*', [channel.port1]); |
| 113 channel.port2.onmessage = reply => resolve(reply.data); | 113 channel.port2.onmessage = reply => resolve(reply.data); |
| 114 })) | 114 })) |
| 115 .then(reply => { | 115 .then(reply => { |
| 116 assert_equals(reply, 'ping'); | 116 assert_equals(reply, 'ping'); |
| 117 }); | 117 }); |
| 118 }, 'Service Worker does not intercept navigations.'); | 118 }, 'Service Worker does not intercept navigations.'); |
| 119 | 119 |
| 120 promise_test(t => { |
| 121 var scope = 'simple.txt?fallback'; |
| 122 var remote_url = |
| 123 host_info.HTTPS_REMOTE_ORIGIN + '/serviceworker/resources/' + scope; |
| 124 return install_cross_origin_worker(t, worker_for_scopes(['']), scope) |
| 125 .then(() => fetch(remote_url)) |
| 126 .then(response => {}); |
| 127 }, 'Service Worker that fallback to network should not crash.'); |
| 128 |
| 120 </script> | 129 </script> |
| 121 </body> | 130 </body> |
| OLD | NEW |