Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html

Issue 1045363004: ServiceWorker: Clean up clients-matchall-client-types.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/clients-matchall-client-types-shared-worker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/clients-matchall-client-types-shared-worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698