Bug 956431 - fix Australis' intermittent browser_946320_tabs_from_other_computers.js, r=jaws

This commit is contained in:
Gijs Kruitbosch 2014-01-09 23:52:00 +00:00
Родитель bd2a66c458
Коммит 9a5aa5f1bb
2 изменённых файлов: 7 добавлений и 11 удалений

Просмотреть файл

@ -42,9 +42,6 @@ skip-if = true
skip-if = os == "mac"
[browser_946320_tabs_from_other_computers.js]
# Because the test frequently intermittently fails on Linux for some reason
skip-if = os == "linux"
[browser_934951_zoom_in_toolbar.js]
[browser_938980_navbar_collapsed.js]
[browser_938995_indefaultstate_nonremovable.js]

Просмотреть файл

@ -8,9 +8,7 @@ let Preferences = Cu.import("resource://gre/modules/Preferences.jsm", {}).Prefer
Cu.import("resource://gre/modules/Promise.jsm");
add_task(function() {
let shownPanelPromise = promisePanelShown(window);
PanelUI.toggle({type: "command"});
yield shownPanelPromise;
yield PanelUI.show({type: "command"});
let historyButton = document.getElementById("history-panelmenu");
let historySubview = document.getElementById("PanelUI-history");
@ -21,10 +19,9 @@ add_task(function() {
let tabsFromOtherComputers = document.getElementById("sync-tabs-menuitem2");
is(tabsFromOtherComputers.hidden, true, "The Tabs From Other Computers menuitem should be hidden when sync isn't enabled.");
let subviewHiddenPromise = subviewHidden(historySubview);
let panelMultiView = document.getElementById("PanelUI-multiView");
panelMultiView.showMainView();
yield subviewHiddenPromise;
let hiddenPanelPromise = promisePanelHidden(window);
PanelUI.hide();
yield hiddenPanelPromise;
// Part 2 - When Sync is enabled the menuitem should be shown.
Weave.Service.createAccount("john@doe.com", "mysecretpw",
@ -35,6 +32,8 @@ add_task(function() {
Weave.Svc.Prefs.set("firstSync", "newAccount");
Weave.Service.persistLogin();
yield PanelUI.show({type: "command"});
subviewShownPromise = subviewShown(historySubview);
EventUtils.synthesizeMouseAtCenter(historyButton, {});
yield subviewShownPromise;
@ -45,7 +44,7 @@ add_task(function() {
syncPrefBranch.resetBranch("");
Services.logins.removeAllLogins();
let hiddenPanelPromise = promisePanelHidden(window);
hiddenPanelPromise = promisePanelHidden(window);
PanelUI.toggle({type: "command"});
yield hiddenPanelPromise;
});