Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / fetch-event-respond-with-stops-propagation.html
blob20629ef05b0c7bd04d6e8e648ade9c02cefa3214
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharness-helpers.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script>
7 promise_test(function(t) {
8 var script =
9 'resources/fetch-event-respond-with-stops-propagation-worker.js';
10 var scope = 'resources/simple.html';
12 return service_worker_unregister_and_register(t, script, scope)
13 .then(function(registration) {
14 return wait_for_state(t, registration.installing, 'activated');
16 .then(function() {
17 return with_iframe(scope);
19 .then(function(frame) {
20 var channel = new MessageChannel();
21 var saw_message = new Promise(function(resolve) {
22 channel.port1.onmessage = function(e) { resolve(e.data); }
23 });
24 var worker = frame.contentWindow.navigator.serviceWorker.controller;
26 frame.remove();
27 worker.postMessage({port: channel.port2}, [channel.port2]);
28 return saw_message;
30 .then(function(message) {
31 assert_equals(message, 'PASS');
32 return service_worker_unregister_and_done(t, scope);
34 }, 'respondWith() invokes stopImmediatePropagation()');
35 </script>