mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1328255 - Run test_animation_performance_warning.html in a new window with enabling requestIdleCallaback pref. 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. This patch 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 : 19160631c3cd7a067ac47e02bc69c7b08f0169f2
This commit is contained in:
parent
3911d558bb
commit
67f3a5ff19
@ -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
|
||||
|
1274
dom/animation/test/chrome/file_animation_performance_warning.html
Normal file
1274
dom/animation/test/chrome/file_animation_performance_warning.html
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user