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

Unified Diff: chrome/test/data/gpu/pixel_canvas2d.html

Issue 9699028: Should make the gpu pixel tests less flaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 8 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
« no previous file with comments | « no previous file | chrome/test/data/gpu/pixel_css3d.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/gpu/pixel_canvas2d.html
diff --git a/chrome/test/data/gpu/pixel_canvas2d.html b/chrome/test/data/gpu/pixel_canvas2d.html
index f59c1d61f04c232c3c79b73fa18884ed19271ec8..4f72428ea2b7c4808faf67c30a3b7e015288c4e4 100644
--- a/chrome/test/data/gpu/pixel_canvas2d.html
+++ b/chrome/test/data/gpu/pixel_canvas2d.html
@@ -9,17 +9,16 @@
</style>
<script>
var g_swapsBeforeAck = 6;
-var g_paintLoopStarted = false;
+var g_targetHeight, g_targetWidth;
function main()
{
- g_swapsBeforeAck = 6;
+ if (window.outerHeight != g_targetHeight ||
+ window.outerWidth != g_targetWidth)
+ return;
- if (!g_paintLoopStarted) {
- g_paintLoopStarted = true;
- draw();
- waitForFinish();
- }
+ draw();
+ waitForFinish();
}
function draw()
@@ -49,8 +48,10 @@ function notifyLoadFinished()
domAutomationController.send("ok");
}
-function preCallResizeInChromium()
+function preCallResizeInChromium(targetWidth, targetHeight)
{
+ g_targetWidth = targetWidth;
+ g_targetHeight = targetHeight;
window.onresize = main;
// Call main() on a timeout in case the window did not resize for whatever
// reason.
« no previous file with comments | « no previous file | chrome/test/data/gpu/pixel_css3d.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698