Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/fetch-event.html |
| diff --git a/LayoutTests/http/tests/serviceworker/fetch-event.html b/LayoutTests/http/tests/serviceworker/fetch-event.html |
| index e5b9735f16e7dc8d614bc0c4c3a56c62bf8d3065..a0eb31b0f0cd74b393d525401506c4906b1408d5 100644 |
| --- a/LayoutTests/http/tests/serviceworker/fetch-event.html |
| +++ b/LayoutTests/http/tests/serviceworker/fetch-event.html |
| @@ -85,5 +85,25 @@ var worker = 'resources/fetch-event-test-worker.js'; |
| })); |
| } |
| }()); |
| + |
| +(function() { |
| + var t = async_test('Service Worker fetches other file in fetch event'); |
| + var scope = 'resources/simple.html?fetch'; |
| + service_worker_unregister_and_register(t, worker, scope, onRegister); |
| + |
| + function onRegister(sw) { |
| + sw.addEventListener('statechange', t.step_func(onStateChange)); |
| + } |
| + |
| + function onStateChange(event) { |
| + if (event.target.state != 'active') |
| + return; |
| + with_iframe(scope, t.step_func(function(frame) { |
| + assert_equals(frame.contentDocument.body.textContent, 'Here\'s a other html file.\n', |
|
tyoshino (SeeGerritForStatus)
2014/06/12 03:27:24
a -> an
horo
2014/06/12 05:21:16
Done.
|
| + 'Response should come from fetched other file'); |
| + service_worker_unregister_and_done(t, scope); |
| + })); |
| + } |
| +}()); |
| </script> |
| </body> |