зеркало из https://github.com/mozilla/gecko-dev.git
Merge fx-team to m-c.
This commit is contained in:
Коммит
852d2cf85e
|
@ -153,7 +153,7 @@ const SNIPPETS_OBJECTSTORE_NAME = "snippets";
|
||||||
let gInitialized = false;
|
let gInitialized = false;
|
||||||
let gObserver = new MutationObserver(function (mutations) {
|
let gObserver = new MutationObserver(function (mutations) {
|
||||||
for (let mutation of mutations) {
|
for (let mutation of mutations) {
|
||||||
if (mutation.attributeName == "searchEngineURL") {
|
if (mutation.attributeName == "searchEngineName") {
|
||||||
setupSearchEngine();
|
setupSearchEngine();
|
||||||
if (!gInitialized) {
|
if (!gInitialized) {
|
||||||
ensureSnippetsMapThen(loadSnippets);
|
ensureSnippetsMapThen(loadSnippets);
|
||||||
|
@ -295,52 +295,17 @@ function ensureSnippetsMapThen(aCallback)
|
||||||
function onSearchSubmit(aEvent)
|
function onSearchSubmit(aEvent)
|
||||||
{
|
{
|
||||||
let searchTerms = document.getElementById("searchText").value;
|
let searchTerms = document.getElementById("searchText").value;
|
||||||
let searchURL = document.documentElement.getAttribute("searchEngineURL");
|
let engineName = document.documentElement.getAttribute("searchEngineName");
|
||||||
|
|
||||||
if (searchURL && searchTerms.length > 0) {
|
if (engineName && searchTerms.length > 0) {
|
||||||
// Send an event that a search was performed. This was originally
|
// Send an event that will perform a search and Firefox Health Report will
|
||||||
// added so Firefox Health Report could record that a search from
|
// record that a search from about:home has occurred.
|
||||||
// about:home had occurred.
|
let eventData = JSON.stringify({
|
||||||
let engineName = document.documentElement.getAttribute("searchEngineName");
|
engineName: engineName,
|
||||||
let event = new CustomEvent("AboutHomeSearchEvent", {detail: engineName});
|
searchTerms: searchTerms
|
||||||
|
});
|
||||||
|
let event = new CustomEvent("AboutHomeSearchEvent", {detail: eventData});
|
||||||
document.dispatchEvent(event);
|
document.dispatchEvent(event);
|
||||||
|
|
||||||
const SEARCH_TOKEN = "_searchTerms_";
|
|
||||||
let searchPostData = document.documentElement.getAttribute("searchEnginePostData");
|
|
||||||
if (searchPostData) {
|
|
||||||
// Check if a post form already exists. If so, remove it.
|
|
||||||
const POST_FORM_NAME = "searchFormPost";
|
|
||||||
let form = document.forms[POST_FORM_NAME];
|
|
||||||
if (form) {
|
|
||||||
form.parentNode.removeChild(form);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new post form.
|
|
||||||
form = document.body.appendChild(document.createElement("form"));
|
|
||||||
form.setAttribute("name", POST_FORM_NAME);
|
|
||||||
// Set the URL to submit the form to.
|
|
||||||
form.setAttribute("action", searchURL.replace(SEARCH_TOKEN, searchTerms));
|
|
||||||
form.setAttribute("method", "post");
|
|
||||||
|
|
||||||
// Create new <input type=hidden> elements for search param.
|
|
||||||
searchPostData = searchPostData.split("&");
|
|
||||||
for (let postVar of searchPostData) {
|
|
||||||
let [name, value] = postVar.split("=");
|
|
||||||
if (value == SEARCH_TOKEN) {
|
|
||||||
value = searchTerms;
|
|
||||||
}
|
|
||||||
let input = document.createElement("input");
|
|
||||||
input.setAttribute("type", "hidden");
|
|
||||||
input.setAttribute("name", name);
|
|
||||||
input.setAttribute("value", value);
|
|
||||||
form.appendChild(input);
|
|
||||||
}
|
|
||||||
// Submit the form.
|
|
||||||
form.submit();
|
|
||||||
} else {
|
|
||||||
searchURL = searchURL.replace(SEARCH_TOKEN, encodeURIComponent(searchTerms));
|
|
||||||
window.location.href = searchURL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<command id="Browser:ToggleAddonBar" oncommand="toggleAddonBar();"/>
|
<command id="Browser:ToggleAddonBar" oncommand="toggleAddonBar();"/>
|
||||||
<command id="Social:TogglePageMark" oncommand="SocialMark.togglePageMark();" disabled="true"/>
|
<command id="Social:TogglePageMark" oncommand="SocialMark.togglePageMark();" disabled="true"/>
|
||||||
<command id="Social:SharePage" oncommand="SocialShare.sharePage();" disabled="true"/>
|
<command id="Social:SharePage" oncommand="SocialShare.sharePage();" disabled="true"/>
|
||||||
<command id="Social:ToggleSidebar" oncommand="Social.toggleSidebar();"/>
|
<command id="Social:ToggleSidebar" oncommand="Social.toggleSidebar();" hidden="true"/>
|
||||||
<command id="Social:ToggleNotifications" oncommand="Social.toggleNotifications();" hidden="true"/>
|
<command id="Social:ToggleNotifications" oncommand="Social.toggleNotifications();" hidden="true"/>
|
||||||
<command id="Social:FocusChat" oncommand="SocialChatBar.focus();" hidden="true" disabled="true"/>
|
<command id="Social:FocusChat" oncommand="SocialChatBar.focus();" hidden="true" disabled="true"/>
|
||||||
<command id="Social:Toggle" oncommand="Social.toggle();" hidden="true"/>
|
<command id="Social:Toggle" oncommand="Social.toggle();" hidden="true"/>
|
||||||
|
|
|
@ -45,9 +45,9 @@ SocialUI = {
|
||||||
|
|
||||||
if (!Social.initialized) {
|
if (!Social.initialized) {
|
||||||
Social.init();
|
Social.init();
|
||||||
} else if (Social.enabled) {
|
} else if (Social.providers.length > 0) {
|
||||||
// social was previously initialized, so it's not going to notify us of
|
// Social was initialized during startup in a previous window. If we have
|
||||||
// anything, so handle that now.
|
// providers enabled initialize the UI for this window.
|
||||||
this.observe(null, "social:providers-changed", null);
|
this.observe(null, "social:providers-changed", null);
|
||||||
this.observe(null, "social:provider-set", Social.provider ? Social.provider.origin : null);
|
this.observe(null, "social:provider-set", Social.provider ? Social.provider.origin : null);
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,10 @@ SocialUI = {
|
||||||
let containerParent = container.parentNode;
|
let containerParent = container.parentNode;
|
||||||
if (containerParent.classList.contains("social-panel") &&
|
if (containerParent.classList.contains("social-panel") &&
|
||||||
containerParent instanceof Ci.nsIDOMXULPopupElement) {
|
containerParent instanceof Ci.nsIDOMXULPopupElement) {
|
||||||
containerParent.hidePopup();
|
// allow the link traversal to finish before closing the panel
|
||||||
|
setTimeout(() => {
|
||||||
|
containerParent.hidePopup();
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -693,7 +696,7 @@ SocialShare = {
|
||||||
|
|
||||||
onHidden: function() {
|
onHidden: function() {
|
||||||
this.shareButton.removeAttribute("open");
|
this.shareButton.removeAttribute("open");
|
||||||
this.iframe.setAttribute("src", "data:text/plain;charset=utf8,")
|
this.iframe.setAttribute("src", "data:text/plain;charset=utf8,");
|
||||||
this.currentShare = null;
|
this.currentShare = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -90,19 +90,13 @@ let AboutHomeListener = {
|
||||||
|
|
||||||
// Inject search engine and snippets URL.
|
// Inject search engine and snippets URL.
|
||||||
let docElt = doc.documentElement;
|
let docElt = doc.documentElement;
|
||||||
// set the following attributes BEFORE searchEngineURL, which triggers to
|
// set the following attributes BEFORE searchEngineName, which triggers to
|
||||||
// show the snippets when it's set.
|
// show the snippets when it's set.
|
||||||
docElt.setAttribute("snippetsURL", aData.snippetsURL);
|
docElt.setAttribute("snippetsURL", aData.snippetsURL);
|
||||||
if (aData.showKnowYourRights)
|
if (aData.showKnowYourRights)
|
||||||
docElt.setAttribute("showKnowYourRights", "true");
|
docElt.setAttribute("showKnowYourRights", "true");
|
||||||
docElt.setAttribute("snippetsVersion", aData.snippetsVersion);
|
docElt.setAttribute("snippetsVersion", aData.snippetsVersion);
|
||||||
|
docElt.setAttribute("searchEngineName", Services.search.defaultEngine.name);
|
||||||
let engine = aData.defaultSearchEngine;
|
|
||||||
docElt.setAttribute("searchEngineName", engine.name);
|
|
||||||
docElt.setAttribute("searchEnginePostData", engine.postDataString || "");
|
|
||||||
// Again, keep the searchEngineURL as the last attribute, because the
|
|
||||||
// mutation observer in aboutHome.js is counting on that.
|
|
||||||
docElt.setAttribute("searchEngineURL", engine.searchURL);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageLoad: function() {
|
onPageLoad: function() {
|
||||||
|
@ -135,7 +129,7 @@ let AboutHomeListener = {
|
||||||
sendAsyncMessage("AboutHome:RequestUpdate");
|
sendAsyncMessage("AboutHome:RequestUpdate");
|
||||||
|
|
||||||
doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
|
doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
|
||||||
sendAsyncMessage("AboutHome:Search", { engineName: e.detail });
|
sendAsyncMessage("AboutHome:Search", { searchData: e.detail });
|
||||||
}, true, true);
|
}, true, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -280,4 +274,4 @@ let ClickEventHandler = {
|
||||||
return [href ? makeURLAbsolute(baseURI, href) : null, null];
|
return [href ? makeURLAbsolute(baseURI, href) : null, null];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ClickEventHandler.init();
|
ClickEventHandler.init();
|
||||||
|
|
|
@ -107,7 +107,8 @@ let gTests = [
|
||||||
let engineName = doc.documentElement.getAttribute("searchEngineName");
|
let engineName = doc.documentElement.getAttribute("searchEngineName");
|
||||||
|
|
||||||
doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
|
doc.addEventListener("AboutHomeSearchEvent", function onSearch(e) {
|
||||||
is(e.detail, engineName, "Detail is search engine name");
|
let data = JSON.parse(e.detail);
|
||||||
|
is(data.engineName, engineName, "Detail is search engine name");
|
||||||
|
|
||||||
// We use executeSoon() to ensure that this code runs after the
|
// We use executeSoon() to ensure that this code runs after the
|
||||||
// count has been updated in browser.js, since it uses the same
|
// count has been updated in browser.js, since it uses the same
|
||||||
|
@ -287,7 +288,7 @@ let gTests = [
|
||||||
// propagated to the about:home content, we want to perform a search.
|
// propagated to the about:home content, we want to perform a search.
|
||||||
let mutationObserver = new MutationObserver(function (mutations) {
|
let mutationObserver = new MutationObserver(function (mutations) {
|
||||||
for (let mutation of mutations) {
|
for (let mutation of mutations) {
|
||||||
if (mutation.attributeName == "searchEngineURL") {
|
if (mutation.attributeName == "searchEngineName") {
|
||||||
searchText.value = needle;
|
searchText.value = needle;
|
||||||
searchText.focus();
|
searchText.focus();
|
||||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||||
|
@ -445,7 +446,7 @@ function promiseBrowserAttributes(aTab)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we just have to wait for the last attribute.
|
// Now we just have to wait for the last attribute.
|
||||||
if (mutation.attributeName == "searchEngineURL") {
|
if (mutation.attributeName == "searchEngineName") {
|
||||||
info("Remove attributes observer");
|
info("Remove attributes observer");
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
// Must be sure to continue after the page mutation observer.
|
// Must be sure to continue after the page mutation observer.
|
||||||
|
|
|
@ -133,12 +133,10 @@ var tests = {
|
||||||
|
|
||||||
function onTabOpen(event) {
|
function onTabOpen(event) {
|
||||||
gBrowser.tabContainer.removeEventListener("TabOpen", onTabOpen, true);
|
gBrowser.tabContainer.removeEventListener("TabOpen", onTabOpen, true);
|
||||||
is(panel.state, "closed", "flyout should be closed");
|
waitForCondition(function() { return panel.state == "closed" }, function() {
|
||||||
ok(true, "Link should open a new tab");
|
|
||||||
executeSoon(function(){
|
|
||||||
gBrowser.removeTab(event.target);
|
gBrowser.removeTab(event.target);
|
||||||
next();
|
next();
|
||||||
});
|
}, "panel should close after tab open");
|
||||||
}
|
}
|
||||||
|
|
||||||
let panel = document.getElementById("social-flyout-panel");
|
let panel = document.getElementById("social-flyout-panel");
|
||||||
|
@ -154,7 +152,7 @@ var tests = {
|
||||||
if (e.data.result == "shown") {
|
if (e.data.result == "shown") {
|
||||||
// click on our test link
|
// click on our test link
|
||||||
is(panel.state, "open", "flyout should be open");
|
is(panel.state, "open", "flyout should be open");
|
||||||
gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, true);
|
gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, true);
|
||||||
let iframe = panel.firstChild;
|
let iframe = panel.firstChild;
|
||||||
iframe.contentDocument.getElementById('traversal').click();
|
iframe.contentDocument.getElementById('traversal').click();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
// Test the top-level window UI for social.
|
// Test the top-level window UI for social.
|
||||||
|
|
||||||
|
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
||||||
|
|
||||||
// This function should "reset" Social such that the next time Social.init()
|
// This function should "reset" Social such that the next time Social.init()
|
||||||
// is called (eg, when a new window is opened), it re-performs all
|
// is called (eg, when a new window is opened), it re-performs all
|
||||||
// initialization.
|
// initialization.
|
||||||
|
@ -12,7 +14,6 @@ function resetSocial() {
|
||||||
Social._provider = null;
|
Social._provider = null;
|
||||||
Social.providers = [];
|
Social.providers = [];
|
||||||
// *sob* - listeners keep getting added...
|
// *sob* - listeners keep getting added...
|
||||||
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
|
||||||
SocialService._providerListeners.clear();
|
SocialService._providerListeners.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,9 +53,10 @@ function test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let tests = {
|
let tests = {
|
||||||
// check when social is totally disabled at startup (ie, no providers)
|
// check when social is totally disabled at startup (ie, no providers enabled)
|
||||||
testInactiveStartup: function(cbnext) {
|
testInactiveStartup: function(cbnext) {
|
||||||
is(Social.providers.length, 0, "needs zero providers to start this test.");
|
is(Social.providers.length, 0, "needs zero providers to start this test.");
|
||||||
|
ok(!SocialService.hasEnabledProviders, "no providers are enabled");
|
||||||
resetSocial();
|
resetSocial();
|
||||||
openWindowAndWaitForInit(function(w1) {
|
openWindowAndWaitForInit(function(w1) {
|
||||||
checkSocialUI(w1);
|
checkSocialUI(w1);
|
||||||
|
@ -67,12 +69,13 @@ let tests = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// Check when providers exist and social is turned on at startup.
|
// Check when providers are enabled and social is turned on at startup.
|
||||||
testEnabledStartup: function(cbnext) {
|
testEnabledStartup: function(cbnext) {
|
||||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||||
resetSocial();
|
resetSocial();
|
||||||
openWindowAndWaitForInit(function(w1) {
|
openWindowAndWaitForInit(function(w1) {
|
||||||
ok(Social.enabled, "social is enabled");
|
ok(Social.enabled, "social is enabled");
|
||||||
|
ok(SocialService.hasEnabledProviders, "providers are enabled");
|
||||||
checkSocialUI(w1);
|
checkSocialUI(w1);
|
||||||
// now init is complete, open a second window
|
// now init is complete, open a second window
|
||||||
openWindowAndWaitForInit(function(w2) {
|
openWindowAndWaitForInit(function(w2) {
|
||||||
|
@ -91,11 +94,13 @@ let tests = {
|
||||||
}, cbnext);
|
}, cbnext);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Check when providers exist but social is turned off at startup.
|
// Check when providers are enabled but social is turned off at startup.
|
||||||
testDisabledStartup: function(cbnext) {
|
testDisabledStartup: function(cbnext) {
|
||||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
setManifestPref("social.manifest.test", manifest);
|
||||||
|
SocialService.addProvider(manifest, function (provider) {
|
||||||
Services.prefs.setBoolPref("social.enabled", false);
|
Services.prefs.setBoolPref("social.enabled", false);
|
||||||
resetSocial();
|
resetSocial();
|
||||||
|
ok(SocialService.hasEnabledProviders, "providers are enabled");
|
||||||
openWindowAndWaitForInit(function(w1) {
|
openWindowAndWaitForInit(function(w1) {
|
||||||
ok(!Social.enabled, "social is disabled");
|
ok(!Social.enabled, "social is disabled");
|
||||||
checkSocialUI(w1);
|
checkSocialUI(w1);
|
||||||
|
@ -109,36 +114,36 @@ let tests = {
|
||||||
ok(Social.enabled, "social is enabled");
|
ok(Social.enabled, "social is enabled");
|
||||||
checkSocialUI(w2);
|
checkSocialUI(w2);
|
||||||
checkSocialUI(w1);
|
checkSocialUI(w1);
|
||||||
finishcb();
|
SocialService.removeProvider(manifest.origin, function() {
|
||||||
});
|
Services.prefs.clearUserPref("social.manifest.test");
|
||||||
});
|
cbnext();
|
||||||
});
|
|
||||||
}, cbnext);
|
|
||||||
},
|
|
||||||
|
|
||||||
// Check when the last provider is removed.
|
|
||||||
testRemoveProvider: function(cbnext) {
|
|
||||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
|
||||||
openWindowAndWaitForInit(function(w1) {
|
|
||||||
checkSocialUI(w1);
|
|
||||||
// now init is complete, open a second window
|
|
||||||
openWindowAndWaitForInit(function(w2) {
|
|
||||||
checkSocialUI(w2);
|
|
||||||
// remove the current provider.
|
|
||||||
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
|
||||||
SocialService.removeProvider(manifest.origin, function() {
|
|
||||||
ok(!Social.enabled, "social is disabled");
|
|
||||||
is(Social.providers.length, 0, "no providers");
|
|
||||||
checkSocialUI(w2);
|
|
||||||
checkSocialUI(w1);
|
|
||||||
// *sob* - runSocialTestWithProvider's cleanup fails when it can't
|
|
||||||
// remove the provider, so re-add it.
|
|
||||||
SocialService.addProvider(manifest, function() {
|
|
||||||
finishcb();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, cbnext);
|
}, cbnext);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Check when the last provider is disabled.
|
||||||
|
testRemoveProvider: function(cbnext) {
|
||||||
|
setManifestPref("social.manifest.test", manifest);
|
||||||
|
SocialService.addProvider(manifest, function (provider) {
|
||||||
|
openWindowAndWaitForInit(function(w1) {
|
||||||
|
checkSocialUI(w1);
|
||||||
|
// now init is complete, open a second window
|
||||||
|
openWindowAndWaitForInit(function(w2) {
|
||||||
|
checkSocialUI(w2);
|
||||||
|
// disable the current provider.
|
||||||
|
SocialService.removeProvider(manifest.origin, function() {
|
||||||
|
ok(!Social.enabled, "social is disabled");
|
||||||
|
is(Social.providers.length, 0, "no providers");
|
||||||
|
checkSocialUI(w2);
|
||||||
|
checkSocialUI(w1);
|
||||||
|
Services.prefs.clearUserPref("social.manifest.test");
|
||||||
|
cbnext();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, cbnext);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,6 +194,7 @@ function runSocialTests(tests, cbPreTest, cbPostTest, cbFinish) {
|
||||||
// A fairly large hammer which checks all aspects of the SocialUI for
|
// A fairly large hammer which checks all aspects of the SocialUI for
|
||||||
// internal consistency.
|
// internal consistency.
|
||||||
function checkSocialUI(win) {
|
function checkSocialUI(win) {
|
||||||
|
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
|
||||||
win = win || window;
|
win = win || window;
|
||||||
let doc = win.document;
|
let doc = win.document;
|
||||||
let provider = Social.provider;
|
let provider = Social.provider;
|
||||||
|
@ -201,6 +202,14 @@ function checkSocialUI(win) {
|
||||||
let active = Social.providers.length > 0 && !win.SocialUI._chromeless &&
|
let active = Social.providers.length > 0 && !win.SocialUI._chromeless &&
|
||||||
!PrivateBrowsingUtils.isWindowPrivate(win);
|
!PrivateBrowsingUtils.isWindowPrivate(win);
|
||||||
|
|
||||||
|
// if we have enabled providers, we should also have instances of those
|
||||||
|
// providers
|
||||||
|
if (SocialService.hasEnabledProviders) {
|
||||||
|
ok(Social.providers.length > 0, "providers are enabled");
|
||||||
|
} else {
|
||||||
|
is(Social.providers.length, 0, "providers are not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
// some local helpers to avoid log-spew for the many checks made here.
|
// some local helpers to avoid log-spew for the many checks made here.
|
||||||
let numGoodTests = 0, numTests = 0;
|
let numGoodTests = 0, numTests = 0;
|
||||||
function _ok(what, msg) {
|
function _ok(what, msg) {
|
||||||
|
@ -246,6 +255,7 @@ function checkSocialUI(win) {
|
||||||
|
|
||||||
// and for good measure, check all the social commands.
|
// and for good measure, check all the social commands.
|
||||||
isbool(!doc.getElementById("Social:Toggle").hidden, active, "Social:Toggle visible?");
|
isbool(!doc.getElementById("Social:Toggle").hidden, active, "Social:Toggle visible?");
|
||||||
|
isbool(!doc.getElementById("Social:ToggleSidebar").hidden, enabled, "Social:ToggleSidebar visible?");
|
||||||
isbool(!doc.getElementById("Social:ToggleNotifications").hidden, enabled, "Social:ToggleNotifications visible?");
|
isbool(!doc.getElementById("Social:ToggleNotifications").hidden, enabled, "Social:ToggleNotifications visible?");
|
||||||
isbool(!doc.getElementById("Social:FocusChat").hidden, enabled, "Social:FocusChat visible?");
|
isbool(!doc.getElementById("Social:FocusChat").hidden, enabled, "Social:FocusChat visible?");
|
||||||
isbool(doc.getElementById("Social:FocusChat").getAttribute("disabled"), enabled ? "false" : "true", "Social:FocusChat disabled?");
|
isbool(doc.getElementById("Social:FocusChat").getAttribute("disabled"), enabled ? "false" : "true", "Social:FocusChat disabled?");
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
|
<!DOCTYPE bindings [
|
||||||
|
<!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
|
||||||
|
%notificationDTD;
|
||||||
|
]>
|
||||||
|
|
||||||
|
<bindings id="notificationBindings"
|
||||||
|
xmlns="http://www.mozilla.org/xbl"
|
||||||
|
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||||
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
|
<binding id="notificationbox" extends="chrome://global/content/bindings/notification.xml#notificationbox">
|
||||||
|
<content>
|
||||||
|
<xul:stack xbl:inherits="hidden=notificationshidden"
|
||||||
|
class="notificationbox-stack">
|
||||||
|
<xul:spacer/>
|
||||||
|
<children includes="notification"/>
|
||||||
|
</xul:stack>
|
||||||
|
<html:div anonid="layer1" class="notification-layer"></html:div>
|
||||||
|
<html:div anonid="layer2" class="notification-layer"></html:div>
|
||||||
|
<children/>
|
||||||
|
</content>
|
||||||
|
|
||||||
|
<implementation>
|
||||||
|
<constructor>
|
||||||
|
<![CDATA[
|
||||||
|
this.addEventListener("AlertActive", this.handleEvent, true);
|
||||||
|
this.addEventListener("AlertClose", this.handleEvent, true);
|
||||||
|
this.setAttribute("count", 0);
|
||||||
|
]]>
|
||||||
|
</constructor>
|
||||||
|
<destructor>
|
||||||
|
<![CDATA[
|
||||||
|
this.removeEventListener("AlertActive", this.handleEvent, true);
|
||||||
|
this.removeEventListener("AlertClose", this.handleEvent, true);
|
||||||
|
]]>
|
||||||
|
</destructor>
|
||||||
|
<method name="removeNotification">
|
||||||
|
<parameter name="aItem"/>
|
||||||
|
<parameter name="aSkipAnimation"/>
|
||||||
|
<body>
|
||||||
|
<![CDATA[
|
||||||
|
if (aItem == this.currentNotification)
|
||||||
|
this.removeCurrentNotification(aSkipAnimation);
|
||||||
|
else if (aItem != this._closedNotification)
|
||||||
|
this._removeNotificationElement(aItem);
|
||||||
|
|
||||||
|
// Fire notification closed event.
|
||||||
|
let event = new Event('AlertClose');
|
||||||
|
this.dispatchEvent(event);
|
||||||
|
|
||||||
|
return aItem;
|
||||||
|
]]>
|
||||||
|
</body>
|
||||||
|
</method>
|
||||||
|
<method name="handleEvent">
|
||||||
|
<parameter name="aEvent"/>
|
||||||
|
<body>
|
||||||
|
<![CDATA[
|
||||||
|
switch (aEvent.type) {
|
||||||
|
case "AlertActive":
|
||||||
|
case "AlertClose":
|
||||||
|
this.setAttribute("count", this.allNotifications.length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</body>
|
||||||
|
</method>
|
||||||
|
</implementation>
|
||||||
|
</binding>
|
||||||
|
|
||||||
|
|
||||||
|
</bindings>
|
|
@ -46,6 +46,10 @@ autoscroller {
|
||||||
-moz-binding: url('chrome://browser/content/bindings/popup.xml#element-popup');
|
-moz-binding: url('chrome://browser/content/bindings/popup.xml#element-popup');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notificationbox {
|
||||||
|
-moz-binding: url('chrome://browser/content/bindings/notification.xml#notificationbox');
|
||||||
|
}
|
||||||
|
|
||||||
circularprogressindicator {
|
circularprogressindicator {
|
||||||
-moz-binding: url('chrome://browser/content/bindings/circularprogress.xml#circular-progress-indicator');
|
-moz-binding: url('chrome://browser/content/bindings/circularprogress.xml#circular-progress-indicator');
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ chrome.jar:
|
||||||
content/bindings/cssthrobber.xml (content/bindings/cssthrobber.xml)
|
content/bindings/cssthrobber.xml (content/bindings/cssthrobber.xml)
|
||||||
content/bindings/popup.xml (content/bindings/popup.xml)
|
content/bindings/popup.xml (content/bindings/popup.xml)
|
||||||
content/bindings/circularprogress.xml (content/bindings/circularprogress.xml)
|
content/bindings/circularprogress.xml (content/bindings/circularprogress.xml)
|
||||||
|
content/bindings/notification.xml (content/bindings/notification.xml)
|
||||||
|
|
||||||
* content/flyoutpanels/FlyoutPanelsUI.js (content/flyoutpanels/FlyoutPanelsUI.js)
|
* content/flyoutpanels/FlyoutPanelsUI.js (content/flyoutpanels/FlyoutPanelsUI.js)
|
||||||
* content/flyoutpanels/AboutFlyoutPanel.js (content/flyoutpanels/AboutFlyoutPanel.js)
|
* content/flyoutpanels/AboutFlyoutPanel.js (content/flyoutpanels/AboutFlyoutPanel.js)
|
||||||
|
|
|
@ -447,8 +447,27 @@ notification {
|
||||||
min-height: 64px;
|
min-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notificationbox[count="0"] .notification-layer,
|
||||||
|
notificationbox[count="1"] .notification-layer,
|
||||||
|
notificationbox[count="2"] .notification-layer[anonid="layer2"] {
|
||||||
|
visibility: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
notificationbox[count="2"] .notification-layer[anonid="layer1"],
|
||||||
|
notificationbox[count="3"] .notification-layer[anonid="layer1"],
|
||||||
|
notificationbox[count="3"] .notification-layer[anonid="layer2"] {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-layer {
|
||||||
|
border: @metro_border_thin@ solid @field_disabled_foreground_color@;
|
||||||
|
border-bottom: none;
|
||||||
|
height:5px
|
||||||
|
}
|
||||||
|
|
||||||
.notification-inner {
|
.notification-inner {
|
||||||
border-style: none;
|
border-style: none;
|
||||||
|
border: @metro_border_thin@ solid @field_disabled_foreground_color@;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-button {
|
.notification-button {
|
||||||
|
|
|
@ -25,21 +25,6 @@ const STARTPAGE_VERSION = 4;
|
||||||
this.AboutHomeUtils = {
|
this.AboutHomeUtils = {
|
||||||
get snippetsVersion() STARTPAGE_VERSION,
|
get snippetsVersion() STARTPAGE_VERSION,
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an object containing the name and searchURL of the original default
|
|
||||||
* search engine.
|
|
||||||
*/
|
|
||||||
get defaultSearchEngine() {
|
|
||||||
let defaultEngine = Services.search.defaultEngine;
|
|
||||||
let submission = defaultEngine.getSubmission("_searchTerms_", null, "homepage");
|
|
||||||
|
|
||||||
return Object.freeze({
|
|
||||||
name: defaultEngine.name,
|
|
||||||
searchURL: submission.uri.spec,
|
|
||||||
postDataString: submission.postDataString
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* showKnowYourRights - Determines if the user should be shown the
|
* showKnowYourRights - Determines if the user should be shown the
|
||||||
* about:rights notification. The notification should *not* be shown if
|
* about:rights notification. The notification should *not* be shown if
|
||||||
|
@ -173,9 +158,19 @@ let AboutHome = {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "AboutHome:Search":
|
case "AboutHome:Search":
|
||||||
|
let data;
|
||||||
|
try {
|
||||||
|
data = JSON.parse(aMessage.data.searchData);
|
||||||
|
} catch(ex) {
|
||||||
|
Cu.reportError(ex);
|
||||||
|
break;
|
||||||
|
}
|
||||||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
window.BrowserSearch.recordSearchInHealthReport(aMessage.data.engineName, "abouthome");
|
window.BrowserSearch.recordSearchInHealthReport(data.engineName, "abouthome");
|
||||||
#endif
|
#endif
|
||||||
|
// Trigger a search through nsISearchEngine.getSubmission()
|
||||||
|
let submission = Services.search.currentEngine.getSubmission(data.searchTerms);
|
||||||
|
window.loadURI(submission.uri.spec, null, submission.postData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -189,8 +184,7 @@ let AboutHome = {
|
||||||
showRestoreLastSession: ss.canRestoreLastSession,
|
showRestoreLastSession: ss.canRestoreLastSession,
|
||||||
snippetsURL: AboutHomeUtils.snippetsURL,
|
snippetsURL: AboutHomeUtils.snippetsURL,
|
||||||
showKnowYourRights: AboutHomeUtils.showKnowYourRights,
|
showKnowYourRights: AboutHomeUtils.showKnowYourRights,
|
||||||
snippetsVersion: AboutHomeUtils.snippetsVersion,
|
snippetsVersion: AboutHomeUtils.snippetsVersion
|
||||||
defaultSearchEngine: AboutHomeUtils.defaultSearchEngine
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (AboutHomeUtils.showKnowYourRights) {
|
if (AboutHomeUtils.showKnowYourRights) {
|
||||||
|
|
|
@ -158,8 +158,9 @@ this.Social = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
|
// if SocialService.hasEnabledProviders, retreive the providers so the
|
||||||
if (SocialService.enabled) {
|
// front-end can generate UI
|
||||||
|
if (SocialService.hasEnabledProviders) {
|
||||||
// Retrieve the current set of providers, and set the current provider.
|
// Retrieve the current set of providers, and set the current provider.
|
||||||
SocialService.getOrderedProviderList(function (providers) {
|
SocialService.getOrderedProviderList(function (providers) {
|
||||||
Social._updateProviderCache(providers);
|
Social._updateProviderCache(providers);
|
||||||
|
|
|
@ -11,16 +11,24 @@
|
||||||
android:paddingLeft="50dp"
|
android:paddingLeft="50dp"
|
||||||
android:paddingRight="50dp">
|
android:paddingRight="50dp">
|
||||||
|
|
||||||
|
<!-- Empty spacer view -->
|
||||||
|
<View android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0dip"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView android:id="@+id/home_empty_image"
|
<ImageView android:id="@+id/home_empty_image"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="15dp"/>
|
android:gravity="top|center"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:paddingBottom="10dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/home_empty_text"
|
<TextView android:id="@+id/home_empty_text"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dip"
|
||||||
android:gravity="center"
|
android:gravity="top|center"
|
||||||
android:textAppearance="@style/TextAppearance.EmptyMessage"/>
|
android:textAppearance="@style/TextAppearance.EmptyMessage"
|
||||||
|
android:layout_weight="3"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
interface nsIURI;
|
interface nsIURI;
|
||||||
interface nsIInputStream;
|
interface nsIInputStream;
|
||||||
|
|
||||||
[scriptable, uuid(82ec6ee8-68b5-49ef-87b7-0d5240f8a183)]
|
[scriptable, uuid(5799251f-5b55-4df7-a9e7-0c27812c469a)]
|
||||||
interface nsISearchSubmission : nsISupports
|
interface nsISearchSubmission : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -16,12 +16,6 @@ interface nsISearchSubmission : nsISupports
|
||||||
*/
|
*/
|
||||||
readonly attribute nsIInputStream postData;
|
readonly attribute nsIInputStream postData;
|
||||||
|
|
||||||
/**
|
|
||||||
* The POST data associated with a search submission as an
|
|
||||||
* application/x-www-form-urlencoded string. May be null.
|
|
||||||
*/
|
|
||||||
readonly attribute AString postDataString;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URI to submit a search to.
|
* The URI to submit a search to.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -931,7 +931,6 @@ EngineURL.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
var postData = null;
|
var postData = null;
|
||||||
let postDataString = null;
|
|
||||||
if (this.method == "GET") {
|
if (this.method == "GET") {
|
||||||
// GET method requests have no post data, and append the encoded
|
// GET method requests have no post data, and append the encoded
|
||||||
// query string to the url...
|
// query string to the url...
|
||||||
|
@ -939,8 +938,8 @@ EngineURL.prototype = {
|
||||||
url += "?";
|
url += "?";
|
||||||
url += dataString;
|
url += dataString;
|
||||||
} else if (this.method == "POST") {
|
} else if (this.method == "POST") {
|
||||||
// For POST requests, specify the data as a MIME stream as well as a string.
|
// POST method requests must wrap the encoded text in a MIME
|
||||||
postDataString = dataString;
|
// stream and supply that as POSTDATA.
|
||||||
var stringStream = Cc["@mozilla.org/io/string-input-stream;1"].
|
var stringStream = Cc["@mozilla.org/io/string-input-stream;1"].
|
||||||
createInstance(Ci.nsIStringInputStream);
|
createInstance(Ci.nsIStringInputStream);
|
||||||
stringStream.data = dataString;
|
stringStream.data = dataString;
|
||||||
|
@ -952,7 +951,7 @@ EngineURL.prototype = {
|
||||||
postData.setData(stringStream);
|
postData.setData(stringStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Submission(makeURI(url), postData, postDataString);
|
return new Submission(makeURI(url), postData);
|
||||||
},
|
},
|
||||||
|
|
||||||
_hasRelation: function SRC_EURL__hasRelation(aRel)
|
_hasRelation: function SRC_EURL__hasRelation(aRel)
|
||||||
|
@ -2544,7 +2543,7 @@ Engine.prototype = {
|
||||||
|
|
||||||
if (!aData) {
|
if (!aData) {
|
||||||
// Return a dummy submission object with our searchForm attribute
|
// Return a dummy submission object with our searchForm attribute
|
||||||
return new Submission(makeURI(this.searchForm));
|
return new Submission(makeURI(this.searchForm), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG("getSubmission: In data: \"" + aData + "\"; Purpose: \"" + aPurpose + "\"");
|
LOG("getSubmission: In data: \"" + aData + "\"; Purpose: \"" + aPurpose + "\"");
|
||||||
|
@ -2581,10 +2580,9 @@ Engine.prototype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// nsISearchSubmission
|
// nsISearchSubmission
|
||||||
function Submission(aURI, aPostData = null, aPostDataString = null) {
|
function Submission(aURI, aPostData = null) {
|
||||||
this._uri = aURI;
|
this._uri = aURI;
|
||||||
this._postData = aPostData;
|
this._postData = aPostData;
|
||||||
this._postDataString = aPostDataString;
|
|
||||||
}
|
}
|
||||||
Submission.prototype = {
|
Submission.prototype = {
|
||||||
get uri() {
|
get uri() {
|
||||||
|
@ -2593,9 +2591,6 @@ Submission.prototype = {
|
||||||
get postData() {
|
get postData() {
|
||||||
return this._postData;
|
return this._postData;
|
||||||
},
|
},
|
||||||
get postDataString() {
|
|
||||||
return this._postDataString;
|
|
||||||
},
|
|
||||||
QueryInterface: function SRCH_SUBM_QI(aIID) {
|
QueryInterface: function SRCH_SUBM_QI(aIID) {
|
||||||
if (aIID.equals(Ci.nsISearchSubmission) ||
|
if (aIID.equals(Ci.nsISearchSubmission) ||
|
||||||
aIID.equals(Ci.nsISupports))
|
aIID.equals(Ci.nsISupports))
|
||||||
|
|
|
@ -350,6 +350,16 @@ function schedule(callback) {
|
||||||
|
|
||||||
// Public API
|
// Public API
|
||||||
this.SocialService = {
|
this.SocialService = {
|
||||||
|
get hasEnabledProviders() {
|
||||||
|
// used as an optimization during startup, can be used to check if further
|
||||||
|
// initialization should be done (e.g. creating the instances of
|
||||||
|
// SocialProvider and turning on UI). ActiveProviders may have changed and
|
||||||
|
// not yet flushed so we check the active providers array
|
||||||
|
for (let p in ActiveProviders._providers) {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
return false;
|
||||||
|
},
|
||||||
get enabled() {
|
get enabled() {
|
||||||
return SocialServiceInternal.enabled;
|
return SocialServiceInternal.enabled;
|
||||||
},
|
},
|
||||||
|
|
|
@ -318,6 +318,7 @@ if (APP_BIN_NAME == "xulrunner") {
|
||||||
* Nulls out the most commonly used global vars used by tests as appropriate.
|
* Nulls out the most commonly used global vars used by tests as appropriate.
|
||||||
*/
|
*/
|
||||||
function cleanUp() {
|
function cleanUp() {
|
||||||
|
logTestInfo("start - general test cleanup");
|
||||||
removeUpdateDirsAndFiles();
|
removeUpdateDirsAndFiles();
|
||||||
|
|
||||||
// Force the update manager to reload the update data to prevent it from
|
// Force the update manager to reload the update data to prevent it from
|
||||||
|
@ -348,6 +349,7 @@ function cleanUp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gTestserver = null;
|
gTestserver = null;
|
||||||
|
logTestInfo("finish - general test cleanup");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1562,14 +1564,41 @@ function removeCallbackCopy() {
|
||||||
appBinCopy.remove(false);
|
appBinCopy.remove(false);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
logTestInfo("non-fatal error removing file during cleanup (will try " +
|
logTestInfo("non-fatal error removing file after test finished (will " +
|
||||||
"again). File: " + appBinCopy.path + " Exception: " + e);
|
"try again). File: " + appBinCopy.path + " Exception: " + e);
|
||||||
do_timeout(TEST_HELPER_TIMEOUT, removeCallbackCopy);
|
do_timeout(TEST_HELPER_TIMEOUT, removeCallbackCopy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Use a timeout to give any files that were in use additional
|
logTestInfo("attempting removal of the updater binary");
|
||||||
// time to close. Same as updater.exe without service tests.
|
removeUpdater();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for updater tests that removes the updater binary before
|
||||||
|
* ending the test so the updater binary isn't in use during test cleanup.
|
||||||
|
*/
|
||||||
|
function removeUpdater() {
|
||||||
|
if (IS_WIN) {
|
||||||
|
// Remove the copy of the application executable used for the test on
|
||||||
|
// Windows if it exists.
|
||||||
|
let updater = getUpdatesDir();
|
||||||
|
updater.append("0");
|
||||||
|
updater.append(UPDATER_BIN_FILE);
|
||||||
|
if (updater.exists()) {
|
||||||
|
try {
|
||||||
|
updater.remove(false);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
logTestInfo("non-fatal error removing file after test finished (will " +
|
||||||
|
"try again). File: " + updater.path + " Exception: " + e);
|
||||||
|
do_timeout(TEST_HELPER_TIMEOUT, removeUpdater);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logTestInfo("calling do_test_finished");
|
||||||
do_test_finished();
|
do_test_finished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2113,8 +2142,10 @@ function adjustPathsOnWindows() {
|
||||||
let ds = Services.dirsvc.QueryInterface(AUS_Ci.nsIDirectoryService);
|
let ds = Services.dirsvc.QueryInterface(AUS_Ci.nsIDirectoryService);
|
||||||
ds.QueryInterface(AUS_Ci.nsIProperties).undefine(NS_GRE_DIR);
|
ds.QueryInterface(AUS_Ci.nsIProperties).undefine(NS_GRE_DIR);
|
||||||
ds.registerProvider(dirProvider);
|
ds.registerProvider(dirProvider);
|
||||||
do_register_cleanup(function() {
|
do_register_cleanup(function APOW_cleanup() {
|
||||||
|
logTestInfo("start - unregistering directory provider");
|
||||||
ds.unregisterProvider(dirProvider);
|
ds.unregisterProvider(dirProvider);
|
||||||
|
logTestInfo("finish - unregistering directory provider");
|
||||||
});
|
});
|
||||||
logTestInfo("finish - setup new process directory");
|
logTestInfo("finish - setup new process directory");
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,11 +83,13 @@ function symlinkUpdateFilesIntoBundleDirectory() {
|
||||||
do_check_true(source2.exists());
|
do_check_true(source2.exists());
|
||||||
|
|
||||||
// Cleanup the symlinks when the test is finished.
|
// Cleanup the symlinks when the test is finished.
|
||||||
do_register_cleanup(function() {
|
do_register_cleanup(function AUFIBD_cleanup() {
|
||||||
|
logTestInfo("start - unlinking symlinks");
|
||||||
let ret = unlink(source.path);
|
let ret = unlink(source.path);
|
||||||
do_check_false(source.exists());
|
do_check_false(source.exists());
|
||||||
let ret = unlink(source2.path);
|
let ret = unlink(source2.path);
|
||||||
do_check_false(source2.exists());
|
do_check_false(source2.exists());
|
||||||
|
logTestInfo("finish - unlinking symlinks");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Now, make sure that getUpdatesRootDir returns the application bundle
|
// Now, make sure that getUpdatesRootDir returns the application bundle
|
||||||
|
@ -198,6 +200,7 @@ function run_test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function end_test() {
|
function end_test() {
|
||||||
|
logTestInfo("start - test cleanup");
|
||||||
// Remove the files added by the update.
|
// Remove the files added by the update.
|
||||||
let updateTestDir = getUpdateTestDir();
|
let updateTestDir = getUpdateTestDir();
|
||||||
try {
|
try {
|
||||||
|
@ -230,6 +233,7 @@ function end_test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp();
|
cleanUp();
|
||||||
|
logTestInfo("finish - test cleanup");
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldAdjustPathsOnMac() {
|
function shouldAdjustPathsOnMac() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче