Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js

Issue 2962753002: [DevTools] Unflake some of inspector-protocol tests (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js
index 5ca5a04095da47e2465dccbe7c5a81f0fc59e49b..d2ed8c2674952283470f3cf09442bfaa3ec8087c 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js
@@ -18,10 +18,11 @@
await runTest(session);
testRunner.log('Closing inspector.');
testRunner.log('\nRemoving style sheet.\n');
- session.evaluate('setTimeout(() => { document.head.removeChild(styleElement1); document.body.offsetWidth; }, 0)');
+ session.evaluate('Promise.resolve().then(() => { document.head.removeChild(styleElement1); document.body.offsetWidth; })');
await session.disconnect();
testRunner.log('Reopening inspector.');
session = await page.createSession();
+ await session.evaluateAsync('new Promise(f => setTimeout(f, 0))');
testRunner.log('Running test');
testRunner.log('Opening front-end second time');
await runTest(session);
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698