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

Unified Diff: LayoutTests/compositing/iframes/iframe-src-change.html

Issue 181653006: Remove testRunner.display() from most compositing/ tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert change to plugin test Created 6 years, 10 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
Index: LayoutTests/compositing/iframes/iframe-src-change.html
diff --git a/LayoutTests/compositing/iframes/iframe-src-change.html b/LayoutTests/compositing/iframes/iframe-src-change.html
index 23caad3df45ca55d994eaa248d34c2cd960942d3..d090bf92287bb79bb12731cab8936cf4442daa8f 100644
--- a/LayoutTests/compositing/iframes/iframe-src-change.html
+++ b/LayoutTests/compositing/iframes/iframe-src-change.html
@@ -2,6 +2,7 @@
<html>
<head>
+ <script src="../../resources/run-after-display.js"></script>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
@@ -30,18 +31,18 @@
function doTest()
{
- // For some reason this delay is required for AppKit to not short-circuit the display.
- window.setTimeout(function() {
- var hadLayersBefore = false;
- var hadLayersAfter = false;
+ var hadLayersBefore = false;
+ var hadLayersAfter = false;
+
+ // Need to paint for overlap testing.
+ runAfterDisplay(function() {
if (window.testRunner) {
- testRunner.display(); // Need to paint for overlap testing.
hadLayersBefore = window.internals.layerTreeAsText(document) != "";
}
document.getElementById('parent-iframe').src = "about:blank";
-
- window.setTimeout(function() {
+
+ runAfterDisplay(function() {
if (window.testRunner) {
hadLayersAfter = window.internals.layerTreeAsText(document) != "";
@@ -55,8 +56,8 @@
testRunner.notifyDone();
}
- }, 0);
- }, 0);
+ });
+ });
}
window.addEventListener('load', doTest, false);

Powered by Google App Engine
This is Rietveld 408576698