Skip to content

Commit 996343f

Browse files
nyaxtchromium-wpt-export-bot
authored andcommitted
[ES6 modules] Add WPT for loading cyclic module graph w/ slow imports
This CL adds a layout test demonstrating the currently broken cycle handling, which currently fails on ToT. If a cyclic module graph node contained other edges that are not part of the cycle, the graph does not load reliably. (To be more specific, the graph does not load unless the other edges complete loading before we instantiate the cycle nodes). We expect to have the root cause fixed in the spec change PR: whatwg/html#2674 Bug: 594639 Change-Id: I3cf8a640a73083ad612c96fc4bbd0f01e00f6e46 Reviewed-on: https://chromium-review.googlesource.com/535413 Cr-Commit-Position: refs/heads/master@{#479534} WPT-Export-Revision: 1d8720afaeeb738690321b52bc88960ecb3b36f3
1 parent 858788b commit 996343f

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<title>Cyclic graph with slow imports</title>
3+
<script src="/resources/testharness.js"></script>
4+
<script src="/resources/testharnessreport.js"></script>
5+
<script type="module">
6+
import { loaded } from "./slow-module-graph-a.js";
7+
8+
test(() => {
9+
assert_true(loaded);
10+
}, "module graph with cycles load even if part of the graph loads slow");
11+
</script>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "./slow-module-graph-b.js";
2+
import "./resources/delayed-modulescript.py"
3+
export let loaded = true;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import "./slow-module-graph-a.js";

0 commit comments

Comments
 (0)