From d02fb2f63c8edbbad76a2497589f0e947f7298aa Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 7 Jan 2017 19:18:53 +0900 Subject: [PATCH] Bug 1328255 - Run test_animation_performance_warning.html in a new window with enabling prefs. r=birtles window.requestIdleCallback can not be used right after enabling its pref in the same window object. We need to open a new window after enabling the pref. Also, setting layout.css.devPixelsPerPx in the new windows seems to make test_session_scroll_position.html failure on Android, so in this patch setting layout.css.devPixelsPerPx is set before opening the new window. "general.useragent.locale" too. This patca moves waitForIdleCallback from testcommon.js for preventing from being used in other tests unintentionally. MozReview-Commit-ID: Erm2BPnikvB --HG-- rename : dom/animation/test/chrome/test_animation_performance_warning.html => dom/animation/test/chrome/file_animation_performance_warning.html extra : rebase_source : 69ccc65e1c16c3a3320d45608e9b14f1507b2e95 --- dom/animation/test/chrome.ini | 1 + .../file_animation_performance_warning.html | 1267 +++++++++++++++++ .../test_animation_performance_warning.html | 1266 +--------------- dom/animation/test/testcommon.js | 13 +- 4 files changed, 1284 insertions(+), 1263 deletions(-) create mode 100644 dom/animation/test/chrome/file_animation_performance_warning.html diff --git a/dom/animation/test/chrome.ini b/dom/animation/test/chrome.ini index 5584338bb7d7..0fb476a9d30c 100644 --- a/dom/animation/test/chrome.ini +++ b/dom/animation/test/chrome.ini @@ -4,6 +4,7 @@ support-files = ../../imptests/testharness.js ../../imptests/testharnessreport.js !/dom/animation/test/chrome/file_animate_xrays.html + chrome/file_animation_performance_warning.html [chrome/test_animate_xrays.html] # file_animate_xrays.html needs to go in mochitest.ini since it is served diff --git a/dom/animation/test/chrome/file_animation_performance_warning.html b/dom/animation/test/chrome/file_animation_performance_warning.html new file mode 100644 index 000000000000..9f72bdc4d960 --- /dev/null +++ b/dom/animation/test/chrome/file_animation_performance_warning.html @@ -0,0 +1,1267 @@ + + + +Bug 1196114 - Test metadata related to which animation properties + are running on the compositor + + + + +Mozilla Bug 1196114 +
+ + + diff --git a/dom/animation/test/chrome/test_animation_performance_warning.html b/dom/animation/test/chrome/test_animation_performance_warning.html index d0dcf6f20316..c40251c3e545 100644 --- a/dom/animation/test/chrome/test_animation_performance_warning.html +++ b/dom/animation/test/chrome/test_animation_performance_warning.html @@ -1,1263 +1,21 @@ - -Bug 1196114 - Test metadata related to which animation properties - are running on the compositor - - - - -Mozilla Bug 1196114
- - diff --git a/dom/animation/test/testcommon.js b/dom/animation/test/testcommon.js index 401832de8a2f..48cd08f7a45d 100644 --- a/dom/animation/test/testcommon.js +++ b/dom/animation/test/testcommon.js @@ -162,15 +162,6 @@ function waitForFrame() { }); } -/** - * Promise wrapper for requestIdleCallback. - */ -function waitForIdleCallback() { - return new Promise(function(resolve, reject) { - window.requestIdleCallback(resolve); - }); -} - /** * Returns a Promise that is resolved after the given number of consecutive * animation frames have occured (using requestAnimationFrame callbacks). @@ -220,6 +211,8 @@ if (opener) { for (var funcName of ["async_test", "assert_not_equals", "assert_equals", "assert_approx_equals", "assert_less_than", "assert_less_than_equal", "assert_greater_than", + "assert_greater_than_equal", + "assert_not_exists", "assert_between_inclusive", "assert_true", "assert_false", "assert_class_string", "assert_throws", @@ -229,6 +222,8 @@ if (opener) { } window.EventWatcher = opener.EventWatcher; + // Used for requestLongerTimeout. + window.W3CTest = opener.W3CTest; function done() { opener.add_completion_callback(function() {