зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1397098 - Wait for the content pref update after changing zoom level. r=adw
This commit is contained in:
Родитель
3e69964c92
Коммит
8e58247d0d
|
@ -28,7 +28,6 @@ skip-if = !e10s # Pref and test only relevant for e10s.
|
|||
[browser_pinnedTabs_closeByKeyboard.js]
|
||||
[browser_positional_attributes.js]
|
||||
[browser_preloadedBrowser_zoom.js]
|
||||
skip-if = !debug && (os == 'win' && (os_version == '6.1')) # Bug 1397098
|
||||
[browser_reload_deleted_file.js]
|
||||
skip-if = (debug && os == 'mac') || (debug && os == 'linux' && bits == 64) #Bug 1421183, disabled on Linux/OSX for leaked windows
|
||||
[browser_tabswitch_updatecommands.js]
|
||||
|
|
|
@ -38,6 +38,21 @@ async function zoomNewTab(changeZoom, message) {
|
|||
const level = tab.linkedBrowser.fullZoom;
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
// Wait for the the update of the full-zoom content pref value, that happens
|
||||
// asynchronously after changing the zoom level.
|
||||
let cps2 = Cc["@mozilla.org/content-pref/service;1"].
|
||||
getService(Ci.nsIContentPrefService2);
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return new Promise(resolve => {
|
||||
cps2.getByDomainAndName("about:newtab", "browser.content.full-zoom", null, {
|
||||
handleResult(pref) {
|
||||
resolve(level == pref.value);
|
||||
},
|
||||
handleCompletion() {},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
await checkPreloadedZoom(level, `${message}: ${level}`);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче