mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: make capturePage color matching timeouts consistent (#40167)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -6388,7 +6388,7 @@ describe('BrowserWindow module', () => {
|
||||
foregroundWindow.loadFile(path.join(__dirname, 'fixtures', 'pages', 'css-transparent.html'));
|
||||
await once(ipcMain, 'set-transparent');
|
||||
|
||||
await setTimeout();
|
||||
await setTimeout(1000);
|
||||
const screenCapture = await captureScreen();
|
||||
const centerColor = getPixelColor(screenCapture, {
|
||||
x: display.size.width / 2,
|
||||
@@ -6411,7 +6411,7 @@ describe('BrowserWindow module', () => {
|
||||
await once(window, 'show');
|
||||
await window.webContents.loadURL('data:text/html,<head><meta name="color-scheme" content="dark"></head>');
|
||||
|
||||
await setTimeout(500);
|
||||
await setTimeout(1000);
|
||||
const screenCapture = await captureScreen();
|
||||
const centerColor = getPixelColor(screenCapture, {
|
||||
x: display.size.width / 2,
|
||||
@@ -6441,6 +6441,7 @@ describe('BrowserWindow module', () => {
|
||||
w.loadURL('about:blank');
|
||||
await once(w, 'ready-to-show');
|
||||
|
||||
await setTimeout(1000);
|
||||
const screenCapture = await captureScreen();
|
||||
const centerColor = getPixelColor(screenCapture, {
|
||||
x: display.size.width / 2,
|
||||
|
||||
Reference in New Issue
Block a user