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

Side by Side Diff: sky/tests/framework/flights-app-pixels.sky

Issue 792883008: Deflake flights-app-pixels.sky. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/tests/framework/flights-app-pixels-expected.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <sky> 1 <sky>
2 <import src="../resources/run-after-display.sky" as="runAfterDisplay" /> 2 <import src="../resources/run-after-display.sky" as="runAfterDisplay" />
3 <import src="/sky/examples/flights-app/flights-app.sky" /> 3 <import src="/sky/examples/flights-app/flights-app.sky" />
4 <script> 4 <script>
5 addEventListener("load", function() { 5 var app;
6 var app = document.createElement("flights-app"); 6
7 document.querySelector("sky").appendChild(app); 7 function imagesLoaded() {
8 var images = app.shadowRoot.querySelectorAll('img');
9 for (var i = 0; i < images.length; i++) {
10 if (!images[i].complete)
11 return false;
12 }
13 return true;
14 }
15
16 function checkImagesLoaded() {
17 if (!imagesLoaded()) {
18 setTimeout(checkImagesLoaded, 10);
19 return;
20 }
8 runAfterDisplay(function() { 21 runAfterDisplay(function() {
9 internals.notifyTestComplete(""); 22 internals.notifyTestComplete("");
10 }); 23 });
24 }
25
26 addEventListener("load", function() {
27 app = document.createElement("flights-app");
28 document.querySelector("sky").appendChild(app);
29 checkImagesLoaded();
11 }); 30 });
12 </script> 31 </script>
13 </sky> 32 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/tests/framework/flights-app-pixels-expected.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698