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

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

Issue 2662953002: Fix two tests in http/tests/serviceworker/ to handle the correct behavior of undefined in arrays, a… (Closed)
Patch Set: whoops, fix TestExpectations file again Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
index fa3b56f22ddccd2b30b231d6ddf2c5c431cfae11..a11a3cc8293668decd76e861fbd4d6405cd8a6ce 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-matchall-client-types.html
@@ -16,11 +16,11 @@ var expected_with_window = [
['visible', true, new URL(iframe_url, location).href, 'nested']
];
var expected_with_shared_worker = [
- [,,new URL(shared_worker_url, location).href, 'none']
+ [undefined, undefined, new URL(shared_worker_url, location).href, 'none']
];
var expected_with_all = [
['visible', true, new URL(iframe_url, location).href, 'nested'],
- [,,new URL(shared_worker_url, location).href, 'none']
+ [undefined, undefined, new URL(shared_worker_url, location).href, 'none']
];
function test_matchall(frame, expected, query_options) {
@@ -28,15 +28,14 @@ function test_matchall(frame, expected, query_options) {
frame.focus();
return new Promise(function(resolve, reject) {
var channel = new MessageChannel();
- channel.port1.onmessage = function(e) {
- 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();
- };
+ channel.port1.onmessage = function(e) { resolve(e.data); };
frame.contentWindow.navigator.serviceWorker.controller.postMessage(
{port:channel.port2, options:query_options},
[channel.port2]);
+ }).then(function(data) {
+ assert_equals(data.length, expected.length);
+ for (var i = 0; i < data.length; i++)
+ assert_array_equals(data[i], expected[i]);
});
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/clients-get-client-types.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698