| 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..a61d2965b5b44e0f087ddba634ee5abd2f39b875 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 an other html file.\n',
|
| + 'Response should come from fetched other file');
|
| + service_worker_unregister_and_done(t, scope);
|
| + }));
|
| + }
|
| +}());
|
| </script>
|
| </body>
|
|
|