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

Unified Diff: chrome/test/data/gpu/pixel_webgl.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 | « chrome/test/data/gpu/pixel_css3d.html ('k') | chrome/test/gpu/gpu_pixel_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/gpu/pixel_webgl.html
diff --git a/chrome/test/data/gpu/pixel_webgl.html b/chrome/test/data/gpu/pixel_webgl.html
index 093c1105a4bd35d28250a00873778abe4802ef62..295e5f799d34fa70d1f18210d217dd5a860e149b 100644
--- a/chrome/test/data/gpu/pixel_webgl.html
+++ b/chrome/test/data/gpu/pixel_webgl.html
@@ -26,20 +26,19 @@ void main(void)
<script>
var g_swapsBeforeAck = 15;
-var g_paintLoopStarted = false;
+var g_targetWidth, g_targetHeight;
var gl;
function main()
{
- g_swapsBeforeAck = 15;
+ if (window.outerWidth != g_targetWidth ||
+ window.outerHeight != g_targetHeight)
+ return;
- if (!g_paintLoopStarted) {
- g_paintLoopStarted = true;
- var canvas = document.getElementById("c");
- gl = initGL(canvas);
- if (gl && setup(gl))
- drawSomeFrames();
- }
+ var canvas = document.getElementById("c");
+ gl = initGL(canvas);
+ if (gl && setup(gl))
+ drawSomeFrames();
}
function notifyLoadFinished()
@@ -48,8 +47,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 | « chrome/test/data/gpu/pixel_css3d.html ('k') | chrome/test/gpu/gpu_pixel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698