From 1072511be7714c18e6f22b6f77a21087eb192db2 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 4 Mar 2012 22:45:38 +0100 Subject: [PATCH] Fixing tests - popup only needed in Firefox. See #249. --- tests/Animation.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/Animation.html b/tests/Animation.html index 75cd4434f8..f113690933 100644 --- a/tests/Animation.html +++ b/tests/Animation.html @@ -17,12 +17,22 @@ function test_all(t) { t.plan(8); t.ok(OpenLayers.Animation.isNative !== undefined, "isNative is set."); - t.open_window("Animation.html", function(win) { + + function doIt(win) { win.requestFrame(t); win.start(t); win.startDuration(t); win.stop(t); - }); + } + + // Test in an extra window in Firefox, and directly in other browsers. + // This is needed because requestAnimationFrame does not work + // correctly in Firefox in a hidden IFrame. + if (window.mozRequestAnimationFrame) { + t.open_window("Animation.html", doIt); + } else { + doIt(window); + } } function requestFrame(t) {