From 07a56dce8775820d3a42d4ac94beb39428f6a585 Mon Sep 17 00:00:00 2001 From: Dan Clark Date: Sat, 3 Jul 2021 15:31:08 -0700 Subject: [PATCH] Address flakiness in import-css-module-basic.html The logs from the failures are not helpful in diagnosing the issue, and I'm unable to reproduce any failure locally. My best guess is that the issue is related to the test's use of 5 iframes that are injected in async_tests. There's probably some strange timing issue that happens if things happen to load in a particular order. This change attempts to address the flakiness by simplifying the test. 4 of the iframes are removed and the modules are just loaded in order at the top level instead. The 5th test remains in an iframe because the test is supposed to cause an error; this one is converted to promise_test. Bug: 1225913 Change-Id: If1870af360ba6812689c03e87ce4d21d91faabe1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3003700 Commit-Queue: Kouhei Ueno Reviewed-by: Kouhei Ueno Cr-Commit-Position: refs/heads/master@{#898417} --- .../css-module/import-css-module-basic.html | 113 +++++++++--------- .../css-module/resources/atImported.css | 3 + .../css-module/resources/bad-import.css | 4 +- .../css-module/resources/basic-large.css | 2 +- .../css-module-at-import-iframe.html | 21 ---- .../resources/css-module-basic-iframe.html | 18 --- .../css-module-basic-large-iframe.html | 18 --- .../resources/malformed-iframe.html | 14 --- .../css-module/resources/malformed.css | 4 +- 9 files changed, 66 insertions(+), 131 deletions(-) create mode 100644 html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css delete mode 100644 html/semantics/scripting-1/the-script-element/css-module/resources/css-module-at-import-iframe.html delete mode 100644 html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-iframe.html delete mode 100644 html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-large-iframe.html delete mode 100644 html/semantics/scripting-1/the-script-element/css-module/resources/malformed-iframe.html diff --git a/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html b/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html index c2235be9603de1..4ea1790aabdf2b 100644 --- a/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html +++ b/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html @@ -1,80 +1,83 @@ - - +
I am a test div.
+
I am a test div.
+
I am a test div.
+
I am a test div.
+
I am a test div.
+
I am a test div.
+ + + + + diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css b/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css new file mode 100644 index 00000000000000..8629a846d14e60 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/css-module/resources/atImported.css @@ -0,0 +1,3 @@ +#test3b { + background-color: #FF0000; +} \ No newline at end of file diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css b/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css index 0ada27b6e83b20..a6e1a0f395d910 100644 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css +++ b/html/semantics/scripting-1/the-script-element/css-module/resources/bad-import.css @@ -1,4 +1,4 @@ -@import "basic.css"; -#test2 { +@import "atImported.css"; +#test3 { background-color:#00FF00; } \ No newline at end of file diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css b/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css index f5b0db5d6ed261..555ab70d2ed80c 100644 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css +++ b/html/semantics/scripting-1/the-script-element/css-module/resources/basic-large.css @@ -1,4 +1,4 @@ -#test { +#test2 { background-color:red; } diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-at-import-iframe.html b/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-at-import-iframe.html deleted file mode 100644 index 90f1223da07404..00000000000000 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-at-import-iframe.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -
- I am a test div. -
-
- I am another test div. -
- \ No newline at end of file diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-iframe.html b/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-iframe.html deleted file mode 100644 index e093d39898f7bb..00000000000000 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-iframe.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - -
- I am a test div. -
- \ No newline at end of file diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-large-iframe.html b/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-large-iframe.html deleted file mode 100644 index 0cf11e9139f513..00000000000000 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/css-module-basic-large-iframe.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - -
- I am a test div. -
- diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/malformed-iframe.html b/html/semantics/scripting-1/the-script-element/css-module/resources/malformed-iframe.html deleted file mode 100644 index cd049cb8532833..00000000000000 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/malformed-iframe.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - -
- I am a test div. -
-
- I am another test div. -
- \ No newline at end of file diff --git a/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css b/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css index 592e5064d16786..28819bfdf55bff 100644 --- a/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css +++ b/html/semantics/scripting-1/the-script-element/css-module/resources/malformed.css @@ -1,7 +1,7 @@ -#test } { +#test4 } { background-color: #FF0000; } -#test2 { +#test4b { background-color: #00FF00; }