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

Unified Diff: LayoutTests/fast/canvas/webgl/webgl-layer-update.html

Issue 196573042: Remove display() from more layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove video-frame-size-change test Created 6 years, 9 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/fast/canvas/webgl/webgl-layer-update.html
diff --git a/LayoutTests/fast/canvas/webgl/webgl-layer-update.html b/LayoutTests/fast/canvas/webgl/webgl-layer-update.html
index a5bd2d7faa6e02b755503ef035e55b274c40d954..e73c98eec315712ebce9211d8c6c492fa91b3965 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-layer-update.html
+++ b/LayoutTests/fast/canvas/webgl/webgl-layer-update.html
@@ -1,25 +1,14 @@
<!DOCTYPE html>
<html>
+<script src="../../../resources/run-after-display.js"></script>
<script>
- function doUpdate()
- {
- document.getElementsByTagName('canvas')[0].style.top = "60px";
-
- if (window.testRunner) {
- testRunner.display();
- testRunner.notifyDone();
- }
- }
-
function init()
{
- if (window.testRunner)
- doUpdate();
- else {
- // Delay canvas layer update if test runs without testRunner to
- // allow first layer update to be processed on UI side.
- window.setTimeout(doUpdate, 100);
- }
+ runAfterDisplay(function() {
+ document.getElementsByTagName('canvas')[0].style.top = "60px";
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
}
</script>
<body onload="init()">
@@ -45,7 +34,7 @@ if (window.testRunner) {
testRunner.overridePreference("WebKitWebGLEnabled", "1");
testRunner.dumpAsTextWithPixelResults();
document.getElementById("description").style.position = "absolute";
- document.getElementById("description").style.top = "-5000px";
+ document.getElementById("description").style.top = "-5000px";
}
var can = document.createElement('canvas');
@@ -57,9 +46,6 @@ document.body.appendChild(can);
var ctx = can.getContext("experimental-webgl");
ctx.clearColor(1, 0, 0, 1);
ctx.clear(ctx.COLOR_BUFFER_BIT);
-
-if (window.testRunner)
- testRunner.display();
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698