| 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/test-helpers.js"></script> | 4 <script src="resources/test-helpers.js"></script> |
| 5 <body> | 5 <body> |
| 6 <script> | 6 <script> |
| 7 // Temporary measure to diagnose timeouts on Win XP. Let the W3C harness | 7 // Temporary measure to diagnose timeouts on Win XP. Let the W3C harness |
| 8 // timeout before run-webkit-tests does, so it can report the particular | 8 // timeout before run-webkit-tests does, so it can report the particular |
| 9 // test that timed out. | 9 // test that timed out. |
| 10 // FIXME: Remove after the cause of timeout is fixed. | 10 // FIXME: Remove after the cause of timeout is fixed. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 .catch(unreached_rejection(t)); | 98 .catch(unreached_rejection(t)); |
| 99 }, 'Service Worker responds to fetch event with null response body', propertie
s); | 99 }, 'Service Worker responds to fetch event with null response body', propertie
s); |
| 100 | 100 |
| 101 async_test(function(t) { | 101 async_test(function(t) { |
| 102 var scope = 'resources/simple.html?reject'; | 102 var scope = 'resources/simple.html?reject'; |
| 103 service_worker_unregister_and_register(t, worker, scope) | 103 service_worker_unregister_and_register(t, worker, scope) |
| 104 .then(function(reg) { return wait_for_activated(t, reg); }) | 104 .then(function(reg) { return wait_for_activated(t, reg); }) |
| 105 .then(function() { return with_iframe(scope); }) | 105 .then(function() { return with_iframe(scope); }) |
| 106 .then(function(frame) { | 106 .then(function(frame) { |
| 107 assert_equals(frame.contentDocument.body.textContent, | 107 assert_equals(frame.contentDocument.body.textContent, |
| 108 'Here\'s a simple html file.\n', | 108 '', |
| 109 'Response should come from fallback to native fetch'); | 109 'Response should be a NetworkError'); |
| 110 unload_iframe(frame); | 110 unload_iframe(frame); |
| 111 return service_worker_unregister_and_done(t, scope); | 111 return service_worker_unregister_and_done(t, scope); |
| 112 }) | 112 }) |
| 113 .catch(unreached_rejection(t)); | 113 .catch(unreached_rejection(t)); |
| 114 }, 'Service Worker rejects fetch event', properties); | 114 }, 'Service Worker rejects fetch event', properties); |
| 115 | 115 |
| 116 async_test(function(t) { | 116 async_test(function(t) { |
| 117 var scope = 'resources/simple.html?fetch'; | 117 var scope = 'resources/simple.html?fetch'; |
| 118 service_worker_unregister_and_register(t, worker, scope) | 118 service_worker_unregister_and_register(t, worker, scope) |
| 119 .then(function(reg) { return wait_for_activated(t, reg); }) | 119 .then(function(reg) { return wait_for_activated(t, reg); }) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 '(0)(1)[InvalidStateError](2)[InvalidStateError](0)', | 188 '(0)(1)[InvalidStateError](2)[InvalidStateError](0)', |
| 189 'Multiple calls of respondWith must throw InvalidStateErrors.'); | 189 'Multiple calls of respondWith must throw InvalidStateErrors.'); |
| 190 unload_iframe(frame); | 190 unload_iframe(frame); |
| 191 return service_worker_unregister_and_done(t, scope); | 191 return service_worker_unregister_and_done(t, scope); |
| 192 }) | 192 }) |
| 193 .catch(unreached_rejection(t)); | 193 .catch(unreached_rejection(t)); |
| 194 }, 'Multiple calls of respondWith must throw InvalidStateErrors', properties); | 194 }, 'Multiple calls of respondWith must throw InvalidStateErrors', properties); |
| 195 | 195 |
| 196 </script> | 196 </script> |
| 197 </body> | 197 </body> |
| OLD | NEW |