From 970811885026f439b978a3cbb3d8169b0b0dadba Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sun, 27 Oct 2019 00:15:51 +0000 Subject: [PATCH] Bug 1586319 [wpt PR 19517] - [Import Maps] Split out WPT tests related to built-in modules, a=testonly Automatic update from web-platform-tests [Import Maps] Split out WPT tests related to built-in modules This CL splits some WPT tests into - wpt/import-maps/core/ that tests the core features after https://github.com/WICG/import-maps/pull/176, and - wpt/import-maps/builtin-support.tentative/ that requires pre-#176 built-in module and fallback support, in order to test builtin- and non-builtin- versions easier. Bug: 1010751 Change-Id: I9f4793f64fa0ad267fa1d4e43d5597d94a5cc541 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839428 Commit-Queue: Hiroshige Hayashizaki Reviewed-by: Domenic Denicola Cr-Commit-Position: refs/heads/master{#706510} -- wpt-commits: bc0ed740d1afbd88607aab23ab23ddc81d685073 wpt-pr: 19517 UltraBlame original commit: 3427c97a50a3fba2fc1411e64180199bef3dcc87 --- .../@std/__dir__.headers | 0 .../@std/blank | 0 .../{ => builtin-support.tentative}/@std/none | 0 .../bare.sub.tentative.html | 439 ++++++++++++++ .../bare/__dir__.headers | 0 .../bare/blank | 0 .../{ => builtin-support.tentative}/bare/none | 0 .../bare/std-blank | 0 .../bare/std-none | 0 .../builtin-empty.tentative.html | 8 + .../builtin-import-scheme.tentative.html | 3 + .../builtin.tentative.html | 3 + .../data.sub.tentative.html | 536 ++++++++++++++++++ .../fallback-disallowed.sub.tentative.html | 23 + .../fallback.sub.tentative.html | 15 + .../http.sub.tentative.html} | 368 +++++------- .../static-import.js | 0 .../import-maps/core/bare.sub.tentative.html | 483 ++++++++++++++++ .../import-maps/core/bare/__dir__.headers | 7 + .../tests/import-maps/{ => core}/bare/bare | 0 .../{ => core}/bare/cross-origin-bare | 0 .../tests/import-maps/{ => core}/bare/to-bare | 0 .../tests/import-maps/{ => core}/bare/to-data | 0 .../{ => core}/data.sub.tentative.html | 304 +--------- .../{ => core}/http.sub.tentative.html | 352 +----------- .../{ => core}/module-map-key.tentative.html | 4 + .../tests/import-maps/core/static-import.js | 12 + .../import-maps/resources/test-helper.js | 5 - 28 files changed, 1676 insertions(+), 886 deletions(-) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/@std/__dir__.headers (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/@std/blank (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/@std/none (100%) create mode 100644 testing/web-platform/tests/import-maps/builtin-support.tentative/bare.sub.tentative.html rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/bare/__dir__.headers (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/bare/blank (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/bare/none (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/bare/std-blank (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/bare/std-none (100%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/builtin-empty.tentative.html (98%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/builtin-import-scheme.tentative.html (99%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/builtin.tentative.html (99%) create mode 100644 testing/web-platform/tests/import-maps/builtin-support.tentative/data.sub.tentative.html rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/fallback-disallowed.sub.tentative.html (98%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/fallback.sub.tentative.html (99%) rename testing/web-platform/tests/import-maps/{bare.sub.tentative.html => builtin-support.tentative/http.sub.tentative.html} (72%) rename testing/web-platform/tests/import-maps/{ => builtin-support.tentative}/static-import.js (100%) create mode 100644 testing/web-platform/tests/import-maps/core/bare.sub.tentative.html create mode 100644 testing/web-platform/tests/import-maps/core/bare/__dir__.headers rename testing/web-platform/tests/import-maps/{ => core}/bare/bare (100%) rename testing/web-platform/tests/import-maps/{ => core}/bare/cross-origin-bare (100%) rename testing/web-platform/tests/import-maps/{ => core}/bare/to-bare (100%) rename testing/web-platform/tests/import-maps/{ => core}/bare/to-data (100%) rename testing/web-platform/tests/import-maps/{ => core}/data.sub.tentative.html (65%) rename testing/web-platform/tests/import-maps/{ => core}/http.sub.tentative.html (63%) rename testing/web-platform/tests/import-maps/{ => core}/module-map-key.tentative.html (99%) create mode 100644 testing/web-platform/tests/import-maps/core/static-import.js diff --git a/testing/web-platform/tests/import-maps/@std/__dir__.headers b/testing/web-platform/tests/import-maps/builtin-support.tentative/@std/__dir__.headers similarity index 100% rename from testing/web-platform/tests/import-maps/@std/__dir__.headers rename to testing/web-platform/tests/import-maps/builtin-support.tentative/@std/__dir__.headers diff --git a/testing/web-platform/tests/import-maps/@std/blank b/testing/web-platform/tests/import-maps/builtin-support.tentative/@std/blank similarity index 100% rename from testing/web-platform/tests/import-maps/@std/blank rename to testing/web-platform/tests/import-maps/builtin-support.tentative/@std/blank diff --git a/testing/web-platform/tests/import-maps/@std/none b/testing/web-platform/tests/import-maps/builtin-support.tentative/@std/none similarity index 100% rename from testing/web-platform/tests/import-maps/@std/none rename to testing/web-platform/tests/import-maps/builtin-support.tentative/@std/none diff --git a/testing/web-platform/tests/import-maps/builtin-support.tentative/bare.sub.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare.sub.tentative.html new file mode 100644 index 0000000000000..1117c5dbc2d0a --- /dev/null +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare.sub.tentative.html @@ -0,0 +1,439 @@ +< +! +DOCTYPE +html +> +< +meta +name += +" +timeout +" +content += +" +long +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +. +. +/ +resources +/ +test +- +helper +. +js +" +> +< +/ +script +> +< +script +> +/ +/ +" +bare +/ +. +. +. +" +( +i +. +e +. +without +leading +" +. +/ +" +) +are +bare +specifiers +/ +/ +( +not +relative +paths +) +. +/ +/ +/ +/ +Discussions +about +notations +for +builtin +modules +are +ongoing +e +. +g +. +/ +/ +https +: +/ +/ +github +. +com +/ +tc39 +/ +proposal +- +javascript +- +standard +- +library +/ +issues +/ +12 +/ +/ +Currently +the +tests +expects +two +notations +are +accepted +. +/ +/ +TODO +: +Once +the +discussions +converge +update +the +tests +. +const +importMap += +{ +" +imports +" +: +{ +" +bare +/ +std +- +blank +" +: +" +std +: +blank +" +" +bare +/ +blank +" +: +" +std +/ +blank +" +" +bare +/ +std +- +none +" +: +" +std +: +none +" +" +bare +/ +none +" +: +" +std +/ +none +" +} +} +; +const +tests += +{ +/ +/ +Arrays +of +expected +results +for +: +/ +/ +- +< +script +src +type += +" +module +" +> +/ +/ +- +< +script +src +> +( +classic +script +) +/ +/ +- +static +import +and +/ +/ +- +dynamic +import +. +/ +/ +Currently +Chromium +' +s +implementation +resolves +import +maps +as +a +part +of +/ +/ +specifier +resolution +and +thus +failure +in +import +map +resolution +causes +/ +/ +a +parse +error +not +fetch +error +. +Therefore +we +use +Result +. +PARSE_ERROR +/ +/ +below +. +https +: +/ +/ +crbug +. +com +/ +928435 +/ +/ +Bare +to +built +- +in +. +" +bare +/ +std +- +blank +" +: +[ +Result +. +URL +Result +. +URL +Result +. +BUILTIN +Result +. +BUILTIN +] +" +bare +/ +blank +" +: +[ +Result +. +URL +Result +. +URL +Result +. +BUILTIN +Result +. +BUILTIN +] +" +bare +/ +std +- +none +" +: +[ +Result +. +URL +Result +. +URL +Result +. +PARSE_ERROR +Result +. +PARSE_ERROR +] +" +bare +/ +none +" +: +[ +Result +. +URL +Result +. +URL +Result +. +PARSE_ERROR +Result +. +PARSE_ERROR +] +} +; +doTests +( +importMap +null +tests +) +; +< +/ +script +> +< +body +> diff --git a/testing/web-platform/tests/import-maps/bare/__dir__.headers b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare/__dir__.headers similarity index 100% rename from testing/web-platform/tests/import-maps/bare/__dir__.headers rename to testing/web-platform/tests/import-maps/builtin-support.tentative/bare/__dir__.headers diff --git a/testing/web-platform/tests/import-maps/bare/blank b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare/blank similarity index 100% rename from testing/web-platform/tests/import-maps/bare/blank rename to testing/web-platform/tests/import-maps/builtin-support.tentative/bare/blank diff --git a/testing/web-platform/tests/import-maps/bare/none b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare/none similarity index 100% rename from testing/web-platform/tests/import-maps/bare/none rename to testing/web-platform/tests/import-maps/builtin-support.tentative/bare/none diff --git a/testing/web-platform/tests/import-maps/bare/std-blank b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare/std-blank similarity index 100% rename from testing/web-platform/tests/import-maps/bare/std-blank rename to testing/web-platform/tests/import-maps/builtin-support.tentative/bare/std-blank diff --git a/testing/web-platform/tests/import-maps/bare/std-none b/testing/web-platform/tests/import-maps/builtin-support.tentative/bare/std-none similarity index 100% rename from testing/web-platform/tests/import-maps/bare/std-none rename to testing/web-platform/tests/import-maps/builtin-support.tentative/bare/std-none diff --git a/testing/web-platform/tests/import-maps/builtin-empty.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-empty.tentative.html similarity index 98% rename from testing/web-platform/tests/import-maps/builtin-empty.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-empty.tentative.html index 91a09848eaece..f21dcf4a718db 100644 --- a/testing/web-platform/tests/import-maps/builtin-empty.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-empty.tentative.html @@ -42,6 +42,9 @@ src = " +. +. +/ resources / test @@ -69,6 +72,7 @@ { " . +. / resources / @@ -93,6 +97,7 @@ ] " . +. / resources / @@ -118,6 +123,7 @@ " " . +. / resources / @@ -285,6 +291,7 @@ ] " . +. / resources / @@ -317,6 +324,7 @@ ] " . +. / resources / diff --git a/testing/web-platform/tests/import-maps/builtin-import-scheme.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-import-scheme.tentative.html similarity index 99% rename from testing/web-platform/tests/import-maps/builtin-import-scheme.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-import-scheme.tentative.html index 74c61dde5f303..a0765db2ce6fc 100644 --- a/testing/web-platform/tests/import-maps/builtin-import-scheme.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin-import-scheme.tentative.html @@ -42,6 +42,9 @@ src = " +. +. +/ resources / test diff --git a/testing/web-platform/tests/import-maps/builtin.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin.tentative.html similarity index 99% rename from testing/web-platform/tests/import-maps/builtin.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/builtin.tentative.html index 583e3c41dea62..ef5c1772d410a 100644 --- a/testing/web-platform/tests/import-maps/builtin.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/builtin.tentative.html @@ -42,6 +42,9 @@ src = " +. +. +/ resources / test diff --git a/testing/web-platform/tests/import-maps/builtin-support.tentative/data.sub.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/data.sub.tentative.html new file mode 100644 index 0000000000000..a49d70dc82844 --- /dev/null +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/data.sub.tentative.html @@ -0,0 +1,536 @@ +< +! +DOCTYPE +html +> +< +meta +name += +" +timeout +" +content += +" +long +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +. +. +/ +resources +/ +test +- +helper +. +js +" +> +< +/ +script +> +< +script +> +/ +/ +" +bare +/ +. +. +. +" +( +i +. +e +. +without +leading +" +. +/ +" +) +are +bare +specifiers +/ +/ +( +not +relative +paths +) +. +/ +/ +/ +/ +Discussions +about +notations +for +builtin +modules +are +ongoing +e +. +g +. +/ +/ +https +: +/ +/ +github +. +com +/ +tc39 +/ +proposal +- +javascript +- +standard +- +library +/ +issues +/ +12 +/ +/ +Currently +the +tests +expects +two +notations +are +accepted +. +/ +/ +TODO +: +Once +the +discussions +converge +update +the +tests +. +const +importMap += +{ +" +imports +" +: +{ +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +std +- +blank +' +) +" +: +" +std +: +blank +" +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +blank +' +) +" +: +" +std +/ +blank +" +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +std +- +none +' +) +" +: +" +std +: +none +" +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +none +' +) +" +: +" +std +/ +none +" +} +} +; +const +tests += +{ +/ +/ +Arrays +of +expected +results +for +: +/ +/ +- +< +script +src +type += +" +module +" +> +/ +/ +- +< +script +src +> +( +classic +script +) +/ +/ +- +static +import +and +/ +/ +- +dynamic +import +. +/ +/ +Currently +Chromium +' +s +implementation +resolves +import +maps +as +a +part +of +/ +/ +specifier +resolution +and +thus +failure +in +import +map +resolution +causes +/ +/ +a +parse +error +not +fetch +error +. +Therefore +we +use +Result +. +PARSE_ERROR +/ +/ +below +. +https +: +/ +/ +crbug +. +com +/ +928435 +/ +/ +data +: +to +built +- +in +. +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +std +- +blank +' +) +" +: +[ +Result +. +URL +Result +. +URL +Result +. +BUILTIN +Result +. +BUILTIN +] +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +blank +' +) +" +: +[ +Result +. +URL +Result +. +URL +Result +. +BUILTIN +Result +. +BUILTIN +] +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +std +- +none +' +) +" +: +[ +Result +. +URL +Result +. +URL +Result +. +PARSE_ERROR +Result +. +PARSE_ERROR +] +" +data +: +text +/ +javascript +log +. +push +( +' +data +: +none +' +) +" +: +[ +Result +. +URL +Result +. +URL +Result +. +PARSE_ERROR +Result +. +PARSE_ERROR +] +} +; +doTests +( +importMap +null +tests +) +; +< +/ +script +> +< +body +> diff --git a/testing/web-platform/tests/import-maps/fallback-disallowed.sub.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/fallback-disallowed.sub.tentative.html similarity index 98% rename from testing/web-platform/tests/import-maps/fallback-disallowed.sub.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/fallback-disallowed.sub.tentative.html index 0b4ae3e3f6828..a2e650a4005f6 100644 --- a/testing/web-platform/tests/import-maps/fallback-disallowed.sub.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/fallback-disallowed.sub.tentative.html @@ -55,6 +55,9 @@ src = " +. +. +/ resources / test @@ -205,6 +208,7 @@ : " . +. / resources / @@ -222,6 +226,7 @@ " " . +. / resources / @@ -245,6 +250,7 @@ [ " . +. / resources / @@ -272,6 +278,7 @@ ] " . +. / resources / @@ -304,6 +311,7 @@ " " . +. / resources / @@ -324,6 +332,7 @@ ] " . +. / resources / @@ -356,6 +365,7 @@ " " . +. / resources / @@ -376,6 +386,7 @@ ] " . +. / resources / @@ -461,6 +472,7 @@ ] " . +. / resources / @@ -546,6 +558,7 @@ ] " . +. / resources / @@ -583,6 +596,7 @@ " " . +. / resources / @@ -609,6 +623,7 @@ ] " . +. / resources / @@ -641,6 +656,7 @@ " " . +. / resources / @@ -672,6 +688,7 @@ ] " . +. / resources / @@ -695,6 +712,7 @@ [ " . +. / resources / @@ -716,6 +734,7 @@ " " . +. / resources / @@ -738,6 +757,7 @@ ] " . +. / resources / @@ -770,6 +790,7 @@ " " . +. / resources / @@ -792,6 +813,7 @@ ] " . +. / resources / @@ -832,6 +854,7 @@ " " . +. / resources / diff --git a/testing/web-platform/tests/import-maps/fallback.sub.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/fallback.sub.tentative.html similarity index 99% rename from testing/web-platform/tests/import-maps/fallback.sub.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/fallback.sub.tentative.html index e022afcf2dead..68a1875982dde 100644 --- a/testing/web-platform/tests/import-maps/fallback.sub.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/fallback.sub.tentative.html @@ -55,6 +55,9 @@ src = " +. +. +/ resources / test @@ -206,6 +209,7 @@ { " . +. / resources / @@ -230,6 +234,7 @@ " " . +. / resources / @@ -248,6 +253,7 @@ ] " . +. / resources / @@ -272,6 +278,7 @@ " " . +. / resources / @@ -498,6 +505,7 @@ ] " . +. / resources / @@ -524,6 +532,7 @@ " " . +. / resources / @@ -544,6 +553,7 @@ ] " . +. / resources / @@ -570,6 +580,7 @@ " " . +. / resources / @@ -889,6 +900,7 @@ . " . +. / resources / @@ -921,6 +933,7 @@ ] " . +. / resources / @@ -1079,6 +1092,7 @@ ] " . +. / resources / @@ -1113,6 +1127,7 @@ ] " . +. / resources / diff --git a/testing/web-platform/tests/import-maps/bare.sub.tentative.html b/testing/web-platform/tests/import-maps/builtin-support.tentative/http.sub.tentative.html similarity index 72% rename from testing/web-platform/tests/import-maps/bare.sub.tentative.html rename to testing/web-platform/tests/import-maps/builtin-support.tentative/http.sub.tentative.html index 587fb8893daa2..2ca2d9bc8bea9 100644 --- a/testing/web-platform/tests/import-maps/bare.sub.tentative.html +++ b/testing/web-platform/tests/import-maps/builtin-support.tentative/http.sub.tentative.html @@ -4,19 +4,6 @@ html > < -meta -name -= -" -timeout -" -content -= -" -long -" -> -< script src = @@ -55,6 +42,9 @@ src = " +. +. +/ resources / test @@ -175,12 +165,7 @@ : { " -bare -/ -bare -" -: -" +. . / resources @@ -195,47 +180,19 @@ & name = -bare -" -" -bare -/ -cross -- -origin +std - -bare +blank " : " -https -: -/ -/ -{ -{ -domains -[ -www1 -] -} -} +std : -{ -{ -ports -[ -https -] -[ -0 -] -} -} -/ -import -- -maps +blank +" +" +. +. / resources / @@ -249,62 +206,30 @@ & name = -cross -- -origin -- -bare -" -" -bare -/ -to -- -data -" -: -" -data -: -text -/ -javascript -log -. -push -( -' -dataURL -' -) -" -" -bare -/ -std -- blank " : " std -: -blank -" -" -bare / blank " -: " -std +. +. / -blank -" -" -bare +resources / +log +. +js +? +pipe += +sub +& +name += std - none @@ -316,8 +241,21 @@ none " " -bare +. +. +/ +resources / +log +. +js +? +pipe += +sub +& +name += none " : @@ -326,19 +264,6 @@ / none " -" -bare -/ -to -- -bare -" -: -" -bare -/ -bare -" } } ; @@ -445,112 +370,41 @@ 928435 / / -Bare -to HTTP ( S ) -. -" -bare -/ -bare -" -: -[ -Result -. -URL -Result -. -URL -" -log -: -bare -" -" -log -: -bare -" -] -" -bare -/ -cross -- -origin +to +built - -bare -" -: -[ -Result -. -URL -Result +in . -URL -" -log -: -cross -- -origin -- -bare -" -" -log -: -cross -- -origin -- -bare " +{ +{ +location +[ +server ] +} +} / -/ -Bare -to -data -: -" -bare -/ -to +import - -data -" -: -[ -Result -. -URL -Result -. -URL -" -dataURL -" -" -dataURL -" -] +maps / +resources / -Bare -to -built -- -in +log . -" -bare -/ +js +? +pipe += +sub +& +name += std - blank @@ -571,8 +425,31 @@ BUILTIN ] " -bare +{ +{ +location +[ +server +] +} +} / +import +- +maps +/ +resources +/ +log +. +js +? +pipe += +sub +& +name += blank " : @@ -591,8 +468,31 @@ BUILTIN ] " -bare +{ +{ +location +[ +server +] +} +} / +import +- +maps +/ +resources +/ +log +. +js +? +pipe += +sub +& +name += std - none @@ -613,40 +513,32 @@ PARSE_ERROR ] " -bare -/ -none -" -: +{ +{ +location [ -Result -. -URL -Result -. -URL -Result -. -PARSE_ERROR -Result -. -PARSE_ERROR +server ] +} +} +/ +import +- +maps / +resources / -Bare -to -bare -mapping -is -disabled +log . -" -bare -/ -to -- -bare +js +? +pipe += +sub +& +name += +none " : [ diff --git a/testing/web-platform/tests/import-maps/static-import.js b/testing/web-platform/tests/import-maps/builtin-support.tentative/static-import.js similarity index 100% rename from testing/web-platform/tests/import-maps/static-import.js rename to testing/web-platform/tests/import-maps/builtin-support.tentative/static-import.js diff --git a/testing/web-platform/tests/import-maps/core/bare.sub.tentative.html b/testing/web-platform/tests/import-maps/core/bare.sub.tentative.html new file mode 100644 index 0000000000000..ce6f5b86a9def --- /dev/null +++ b/testing/web-platform/tests/import-maps/core/bare.sub.tentative.html @@ -0,0 +1,483 @@ +< +! +DOCTYPE +html +> +< +meta +name += +" +timeout +" +content += +" +long +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +. +. +/ +resources +/ +test +- +helper +. +js +" +> +< +/ +script +> +< +script +> +/ +/ +" +bare +/ +. +. +. +" +( +i +. +e +. +without +leading +" +. +/ +" +) +are +bare +specifiers +/ +/ +( +not +relative +paths +) +. +const +importMap += +{ +" +imports +" +: +{ +" +bare +/ +bare +" +: +" +. +. +/ +resources +/ +log +. +js +? +pipe += +sub +& +name += +bare +" +" +bare +/ +cross +- +origin +- +bare +" +: +" +https +: +/ +/ +{ +{ +domains +[ +www1 +] +} +} +: +{ +{ +ports +[ +https +] +[ +0 +] +} +} +/ +import +- +maps +/ +resources +/ +log +. +js +? +pipe += +sub +& +name += +cross +- +origin +- +bare +" +" +bare +/ +to +- +data +" +: +" +data +: +text +/ +javascript +log +. +push +( +' +dataURL +' +) +" +" +bare +/ +to +- +bare +" +: +" +bare +/ +bare +" +} +} +; +const +tests += +{ +/ +/ +Arrays +of +expected +results +for +: +/ +/ +- +< +script +src +type += +" +module +" +> +/ +/ +- +< +script +src +> +( +classic +script +) +/ +/ +- +static +import +and +/ +/ +- +dynamic +import +. +/ +/ +Currently +Chromium +' +s +implementation +resolves +import +maps +as +a +part +of +/ +/ +specifier +resolution +and +thus +failure +in +import +map +resolution +causes +/ +/ +a +parse +error +not +fetch +error +. +Therefore +we +use +Result +. +PARSE_ERROR +/ +/ +below +. +https +: +/ +/ +crbug +. +com +/ +928435 +/ +/ +Bare +to +HTTP +( +S +) +. +" +bare +/ +bare +" +: +[ +Result +. +URL +Result +. +URL +" +log +: +bare +" +" +log +: +bare +" +] +" +bare +/ +cross +- +origin +- +bare +" +: +[ +Result +. +URL +Result +. +URL +" +log +: +cross +- +origin +- +bare +" +" +log +: +cross +- +origin +- +bare +" +] +/ +/ +Bare +to +data +: +" +bare +/ +to +- +data +" +: +[ +Result +. +URL +Result +. +URL +" +dataURL +" +" +dataURL +" +] +/ +/ +Bare +to +bare +mapping +is +disabled +. +" +bare +/ +to +- +bare +" +: +[ +Result +. +URL +Result +. +URL +Result +. +PARSE_ERROR +Result +. +PARSE_ERROR +] +} +; +doTests +( +importMap +null +tests +) +; +< +/ +script +> +< +body +> diff --git a/testing/web-platform/tests/import-maps/core/bare/__dir__.headers b/testing/web-platform/tests/import-maps/core/bare/__dir__.headers new file mode 100644 index 0000000000000..a56d9972d601a --- /dev/null +++ b/testing/web-platform/tests/import-maps/core/bare/__dir__.headers @@ -0,0 +1,7 @@ +Content +- +Type +: +text +/ +javascript diff --git a/testing/web-platform/tests/import-maps/bare/bare b/testing/web-platform/tests/import-maps/core/bare/bare similarity index 100% rename from testing/web-platform/tests/import-maps/bare/bare rename to testing/web-platform/tests/import-maps/core/bare/bare diff --git a/testing/web-platform/tests/import-maps/bare/cross-origin-bare b/testing/web-platform/tests/import-maps/core/bare/cross-origin-bare similarity index 100% rename from testing/web-platform/tests/import-maps/bare/cross-origin-bare rename to testing/web-platform/tests/import-maps/core/bare/cross-origin-bare diff --git a/testing/web-platform/tests/import-maps/bare/to-bare b/testing/web-platform/tests/import-maps/core/bare/to-bare similarity index 100% rename from testing/web-platform/tests/import-maps/bare/to-bare rename to testing/web-platform/tests/import-maps/core/bare/to-bare diff --git a/testing/web-platform/tests/import-maps/bare/to-data b/testing/web-platform/tests/import-maps/core/bare/to-data similarity index 100% rename from testing/web-platform/tests/import-maps/bare/to-data rename to testing/web-platform/tests/import-maps/core/bare/to-data diff --git a/testing/web-platform/tests/import-maps/data.sub.tentative.html b/testing/web-platform/tests/import-maps/core/data.sub.tentative.html similarity index 65% rename from testing/web-platform/tests/import-maps/data.sub.tentative.html rename to testing/web-platform/tests/import-maps/core/data.sub.tentative.html index 9d9ab455359b2..bc404539c749b 100644 --- a/testing/web-platform/tests/import-maps/data.sub.tentative.html +++ b/testing/web-platform/tests/import-maps/core/data.sub.tentative.html @@ -55,6 +55,9 @@ src = " +. +. +/ resources / test @@ -103,68 +106,6 @@ paths ) . -/ -/ -/ -/ -Discussions -about -notations -for -builtin -modules -are -ongoing -e -. -g -. -/ -/ -https -: -/ -/ -github -. -com -/ -tc39 -/ -proposal -- -javascript -- -standard -- -library -/ -issues -/ -12 -/ -/ -Currently -the -tests -expects -two -notations -are -accepted -. -/ -/ -TODO -: -Once -the -discussions -converge -update -the -tests -. const importMap = @@ -180,6 +121,7 @@ : " . +. / resources / @@ -215,6 +157,7 @@ : " . +. / resources / @@ -348,102 +291,6 @@ ' data : -std -- -blank -' -) -" -: -" -std -: -blank -" -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -blank -' -) -" -: -" -std -/ -blank -" -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -std -- -none -' -) -" -: -" -std -: -none -" -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -none -' -) -" -: -" -std -/ -none -" -" -data -: -text -/ -javascript -log -. -push -( -' -data -: to - bare @@ -698,147 +545,6 @@ data : to -built -- -in -. -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -std -- -blank -' -) -" -: -[ -Result -. -URL -Result -. -URL -Result -. -BUILTIN -Result -. -BUILTIN -] -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -blank -' -) -" -: -[ -Result -. -URL -Result -. -URL -Result -. -BUILTIN -Result -. -BUILTIN -] -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -std -- -none -' -) -" -: -[ -Result -. -URL -Result -. -URL -Result -. -PARSE_ERROR -Result -. -PARSE_ERROR -] -" -data -: -text -/ -javascript -log -. -push -( -' -data -: -none -' -) -" -: -[ -Result -. -URL -Result -. -URL -Result -. -PARSE_ERROR -Result -. -PARSE_ERROR -] -/ -/ -data -: -to bare mapping is diff --git a/testing/web-platform/tests/import-maps/http.sub.tentative.html b/testing/web-platform/tests/import-maps/core/http.sub.tentative.html similarity index 63% rename from testing/web-platform/tests/import-maps/http.sub.tentative.html rename to testing/web-platform/tests/import-maps/core/http.sub.tentative.html index 2f6cfb9ec9f05..cb4d2dad0f31e 100644 --- a/testing/web-platform/tests/import-maps/http.sub.tentative.html +++ b/testing/web-platform/tests/import-maps/core/http.sub.tentative.html @@ -42,6 +42,9 @@ src = " +. +. +/ resources / test @@ -90,68 +93,6 @@ paths ) . -/ -/ -/ -/ -Discussions -about -notations -for -builtin -modules -are -ongoing -e -. -g -. -/ -/ -https -: -/ -/ -github -. -com -/ -tc39 -/ -proposal -- -javascript -- -standard -- -library -/ -issues -/ -12 -/ -/ -Currently -the -tests -expects -two -notations -are -accepted -. -/ -/ -TODO -: -Once -the -discussions -converge -update -the -tests -. const importMap = @@ -167,6 +108,7 @@ : " . +. / resources / @@ -184,6 +126,7 @@ " " . +. / resources / @@ -202,6 +145,7 @@ : " . +. / resources / @@ -219,6 +163,7 @@ " " . +. / resources / @@ -289,6 +234,7 @@ " " . +. / resources / @@ -324,101 +270,6 @@ " " . -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -std -- -blank -" -: -" -std -: -blank -" -" -. -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -blank -" -: -" -std -/ -blank -" -" -. -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -std -- -none -" -: -" -std -: -none -" -" -. -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -none -" -: -" -std -/ -none -" -" . / resources @@ -724,193 +575,6 @@ S ) to -built -- -in -. -" -{ -{ -location -[ -server -] -} -} -/ -import -- -maps -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -std -- -blank -" -: -[ -Result -. -URL -Result -. -URL -Result -. -BUILTIN -Result -. -BUILTIN -] -" -{ -{ -location -[ -server -] -} -} -/ -import -- -maps -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -blank -" -: -[ -Result -. -URL -Result -. -URL -Result -. -BUILTIN -Result -. -BUILTIN -] -" -{ -{ -location -[ -server -] -} -} -/ -import -- -maps -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -std -- -none -" -: -[ -Result -. -URL -Result -. -URL -Result -. -PARSE_ERROR -Result -. -PARSE_ERROR -] -" -{ -{ -location -[ -server -] -} -} -/ -import -- -maps -/ -resources -/ -log -. -js -? -pipe -= -sub -& -name -= -none -" -: -[ -Result -. -URL -Result -. -URL -Result -. -PARSE_ERROR -Result -. -PARSE_ERROR -] -/ -/ -HTTP -( -S -) -to bare mapping is diff --git a/testing/web-platform/tests/import-maps/module-map-key.tentative.html b/testing/web-platform/tests/import-maps/core/module-map-key.tentative.html similarity index 99% rename from testing/web-platform/tests/import-maps/module-map-key.tentative.html rename to testing/web-platform/tests/import-maps/core/module-map-key.tentative.html index ae479e667ae0d..c625d9fb5e808 100644 --- a/testing/web-platform/tests/import-maps/module-map-key.tentative.html +++ b/testing/web-platform/tests/import-maps/core/module-map-key.tentative.html @@ -56,6 +56,7 @@ { " . +. / resources / @@ -74,6 +75,7 @@ : " . +. / resources / @@ -171,6 +173,7 @@ ( " . +. / resources / @@ -198,6 +201,7 @@ ( " . +. / resources / diff --git a/testing/web-platform/tests/import-maps/core/static-import.js b/testing/web-platform/tests/import-maps/core/static-import.js new file mode 100644 index 0000000000000..aceda83a88e9a --- /dev/null +++ b/testing/web-platform/tests/import-maps/core/static-import.js @@ -0,0 +1,12 @@ +import +" +{ +{ +GET +[ +url +] +} +} +" +; diff --git a/testing/web-platform/tests/import-maps/resources/test-helper.js b/testing/web-platform/tests/import-maps/resources/test-helper.js index 7c4fb07769ceb..7c28a1a2811ef 100644 --- a/testing/web-platform/tests/import-maps/resources/test-helper.js +++ b/testing/web-platform/tests/import-maps/resources/test-helper.js @@ -1008,11 +1008,6 @@ setAttribute src " " -/ -import -- -maps -/ static - import