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

Unified Diff: third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html

Issue 2593403002: Fix pixel-crack-image-background-webkit-transform-scale test with mojo-loading (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html
diff --git a/third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html b/third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html
index ba3610bb7c28cab570c7e75ee08093c1b1f40356..eba164e24271550f8301ff505468d45ee0409a37 100644
--- a/third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html
+++ b/third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html
@@ -23,6 +23,23 @@
document.body.appendChild(div);
}
}
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ window.addEventListener('load', () => {
+ // This is a workaroud for an issue that the load event may be
+ // dispatched before loading the background image. See
+ // https://crbug.com/675870.
+ const id = setInterval(() => {
+ // Force layout.
+ document.body.offsetTop;
+ if (internals.isLoading('./resources/pixel-crack-image-background-webkit-transform-scale.png')) {
+ return;
+ }
+ clearInterval(id);
+ testRunner.notifyDone();
+ }, 50);
+ });
+ }
</script>
</head>
<body onload="runTest()">
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698