Skip to content

Commit

Permalink
De-flake toggleEvent.html
Browse files Browse the repository at this point in the history
This patch removes the open attribute from some of the details elements
in the initial HTML markup because the timing at which the parser will
fire the toggle event is inconsistent and leads to test flaking.

Fixed: 1487880, 1488725
Change-Id: I623382108f8eaf9e43e07172133c5551926ae062
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4907762
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1204864}
  • Loading branch information
josepharhar authored and chromium-wpt-export-bot committed Oct 3, 2023
1 parent 4cd570d commit 211f307
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<summary>Lorem ipsum</summary>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</details>
<details id=details2 open>
<details id=details2>
<summary>Lorem ipsum</summary>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</details>
Expand All @@ -28,7 +28,7 @@
<summary>Lorem ipsum</summary>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</details>
<details id=details8 open>
<details id=details8>
<summary>Lorem ipsum</summary>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</details>
Expand Down Expand Up @@ -88,6 +88,7 @@
assert_false(details2.open);
testEvent(evt);
});
details2.open = true;
details2.open = false; // closes details2

details3.ontoggle = t3.step_func_done(function(evt) {
Expand Down Expand Up @@ -147,6 +148,7 @@
assert_false(details8.open);
testEvent(evt)
});
details8.open = true;
details8.removeAttribute('open'); // closes details8

window.details9TogglePromise.then(t9.step_func(() => {
Expand Down

0 comments on commit 211f307

Please sign in to comment.