Closed Bug 1588671 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 19685 - [Import Maps] Import tests

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 19685 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19685
Details from upstream follow.

Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:

[Import Maps] Import tests

This CL imports post-#176 upstream reference implementation's tests
into wpt/import-maps/core-imported/, and
executes them under virtual/import-maps-without-builtin-modules/.

The pre-#176 existing tests are still left under
wpt/import-maps/imported/, which are excluded
by this CL from virtual/import-maps-without-builtin-modules.

To match with the expectation of post-#176 tests,
this CL modifies ImportMap::ToString() to output
strings (not single-element arrays) as right hand side.

https://github.com/WICG/import-maps/pull/176

Bug: 990561, 1010751
Change-Id: I652b35969d48e0147d07aa869ca3a97004f2f7a1

Reviewed-on: https://chromium-review.googlesource.com/1842928
WPT-Export-Revision: 45a84638ff8b0e83dda7cbb8b3c51361b90ff8d2

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 16 tests and 219 subtests

Firefox

OK : 14
FAIL : 166

Chrome

OK : 14
PASS : 6
FAIL : 160

Safari

OK : 14
PASS : 14

Existing tests that now have a worse result

/import-maps/imported/resolving-builtins.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

/import-maps/imported/resolving-not-yet-implemented.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

Other new tests that's don't pass

/import-maps/builtin-support.tentative/imported/parsing-schema.tentative.html
Mismatching the specifier map schema / should ignore entries where the address is not a string, array, or null: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Normalization / should normalize an import map without imports to have imports: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mismatching the specifier map schema / should throw if a scope's value is not an object: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Normalization / should normalize empty import maps to have imports and scopes keys: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Normalization / should normalize an import map without scopes to have scopes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mismatching the top-level schema / should throw if imports is a non-object: Firefox: FAIL, Chrome: PASS, Safari: MISSING
Normalization / should normalize addresses to arrays: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mismatching the specifier map schema / should ignore members of an address array that are not strings: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Mismatching the top-level schema / should throw if scopes is a non-object: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mismatching the top-level schema / should throw for top-level non-objects: Firefox: FAIL, Chrome: PASS, Safari: MISSING
Invalid JSON: Firefox: FAIL, Chrome: PASS, Safari: MISSING
Mismatching the specifier map schema / should ignore entries where the specifier key is an empty string: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mismatching the top-level schema / should ignore unspecified top-level entries: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/resolving-scopes.tentative.html
resolving-scopes: Firefox: MISSING, Chrome: MISSING, Safari: PASS

/import-maps/builtin-support.tentative/imported/resolving-not-yet-implemented.tentative.html
Fallbacks that are not [built-in, fetch scheme] / should fail for [built-in, built-in]: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Fallbacks that are not [built-in, fetch scheme] / should fail for [fetch scheme, fetch scheme]: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Fallbacks that are not [built-in, fetch scheme] / should fail for [built-in, fetch scheme, fetch scheme]: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/parsing-specifier-keys.tentative.html
Absolute URL specifier keys / Accept all absolute URL specifier keys even with fetch schemes as URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
parsing-specifier-keys: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Absolute URL specifier keys / should sort correctly (issue #181): Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/parsing-addresses.tentative.html
parsing-addresses: Firefox: MISSING, Chrome: MISSING, Safari: PASS

/import-maps/builtin-support.tentative/imported/parsing-specifier-keys.tentative.html
Absolute URL specifier keys / should parse built-in module specifier keys, including with a "/": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL specifier keys / should parse absolute URLs, treating unparseable ones as bare specifiers: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like specifier keys / should absolutize strings prefixed with ./, ../, or / into the corresponding URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL specifier keys / should only accept absolute URL specifier keys with fetch schemes, treating others as bare specifiers: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like specifier keys / should not absolutize strings prefixed with ./, ../, or / with a data: URL base: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Relative URL-like specifier keys / should treat percent-encoded variants of ./, ../, or / as bare specifiers: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like specifier keys / should absolutize the literal strings ./, ../, or / with no suffix: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/resolving-builtins.tentative.html
resolving-builtins: Firefox: MISSING, Chrome: MISSING, Safari: MISSING

/import-maps/imported/parsing-scope-keys.tentative.html
Absolute URL scope keys / should accept all absolute URL scope keys, with or without fetch schemes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
parsing-scope-keys: Firefox: MISSING, Chrome: MISSING, Safari: PASS

/import-maps/builtin-support.tentative/imported/parsing-addresses.tentative.html
Relative URL-like addresses / should accept the literal strings ./, ../, or / with no suffix: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL addresses / should only accept absolute URL addresses with fetch schemes inside arrays: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL addresses / should parse absolute URLs, ignoring unparseable ones: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Failing addresses: mismatched trailing slashes / should warn for the simple case: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like addresses / should ignore percent-encoded variants of ./, ../, or /: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Failing addresses: mismatched trailing slashes / should warn for a mismatch alongside non-mismatches in an array: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL addresses / should only accept absolute URL addresses with fetch schemes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Other invalid addresses / should ignore unprefixed strings that are not absolute URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Failing addresses: mismatched trailing slashes / should warn for a mismatch alone in an array: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like addresses / should not accept strings prefixed with ./, ../, or / for data: base URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Built-in module addresses / should ignore percent-encoded variants of the built-in module scheme: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Built-in module addresses / should allow built-in module URLs that contain "/" or "": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL addresses / should parse absolute URLs, ignoring unparseable ones inside arrays: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Built-in module addresses / should accept URLs using the built-in module scheme: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL-like addresses / should accept strings prefixed with ./, ../, or /: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/resolving.tentative.html
resolving: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Mapped using the "imports" key only (no scopes) / Overlapping entries with trailing slashes / should favor the most-specific key: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Tricky specifiers / should fail for attempting to get a module if only a trailing-slash version is present: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / should deal with data: URL bases: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should parse absolute non-fetch-scheme URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Overlapping entries with trailing slashes / should favor the most-specific key when there are no mappings for less-specific keys: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/builtin-support.tentative/imported/resolving-scopes.tentative.html
Mapped using scope instead of "imports" / Exact vs. prefix based matching / should match correctly when only a prefix match is in the map: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Relative URL scope keys / should resolve a ./ scope using the import map URL's directory: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Package-like scenarios / should fallback to "imports": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Relative URL scope keys / should resolve an empty string scope using the import map URL: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / The scope inheritance example from the README / should fall back to "imports" when none match: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Package-like scenarios / should still fail for package-like specifiers that are not declared: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Exact vs. prefix based matching / should match correctly when only an exact match is in the map: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Package-like scenarios / should apply best scope match: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / The scope inheritance example from the README / should use an indirect scope override: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / The scope inheritance example from the README / should use a direct scope override: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Mapped using scope instead of "imports" / Package-like scenarios / should resolve scoped: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Exact vs. prefix based matching / should match correctly when both are in the map: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / should fail when the mapping is to an empty array: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using scope instead of "imports" / Relative URL scope keys / should resolve a ../ scope using the import map URL's directory: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/imported/parsing-schema.tentative.html
Mismatching the specifier map schema / should ignore entries where the address is not a string: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
parsing-schema: Firefox: MISSING, Chrome: MISSING, Safari: PASS

/import-maps/imported/resolving-not-yet-implemented.tentative.html
resolving-not-yet-implemented: Firefox: MISSING, Chrome: MISSING, Safari: MISSING

/import-maps/builtin-support.tentative/imported/resolving-builtins.tentative.html
Remapping to built-in modules / should fail when remapping to "std:blank/": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping built-in module specifiers / should remap built-in modules with slashes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping built-in module specifiers / should remap built-in modules: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping to built-in modules / should remap to "std:blank" for URL-like specifiers: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping built-in module specifiers / should remap built-in modules with slashes and fallbacks: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping to built-in modules / should fail when remapping to "std:none": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping to built-in modules / should remap to "std:blank/for-testing": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping to built-in modules / should remap to "std:blank": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Fallbacks with built-in module addresses / should fall back past "std:none": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Remapping built-in module specifiers / should remap built-in modules with fallbacks: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped built-in module specifiers / should resolve "std:blank" to "std:blank": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped built-in module specifiers / should error resolving "std:none": Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Fallbacks with built-in module addresses / should resolve to "std:blank": Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/builtin-support.tentative/imported/parsing-scope-keys.tentative.html
Relative URL scope keys / should work with /s, ?s, and #s: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL scope keys / should ignore relative URL scope keys when the base URL is a data: URL: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL scope keys / should work with ./, ../, and / prefixes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL scope keys / should work with / suffixes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL scope keys / should work with an empty string scope key: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL scope keys / should only accept absolute URL scope keys with fetch schemes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Relative URL scope keys / should deduplicate based on URL parsing rules: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Absolute URL scope keys / should parse absolute URL scope keys, ignoring unparseable ones: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Relative URL scope keys / should work with no prefix: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

/import-maps/builtin-support.tentative/imported/resolving.tentative.html
Mapped using the "imports" key only (no scopes) / Package-like scenarios / should fail for package submodules that map to nowhere: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Tricky specifiers / should work for explicitly-mapped specifiers that happen to have a slash: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should parse absolute fetch-scheme URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / should fail when the mapping is to an empty array: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / URL-like specifiers / should remap to other URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Package-like scenarios / should work for package submodules: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
.tentative/imported/: Firefox: MISSING, Chrome: MISSING, Safari: PASS
Unmapped / should resolve ./ specifiers as URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Overlapping entries with trailing slashes / should favor the most-specific key when empty arrays are involved for less-specific keys: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / URL-like specifiers / should remap URLs that are just composed from / and .: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / URL-like specifiers / should fail for URLs that remap to empty arrays: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / URL-like specifiers / should remap URLs that are prefix-matched by keys with trailing slashes: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Tricky specifiers / should fail for attempting to get a submodule of something not declared with a trailing slash: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / URL-like specifiers / should use the last entry's address when URL-like specifiers parse to the same absolute URL: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should fail for strings not parseable as absolute URLs and not starting with ./ ../ or /: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Package-like scenarios / should work for package main modules: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should resolve ../ specifiers as URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Overlapping entries with trailing slashes / should favor the most-specific key (no empty arrays): Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should resolve / specifiers as URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Tricky specifiers / should work when the specifier has punctuation: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Unmapped / should fail for absolute non-fetch-scheme URLs: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Package-like scenarios / should still fail for package modules that are not declared: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Overlapping entries with trailing slashes / should favor the most-specific key when empty arrays are involved for more-specific keys: Firefox: FAIL, Chrome: FAIL, Safari: MISSING
Mapped using the "imports" key only (no scopes) / Package-like scenarios / should work for package names that end in a slash by just passing through: Firefox: FAIL, Chrome: FAIL, Safari: MISSING

Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfd9e691d824
[wpt PR 19685] - [Import Maps] Import tests, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/40d6c65045ef
[wpt PR 19685] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.