| Index: LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
|
| diff --git a/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html b/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
|
| index 70193f091fb931d0a9e2d826d67ef0442aa7a6cc..5a0ea579a14819cd2077b1b1f0e9ef55cc2ae120 100644
|
| --- a/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
|
| +++ b/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
|
| @@ -6,21 +6,21 @@
|
| <script>
|
| var scope = 'resources/clients-matchall-client-types';
|
| var iframe_url = scope + '-iframe.html';
|
| -var worker_url = scope + '-worker.js';
|
| +var shared_worker_url = scope + '-shared-worker.js';
|
|
|
| /* visibilityState, focused, url, frameType */
|
| var expected_without_type = [
|
| - ['visible', true, new URL(iframe_url, location).toString(), 'nested']
|
| + ['visible', true, new URL(iframe_url, location).href, 'nested']
|
| ];
|
| var expected_with_window = [
|
| - ['visible', true, new URL(iframe_url, location).toString(), 'nested']
|
| + ['visible', true, new URL(iframe_url, location).href, 'nested']
|
| ];
|
| var expected_with_shared_worker = [
|
| - [,,new URL(worker_url, location).toString(), 'none']
|
| + [,,new URL(shared_worker_url, location).href, 'none']
|
| ];
|
| var expected_with_all = [
|
| - ['visible', true, new URL(iframe_url, location).toString(), 'nested'],
|
| - [,,new URL(worker_url, location).toString(), 'none']
|
| + ['visible', true, new URL(iframe_url, location).href, 'nested'],
|
| + [,,new URL(shared_worker_url, location).href, 'none']
|
| ];
|
|
|
| function test_matchall(frame, expected, query_options) {
|
| @@ -33,7 +33,7 @@ function test_matchall(frame, expected, query_options) {
|
| assert_equals(e.data.length, expected.length);
|
| for (var i = 0; i < e.data.length; i++)
|
| assert_array_equals(e.data[i], expected[i]);
|
| - resolve(frame);
|
| + resolve();
|
| };
|
| frame.contentWindow.navigator.serviceWorker.controller.postMessage(
|
| {port:channel.port2, options:query_options},
|
| @@ -52,26 +52,22 @@ promise_test(function(t) {
|
| .then(function(f) {
|
| frame = f;
|
| return new Promise(function(resolve, reject) {
|
| - var w = new SharedWorker(worker_url);
|
| - w.port.onmessage = function(e) {
|
| - resolve(e.data);
|
| - }
|
| + var w = new SharedWorker(shared_worker_url);
|
| + w.port.onmessage = resolve;
|
| });
|
| })
|
| .then(function() {
|
| - return test_matchall(frame, expected_without_type, {});
|
| + return test_matchall(frame, expected_without_type, {});
|
| })
|
| .then(function() {
|
| - return test_matchall(frame, expected_with_window,
|
| - {type:"window"});
|
| + return test_matchall(frame, expected_with_window, {type:'window'});
|
| })
|
| .then(function() {
|
| - return test_matchall(frame, expected_with_shared_worker,
|
| - {type:"sharedworker"});
|
| + return test_matchall(frame, expected_with_shared_worker,
|
| + {type:'sharedworker'});
|
| })
|
| .then(function() {
|
| - return test_matchall(frame, expected_with_all,
|
| - {type:"all"});
|
| + return test_matchall(frame, expected_with_all, {type:'all'});
|
| })
|
| .then(function() {
|
| frame.remove();
|
|
|