From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../test/jsmodules/importmaps/classic_script.js | 1 + dom/base/test/jsmodules/importmaps/mochitest.toml | 7 ++ .../test/jsmodules/importmaps/module_chain_1.mjs | 2 + .../test/jsmodules/importmaps/module_chain_2.mjs | 1 + .../module_importMap_with_nonexisting_module.mjs | 4 ++ .../test_dynamic_importMap_load_completes.html | 33 +++++++++ ...est_dynamic_importMap_with_external_script.html | 81 ++++++++++++++++++++++ .../test_importMap_with_nonexisting_module.html | 25 +++++++ 8 files changed, 154 insertions(+) create mode 100644 dom/base/test/jsmodules/importmaps/classic_script.js create mode 100644 dom/base/test/jsmodules/importmaps/module_chain_1.mjs create mode 100644 dom/base/test/jsmodules/importmaps/module_chain_2.mjs create mode 100644 dom/base/test/jsmodules/importmaps/module_importMap_with_nonexisting_module.mjs create mode 100644 dom/base/test/jsmodules/importmaps/test_dynamic_importMap_load_completes.html create mode 100644 dom/base/test/jsmodules/importmaps/test_dynamic_importMap_with_external_script.html create mode 100644 dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html (limited to 'dom/base/test/jsmodules/importmaps') diff --git a/dom/base/test/jsmodules/importmaps/classic_script.js b/dom/base/test/jsmodules/importmaps/classic_script.js new file mode 100644 index 0000000000..d7ae0be054 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/classic_script.js @@ -0,0 +1 @@ +// Empty script. diff --git a/dom/base/test/jsmodules/importmaps/mochitest.toml b/dom/base/test/jsmodules/importmaps/mochitest.toml index 4229455722..1f95b155ac 100644 --- a/dom/base/test/jsmodules/importmaps/mochitest.toml +++ b/dom/base/test/jsmodules/importmaps/mochitest.toml @@ -3,6 +3,9 @@ support-files = [ "bug_1865410_module_a.mjs", "bug_1865410_module_b.mjs", "bug_1873417.mjs", + "classic_script.js", + "module_chain_1.mjs", + "module_chain_2.mjs", "module_importMap_with_external_script_0.mjs", "module_importMap_with_external_script_1.mjs", "module_importMap_with_external_script_2.mjs", @@ -13,6 +16,7 @@ support-files = [ "module_importMap_with_external_script_6.mjs", "module_importMap_with_external_script_6.mjs^headers^", "module_importMap_with_external_script_7.mjs", + "module_importMap_with_nonexisting_module.mjs", "bad/module_2.mjs", "bad/module_3.mjs", "bad/module_4.mjs", @@ -31,3 +35,6 @@ support-files = [ ["test_bug_1873417.html"] ["test_importMap_with_external_script.html"] +["test_importMap_with_nonexisting_module.html"] +["test_dynamic_importMap_with_external_script.html"] +["test_dynamic_importMap_load_completes.html"] diff --git a/dom/base/test/jsmodules/importmaps/module_chain_1.mjs b/dom/base/test/jsmodules/importmaps/module_chain_1.mjs new file mode 100644 index 0000000000..d9515fab7f --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/module_chain_1.mjs @@ -0,0 +1,2 @@ +// eslint-disable-next-line import/no-unassigned-import +import {} from "./module_chain_2.mjs"; diff --git a/dom/base/test/jsmodules/importmaps/module_chain_2.mjs b/dom/base/test/jsmodules/importmaps/module_chain_2.mjs new file mode 100644 index 0000000000..ce12406a76 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/module_chain_2.mjs @@ -0,0 +1 @@ +loaded = true; diff --git a/dom/base/test/jsmodules/importmaps/module_importMap_with_nonexisting_module.mjs b/dom/base/test/jsmodules/importmaps/module_importMap_with_nonexisting_module.mjs new file mode 100644 index 0000000000..4f9981bbe3 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/module_importMap_with_nonexisting_module.mjs @@ -0,0 +1,4 @@ +/* eslint-disable import/no-unassigned-import, import/no-unresolved */ +// Bareword specifier should be mapped to ./good/module_0.mjs. +import {} from "bare"; +import * as test from "nonexistingmodule"; diff --git a/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_load_completes.html b/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_load_completes.html new file mode 100644 index 0000000000..da354c1ca0 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_load_completes.html @@ -0,0 +1,33 @@ + + + +Test script loading complets when there's a dynamicly inserted import map + + + + + + + + + + + + + + + + + diff --git a/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_with_external_script.html b/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_with_external_script.html new file mode 100644 index 0000000000..b78992fb87 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/test_dynamic_importMap_with_external_script.html @@ -0,0 +1,81 @@ + + + +Test speculative preload of external script doesn't conflict with import map + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html b/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html new file mode 100644 index 0000000000..57cfd5e5a1 --- /dev/null +++ b/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html @@ -0,0 +1,25 @@ + + +Test an import map with an nonexisting module specifier + + + + + + + + -- cgit v1.2.3