зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
462f9b0e95
Коммит
d02fb2f63c
|
@ -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
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче