Commit 7c717475 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[Import Maps] WPT: Do not check warnings

Because there are no ways to check console warnings from JavaScript.

Bug: 990561
Change-Id: I5f3827c4383e35c74521148aa2e3b912b52a5f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1843507
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarDomenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706592}
parent 7863e435
This is a testharness.js-based test.
PASS Invalid JSON
PASS Mismatching the top-level schema / should throw for top-level non-objects
PASS Mismatching the top-level schema / should throw if imports is a non-object
PASS Mismatching the top-level schema / should throw if scopes is a non-object
FAIL Mismatching the top-level schema / should ignore unspecified top-level entries assert_object_equals: expected property "0" missing
PASS Mismatching the specifier map schema / should ignore entries where the address is not a string, array, or null
PASS Mismatching the specifier map schema / should ignore entries where the specifier key is an empty string
PASS Mismatching the specifier map schema / should ignore members of an address array that are not strings
PASS Mismatching the specifier map schema / should throw if a scope's value is not an object
PASS Normalization / should normalize empty import maps to have imports and scopes keys
PASS Normalization / should normalize an import map without imports to have imports
PASS Normalization / should normalize an import map without scopes to have scopes
PASS Normalization / should normalize addresses to arrays
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Relative URL scope keys / should work with no prefix
PASS Relative URL scope keys / should work with ./, ../, and / prefixes
PASS Relative URL scope keys / should work with /s, ?s, and #s
PASS Relative URL scope keys / should work with an empty string scope key
PASS Relative URL scope keys / should work with / suffixes
PASS Relative URL scope keys / should deduplicate based on URL parsing rules
FAIL Absolute URL scope keys / should only accept absolute URL scope keys with fetch schemes assert_object_equals: expected property "0" missing
FAIL Absolute URL scope keys / should parse absolute URL scope keys, ignoring unparseable ones assert_object_equals: expected property "0" missing
FAIL Absolute URL scope keys / should ignore relative URL scope keys when the base URL is a data: URL assert_object_equals: expected property "0" missing
Harness: the test ran to completion.
...@@ -38,13 +38,7 @@ exports.expectWarnings = (input, baseURL, output, warnings = []) => { ...@@ -38,13 +38,7 @@ exports.expectWarnings = (input, baseURL, output, warnings = []) => {
}; };
function testWarningHandler(expectedWarnings) { function testWarningHandler(expectedWarnings) {
const warnings = []; // We don't check warnings on WPT tests, because there are no
const { warn } = console; // ways to catch console warnings from JavaScript.
console.warn = warning => { return () => {};
warnings.push(warning);
};
return () => {
console.warn = warn;
expect(warnings).toEqual(expectedWarnings);
};
} }
...@@ -3,7 +3,7 @@ PASS Invalid JSON ...@@ -3,7 +3,7 @@ PASS Invalid JSON
PASS Mismatching the top-level schema / should throw for top-level non-objects PASS Mismatching the top-level schema / should throw for top-level non-objects
PASS Mismatching the top-level schema / should throw if imports is a non-object PASS Mismatching the top-level schema / should throw if imports is a non-object
PASS Mismatching the top-level schema / should throw if scopes is a non-object PASS Mismatching the top-level schema / should throw if scopes is a non-object
FAIL Mismatching the top-level schema / should ignore unspecified top-level entries assert_object_equals: expected property "0" missing PASS Mismatching the top-level schema / should ignore unspecified top-level entries
FAIL Mismatching the specifier map schema / should ignore entries where the address is not a string, array, or null assert_equals: expected "{\"bar\":[\"https://example.com/\"]}" but got "{}" FAIL Mismatching the specifier map schema / should ignore entries where the address is not a string, array, or null assert_equals: expected "{\"bar\":[\"https://example.com/\"]}" but got "{}"
PASS Mismatching the specifier map schema / should ignore entries where the specifier key is an empty string PASS Mismatching the specifier map schema / should ignore entries where the specifier key is an empty string
FAIL Mismatching the specifier map schema / should ignore members of an address array that are not strings assert_equals: expected "{\"bar\":[\"https://example.com/\"],\"foo\":[\"https://example.com/\"]}" but got "{}" FAIL Mismatching the specifier map schema / should ignore members of an address array that are not strings assert_equals: expected "{\"bar\":[\"https://example.com/\"],\"foo\":[\"https://example.com/\"]}" but got "{}"
......
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