зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1165046 fix e10s test browser_social_activation, r=felipe
This commit is contained in:
Родитель
0fa9447332
Коммит
2d0bcb2404
|
@ -34,7 +34,7 @@ skip-if = e10s && debug # Leaking docshells (bug 1150147)
|
|||
[browser_share.js]
|
||||
skip-if = true # bug 1115131
|
||||
[browser_social_activation.js]
|
||||
skip-if = e10s # Bug 933103 synthesizeMouseAtCenter not e10s friendly
|
||||
skip-if = e10s && debug # e10s/Linux/Debug Leaking docshells (bug 1150147)
|
||||
[browser_social_chatwindow.js]
|
||||
[browser_social_chatwindow_resize.js]
|
||||
[browser_social_chatwindowfocus.js]
|
||||
|
|
|
@ -62,12 +62,7 @@ function addTab(url, callback) {
|
|||
function sendActivationEvent(tab, callback, nullManifest) {
|
||||
// hack Social.lastEventReceived so we don't hit the "too many events" check.
|
||||
Social.lastEventReceived = 0;
|
||||
let doc = tab.linkedBrowser.contentDocument;
|
||||
// if our test has a frame, use it
|
||||
if (doc.defaultView.frames[0])
|
||||
doc = doc.defaultView.frames[0].document;
|
||||
let button = doc.getElementById(nullManifest ? "activation-old" : "activation");
|
||||
EventUtils.synthesizeMouseAtCenter(button, {}, doc.defaultView);
|
||||
BrowserTestUtils.synthesizeMouseAtCenter("#activation", {}, tab.linkedBrowser);
|
||||
executeSoon(callback);
|
||||
}
|
||||
|
||||
|
@ -117,24 +112,22 @@ function clickAddonRemoveButton(tab, aCallback) {
|
|||
AddonManager.getAddonsByTypes(["service"], function(aAddons) {
|
||||
let addon = aAddons[0];
|
||||
|
||||
let doc = tab.linkedBrowser.contentDocument;
|
||||
let doc = tab.linkedBrowser.contentDocument;;
|
||||
let list = doc.getElementById("addon-list");
|
||||
|
||||
let item = getAddonItemInList(addon.id, list);
|
||||
isnot(item, null, "Should have found the add-on in the list");
|
||||
|
||||
var button = doc.getAnonymousElementByAttribute(item, "anonid", "remove-btn");
|
||||
let button = item._removeBtn;
|
||||
isnot(button, null, "Should have a remove button");
|
||||
ok(!button.disabled, "Button should not be disabled");
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(button, { }, doc.defaultView);
|
||||
// uninstall happens after about:addons tab is closed, so we wait on
|
||||
// disabled
|
||||
promiseObserverNotified("social:provider-disabled").then(() => {
|
||||
is(item.getAttribute("pending"), "uninstall", "Add-on should be uninstalling");
|
||||
executeSoon(function() { aCallback(addon); });
|
||||
});
|
||||
|
||||
// Force XBL to apply
|
||||
item.clientTop;
|
||||
|
||||
is(item.getAttribute("pending"), "uninstall", "Add-on should be uninstalling");
|
||||
|
||||
executeSoon(function() { aCallback(addon); });
|
||||
BrowserTestUtils.synthesizeMouseAtCenter(button, {}, tab.linkedBrowser);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче