Skip to content

Commit 5adff6a

Browse files
Merge pull request #20126 from timvandermeij/fix-intermittents-chrome
Implement a delay for Chrome protocol calls in the integration tests, and skip the "must check that an existing highlight is ignored on hovering" integration test on Windows
2 parents c6bd044 + 17dc9e9 commit 5adff6a

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

test/integration/highlight_editor_spec.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,12 @@ describe("Highlight Editor", () => {
18531853
it("must check that an existing highlight is ignored on hovering", async () => {
18541854
await Promise.all(
18551855
pages.map(async ([browserName, page]) => {
1856+
if (navigator.platform.includes("Win")) {
1857+
// Skip the test on Windows because it permafails.
1858+
// TODO: Remove this check once #20136 is fixed.
1859+
return;
1860+
}
1861+
18561862
await switchToHighlight(page);
18571863

18581864
const rect = await getSpanRectFromText(

test/test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,14 @@ async function startBrowser({
910910
// crashes with timeouts or OOM if WebDriver BiDi is used (issue #17961).
911911
options.protocol = "cdp";
912912

913+
// Slow down protocol calls by the given number of milliseconds. In Chrome
914+
// protocol calls are faster than in Firefox and thus trigger in quicker
915+
// succession. This can cause intermittent failures because new protocol
916+
// calls can run before events triggered by the previous protocol calls had
917+
// a chance to be processed (essentially causing events to get lost). This
918+
// value gives Chrome a more similar execution speed as Firefox.
919+
options.slowMo = 5;
920+
913921
// avoid crash
914922
options.args = ["--no-sandbox", "--disable-setuid-sandbox"];
915923
// silent printing in a pdf

0 commit comments

Comments
 (0)