Bug 1118768 - Redundant PopupNotifications.transitionsEnabled code removed, r=gijs
This commit is contained in:
@@ -846,13 +846,10 @@ function test() {
|
|||||||
Services.obs.addObserver(XPInstallObserver, "addon-install-failed", false);
|
Services.obs.addObserver(XPInstallObserver, "addon-install-failed", false);
|
||||||
Services.obs.addObserver(XPInstallObserver, "addon-install-complete", false);
|
Services.obs.addObserver(XPInstallObserver, "addon-install-complete", false);
|
||||||
|
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
// Make sure no more test parts run in case we were timed out
|
// Make sure no more test parts run in case we were timed out
|
||||||
TESTS = [];
|
TESTS = [];
|
||||||
PopupNotifications.panel.removeEventListener("popupshown", check_notification, false);
|
PopupNotifications.panel.removeEventListener("popupshown", check_notification, false);
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
|
|
||||||
AddonManager.getAllInstalls(function(aInstalls) {
|
AddonManager.getAllInstalls(function(aInstalls) {
|
||||||
aInstalls.forEach(function(aInstall) {
|
aInstalls.forEach(function(aInstall) {
|
||||||
|
|||||||
@@ -88,11 +88,9 @@ const PREF_SECURITY_DELAY_INITIAL = Services.prefs.getIntPref("security.notifica
|
|||||||
function setup() {
|
function setup() {
|
||||||
// Disable transitions as they slow the test down and we want to click the
|
// Disable transitions as they slow the test down and we want to click the
|
||||||
// mouse buttons in a predictable location.
|
// mouse buttons in a predictable location.
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
registerCleanupFunction(() => {
|
registerCleanupFunction(() => {
|
||||||
PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
|
PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,11 @@ function checkProviderPrefsEmpty(isError) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function defaultFinishChecks() {
|
function defaultFinishChecks() {
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
checkProviderPrefsEmpty(true);
|
checkProviderPrefsEmpty(true);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
function runSocialTestWithProvider(manifest, callback, finishcallback) {
|
function runSocialTestWithProvider(manifest, callback, finishcallback) {
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
||||||
|
|
||||||
@@ -172,7 +170,6 @@ function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
|
|||||||
info("runSocialTests: start test run with " + providersAtStart + " providers");
|
info("runSocialTests: start test run with " + providersAtStart + " providers");
|
||||||
window.focus();
|
window.focus();
|
||||||
|
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
if (cbPreTest === undefined) {
|
if (cbPreTest === undefined) {
|
||||||
cbPreTest = function(cb) {cb()};
|
cbPreTest = function(cb) {cb()};
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ function test() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
registerCleanupFunction(cleanUp);
|
registerCleanupFunction(cleanUp);
|
||||||
|
|
||||||
@@ -316,7 +315,6 @@ function cleanUp() {
|
|||||||
info("cleanup");
|
info("cleanup");
|
||||||
resetState();
|
resetState();
|
||||||
|
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
|
|
||||||
for (let topic in gActiveObservers)
|
for (let topic in gActiveObservers)
|
||||||
Services.obs.removeObserver(gActiveObservers[topic], topic);
|
Services.obs.removeObserver(gActiveObservers[topic], topic);
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
|
|
||||||
// We want a prompt.
|
// We want a prompt.
|
||||||
removePermission(testPageURL, "indexedDB");
|
removePermission(testPageURL, "indexedDB");
|
||||||
executeSoon(test1);
|
executeSoon(test1);
|
||||||
@@ -72,7 +70,6 @@ function test2()
|
|||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
removePermission(testPageURL, "indexedDB");
|
removePermission(testPageURL, "indexedDB");
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(finish);
|
executeSoon(finish);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
// We want the prompt.
|
// We want the prompt.
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
removePermission(testPageURL, "indexedDB");
|
removePermission(testPageURL, "indexedDB");
|
||||||
executeSoon(test1);
|
executeSoon(test1);
|
||||||
}
|
}
|
||||||
@@ -69,7 +68,6 @@ function test2()
|
|||||||
gBrowser.selectedBrowser.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = false;
|
gBrowser.selectedBrowser.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = false;
|
||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(test3);
|
executeSoon(test3);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
requestLongerTimeout(10);
|
requestLongerTimeout(10);
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
setPermission(testPageURL, "indexedDB");
|
setPermission(testPageURL, "indexedDB");
|
||||||
removePermission(testPageURL, "indexedDB-unlimited");
|
removePermission(testPageURL, "indexedDB-unlimited");
|
||||||
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
||||||
@@ -110,7 +109,6 @@ function test2()
|
|||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
removePermission(testPageURL, "indexedDB");
|
removePermission(testPageURL, "indexedDB");
|
||||||
Services.prefs.clearUserPref("dom.indexedDB.warningQuota");
|
Services.prefs.clearUserPref("dom.indexedDB.warningQuota");
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(finish);
|
executeSoon(finish);
|
||||||
});
|
});
|
||||||
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
requestLongerTimeout(10);
|
requestLongerTimeout(10);
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
setPermission(testPageURL, "indexedDB");
|
setPermission(testPageURL, "indexedDB");
|
||||||
removePermission(testPageURL, "indexedDB-unlimited");
|
removePermission(testPageURL, "indexedDB-unlimited");
|
||||||
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
||||||
@@ -45,7 +44,6 @@ function test1()
|
|||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
addMoreTest1Count = seenPopupCount;
|
addMoreTest1Count = seenPopupCount;
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(finish);
|
executeSoon(finish);
|
||||||
});
|
});
|
||||||
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
requestLongerTimeout(10);
|
requestLongerTimeout(10);
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
setPermission(testPageURL, "indexedDB");
|
setPermission(testPageURL, "indexedDB");
|
||||||
removePermission(testPageURL, "indexedDB-unlimited");
|
removePermission(testPageURL, "indexedDB-unlimited");
|
||||||
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
||||||
@@ -56,7 +55,6 @@ function test1()
|
|||||||
"Correct permission set");
|
"Correct permission set");
|
||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(finish);
|
executeSoon(finish);
|
||||||
});
|
});
|
||||||
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ function test()
|
|||||||
{
|
{
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
requestLongerTimeout(10);
|
requestLongerTimeout(10);
|
||||||
PopupNotifications.transitionsEnabled = false;
|
|
||||||
setPermission(testPageURL, "indexedDB");
|
setPermission(testPageURL, "indexedDB");
|
||||||
removePermission(testPageURL, "indexedDB-unlimited");
|
removePermission(testPageURL, "indexedDB-unlimited");
|
||||||
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
Services.prefs.setIntPref("dom.indexedDB.warningQuota", 2);
|
||||||
@@ -50,7 +49,6 @@ function test1()
|
|||||||
gBrowser.removeCurrentTab();
|
gBrowser.removeCurrentTab();
|
||||||
unregisterAllPopupEventHandlers();
|
unregisterAllPopupEventHandlers();
|
||||||
addMoreTest1Count = seenPopupCount;
|
addMoreTest1Count = seenPopupCount;
|
||||||
PopupNotifications.transitionsEnabled = true;
|
|
||||||
executeSoon(test2);
|
executeSoon(test2);
|
||||||
});
|
});
|
||||||
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
executeSoon(function() { dispatchEvent("indexedDB-done"); });
|
||||||
|
|||||||
Reference in New Issue
Block a user