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

Unified Diff: Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html

Issue 397343006: Fix race-condition in ct-embedded-flakiness-dashboard-tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html
diff --git a/Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html b/Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html
index 6749a205b1b017f901b350004d9ac1baa50479e8..8aa0f33268bb2cae4fc890a983b270a035343ad2 100644
--- a/Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html
+++ b/Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard-tests.html
@@ -36,12 +36,17 @@ asyncTest("url", 1, function() {
asyncTest("heightChanged", 1, function() {
var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness-dashboard');
- window.postMessage({command: 'heightChanged', height: "100"}, '*')
- requestAnimationFrame(function() {
+ function finishTest() {
+ window.removeEventListener('message', finishTest);
var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe');
equal(iframe.style.height, "100px");
start();
+ }
+ window.addEventListener('message', finishTest);
+
+ requestAnimationFrame(function() {
+ window.postMessage({command: 'heightChanged', height: "100"}, '*');
});
});
« no previous file with comments | « Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698