Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test imports under more than 3 levels in different modules
  • Loading branch information
CYBAI committed Jun 23, 2020
1 parent a7221fd commit 0c938b3
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/wpt/metadata/MANIFEST.json
Expand Up @@ -334491,6 +334491,38 @@
"e6f5746eb743a338ad6fbd401715fed368e4cf74",
[]
],
"nested-imports-a.js": [
"a127aeb559a0a4d6eedccae19905088fa9fce4b9",
[]
],
"nested-imports-b.js": [
"18a5af40cc0ec3a3c10de50f3cd3bffe22c6ec4d",
[]
],
"nested-imports-c.js": [
"ec44596aeae7482656b29f1d6aebf6d2ab6a9d54",
[]
],
"nested-imports-d.js": [
"cee87849c6258182d6c0085ab504867c197fb8d4",
[]
],
"nested-imports-e.js": [
"ec6f0360a608429f774e430a2658f3235d72ed43",
[]
],
"nested-imports-f.js": [
"0591e0b3166907bdf94cff3677c2460f9824e082",
[]
],
"nested-imports-g.js": [
"86cbe7d3f8e0c29fd7848d9b2626166a0f6f3d30",
[]
],
"nested-imports-h.js": [
"a1612912599a4c79307cffe79b43133ceb7f99b0",
[]
],
"nested-missing-export.js": [
"3801ae847afca704cfac9d99428c96851296b8cb",
[]
Expand Down Expand Up @@ -465114,6 +465146,13 @@
{}
]
],
"nested-imports.html": [
"23bb595d0ebce1fbe14a3b72ce34fc1efa2720fe",
[
null,
{}
]
],
"nomodule-attribute.html": [
"656c99b292ac03f401eead1c4798666de61ca91a",
[
Expand Down
@@ -0,0 +1 @@
import { b } from "./nested-imports-b.js";
@@ -0,0 +1,2 @@
import { c } from "./nested-imports-c.js";
export const b = "b";
@@ -0,0 +1,2 @@
import { d } from "./nested-imports-d.js";
export const c = "c";
@@ -0,0 +1,3 @@
import { e } from "./nested-imports-e.js";
import "./resources/delayed-modulescript.py";
export const d = "d";
@@ -0,0 +1,2 @@
import { f } from "./nested-imports-f.js";
export const e = "e";
@@ -0,0 +1,2 @@
import { g } from "./nested-imports-g.js";
export const f = "f";
@@ -0,0 +1,2 @@
import { h } from "./nested-imports-h.js";
export const g = "g";
@@ -0,0 +1,2 @@
import { c } from "./nested-imports-c.js";
export const h = "h";
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<title>Test imports under more than 3 levels in different modules</title>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({ allow_uncaught_exception: true });

window.log = [];

const test_load = async_test("should load all modules successfully");
window.addEventListener(
"load",
test_load.step_func_done((ev) => {
assert_equals(log.length, 2);

assert_equals(log[0], 1);
assert_equals(log[1], 2);
})
);

function unreachable() {
log.push("unexpected");
}
</script>
<script type="module" src="./nested-imports-a.js" onerror="unreachable()"
onload="log.push(1)"></script>
<script type="module" src="./nested-imports-e.js" onerror="unreachable()"
onload="log.push(2)"></script>

0 comments on commit 0c938b3

Please sign in to comment.