Commit fa4bf5a6 authored by Han Leon's avatar Han Leon Committed by Commit Bot

[ServiceWorker] Fix an incorrect usage of assert_equals() in wpt test

This prototype is 'assert_equals(actual, expected, description)', we
should pass 'actual' and 'expected' in order, to make the failure
message be reasonable.

This CL just fixes
external/wpt/service-workers/service-worker/navigate-window.https.html.

BUG=

Change-Id: Ic11ec67f27f7a9a5ae289ddda4362af72b4737d4
Reviewed-on: https://chromium-review.googlesource.com/955282
Commit-Queue: Han Leon <leon.han@intel.com>
Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542048}
parent ca7bfcb8
This is a testharness.js-based test. This is a testharness.js-based test.
FAIL Clients.matchAll() should not show an old window as controlled after it navigates. assert_unreached: unexpected rejection: assert_equals: client should have expected frame type expected "top-level" but got "auxiliary" Reached unreachable code FAIL Clients.matchAll() should not show an old window as controlled after it navigates. assert_unreached: unexpected rejection: assert_equals: client should have expected frame type expected "auxiliary" but got "top-level" Reached unreachable code
FAIL Clients.matchAll() should not show an old window after it navigates. assert_unreached: unexpected rejection: assert_equals: client should have expected frame type expected "top-level" but got "auxiliary" Reached unreachable code FAIL Clients.matchAll() should not show an old window after it navigates. assert_unreached: unexpected rejection: assert_equals: client should have expected frame type expected "auxiliary" but got "top-level" Reached unreachable code
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -94,9 +94,9 @@ function validate_window(win, url, opts) { ...@@ -94,9 +94,9 @@ function validate_window(win, url, opts) {
resultList.sort(compare_urls); resultList.sort(compare_urls);
for (var i = 0; i < resultList.length; ++i) { for (var i = 0; i < resultList.length; ++i) {
assert_equals(expected[i].url, resultList[i].url, assert_equals(resultList[i].url, expected[i].url,
'client should have expected url'); 'client should have expected url');
assert_equals(expected[i].frameType, resultList[i].frameType, assert_equals(resultList[i].frameType, expected[i].frameType,
'client should have expected frame type'); 'client should have expected frame type');
} }
return win; return win;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment