| Index: LayoutTests/http/tests/navigatorconnect/connect-from-worker.html
|
| diff --git a/LayoutTests/http/tests/navigatorconnect/connect-from-worker.html b/LayoutTests/http/tests/navigatorconnect/connect-from-worker.html
|
| index 83119328b010205b6c1117715381fbc1db75af44..adfe9346cb265cf35a8ae2a683a06865490d0f9e 100644
|
| --- a/LayoutTests/http/tests/navigatorconnect/connect-from-worker.html
|
| +++ b/LayoutTests/http/tests/navigatorconnect/connect-from-worker.html
|
| @@ -7,36 +7,12 @@
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <script src="../../resources/testharness-helpers.js"></script>
|
| <script src="../serviceworker/resources/test-helpers.js"></script>
|
| +<script src="resources/test-helpers.js"></script>
|
| <script src="resources/connect-tests.js"></script>
|
| <body>
|
| <script>
|
| var sw_scope = 'resources/service-worker-scope' + window.location.pathname;
|
|
|
| -// Method that behaves similarly to navigator.connect, but the actual connect
|
| -// call is made from a worker.
|
| -function connect_from_worker(t, service) {
|
| - // |service| is a relative URL, but for this to work from the worker it needs
|
| - // an absolute URL.
|
| - var target_url = location.origin + base_path() + service;
|
| - var worker = new Worker('resources/connect-helper.js');
|
| - var channel = new MessageChannel();
|
| - worker.postMessage
|
| - ({connect: target_url, port: channel.port2}, [channel.port2]);
|
| - return new Promise(function(resolve, reject) {
|
| - var got_reply = false;
|
| - channel.port1.onmessage = t.step_func(function(event) {
|
| - assert_false(got_reply);
|
| - assert_true('success' in event.data);
|
| - assert_true('result' in event.data);
|
| - got_reply = true;
|
| - if (event.data.success)
|
| - resolve(event.data.result);
|
| - else
|
| - reject(event.data.result);
|
| - });
|
| - });
|
| -}
|
| -
|
| run_connect_tests(connect_from_worker);
|
| </script>
|
| -</body>
|
| +</body>
|
|
|