Skip to content

Commit

Permalink
Test: fix page load stall in one test on Chrome Beta 117 (#11660)
Browse files Browse the repository at this point in the history
  • Loading branch information
bershanskiy committed Sep 2, 2023
1 parent 93e6584 commit 08dadea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/browser/e2e/toggle.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('Toggling the extension', () => {
];

let loadSubframe: () => void = null;
await loadTestPage({
const loadCompleted = loadTestPage({
'/': multiline(
'<!DOCTYPE html>',
'<html>',
Expand Down Expand Up @@ -217,7 +217,10 @@ describe('Toggling the extension', () => {

await expectStyles(darkPageExpectations);

// Finalize page load
loadSubframe();
// Top-level page may finish loading only after the subframe has loaded
await loadCompleted;

// Ensure that the subframe received its styles
await expectStyles(darkSubframePageExpectations);
Expand Down

0 comments on commit 08dadea

Please sign in to comment.