Bug 994117, disable transition for popups in social tests, r=mixedpuppy

This commit is contained in:
Neil Deakin 2014-06-16 14:43:10 -04:00
parent 3884a72e08
commit 139c38b2df
2 changed files with 11 additions and 1 deletions

View File

@ -112,6 +112,11 @@ var tests = {
iconURL: "chrome://browser/skin/Info.png",
counter: 1
};
// Disable the transition
let panel = document.getElementById("social-notification-panel");
panel.setAttribute("animate", "false");
// click on panel to open and wait for visibility
let provider = Social._getProviderFromOrigin(manifest2.origin);
let id = SocialStatus._toolbarHelper.idFromOrigin(manifest2.origin);
@ -131,8 +136,8 @@ var tests = {
case "got-social-panel-visibility":
ok(true, "got the panel message " + e.data.result);
if (e.data.result == "shown") {
let panel = document.getElementById("social-notification-panel");
panel.hidePopup();
panel.removeAttribute("animate");
} else {
port.postMessage({topic: "test-ambient-notification", data: icon});
port.close();

View File

@ -63,11 +63,14 @@ function checkProviderPrefsEmpty(isError) {
}
function defaultFinishChecks() {
PopupNotifications.transitionsEnabled = true;
checkProviderPrefsEmpty(true);
finish();
}
function runSocialTestWithProvider(manifest, callback, finishcallback) {
PopupNotifications.transitionsEnabled = false;
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
let manifests = Array.isArray(manifest) ? manifest : [manifest];
@ -158,6 +161,8 @@ function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
let providersAtStart = Social.providers.length;
info("runSocialTests: start test run with " + providersAtStart + " providers");
PopupNotifications.transitionsEnabled = false;
if (cbPreTest === undefined) {
cbPreTest = function(cb) {cb()};
}