| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-during-respond-with.html
 | 
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-during-respond-with.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-during-respond-with.html
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..fc56430133c6024115001d03337fb4d16b3f4a32
 | 
| --- /dev/null
 | 
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-during-respond-with.html
 | 
| @@ -0,0 +1,30 @@
 | 
| +<!DOCTYPE html>
 | 
| +<!-- This is in chromium/ because it relies on the internals API to terminate a
 | 
| +  service worker. -->
 | 
| +<title>Service Worker: Stopping the worker during responding to a fetch</title>
 | 
| +<script src="../../resources/testharness.js"></script>
 | 
| +<script src="../../resources/testharnessreport.js"></script>
 | 
| +<script src="../resources/test-helpers.js"></script>
 | 
| +<script>
 | 
| +
 | 
| +promise_test(t => {
 | 
| +    var SCOPE = 'resources/slow-fetch-and-stop-worker-iframe.html';
 | 
| +    var SCRIPT = 'resources/respondwith-fetch-worker.js';
 | 
| +    return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
 | 
| +      .then(r => {
 | 
| +          add_completion_callback(() => r.unregister());
 | 
| +          return wait_for_state(t, r.installing, 'activated');
 | 
| +        })
 | 
| +      .then(() => { return with_iframe(SCOPE, {auto_remove: true}); })
 | 
| +      .then(f => {
 | 
| +          return new Promise(resolve => {
 | 
| +              addEventListener('message', resolve);
 | 
| +              f.contentWindow.postMessage('run', '*');
 | 
| +            })
 | 
| +        })
 | 
| +      .then(e => {
 | 
| +          assert_equals(e.data, 'Rejected successfully');
 | 
| +        });
 | 
| +  }, 'Stopping the worker during responding fetch event cancels the request.');
 | 
| +
 | 
| +</script>
 | 
| 
 |