Index: chrome/test/data/gpu/pixel_css3d.html |
diff --git a/chrome/test/data/gpu/pixel_css3d.html b/chrome/test/data/gpu/pixel_css3d.html |
index ddc7bf5c03d5a280e9216fa9b0b23cb2b91e3066..3fa0fe4212ff0b4bfdb52f5d5dedff15f5dd29b5 100644 |
--- a/chrome/test/data/gpu/pixel_css3d.html |
+++ b/chrome/test/data/gpu/pixel_css3d.html |
@@ -25,15 +25,21 @@ |
</style> |
<script> |
var g_swapsBeforeAck = 15; |
-var g_paintLoopStarted = false; |
+var g_targetWidth, g_targetHeight; |
+ |
+function onresized() |
+{ |
+ if (g_targetWidth != window.outerWidth || |
+ g_targetHeight != window.outerHeight) |
+ return; |
+ |
+ main(); |
+} |
+ |
function main() |
{ |
- g_swapsBeforeAck = 15; |
- if (!g_paintLoopStarted) { |
- g_paintLoopStarted = true; |
- waitForFinish(); |
- } |
+ waitForFinish(); |
} |
function waitForFinish() |
@@ -54,9 +60,12 @@ function notifyLoadFinished() |
domAutomationController.send("ok"); |
} |
-function preCallResizeInChromium() |
+function preCallResizeInChromium(targetWidth, targetHeight) |
{ |
- window.onresize = main; |
+ g_targetWidth = targetWidth; |
+ g_targetHeight = targetHeight; |
+ window.onresize = onresized; |
+ |
// Call main() on a timeout in case the window did not resize for whatever |
// reason. |
setTimeout(main, 10000); |