зеркало из https://github.com/mozilla/pjs.git
Merge
This commit is contained in:
Коммит
7d99e9efdd
|
@ -78,7 +78,11 @@
|
|||
}
|
||||
]
|
||||
};
|
||||
testAccessibleTree("menulist2", accTree);
|
||||
|
||||
// XXX Bug 551957
|
||||
if (!MAC) {
|
||||
testAccessibleTree("menulist2", accTree);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// textbox@type=autocomplete #1 (history)
|
||||
|
@ -171,7 +175,7 @@
|
|||
|
||||
<textbox id="autocomplete" type="autocomplete"
|
||||
autocompletesearch="history"
|
||||
value="http://localhost:8888/redirect-a11y.html"/>
|
||||
value="http://mochi.test:8888/redirect-a11y.html"/>
|
||||
|
||||
<textbox id="autocomplete2" type="autocomplete">
|
||||
<menupopup>
|
||||
|
|
|
@ -240,7 +240,6 @@ pref("browser.urlbar.delay", 50);
|
|||
pref("browser.urlbar.restrict.history", "^");
|
||||
pref("browser.urlbar.restrict.bookmark", "*");
|
||||
pref("browser.urlbar.restrict.tag", "+");
|
||||
pref("browser.urlbar.restrict.openpage", "%");
|
||||
pref("browser.urlbar.restrict.typed", "~");
|
||||
pref("browser.urlbar.match.title", "#");
|
||||
pref("browser.urlbar.match.url", "@");
|
||||
|
@ -248,8 +247,7 @@ pref("browser.urlbar.match.url", "@");
|
|||
// The default behavior for the urlbar can be configured to use any combination
|
||||
// of the restrict or match filters with each additional filter restricting
|
||||
// more (intersection). Add the following values to set the behavior as the
|
||||
// default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed,
|
||||
// 64: javascript, 128: tabs
|
||||
// default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed
|
||||
// E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
|
||||
// 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
|
||||
pref("browser.urlbar.default.behavior", 0);
|
||||
|
|
|
@ -43,26 +43,6 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
|
|||
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
|
||||
}
|
||||
|
||||
/* Some child nodes want to be ordered based on the locale's direction, while
|
||||
everything else should be ltr. */
|
||||
#urlbar:-moz-locale-dir(rtl) > .autocomplete-textbox-container > .textbox-input-box {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
#urlbar html|*.autocomplete-textbox {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* For results that are actions, their description text is shown instead of
|
||||
the URL - this needs to follow the locale's direction, unlike URLs. */
|
||||
richlistitem[type="action"]:-moz-locale-dir(rtl) > .ac-url-box {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
#urlbar:not([actiontype]) > #urlbar-display {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wrapper-urlbar-container > #urlbar-container > #urlbar {
|
||||
-moz-user-input: disabled;
|
||||
cursor: -moz-grab;
|
||||
|
@ -76,8 +56,6 @@ richlistitem[type="action"]:-moz-locale-dir(rtl) > .ac-url-box {
|
|||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#urlbar-throbber:not([busy="true"]),
|
||||
#urlbar-throbber[busy="true"] + #page-proxy-favicon {
|
||||
display: none;
|
||||
|
|
|
@ -3835,6 +3835,7 @@ var XULBrowserWindow = {
|
|||
overLink: "",
|
||||
startTime: 0,
|
||||
statusText: "",
|
||||
lastURI: null,
|
||||
isBusy: false,
|
||||
|
||||
_progressCollapseTimer: 0,
|
||||
|
@ -3898,6 +3899,7 @@ var XULBrowserWindow = {
|
|||
delete this.statusTextField;
|
||||
delete this.securityButton;
|
||||
delete this.statusText;
|
||||
delete this.lastURI;
|
||||
},
|
||||
|
||||
setJSStatus: function (status) {
|
||||
|
@ -4112,6 +4114,7 @@ var XULBrowserWindow = {
|
|||
nBox.removeTransientNotifications();
|
||||
}
|
||||
}
|
||||
selectedBrowser.lastURI = aLocationURI;
|
||||
|
||||
// Disable menu entries for images, enable otherwise
|
||||
if (content.document && mimeTypeIsTextBased(content.document.contentType))
|
||||
|
@ -7483,44 +7486,3 @@ var LightWeightThemeWebInstaller = {
|
|||
node.baseURI);
|
||||
}
|
||||
}
|
||||
|
||||
function switchToTabHavingURI(aURI) {
|
||||
function switchIfURIInWindow(aWindow) {
|
||||
if (!("gBrowser" in aWindow))
|
||||
return false;
|
||||
let browsers = aWindow.gBrowser.browsers;
|
||||
for (let i = 0; i < browsers.length; i++) {
|
||||
let browser = browsers[i];
|
||||
if (browser.currentURI.equals(aURI)) {
|
||||
gURLBar.handleRevert();
|
||||
aWindow.focus();
|
||||
aWindow.gBrowser.tabContainer.selectedIndex = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// This can be passed either nsIURI or a string.
|
||||
if (!(aURI instanceof Ci.nsIURI))
|
||||
aURI = makeURI(aURI);
|
||||
|
||||
// Prioritise this window.
|
||||
if (switchIfURIInWindow(window))
|
||||
return true;
|
||||
|
||||
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Ci.nsIWindowMediator);
|
||||
let winEnum = windowMediator.getEnumerator("navigator:browser");
|
||||
while (winEnum.hasMoreElements()) {
|
||||
let browserWin = winEnum.getNext();
|
||||
// Skip closed (but not yet destroyed) windows,
|
||||
// and the current window (which was checked earlier).
|
||||
if (browserWin.closed || browserWin == window)
|
||||
continue;
|
||||
if (switchIfURIInWindow(browserWin))
|
||||
return true;
|
||||
}
|
||||
// No opened tab has that url.
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -405,7 +405,6 @@
|
|||
noneplaceholder="&urlbar.none.emptyText;"
|
||||
type="autocomplete"
|
||||
autocompletesearch="history"
|
||||
autocompletesearchparam="enable-actions"
|
||||
autocompletepopup="PopupAutoCompleteRichResult"
|
||||
completeselectedindex="true"
|
||||
tabscrolling="true"
|
||||
|
@ -444,7 +443,6 @@
|
|||
</hbox>
|
||||
</hbox>
|
||||
</box>
|
||||
<label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
|
||||
<hbox id="urlbar-icons">
|
||||
<button type="menu"
|
||||
style="-moz-user-focus: none"
|
||||
|
|
|
@ -422,7 +422,7 @@ var gSanitizePromptDialog = {
|
|||
|
||||
var view = gContiguousSelectionTreeHelper.setTree(this.placesTree,
|
||||
new PlacesTreeView());
|
||||
result.viewer = view;
|
||||
result.addObserver(view, false);
|
||||
this.initDurationDropdown();
|
||||
},
|
||||
|
||||
|
@ -529,8 +529,8 @@ var gSanitizePromptDialog = {
|
|||
*/
|
||||
unload: function ()
|
||||
{
|
||||
var view = this.placesTree.view;
|
||||
view.QueryInterface(Ci.nsINavHistoryResultViewer).result.viewer = null;
|
||||
let result = this.placesTree.getResult();
|
||||
result.removeObserver(this.placesTree.view);
|
||||
this.placesTree.view = null;
|
||||
},
|
||||
|
||||
|
|
|
@ -154,10 +154,6 @@
|
|||
Components.classes["@mozilla.org/browser/favicon-service;1"]
|
||||
.getService(Components.interfaces.nsIFaviconService);
|
||||
</field>
|
||||
<field name="mBrowserHistory">
|
||||
Components.classes["@mozilla.org/browser/nav-history-service;1"]
|
||||
.getService(Components.interfaces.nsIBrowserHistory);
|
||||
</field>
|
||||
<field name="mTabBox" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "tabbox");
|
||||
</field>
|
||||
|
@ -531,30 +527,15 @@
|
|||
// changing location, clear out the missing plugins list
|
||||
this.mBrowser.missingPlugins = null;
|
||||
|
||||
var browserHistory = this.mTabBrowser.mBrowserHistory;
|
||||
if ("lastURI" in this.mBrowser && this.mBrowser.lastURI)
|
||||
browserHistory.unregisterOpenPage(this.mBrowser.lastURI);
|
||||
browserHistory.registerOpenPage(aLocation);
|
||||
if (this.mBlank)
|
||||
return;
|
||||
|
||||
if (!this.mBlank) {
|
||||
if (this.mTabBrowser.mCurrentTab == this.mTab) {
|
||||
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
|
||||
let p = this.mTabBrowser.mProgressListeners[i];
|
||||
if (p)
|
||||
try {
|
||||
p.onLocationChange(aWebProgress, aRequest, aLocation);
|
||||
} catch (e) {
|
||||
// don't inhibit other listeners
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
|
||||
let p = this.mTabBrowser.mTabsProgressListeners[i];
|
||||
if (this.mTabBrowser.mCurrentTab == this.mTab) {
|
||||
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
|
||||
let p = this.mTabBrowser.mProgressListeners[i];
|
||||
if (p)
|
||||
try {
|
||||
p.onLocationChange(this.mBrowser, aWebProgress, aRequest, aLocation);
|
||||
p.onLocationChange(aWebProgress, aRequest, aLocation);
|
||||
} catch (e) {
|
||||
// don't inhibit other listeners
|
||||
Components.utils.reportError(e);
|
||||
|
@ -562,8 +543,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
this.mBrowser.lastURI = aLocation;
|
||||
|
||||
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
|
||||
let p = this.mTabBrowser.mTabsProgressListeners[i];
|
||||
if (p)
|
||||
try {
|
||||
p.onLocationChange(this.mBrowser, aWebProgress, aRequest, aLocation);
|
||||
} catch (e) {
|
||||
// don't inhibit other listeners
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
|
||||
|
@ -1576,10 +1565,6 @@
|
|||
filter.removeProgressListener(this.mTabListeners[aTab._tPos]);
|
||||
this.mTabListeners[aTab._tPos].destroy();
|
||||
|
||||
let closedBrowser = this.getBrowserForTab(aTab);
|
||||
if (closedBrowser.currentURI)
|
||||
this.mBrowserHistory.unregisterOpenPage(closedBrowser.currentURI);
|
||||
|
||||
// We are no longer the primary content area.
|
||||
browser.setAttribute("type", "content-targetable");
|
||||
|
||||
|
@ -2834,8 +2819,6 @@
|
|||
this.mTabFilters[i] = null;
|
||||
this.mTabListeners[i].destroy();
|
||||
this.mTabListeners[i] = null;
|
||||
let browser = this.getBrowserAtIndex(i);
|
||||
this.mBrowserHistory.unregisterOpenPage(browser.currentURI);
|
||||
}
|
||||
document.removeEventListener("keypress", this, false);
|
||||
]]>
|
||||
|
|
|
@ -149,7 +149,6 @@ _BROWSER_FILES = \
|
|||
alltabslistener.html \
|
||||
zoom_test.html \
|
||||
dummy_page.html \
|
||||
browser_tabMatchesInAwesomebar.js \
|
||||
$(NULL)
|
||||
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
|
|
@ -33,6 +33,6 @@ function test () {
|
|||
}, true);
|
||||
|
||||
content.location =
|
||||
"http://localhost:8888/browser/browser/base/content/test/title_test.svg";
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/title_test.svg";
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function start_test_prefNotSet() {
|
|||
isnot(zoomLevel, 1, "zoom level should have changed");
|
||||
|
||||
content.location =
|
||||
"http://localhost:8888/browser/browser/base/content/test/moz.png";
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/moz.png";
|
||||
}
|
||||
|
||||
function continue_test_prefNotSet () {
|
||||
|
@ -22,7 +22,7 @@ function continue_test_prefNotSet () {
|
|||
FullZoom.reset();
|
||||
|
||||
content.location =
|
||||
"http://localhost:8888/browser/browser/base/content/test/zoom_test.html";
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html";
|
||||
}
|
||||
|
||||
function end_test_prefNotSet() {
|
||||
|
@ -44,6 +44,6 @@ function test() {
|
|||
tabElm.linkedBrowser.addEventListener("load", start_test_prefNotSet, true);
|
||||
|
||||
content.location =
|
||||
"http://localhost:8888/browser/browser/base/content/test/zoom_test.html";
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html";
|
||||
|
||||
}
|
||||
|
|
|
@ -43,14 +43,12 @@ function testCustomize(aWindow, aCallback) {
|
|||
is(fileMenu.disabled, true,
|
||||
"file menu is disabled during toolbar customization");
|
||||
|
||||
// Set a callback on the window's toolbox
|
||||
var nt = aWindow.getNavToolbox();
|
||||
var oldHandler = nt.customizeInitialized;
|
||||
nt.customizeInitialized = ctInit;
|
||||
function ctInit() {
|
||||
// Restore customizeInitialized handler
|
||||
nt.customizeInitialized = oldHandler;
|
||||
aWindow.gNavToolbox.addEventListener("beforecustomization", function () {
|
||||
aWindow.gNavToolbox.removeEventListener("beforecustomization", arguments.callee, false);
|
||||
executeSoon(ctInit);
|
||||
}, false);
|
||||
|
||||
function ctInit() {
|
||||
// Close toolbar customization
|
||||
closeToolbarCustomization(aWindow, ctEl);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab(
|
||||
"http://localhost:8888/browser/browser/base/content/test/browser_bug479408_sample.html");
|
||||
"http://mochi.test:8888/browser/browser/base/content/test/browser_bug479408_sample.html");
|
||||
|
||||
gBrowser.addEventListener("DOMLinkAdded", function(aEvent) {
|
||||
gBrowser.removeEventListener("DOMLinkAdded", arguments.callee, true);
|
||||
|
|
|
@ -44,14 +44,14 @@ function test() {
|
|||
|
||||
// test normal close
|
||||
tabA = gBrowser.addTab(testPage);
|
||||
gBrowser.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.removeEventListener("TabClose", arguments.callee, true);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", arguments.callee, true);
|
||||
ok(!aEvent.detail, "This was a normal tab close");
|
||||
|
||||
// test tab close by moving
|
||||
tabB = gBrowser.addTab(testPage);
|
||||
gBrowser.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.removeEventListener("TabClose", arguments.callee, true);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", arguments.callee, true);
|
||||
executeSoon(function() {
|
||||
ok(aEvent.detail, "This was a tab closed by moving");
|
||||
|
||||
|
|
|
@ -45,22 +45,22 @@ function test() {
|
|||
function addTab(aURL,aReferrer)
|
||||
tabs.push(gBrowser.addTab(aURL, {referrerURI: aReferrer}));
|
||||
|
||||
addTab("http://localhost:8888/#0");
|
||||
addTab("http://mochi.test:8888/#0");
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
addTab("http://localhost:8888/#1");
|
||||
addTab("http://localhost:8888/#2",gBrowser.currentURI);
|
||||
addTab("http://localhost:8888/#3",gBrowser.currentURI);
|
||||
addTab("http://mochi.test:8888/#1");
|
||||
addTab("http://mochi.test:8888/#2",gBrowser.currentURI);
|
||||
addTab("http://mochi.test:8888/#3",gBrowser.currentURI);
|
||||
gBrowser.selectedTab = tabs[tabs.length - 1];
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
addTab("http://localhost:8888/#4",gBrowser.currentURI);
|
||||
addTab("http://mochi.test:8888/#4",gBrowser.currentURI);
|
||||
gBrowser.selectedTab = tabs[3];
|
||||
addTab("http://localhost:8888/#5",gBrowser.currentURI);
|
||||
addTab("http://mochi.test:8888/#5",gBrowser.currentURI);
|
||||
gBrowser.removeTab(tabs.pop());
|
||||
addTab("about:blank",gBrowser.currentURI);
|
||||
gBrowser.moveTabTo(gBrowser.selectedTab, 1);
|
||||
addTab("http://localhost:8888/#6",gBrowser.currentURI);
|
||||
addTab("http://mochi.test:8888/#6",gBrowser.currentURI);
|
||||
addTab();
|
||||
addTab("http://localhost:8888/#7");
|
||||
addTab("http://mochi.test:8888/#7");
|
||||
|
||||
return tabs;
|
||||
}
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
const TEST_URL_BASES = [
|
||||
"http://example.org/browser/browser/base/content/test/dummy_page.html#tabmatch",
|
||||
"http://example.org/browser/browser/base/content/test/moz.png#tabmatch"
|
||||
];
|
||||
|
||||
var gIOService = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var gWindowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
var gPrivateBrowsing = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
var gObserverService = Cc["@mozilla.org/observer-service;1"].
|
||||
getService(Ci.nsIObserverService);
|
||||
|
||||
|
||||
var gTabWaitCount = 0;
|
||||
var gTabCounter = 0;
|
||||
var gNewWindow = null;
|
||||
|
||||
var gTestSteps = [
|
||||
function() {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
let tab = gBrowser.addTab();
|
||||
loadTab(tab, TEST_URL_BASES[0] + (++gTabCounter));
|
||||
}
|
||||
},
|
||||
function() {
|
||||
gBrowser.selectTabAtIndex(1);
|
||||
gBrowser.removeCurrentTab();
|
||||
gBrowser.selectTabAtIndex(1);
|
||||
gBrowser.removeCurrentTab();
|
||||
for (let i = 1; i < gBrowser.mTabs.length; i++)
|
||||
loadTab(gBrowser.mTabs[i], TEST_URL_BASES[1] + (++gTabCounter));
|
||||
},
|
||||
function() {
|
||||
for (let i = 1; i < gBrowser.mTabs.length; i++)
|
||||
loadTab(gBrowser.mTabs[i], TEST_URL_BASES[0] + gTabCounter);
|
||||
},
|
||||
function() {
|
||||
gNewWindow = openNewWindowWith("about:blank");
|
||||
gNewWindow.addEventListener("load", function () {
|
||||
gNewWindow.removeEventListener("load", arguments.callee, false);
|
||||
var delayedStartup = gNewWindow.delayedStartup;
|
||||
gNewWindow.delayedStartup = function() {
|
||||
delayedStartup.apply(gNewWindow, arguments);
|
||||
loadTab(gNewWindow.gBrowser.mTabs[0], TEST_URL_BASES[0] + gTabCounter);
|
||||
}
|
||||
}, false);
|
||||
},
|
||||
function() {
|
||||
gPrefService.setBoolPref("browser.tabs.warnOnClose", false);
|
||||
gNewWindow.close();
|
||||
if (gPrefService.prefHasUserValue("browser.tabs.warnOnClose"))
|
||||
gPrefService.clearUserPref("browser.tabs.warnOnClose");
|
||||
ensure_opentabs_match_db();
|
||||
executeSoon(nextStep);
|
||||
},
|
||||
function() {
|
||||
gPrivateBrowsing.privateBrowsingEnabled = true;
|
||||
|
||||
executeSoon(function() {
|
||||
ensure_opentabs_match_db();
|
||||
nextStep();
|
||||
});
|
||||
},
|
||||
function() {
|
||||
gPrivateBrowsing.privateBrowsingEnabled = false;
|
||||
setTimeout(function() {
|
||||
ensure_opentabs_match_db();
|
||||
nextStep();
|
||||
}, 100);
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
nextStep();
|
||||
}
|
||||
|
||||
function loadTab(tab, url) {
|
||||
tab.linkedBrowser.addEventListener("load", function (event) {
|
||||
event.currentTarget.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
if (--gTabWaitCount > 0)
|
||||
return;
|
||||
is(gTabWaitCount, 0,
|
||||
"sanity check, gTabWaitCount should not be decremented below 0");
|
||||
|
||||
try {
|
||||
ensure_opentabs_match_db();
|
||||
} catch (e) {
|
||||
ok(false, "exception from ensure_openpages_match_db: " + e);
|
||||
}
|
||||
|
||||
executeSoon(nextStep);
|
||||
}, true);
|
||||
gTabWaitCount++;
|
||||
tab.linkedBrowser.loadURI(url);
|
||||
}
|
||||
|
||||
function nextStep() {
|
||||
if (gTestSteps.length == 0) {
|
||||
while (gBrowser.mTabs.length > 1) {
|
||||
gBrowser.selectTabAtIndex(1);
|
||||
gBrowser.removeCurrentTab();
|
||||
}
|
||||
PlacesUtils.history.QueryInterface(Ci.nsIBrowserHistory).removeAllPages();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
var stepFunc = gTestSteps.shift();
|
||||
stepFunc();
|
||||
}
|
||||
|
||||
function ensure_opentabs_match_db() {
|
||||
var tabs = {};
|
||||
|
||||
var winEnum = gWindowMediator.getEnumerator("navigator:browser");
|
||||
while (winEnum.hasMoreElements()) {
|
||||
let browserWin = winEnum.getNext();
|
||||
// skip closed-but-not-destroyed windows
|
||||
if (browserWin.closed)
|
||||
continue;
|
||||
|
||||
for (let i = 0; i < browserWin.gBrowser.mTabContainer.childElementCount; i++) {
|
||||
let browser = browserWin.gBrowser.getBrowserAtIndex(i);
|
||||
let url = browser.currentURI.spec;
|
||||
if (!(url in tabs))
|
||||
tabs[url] = 1;
|
||||
else
|
||||
tabs[url]++;
|
||||
}
|
||||
}
|
||||
|
||||
var db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
|
||||
.DBConnection;
|
||||
|
||||
try {
|
||||
var stmt = db.createStatement(
|
||||
"SELECT IFNULL(p_t.url, p.url) AS url, open_count, place_id " +
|
||||
"FROM moz_openpages_temp " +
|
||||
"LEFT JOIN moz_places p ON p.id=place_id " +
|
||||
"LEFT JOIN moz_places_temp p_t ON p_t.id=place_id");
|
||||
} catch (e) {
|
||||
ok(false, "error creating db statement: " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
var dbtabs = [];
|
||||
try {
|
||||
while (stmt.executeStep()) {
|
||||
ok(stmt.row.url in tabs,
|
||||
"url is in db, should be in tab: " + stmt.row.url);
|
||||
is(tabs[stmt.row.url], stmt.row.open_count,
|
||||
"db count (" + stmt.row.open_count + ") " +
|
||||
"should match actual open tab count " +
|
||||
"(" + tabs[stmt.row.url] + "): " + stmt.row.url);
|
||||
dbtabs.push(stmt.row.url);
|
||||
}
|
||||
} finally {
|
||||
stmt.finalize();
|
||||
}
|
||||
|
||||
for (let url in tabs) {
|
||||
// ignore URLs that should never be in the places db
|
||||
if (!is_expected_in_db(url))
|
||||
continue;
|
||||
ok(dbtabs.indexOf(url) > -1,
|
||||
"tab is open (" + tabs[url] + " times) and should recorded in db: " + url);
|
||||
}
|
||||
}
|
||||
|
||||
function is_expected_in_db(url) {
|
||||
var uri = gIOService.newURI(url, null, null);
|
||||
return PlacesUtils.history.canAddURI(uri);
|
||||
}
|
|
@ -104,7 +104,7 @@ function loaded() {
|
|||
var win = wm.getMostRecentWindow("navigator:browser");
|
||||
var notificationBox = win.gBrowser.getNotificationBox();
|
||||
|
||||
var notification = notificationBox.getNotificationWithValue("offline-app-requested-localhost");
|
||||
var notification = notificationBox.getNotificationWithValue("offline-app-requested-mochi.test");
|
||||
notification.childNodes[0].click();
|
||||
|
||||
notification = notificationBox.getNotificationWithValue("offline-app-requested-example.com");
|
||||
|
|
|
@ -37,7 +37,7 @@ function finishTest() {
|
|||
var pm = Components.classes["@mozilla.org/permissionmanager;1"].
|
||||
getService(Components.interfaces.nsIPermissionManager);
|
||||
|
||||
pm.remove("localhost", "offline-app");
|
||||
pm.remove("mochi.test", "offline-app");
|
||||
|
||||
window.removeEventListener("message", handleMessageEvents, false);
|
||||
|
||||
|
@ -103,7 +103,7 @@ function loaded() {
|
|||
var notificationBox = win.gBrowser.getNotificationBox();
|
||||
|
||||
var notification = notificationBox
|
||||
.getNotificationWithValue("offline-app-requested-localhost");
|
||||
.getNotificationWithValue("offline-app-requested-mochi.test");
|
||||
notification.childNodes[0].click();
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
this.inputField.addEventListener("mousedown", this, false);
|
||||
this.inputField.addEventListener("mousemove", this, false);
|
||||
this.inputField.addEventListener("mouseout", this, false);
|
||||
this.inputField.addEventListener("overflow", this, false);
|
||||
this.inputField.addEventListener("underflow", this, false);
|
||||
this.inputField.addEventListener("overflow", this, false);
|
||||
this.inputField.addEventListener("underflow", this, false);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
|
@ -72,45 +72,10 @@
|
|||
this.inputField.removeEventListener("mousedown", this, false);
|
||||
this.inputField.removeEventListener("mousemove", this, false);
|
||||
this.inputField.removeEventListener("mouseout", this, false);
|
||||
this.inputField.removeEventListener("overflow", this, false);
|
||||
this.inputField.removeEventListener("underflow", this, false);
|
||||
this.inputField.removeEventListener("overflow", this, false);
|
||||
this.inputField.removeEventListener("underflow", this, false);
|
||||
]]></destructor>
|
||||
|
||||
<field name="_value"></field>
|
||||
|
||||
<!--
|
||||
onBeforeValueGet is called by the base-binding's .value getter.
|
||||
It can return an object with a "value" property, to override the
|
||||
return value of the getter.
|
||||
-->
|
||||
<method name="onBeforeValueGet">
|
||||
<body><![CDATA[
|
||||
if (this.hasAttribute("actiontype"))
|
||||
return {value: this._value};
|
||||
return null;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
onBeforeValueSet is called by the base-binding's .value setter.
|
||||
It should return the value that the setter should use.
|
||||
-->
|
||||
<method name="onBeforeValueSet">
|
||||
<parameter name="aValue"/>
|
||||
<body><![CDATA[
|
||||
this._value = aValue;
|
||||
var returnValue = aValue;
|
||||
var action = this._parseActionUrl(aValue);
|
||||
if (action) {
|
||||
returnValue = action.param;
|
||||
this.setAttribute("actiontype", action.type);
|
||||
} else {
|
||||
this.removeAttribute("actiontype");
|
||||
}
|
||||
return returnValue;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleRevert">
|
||||
<body><![CDATA[
|
||||
var isScrolling = this.popupOpen;
|
||||
|
@ -143,13 +108,6 @@
|
|||
if (!url)
|
||||
return;
|
||||
|
||||
var action = this._parseActionUrl(url);
|
||||
if (action) {
|
||||
if (action.type == "switchtab")
|
||||
switchToTabHavingURI(action.param);
|
||||
return;
|
||||
}
|
||||
|
||||
this.value = url;
|
||||
gBrowser.userTypedValue = url;
|
||||
try {
|
||||
|
@ -258,12 +216,12 @@
|
|||
return [url, postData.value];
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<field name="_contentIsCropped">false</field>
|
||||
|
||||
<field name="_contentIsCropped">false</field>
|
||||
|
||||
<method name="_initURLTooltip">
|
||||
<body><![CDATA[
|
||||
if (this.focused || !this._contentIsCropped)
|
||||
if (this.focused || !this._contentIsCropped)
|
||||
return;
|
||||
if (this._tooltipTimer)
|
||||
clearTimeout(this._tooltipTimer);
|
||||
|
@ -431,13 +389,13 @@
|
|||
case "mouseout":
|
||||
this._hideURLTooltip();
|
||||
break;
|
||||
case "overflow":
|
||||
this._contentIsCropped = true;
|
||||
break;
|
||||
case "underflow":
|
||||
this._contentIsCropped = false;
|
||||
this._hideURLTooltip();
|
||||
break;
|
||||
case "overflow":
|
||||
this._contentIsCropped = true;
|
||||
break;
|
||||
case "underflow":
|
||||
this._contentIsCropped = false;
|
||||
this._hideURLTooltip();
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -484,21 +442,6 @@
|
|||
this.placeholder = this.getAttribute(type + "placeholder");
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_parseActionUrl">
|
||||
<parameter name="aUrl"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (!/^moz-action:/.test(aUrl))
|
||||
return null;
|
||||
|
||||
// url is in the format moz-action:ACTION,PARAM
|
||||
let [, action, param] = aUrl.match(/^moz-action:([^,]+),(.*)$/);
|
||||
return {type: action, param: param};
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
|
@ -670,15 +613,6 @@
|
|||
this.closePopup();
|
||||
controller.handleEscape();
|
||||
|
||||
// Check if this is meant to be an action
|
||||
let action = this.mInput._parseActionUrl(url);
|
||||
if (action) {
|
||||
if (action.type == "switchtab")
|
||||
url = action.param;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
// respect the usual clicking subtleties
|
||||
openUILink(url, aEvent);
|
||||
}
|
||||
|
@ -706,5 +640,4 @@
|
|||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
/* register a handler for the feed type */
|
||||
const MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
|
||||
var handlerPage = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=%s";
|
||||
var handlerPage = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=%s";
|
||||
var wccr = Cc[wccrID].getService(Ci.nsIWebContentConverterService);
|
||||
wccr.registerContentHandler(MAYBE_FEED, handlerPage, "Demo handler", null);
|
||||
var demoHandler = wccr.getWebContentHandlerByURI(MAYBE_FEED, handlerPage);
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
function finishUp() {
|
||||
var theframe = document.getElementById('theframe');
|
||||
var previewURL = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=http%3A%2F%2Flocalhost%3A8888%2Ftests%2Ftoolkit%2Fcomponents%2Fplaces%2Ftests%2Fchrome%2Fsample_feed.atom";
|
||||
var previewURL = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=http%3A%2F%2Fmochi.test%3A8888%2Ftests%2Ftoolkit%2Fcomponents%2Fplaces%2Ftests%2Fchrome%2Fsample_feed.atom";
|
||||
is(theframe.contentDocument.URL, previewURL);
|
||||
|
||||
/* remove our demoHandler */
|
||||
|
@ -52,7 +52,7 @@
|
|||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
<html:iframe src="http://localhost:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom" height="400px"
|
||||
<html:iframe src="http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom" height="400px"
|
||||
id="theframe" onload="finishUp();">
|
||||
</html:iframe>
|
||||
</window>
|
||||
</window>
|
||||
|
|
|
@ -40,12 +40,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
|
|||
ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
|
||||
|
||||
// testing a generic case
|
||||
is(true, testRegisterHandler(true, "foo", "http://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/%s", "Foo handler"), "registering a foo content handler should work");
|
||||
is(true, testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler should work");
|
||||
|
||||
// testing with wrong uris
|
||||
is(false, testRegisterHandler(true, "foo", "http://localhost:8888/", "Foo handler"), "a protocol handler uri should contain %s");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/", "Foo handler"), "a content handler uri should contain %s");
|
||||
is(false, testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), "a protocol handler uri should contain %s");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), "a content handler uri should contain %s");
|
||||
|
||||
// the spec says we should not throw here, but it probably needs to be changed
|
||||
is(false, testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), "a protocol handler uri should be valid");
|
||||
|
@ -57,28 +57,28 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
|
|||
|
||||
// restriction to http(s) for the uri of the handler (bug 401343)
|
||||
// https should work (http already tested in the generic case)
|
||||
is(true, testRegisterHandler(true, "foo", "https://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "https://localhost:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work");
|
||||
is(true, testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work");
|
||||
// ftp should not work
|
||||
is(false, testRegisterHandler(true, "foo", "ftp://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "ftp://localhost:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work");
|
||||
is(false, testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work");
|
||||
// chrome should not work
|
||||
is(false, testRegisterHandler(true, "foo", "chrome://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "chrome://localhost:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work");
|
||||
is(false, testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work");
|
||||
// foo should not work
|
||||
is(false, testRegisterHandler(true, "foo", "foo://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "foo://localhost:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work");
|
||||
is(false, testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work");
|
||||
|
||||
// for security reasons, protocol handlers should never be registered for some schemes (chrome, vbscript, ...) (bug 402788)
|
||||
is(false, testRegisterHandler(true, "chrome", "http://localhost:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "vbscript", "http://localhost:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "javascript", "http://localhost:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "moz-icon", "http://localhost:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work");
|
||||
|
||||
// for security reasons, content handlers should never be registered for some types (html, ...)
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/%s", "Foo handler"), "registering rss content handlers should work");
|
||||
is(true, testRegisterHandler(false, "application/atom+xml", "http://localhost:8888/%s", "Foo handler"), "registering atom content handlers should work");
|
||||
todo(false, testRegisterHandler(false, "text/html", "http://localhost:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering rss content handlers should work");
|
||||
is(true, testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering atom content handlers should work");
|
||||
todo(false, testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -1109,20 +1109,21 @@ PlacesController.prototype = {
|
|||
* The dragstart event.
|
||||
*/
|
||||
setDataTransfer: function PC_setDataTransfer(aEvent) {
|
||||
var dt = aEvent.dataTransfer;
|
||||
var doCopy = ["copyLink", "copy", "link"].indexOf(dt.effectAllowed) != -1;
|
||||
let dt = aEvent.dataTransfer;
|
||||
let doCopy = ["copyLink", "copy", "link"].indexOf(dt.effectAllowed) != -1;
|
||||
|
||||
let result = this._view.getResult();
|
||||
let didSuppressNotifications = result.suppressNotifications;
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = true;
|
||||
|
||||
var result = this._view.getResult();
|
||||
var oldViewer = result.viewer;
|
||||
try {
|
||||
result.viewer = null;
|
||||
var nodes = this._view.getDraggableSelection();
|
||||
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
let nodes = this._view.getDraggableSelection();
|
||||
for (let i = 0; i < nodes.length; ++i) {
|
||||
var node = nodes[i];
|
||||
|
||||
function addData(type, index, overrideURI) {
|
||||
var wrapNode = PlacesUtils.wrapNode(node, type, overrideURI, doCopy);
|
||||
let wrapNode = PlacesUtils.wrapNode(node, type, overrideURI, doCopy);
|
||||
dt.mozSetDataAt(type, wrapNode, index);
|
||||
}
|
||||
|
||||
|
@ -1144,8 +1145,8 @@ PlacesController.prototype = {
|
|||
}
|
||||
}
|
||||
finally {
|
||||
if (oldViewer)
|
||||
result.viewer = oldViewer;
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = false;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1153,29 +1154,32 @@ PlacesController.prototype = {
|
|||
* Copy Bookmarks and Folders to the clipboard
|
||||
*/
|
||||
copy: function PC_copy() {
|
||||
var result = this._view.getResult();
|
||||
var oldViewer = result.viewer;
|
||||
try {
|
||||
result.viewer = null;
|
||||
var nodes = this._view.getSelectionNodes();
|
||||
let result = this._view.getResult();
|
||||
|
||||
var xferable = Cc["@mozilla.org/widget/transferable;1"].
|
||||
let didSuppressNotifications = result.suppressNotifications;
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = true;
|
||||
|
||||
try {
|
||||
let nodes = this._view.getSelectionNodes();
|
||||
|
||||
let xferable = Cc["@mozilla.org/widget/transferable;1"].
|
||||
createInstance(Ci.nsITransferable);
|
||||
var foundFolder = false, foundLink = false;
|
||||
var copiedFolders = [];
|
||||
var placeString, mozURLString, htmlString, unicodeString;
|
||||
let foundFolder = false, foundLink = false;
|
||||
let copiedFolders = [];
|
||||
let placeString, mozURLString, htmlString, unicodeString;
|
||||
placeString = mozURLString = htmlString = unicodeString = "";
|
||||
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
var node = nodes[i];
|
||||
for (let i = 0; i < nodes.length; ++i) {
|
||||
let node = nodes[i];
|
||||
if (this._shouldSkipNode(node, copiedFolders))
|
||||
continue;
|
||||
if (PlacesUtils.nodeIsFolder(node))
|
||||
copiedFolders.push(node);
|
||||
|
||||
function generateChunk(type, overrideURI) {
|
||||
var suffix = i < (nodes.length - 1) ? NEWLINE : "";
|
||||
var uri = overrideURI;
|
||||
let suffix = i < (nodes.length - 1) ? NEWLINE : "";
|
||||
let uri = overrideURI;
|
||||
|
||||
if (PlacesUtils.nodeIsLivemarkContainer(node))
|
||||
uri = PlacesUtils.livemarks.getFeedURI(node.itemId).spec
|
||||
|
@ -1216,8 +1220,8 @@ PlacesController.prototype = {
|
|||
}
|
||||
}
|
||||
finally {
|
||||
if (oldViewer)
|
||||
result.viewer = oldViewer;
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = false;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -523,9 +523,9 @@
|
|||
<implementation>
|
||||
<destructor><![CDATA[
|
||||
if (this._result) {
|
||||
this._result.removeObserver(this._resultObserver);
|
||||
this._resultNode.containerOpen = false;
|
||||
this._resultNode = null;
|
||||
this._result.viewer = null;
|
||||
this._result = null;
|
||||
}
|
||||
]]></destructor>
|
||||
|
@ -692,8 +692,8 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- nsINavHistoryResultViewer -->
|
||||
<field name="_viewer"><![CDATA[({
|
||||
<!-- nsINavHistoryResultObserver -->
|
||||
<field name="_resultObserver"><![CDATA[({
|
||||
_self: this,
|
||||
|
||||
get result() {
|
||||
|
@ -701,24 +701,21 @@
|
|||
},
|
||||
|
||||
set result(val) {
|
||||
// some methods (e.g. getURLsFromContainer) temporarily null out the
|
||||
// viewer when they do temporary changes to the view, this does _not_
|
||||
// call setResult(null), but then, we're called again with the result
|
||||
// object which is already set for this viewer. At that point,
|
||||
// we should do nothing.
|
||||
if (this._self._result != val) {
|
||||
if (this._self._result)
|
||||
this._self._resultNode.containerOpen = false;
|
||||
|
||||
this._self.parentNode._built = false;
|
||||
this._self._result = val;
|
||||
if (val) {
|
||||
this._self._resultNode = val.root;
|
||||
this._self._resultNode._DOMElement = this._self.parentNode;
|
||||
}
|
||||
else
|
||||
this._self._resultNode = null;
|
||||
if (this._self._result) {
|
||||
this._self._result.removeObserver(this);
|
||||
this._self._resultNode.containerOpen = false;
|
||||
}
|
||||
|
||||
this._self.parentNode._built = false;
|
||||
this._self._result = val;
|
||||
if (val) {
|
||||
this._self._resultNode = val.root;
|
||||
this._self._resultNode._DOMElement = this._self.parentNode;
|
||||
}
|
||||
else {
|
||||
this._self._resultNode = null;
|
||||
}
|
||||
|
||||
return val;
|
||||
},
|
||||
|
||||
|
@ -895,6 +892,14 @@
|
|||
},
|
||||
|
||||
sortingChanged: function PMV_sortingChanged(aSortingMode) {
|
||||
},
|
||||
|
||||
QueryInterface: function PTV_QueryInterface(aIID) {
|
||||
if (aIID.equals(Ci.nsINavHistoryResultObserver) ||
|
||||
aIID.equals(Ci.nsISupportsWeakReference) ||
|
||||
aIID.equals(Ci.nsISupports))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
})]]></field>
|
||||
|
||||
|
@ -914,7 +919,7 @@
|
|||
queries.value.length,
|
||||
options.value);
|
||||
|
||||
result.viewer = this._viewer;
|
||||
result.addObserver(this._resultObserver, false);
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
|
|
@ -100,9 +100,9 @@
|
|||
window.removeEventListener("resize", this, false);
|
||||
|
||||
if (this._result) {
|
||||
this._result.removeObserver(this._resultObserver);
|
||||
this._resultNode.containerOpen = false;
|
||||
this._resultNode = null;
|
||||
this._result.viewer = null;
|
||||
this._result = null;
|
||||
}
|
||||
]]></destructor>
|
||||
|
@ -402,7 +402,7 @@
|
|||
var result =
|
||||
history.executeQueries(queries.value, queries.value.length,
|
||||
options.value);
|
||||
result.viewer = this._viewer;
|
||||
result.addObserver(this._resultObserver, false);
|
||||
}
|
||||
catch(ex) {
|
||||
// Invalid query, or had no results.
|
||||
|
@ -509,8 +509,8 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- nsINavHistoryResultViewer -->
|
||||
<field name="_viewer"><![CDATA[({
|
||||
<!-- nsINavHistoryResultObserver -->
|
||||
<field name="_resultObserver"><![CDATA[({
|
||||
_self: this,
|
||||
|
||||
get result() {
|
||||
|
@ -518,25 +518,22 @@
|
|||
},
|
||||
|
||||
set result(val) {
|
||||
// some methods (e.g. getURLsFromContainer) temporarily null out the
|
||||
// viewer when they do temporary changes to the view, this does _not_
|
||||
// call setResult(null), but then, we're called again with the result
|
||||
// object which is already set for this viewer. At that point,
|
||||
// we should do nothing.
|
||||
if (this._self._result != val) {
|
||||
if (this._self._result)
|
||||
this._self._resultNode.containerOpen = false;
|
||||
|
||||
this._self._result = val;
|
||||
if (val) {
|
||||
this._self._resultNode = val.root;
|
||||
this._self._resultNode._DOMElement = this._self;
|
||||
// This calls _rebuild through invalidateContainer.
|
||||
this._self._resultNode.containerOpen = true;
|
||||
}
|
||||
else
|
||||
this._self._resultNode = null;
|
||||
if (this._self._result) {
|
||||
this._self._result.removeObserver(this);
|
||||
this._self._resultNode.containerOpen = false;
|
||||
}
|
||||
|
||||
this._self._result = val;
|
||||
if (val) {
|
||||
this._self._resultNode = val.root;
|
||||
this._self._resultNode._DOMElement = this._self;
|
||||
// This calls _rebuild through invalidateContainer.
|
||||
this._self._resultNode.containerOpen = true;
|
||||
}
|
||||
else {
|
||||
this._self._resultNode = null;
|
||||
}
|
||||
|
||||
return val;
|
||||
},
|
||||
|
||||
|
@ -757,6 +754,14 @@
|
|||
},
|
||||
|
||||
sortingChanged: function TV_V_sortingChanged(aSortingMode) {
|
||||
},
|
||||
|
||||
QueryInterface: function PTV_QueryInterface(aIID) {
|
||||
if (aIID.equals(Ci.nsINavHistoryResultObserver) ||
|
||||
aIID.equals(Ci.nsISupportsWeakReference) ||
|
||||
aIID.equals(Ci.nsISupports))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
})]]></field>
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
// the viewer's reference to our treeBoxObject.
|
||||
var result = this.getResult();
|
||||
if (result) {
|
||||
result.viewer = null;
|
||||
result.root.containerOpen = false;
|
||||
}
|
||||
this.view = null;
|
||||
|
@ -71,7 +70,12 @@
|
|||
<!-- overriding -->
|
||||
<property name="view">
|
||||
<getter><![CDATA[
|
||||
return this.treeBoxObject.view.QueryInterface(Ci.nsINavHistoryResultTreeViewer);
|
||||
try {
|
||||
return this.treeBoxObject.view.QueryInterface(Ci.nsINavHistoryResultTreeViewer);
|
||||
}
|
||||
catch(e) {
|
||||
return null;
|
||||
}
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
return this.treeBoxObject.view = val;
|
||||
|
@ -122,22 +126,24 @@
|
|||
<parameter name="options"/>
|
||||
<body><![CDATA[
|
||||
// Cleanup old result if exists.
|
||||
var oldResult = this.getResult();
|
||||
if (oldResult)
|
||||
let oldResult = this.getResult();
|
||||
if (oldResult) {
|
||||
oldResult.removeObserver(this.view);
|
||||
oldResult.root.containerOpen = false;
|
||||
}
|
||||
|
||||
var result = PlacesUtils.history
|
||||
let result = PlacesUtils.history
|
||||
.executeQueries(queries, queries.length,
|
||||
options);
|
||||
var callback;
|
||||
let callback;
|
||||
if (this.flatList) {
|
||||
var onOpenFlatContainer = this.onOpenFlatContainer;
|
||||
let onOpenFlatContainer = this.onOpenFlatContainer;
|
||||
if (onOpenFlatContainer)
|
||||
callback = new Function("aContainer", onOpenFlatContainer);
|
||||
}
|
||||
|
||||
var treeView = new PlacesTreeView(this.flatList, callback);
|
||||
result.viewer = treeView;
|
||||
let treeView = new PlacesTreeView(this.flatList, callback);
|
||||
result.addObserver(treeView, false);
|
||||
this.view = treeView;
|
||||
if (!this._controller) {
|
||||
this._controller = new PlacesController(this);
|
||||
|
@ -261,13 +267,17 @@
|
|||
// opening each folder as we go.
|
||||
for (var i = parents.length - 1; i >= 0; --i) {
|
||||
var index = view.treeIndexForNode(parents[i]);
|
||||
if (view.isContainer(index) && !view.isContainerOpen(index))
|
||||
if (index != Ci.nsINavHistoryResultTreeViewer.INDEX_INVISIBLE &&
|
||||
view.isContainer(index) && !view.isContainerOpen(index))
|
||||
view.toggleOpenState(index);
|
||||
}
|
||||
// Select the specified node...
|
||||
}
|
||||
|
||||
var index = view.treeIndexForNode(node);
|
||||
if (index == Ci.nsINavHistoryResultTreeViewer.INDEX_INVISIBLE)
|
||||
return;
|
||||
|
||||
view.selection.select(index);
|
||||
// ... and ensure it's visible, not scrolled off somewhere.
|
||||
this.treeBoxObject.ensureRowIsVisible(index);
|
||||
|
@ -278,7 +288,7 @@
|
|||
<method name="getResult">
|
||||
<body><![CDATA[
|
||||
try {
|
||||
return this.view.QueryInterface(Ci.nsINavHistoryResultViewer).result;
|
||||
return this.view.QueryInterface(Ci.nsINavHistoryResultObserver).result;
|
||||
}
|
||||
catch (e) {
|
||||
return null;
|
||||
|
@ -319,16 +329,19 @@
|
|||
<!-- nsIPlacesView -->
|
||||
<property name="hasSelection">
|
||||
<getter><![CDATA[
|
||||
return this.view.selection.count >= 1;
|
||||
return this.view && this.view.selection.count >= 1;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<!-- nsIPlacesView -->
|
||||
<method name="getSelectionNodes">
|
||||
<body><![CDATA[
|
||||
let nodes = [];
|
||||
if (!this.hasSelection)
|
||||
return nodes;
|
||||
|
||||
let selection = this.view.selection;
|
||||
let rc = selection.getRangeCount();
|
||||
let nodes = [];
|
||||
let resultview = this.view;
|
||||
for (let i = 0; i < rc; ++i) {
|
||||
let min = { }, max = { };
|
||||
|
@ -367,9 +380,12 @@
|
|||
// filter out all such redundancies since some partial amount of
|
||||
// the folder's children may be selected.
|
||||
//
|
||||
let nodes = [];
|
||||
if (!this.hasSelection)
|
||||
return nodes;
|
||||
|
||||
var selection = this.view.selection;
|
||||
var rc = selection.getRangeCount();
|
||||
var nodes = [];
|
||||
var resultview = this.view;
|
||||
// This list is kept independently of the range selected (i.e. OUTSIDE
|
||||
// the for loop) since the row index of a container is unique for the
|
||||
|
@ -404,7 +420,7 @@
|
|||
<property name="selectedNode">
|
||||
<getter><![CDATA[
|
||||
var view = this.view;
|
||||
if (view.selection.count != 1)
|
||||
if (!view || view.selection.count != 1)
|
||||
return null;
|
||||
|
||||
var selection = view.selection;
|
||||
|
@ -640,12 +656,18 @@
|
|||
return foundOne;
|
||||
}
|
||||
|
||||
// Null the viewer while looking for nodes
|
||||
var result = this.getResult();
|
||||
var oldViewer = result.viewer;
|
||||
result.viewer = null;
|
||||
findNodes(this.getResultNode());
|
||||
result.viewer = oldViewer;
|
||||
// Disable notifications while looking for nodes.
|
||||
let result = this.getResult();
|
||||
let didSuppressNotifications = result.suppressNotifications;
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = true
|
||||
try {
|
||||
findNodes(this.getResultNode());
|
||||
}
|
||||
finally {
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = false;
|
||||
}
|
||||
|
||||
// For all the nodes we've found, highlight the corresponding
|
||||
// index in the tree.
|
||||
|
@ -659,6 +681,8 @@
|
|||
}
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var index = resultview.treeIndexForNode(nodes[i]);
|
||||
if (index == Ci.nsINavHistoryResultTreeViewer.INDEX_INVISIBLE)
|
||||
continue;
|
||||
selection.rangedSelect(index, index, true);
|
||||
}
|
||||
selection.selectEventsSuppressed = false;
|
||||
|
|
|
@ -63,11 +63,11 @@ PlacesTreeView.prototype = {
|
|||
|
||||
QueryInterface: function PTV_QueryInterface(aIID) {
|
||||
if (aIID.equals(Ci.nsITreeView) ||
|
||||
aIID.equals(Ci.nsINavHistoryResultViewer) ||
|
||||
aIID.equals(Ci.nsINavHistoryResultObserver) ||
|
||||
aIID.equals(Ci.nsINavHistoryResultTreeViewer) ||
|
||||
aIID.equals(Ci.nsISupportsWeakReference) ||
|
||||
aIID.equals(Ci.nsISupports))
|
||||
return this;
|
||||
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
|
@ -591,7 +591,7 @@ PlacesTreeView.prototype = {
|
|||
return [this.COLUMN_TYPE_UNKNOWN, false];
|
||||
},
|
||||
|
||||
// nsINavHistoryResultViewer
|
||||
// nsINavHistoryResultObserver
|
||||
nodeInserted: function PTV_nodeInserted(aParentNode, aNode, aNewIndex) {
|
||||
NS_ASSERT(this._result, "Got a notification but have no result!");
|
||||
if (!this._tree || !this._result)
|
||||
|
@ -995,22 +995,18 @@ PlacesTreeView.prototype = {
|
|||
|
||||
get result() this._result,
|
||||
set result(val) {
|
||||
// Some methods (e.g. getURLsFromContainer) temporarily null out the
|
||||
// viewer when they do temporary changes to the view, this does _not_
|
||||
// call setResult(null), but then, we're called again with the result
|
||||
// object which is already set for this viewer. At that point,
|
||||
// we should do nothing.
|
||||
if (this._result != val) {
|
||||
if (this._result)
|
||||
this._rootNode.containerOpen = false;
|
||||
|
||||
this._result = val;
|
||||
this._rootNode = val ? val.root : null;
|
||||
|
||||
// If the tree is not set yet, setTree will call finishInit.
|
||||
if (this._tree && val)
|
||||
this._finishInit();
|
||||
if (this._result) {
|
||||
this._result.removeObserver(this);
|
||||
this._rootNode.containerOpen = false;
|
||||
}
|
||||
|
||||
this._result = val;
|
||||
this._rootNode = val ? val.root : null;
|
||||
|
||||
// If the tree is not set yet, setTree will call finishInit.
|
||||
if (this._tree && val)
|
||||
this._finishInit();
|
||||
|
||||
return val;
|
||||
},
|
||||
|
||||
|
@ -1363,8 +1359,10 @@ PlacesTreeView.prototype = {
|
|||
if (hasOldTree) {
|
||||
// detach from result when we are detaching from the tree.
|
||||
// This breaks the reference cycle between us and the result.
|
||||
if (!aTree)
|
||||
this._result.viewer = null;
|
||||
if (!aTree) {
|
||||
this._result.removeObserver(this);
|
||||
this._rootNode.containerOpen = false;
|
||||
}
|
||||
}
|
||||
if (aTree)
|
||||
this._finishInit();
|
||||
|
|
|
@ -129,7 +129,7 @@ function addDownload(dm, aParams)
|
|||
aParams.targetFile.append(aParams.resultFileName);
|
||||
}
|
||||
if (!("sourceURI" in aParams))
|
||||
aParams.sourceURI = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/staller.sjs";
|
||||
aParams.sourceURI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/staller.sjs";
|
||||
if (!("downloadName" in aParams))
|
||||
aParams.downloadName = null;
|
||||
if (!("runBeforeStart" in aParams))
|
||||
|
|
|
@ -43,7 +43,7 @@ function test() {
|
|||
let pb = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
|
||||
const testPageURL = "http://localhost:8888/browser/" +
|
||||
const testPageURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html";
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ function test() {
|
|||
getService(Ci.nsICookieManager);
|
||||
waitForExplicitFinish();
|
||||
|
||||
const TEST_URL = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/title.sjs";
|
||||
const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/title.sjs";
|
||||
|
||||
function cleanup() {
|
||||
// delete all history items
|
||||
|
|
|
@ -46,7 +46,7 @@ function test() {
|
|||
let oldPopupPolicy = gPrefService.getBoolPref("dom.disable_open_during_load");
|
||||
gPrefService.setBoolPref("dom.disable_open_during_load", true);
|
||||
|
||||
const TEST_URI = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/popup.html";
|
||||
const TEST_URI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/popup.html";
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ function test() {
|
|||
let pb = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
|
||||
const testPageURL = "http://localhost:8888/browser/" +
|
||||
const testPageURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle_page.html";
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<Description>426329 Search</Description>
|
||||
<InputEncoding>utf-8</InputEncoding>
|
||||
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC</Image>
|
||||
<Url type="text/html" method="GET" template="http://localhost:8888/browser/browser/components/search/test/test.html">
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/browser/browser/components/search/test/test.html">
|
||||
<Param name="test" value="{searchTerms}"/>
|
||||
</Url>
|
||||
<moz:SearchForm>http://localhost:8888/browser/browser/components/search/test/test.html</moz:SearchForm>
|
||||
<moz:SearchForm>http://mochi.test:8888/browser/browser/components/search/test/test.html</moz:SearchForm>
|
||||
</OpenSearchDescription>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ShortName>483086a</ShortName>
|
||||
<Description>Bug 483086 Test 1</Description>
|
||||
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC</Image>
|
||||
<Url type="text/html" method="GET" template="http://localhost:8888/browser/browser/components/search/test/?search">
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/browser/browser/components/search/test/?search">
|
||||
<Param name="test" value="{searchTerms}"/>
|
||||
</Url>
|
||||
<moz:SearchForm>foo://example.com</moz:SearchForm>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ShortName>483086b</ShortName>
|
||||
<Description>Bug 483086 Test 2</Description>
|
||||
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC</Image>
|
||||
<Url type="text/html" method="GET" template="http://localhost:8888/browser/browser/components/search/test/?search">
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/browser/browser/components/search/test/?search">
|
||||
<Param name="test" value="{searchTerms}"/>
|
||||
</Url>
|
||||
<moz:SearchForm>http://example.com</moz:SearchForm>
|
||||
|
|
|
@ -56,7 +56,7 @@ function test() {
|
|||
waitForExplicitFinish();
|
||||
gObs.addObserver(observers, "browser-search-engine-modified", false);
|
||||
|
||||
gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/testEngine.xml",
|
||||
gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
|
||||
Ci.nsISearchEngine.DATA_XML, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
|
||||
false);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ function test() {
|
|||
}
|
||||
|
||||
obs.addObserver(observer, "browser-search-engine-modified", false);
|
||||
ss.addEngine("http://localhost:8888/browser/browser/components/search/test/426329.xml",
|
||||
ss.addEngine("http://mochi.test:8888/browser/browser/components/search/test/426329.xml",
|
||||
Ci.nsISearchEngine.DATA_XML, "data:image/x-icon,%00",
|
||||
false);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ function test() {
|
|||
}
|
||||
|
||||
gObs.addObserver(observer, "browser-search-engine-modified", false);
|
||||
gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/483086-1.xml",
|
||||
gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-1.xml",
|
||||
Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00",
|
||||
false);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ function test2() {
|
|||
}
|
||||
|
||||
gObs.addObserver(observer, "browser-search-engine-modified", false);
|
||||
gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/483086-2.xml",
|
||||
gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-2.xml",
|
||||
Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00",
|
||||
false);
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<Description>Foo Search</Description>
|
||||
<InputEncoding>utf-8</InputEncoding>
|
||||
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC</Image>
|
||||
<Url type="text/html" method="GET" template="http://localhost:8888/browser/browser/components/search/test/?search">
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/browser/browser/components/search/test/?search">
|
||||
<Param name="test" value="{searchTerms}"/>
|
||||
</Url>
|
||||
<moz:SearchForm>http://localhost:8888/browser/browser/components/search/test/</moz:SearchForm>
|
||||
<moz:SearchForm>http://mochi.test:8888/browser/browser/components/search/test/</moz:SearchForm>
|
||||
<moz:Alias>fooalias</moz:Alias>
|
||||
</OpenSearchDescription>
|
||||
|
|
|
@ -676,9 +676,9 @@ SessionStoreService.prototype = {
|
|||
this.onTabAdd(aWindow, tabbrowser.browsers[i], true);
|
||||
}
|
||||
// notification of tab add/remove/selection
|
||||
tabbrowser.addEventListener("TabOpen", this, true);
|
||||
tabbrowser.addEventListener("TabClose", this, true);
|
||||
tabbrowser.addEventListener("TabSelect", this, true);
|
||||
tabbrowser.tabContainer.addEventListener("TabOpen", this, true);
|
||||
tabbrowser.tabContainer.addEventListener("TabClose", this, true);
|
||||
tabbrowser.tabContainer.addEventListener("TabSelect", this, true);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -694,7 +694,7 @@ SessionStoreService.prototype = {
|
|||
if (!isFullyLoaded) {
|
||||
if (!aWindow.__SSi)
|
||||
aWindow.__SSi = "window" + Date.now();
|
||||
this._window[aWindow.__SSi] = this._statesToRestore[aWindow.__SS_restoreID];
|
||||
this._windows[aWindow.__SSi] = this._statesToRestore[aWindow.__SS_restoreID];
|
||||
delete this._statesToRestore[aWindow.__SS_restoreID];
|
||||
delete aWindow.__SS_restoreID;
|
||||
}
|
||||
|
@ -710,9 +710,9 @@ SessionStoreService.prototype = {
|
|||
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
|
||||
tabbrowser.removeEventListener("TabOpen", this, true);
|
||||
tabbrowser.removeEventListener("TabClose", this, true);
|
||||
tabbrowser.removeEventListener("TabSelect", this, true);
|
||||
tabbrowser.tabContainer.removeEventListener("TabOpen", this, true);
|
||||
tabbrowser.tabContainer.removeEventListener("TabClose", this, true);
|
||||
tabbrowser.tabContainer.removeEventListener("TabSelect", this, true);
|
||||
|
||||
let winData = this._windows[aWindow.__SSi];
|
||||
if (this._loadState == STATE_RUNNING) { // window not closed during a regular shut-down
|
||||
|
|
|
@ -115,7 +115,7 @@ function test() {
|
|||
this.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
// private browsing session, add new tab: (C)
|
||||
const testURL_C = "http://localhost:8888/";
|
||||
const testURL_C = "http://mochi.test:8888/";
|
||||
let tab_C = gBrowser.addTab(testURL_C);
|
||||
|
||||
tab_C.linkedBrowser.addEventListener("load", function (aEvent) {
|
||||
|
|
|
@ -114,7 +114,7 @@ function test() {
|
|||
|
||||
const testURL = "chrome://mochikit/content/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_248970_b_sample.html";
|
||||
const testURL2 = "http://localhost:8888/browser/" +
|
||||
const testURL2 = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_248970_b_sample.html";
|
||||
|
||||
// get closed tab count
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_339445_sample.html";
|
||||
|
||||
let tab = gBrowser.addTab(testURL);
|
||||
|
|
|
@ -120,7 +120,6 @@ function browserWindowsCount(expected, msg) {
|
|||
let state = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore)
|
||||
.getBrowserState();
|
||||
info(state);
|
||||
is(JSON.parse(state).windows.length, expected[1], msg + " (getBrowserState)");
|
||||
}
|
||||
|
||||
|
@ -444,17 +443,6 @@ function test() {
|
|||
browserWindowsCount([0, 1], "browser windows while running testOpenCloseRestoreFromPopup");
|
||||
|
||||
newWin = undoCloseWindow(0);
|
||||
newWin.addEventListener("load", function () {
|
||||
info(["testOpenCloseRestoreFromPopup: newWin loaded", newWin.closed, newWin.document]);
|
||||
var ds = newWin.delayedStartup;
|
||||
newWin.delayedStartup = function () {
|
||||
info(["testOpenCloseRestoreFromPopup: newWin delayedStartup", newWin.closed, newWin.document]);
|
||||
ds.apply(newWin, arguments);
|
||||
};
|
||||
}, false);
|
||||
newWin.addEventListener("unload", function () {
|
||||
info("testOpenCloseRestoreFromPopup: newWin unloaded");
|
||||
}, false);
|
||||
|
||||
newWin2 = openDialog(location, "_blank", CHROME_FEATURES);
|
||||
newWin2.addEventListener("load", function() {
|
||||
|
@ -467,19 +455,12 @@ function test() {
|
|||
|
||||
browserWindowsCount([2, 3], "browser windows while running testOpenCloseRestoreFromPopup");
|
||||
|
||||
info([newWin.closed, newWin.__SSi, newWin.__SS_restoreID, newWin.__SS_dyingCache]);
|
||||
info(newWin2.__SSi);
|
||||
|
||||
// Cleanup
|
||||
newWin.close();
|
||||
newWin2.close();
|
||||
|
||||
info([newWin.closed, newWin.__SSi, newWin.__SS_restoreID, newWin.__SS_dyingCache]);
|
||||
|
||||
browserWindowsCount([0, 1], "browser windows while running testOpenCloseRestoreFromPopup");
|
||||
|
||||
info([newWin.closed, newWin.__SSi, newWin.__SS_restoreID, newWin.__SS_dyingCache]);
|
||||
|
||||
// Next please
|
||||
executeSoon(nextFn);
|
||||
});
|
||||
|
|
|
@ -206,7 +206,6 @@ function test() {
|
|||
let oldState_wins = JSON.parse(oldState).windows.length;
|
||||
if (oldState_wins != 1) {
|
||||
ok(false, "oldState in test_purge has " + oldState_wins + " windows instead of 1");
|
||||
info(oldState);
|
||||
}
|
||||
|
||||
// create a new state for testing
|
||||
|
|
|
@ -63,7 +63,7 @@ function test() {
|
|||
// the interval pref to 0
|
||||
gPrefService.setIntPref("browser.sessionstore.interval", 0);
|
||||
|
||||
const testURL = "http://localhost:8888/browser/" +
|
||||
const testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_423132_sample.html";
|
||||
|
||||
// open a new window
|
||||
|
|
|
@ -40,7 +40,7 @@ function test() {
|
|||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
const baseURL = "http://localhost:8888/browser/" +
|
||||
const baseURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_447951_sample.html#";
|
||||
|
||||
let tab = gBrowser.addTab();
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_459906_sample.html";
|
||||
let uniqueValue = "<b>Unique:</b> " + Date.now();
|
||||
|
||||
|
@ -81,7 +81,7 @@ function test() {
|
|||
innerDomain = iframes[0].document.domain;
|
||||
}
|
||||
catch (ex) { /* throws for chrome: documents */ }
|
||||
is(innerDomain, "localhost", "XSS exploit prevented!");
|
||||
is(innerDomain, "mochi.test", "XSS exploit prevented!");
|
||||
|
||||
// clean up
|
||||
gBrowser.removeTab(tab2);
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_461743_sample.html";
|
||||
|
||||
let frameCount = 0;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
else {
|
||||
frames[1].document.location.hash = "#original";
|
||||
frames[0].document.location = "http://localhost:8888/browser/" +
|
||||
frames[0].document.location = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_463205_helper.html";
|
||||
}
|
||||
}, false);
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_463206_sample.html";
|
||||
|
||||
var frameCount = 0;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<iframe onload="setup()"></iframe>
|
||||
|
||||
<script>
|
||||
var targetUrl = "http://localhost:8888/browser/" +
|
||||
var targetUrl = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_464620_xd.html";
|
||||
var firstPass;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_464620_a.html";
|
||||
|
||||
var frameCount = 0;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<iframe onload="setup()"></iframe>
|
||||
|
||||
<script>
|
||||
var targetUrl = "http://localhost:8888/browser/" +
|
||||
var targetUrl = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_464620_xd.html";
|
||||
var firstPass;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_464620_b.html";
|
||||
|
||||
var frameCount = 0;
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_466937_sample.html";
|
||||
let testPath = "/home/user/regular.file";
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ function test() {
|
|||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testURL = "http://localhost:8888/browser/" +
|
||||
let testURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_476161_sample.html";
|
||||
let tab = gBrowser.addTab(testURL);
|
||||
tab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
|
|
|
@ -57,9 +57,9 @@ function test() {
|
|||
|
||||
is(doc.URL, "about:blank", "loaded page is about:blank");
|
||||
|
||||
// Test that starting a new session loads the homepage (set to http://localhost:8888)
|
||||
// Test that starting a new session loads the homepage (set to http://mochi.test:8888)
|
||||
// if Firefox is configured to display a homepage at startup (browser.startup.page = 1)
|
||||
let homepage = "http://localhost:8888/";
|
||||
let homepage = "http://mochi.test:8888/";
|
||||
gPrefService.setCharPref("browser.startup.homepage", homepage);
|
||||
gPrefService.setIntPref("browser.startup.page", 1);
|
||||
gBrowser.loadURI("about:sessionrestore");
|
||||
|
|
|
@ -207,7 +207,6 @@
|
|||
<!ENTITY urlbar.history.emptyText "Search History">
|
||||
<!ENTITY urlbar.none.emptyText "Type a Web address">
|
||||
<!ENTITY urlbar.accesskey "d">
|
||||
<!ENTITY urlbar.switchToTab.label "Switch to tab:">
|
||||
|
||||
<!--
|
||||
Comment duplicated from browser-sets.inc:
|
||||
|
|
Двоичные данные
browser/themes/gnomestripe/browser/actionicon-tab.png
Двоичные данные
browser/themes/gnomestripe/browser/actionicon-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 293 B |
|
@ -800,17 +800,6 @@ toolbar[iconsize="small"] #fullscreen-button {
|
|||
display: none;
|
||||
}
|
||||
|
||||
#urlbar-display {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 2px;
|
||||
-moz-padding-end: 3px;
|
||||
color: GrayText;
|
||||
-moz-border-end: 1px solid #AAA;
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
#PopupAutoComplete,
|
||||
#PopupAutoCompleteRichResult {
|
||||
direction: ltr !important;
|
||||
|
@ -853,7 +842,7 @@ toolbar[iconsize="small"] #fullscreen-button {
|
|||
|
||||
/* Identity indicator */
|
||||
#identity-box {
|
||||
background-color: -moz-dialog;
|
||||
background: -moz-dialog -moz-linear-gradient(rgba(255,255,255,.25), rgba(0,0,0,.15));
|
||||
color: -moz-dialogtext;
|
||||
-moz-border-end: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
@ -866,13 +855,13 @@ toolbar[iconsize="small"] #fullscreen-button {
|
|||
outline: 1px dotted -moz-DialogText;
|
||||
}
|
||||
|
||||
#identity-box:hover > #identity-box-inner {
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
#identity-box:hover {
|
||||
background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(50%,50%,50%,.2), rgba(0,0,0,.15));
|
||||
}
|
||||
|
||||
#identity-box:hover:active > #identity-box-inner,
|
||||
#identity-box[open="true"] > #identity-box-inner {
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
#identity-box:hover:active,
|
||||
#identity-box[open="true"] {
|
||||
background-image: -moz-linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.1));
|
||||
}
|
||||
|
||||
#identity-icon-labels {
|
||||
|
@ -1009,10 +998,6 @@ toolbar[iconsize="small"] #fullscreen-button {
|
|||
color: -moz-nativehyperlinktext;
|
||||
}
|
||||
|
||||
richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon {
|
||||
list-style-image: url("chrome://browser/skin/actionicon-tab.png");
|
||||
}
|
||||
|
||||
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
|
||||
color: GrayText;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ browser.jar:
|
|||
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
|
||||
skin/classic/browser/aboutSessionRestore-window-icon.png
|
||||
skin/classic/browser/aboutCertError.css (aboutCertError.css)
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
* skin/classic/browser/browser.css (browser.css)
|
||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/browser/fullscreen-video.css
|
||||
|
|
|
@ -33,10 +33,8 @@
|
|||
-moz-margin-end: 2px;
|
||||
border: 0;
|
||||
-moz-box-align: center;
|
||||
background-color: -moz-dialog;
|
||||
-moz-border-end: 1px solid;
|
||||
-moz-border-right-colors: ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDShadow;
|
||||
background: -moz-dialog -moz-linear-gradient(rgba(255,255,255,.25), rgba(0,0,0,.15));
|
||||
-moz-border-end: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
.searchbar-engine-button > .button-box {
|
||||
|
@ -46,17 +44,17 @@
|
|||
border: 0;
|
||||
}
|
||||
|
||||
.searchbar-engine-button:hover > .button-box {
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
.searchbar-engine-button:hover {
|
||||
background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(50%,50%,50%,.2), rgba(0,0,0,.15));
|
||||
}
|
||||
|
||||
.searchbar-engine-button:hover:active > .button-box,
|
||||
.searchbar-engine-button[open="true"] > .button-box {
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
.searchbar-engine-button:hover:active,
|
||||
.searchbar-engine-button[open="true"] {
|
||||
background-image: -moz-linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.1));
|
||||
}
|
||||
|
||||
.searchbar-engine-button[addengines="true"] {
|
||||
-moz-box-shadow: 0 0 5px Highlight inset, 0 0 20px Highlight inset;
|
||||
-moz-box-shadow: 0 -5px 20px Highlight inset;
|
||||
}
|
||||
|
||||
.searchbar-dropmarker-image {
|
||||
|
|
Двоичные данные
browser/themes/pinstripe/browser/actionicon-tab.png
Двоичные данные
browser/themes/pinstripe/browser/actionicon-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 293 B |
|
@ -841,17 +841,6 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
|
|||
-moz-box-align: center;
|
||||
}
|
||||
|
||||
#urlbar-display {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 2px;
|
||||
-moz-padding-end: 3px;
|
||||
color: GrayText;
|
||||
-moz-border-end: 1px solid #AAA;
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
#urlbar-search-splitter {
|
||||
min-width: 8px;
|
||||
width: 8px;
|
||||
|
@ -969,10 +958,6 @@ richlistitem[selected="true"][current="true"] > hbox > .ac-result-type-bookmark,
|
|||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon {
|
||||
list-style-image: url("chrome://browser/skin/actionicon-tab.png");
|
||||
}
|
||||
|
||||
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
|
||||
color: GrayText;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ browser.jar:
|
|||
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
|
||||
skin/classic/browser/aboutSessionRestore-window-icon.png
|
||||
skin/classic/browser/aboutCertError.css (aboutCertError.css)
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
* skin/classic/browser/browser.css (browser.css)
|
||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/browser/feed-icons.png
|
||||
|
|
Двоичные данные
browser/themes/winstripe/browser/actionicon-tab.png
Двоичные данные
browser/themes/winstripe/browser/actionicon-tab.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 293 B |
|
@ -601,17 +601,6 @@ toolbar:not([iconsize="small"])[mode="icons"] #forward-button:not([disabled="tru
|
|||
display: none;
|
||||
}
|
||||
|
||||
#urlbar-display {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 2px;
|
||||
-moz-padding-end: 3px;
|
||||
color: GrayText;
|
||||
-moz-border-end: 1px solid #AAA;
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
#urlbar > .autocomplete-textbox-container {
|
||||
direction: ltr;
|
||||
-moz-box-align: stretch;
|
||||
|
@ -774,10 +763,6 @@ toolbar:not([iconsize="small"])[mode="icons"] #forward-button:not([disabled="tru
|
|||
color: #006600;
|
||||
}
|
||||
|
||||
richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon {
|
||||
list-style-image: url("chrome://browser/skin/actionicon-tab.png");
|
||||
}
|
||||
|
||||
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
|
||||
color: GrayText;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ browser.jar:
|
|||
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
|
||||
skin/classic/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon.png)
|
||||
skin/classic/browser/aboutCertError.css (aboutCertError.css)
|
||||
skin/classic/browser/actionicon-tab.png
|
||||
* skin/classic/browser/browser.css (browser.css)
|
||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/browser/fullscreen-video.css
|
||||
|
@ -96,7 +95,6 @@ browser.jar:
|
|||
* skin/classic/aero/browser/aboutSessionRestore.css (aboutSessionRestore.css)
|
||||
skin/classic/aero/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon-aero.png)
|
||||
skin/classic/aero/browser/aboutCertError.css (aboutCertError.css)
|
||||
skin/classic/aero/browser/actionicon-tab.png (actionicon-tab.png)
|
||||
* skin/classic/aero/browser/browser.css (browser-aero.css)
|
||||
* skin/classic/aero/browser/engineManager.css (engineManager.css)
|
||||
skin/classic/aero/browser/fullscreen-video.css
|
||||
|
|
|
@ -141,6 +141,11 @@ class Automation(object):
|
|||
self.log.setLevel(logging.INFO)
|
||||
self.log.addHandler(handler)
|
||||
|
||||
def setServerInfo(self, server = "mochi.test", httpPort = 8888, sslPort = 4443):
|
||||
self.webServer = server
|
||||
self.httpPort = httpPort
|
||||
self.sslPort = sslPort
|
||||
|
||||
@property
|
||||
def __all__(self):
|
||||
return [
|
||||
|
@ -239,16 +244,14 @@ class Automation(object):
|
|||
|
||||
return locations
|
||||
|
||||
def initializeProfile(self, profileDir, extraPrefs = [], useServerLocations = False):
|
||||
" Sets up the standard testing profile."
|
||||
|
||||
def initializeProfile(self, profileDir, extraPrefs = []):
|
||||
"Sets up the standard testing profile."
|
||||
|
||||
prefs = []
|
||||
# Start with a clean slate.
|
||||
shutil.rmtree(profileDir, True)
|
||||
os.mkdir(profileDir)
|
||||
|
||||
prefs = []
|
||||
|
||||
part = """\
|
||||
user_pref("browser.dom.window.dump.enabled", true);
|
||||
user_pref("dom.allow_scripts_to_close_windows", true);
|
||||
|
@ -274,7 +277,7 @@ user_pref("network.http.prompt-temp-redirect", false);
|
|||
user_pref("media.cache_size", 100);
|
||||
user_pref("security.warn_viewing_mixed", false);
|
||||
|
||||
user_pref("geo.wifi.uri", "http://localhost:8888/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
|
||||
user_pref("geo.wifi.uri", "http://%(server)s/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
|
||||
user_pref("geo.wifi.testing", true);
|
||||
|
||||
user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others
|
||||
|
@ -282,20 +285,30 @@ user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others
|
|||
// Make url-classifier updates so rare that they won't affect tests
|
||||
user_pref("urlclassifier.updateinterval", 172800);
|
||||
// Point the url-classifier to the local testing server for fast failures
|
||||
user_pref("browser.safebrowsing.provider.0.gethashURL", "http://localhost:8888/safebrowsing-dummy/gethash");
|
||||
user_pref("browser.safebrowsing.provider.0.keyURL", "http://localhost:8888/safebrowsing-dummy/newkey");
|
||||
user_pref("browser.safebrowsing.provider.0.lookupURL", "http://localhost:8888/safebrowsing-dummy/lookup");
|
||||
user_pref("browser.safebrowsing.provider.0.updateURL", "http://localhost:8888/safebrowsing-dummy/update");
|
||||
"""
|
||||
|
||||
user_pref("browser.safebrowsing.provider.0.gethashURL", "http://%(server)s/safebrowsing-dummy/gethash");
|
||||
user_pref("browser.safebrowsing.provider.0.keyURL", "http://%(server)s/safebrowsing-dummy/newkey");
|
||||
user_pref("browser.safebrowsing.provider.0.lookupURL", "http://%(server)s/safebrowsing-dummy/lookup");
|
||||
user_pref("browser.safebrowsing.provider.0.updateURL", "http://%(server)s/safebrowsing-dummy/update");
|
||||
""" % { "server" : self.webServer + ":" + str(self.httpPort) }
|
||||
prefs.append(part)
|
||||
|
||||
locations = self.readLocations()
|
||||
|
||||
# Grant God-power to all the privileged servers on which tests run.
|
||||
privileged = filter(lambda loc: "privileged" in loc.options, locations)
|
||||
for (i, l) in itertools.izip(itertools.count(1), privileged):
|
||||
if useServerLocations == False:
|
||||
part = """
|
||||
user_pref("capability.principal.codebase.p1.granted",
|
||||
"UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite \
|
||||
UniversalPreferencesRead UniversalPreferencesWrite \
|
||||
UniversalFileRead");
|
||||
user_pref("capability.principal.codebase.p1.id", "%(origin)s");
|
||||
user_pref("capability.principal.codebase.p1.subjectName", "");
|
||||
""" % { "origin": "http://" + self.webServer + ":" + str(self.httpPort) }
|
||||
prefs.append(part)
|
||||
else:
|
||||
locations = self.readLocations()
|
||||
|
||||
# Grant God-power to all the privileged servers on which tests run.
|
||||
privileged = filter(lambda loc: "privileged" in loc.options, locations)
|
||||
for (i, l) in itertools.izip(itertools.count(1), privileged):
|
||||
part = """
|
||||
user_pref("capability.principal.codebase.p%(i)d.granted",
|
||||
"UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite \
|
||||
UniversalPreferencesRead UniversalPreferencesWrite \
|
||||
|
@ -304,14 +317,14 @@ user_pref("capability.principal.codebase.p%(i)d.id", "%(origin)s");
|
|||
user_pref("capability.principal.codebase.p%(i)d.subjectName", "");
|
||||
""" % { "i": i,
|
||||
"origin": (l.scheme + "://" + l.host + ":" + l.port) }
|
||||
prefs.append(part)
|
||||
prefs.append(part)
|
||||
|
||||
# We need to proxy every server but the primary one.
|
||||
origins = ["'%s://%s:%s'" % (l.scheme, l.host, l.port)
|
||||
for l in filter(lambda l: "primary" not in l.options, locations)]
|
||||
origins = ", ".join(origins)
|
||||
# We need to proxy every server but the primary one.
|
||||
origins = ["'%s://%s:%s'" % (l.scheme, l.host, l.port)
|
||||
for l in filter(lambda l: "primary" not in l.options, locations)]
|
||||
origins = ", ".join(origins)
|
||||
|
||||
pacURL = """data:text/plain,
|
||||
pacURL = """data:text/plain,
|
||||
function FindProxyForURL(url, host)
|
||||
{
|
||||
var origins = [%(origins)s];
|
||||
|
@ -340,15 +353,15 @@ function FindProxyForURL(url, host)
|
|||
return 'PROXY 127.0.0.1:4443';
|
||||
return 'DIRECT';
|
||||
}""" % { "origins": origins }
|
||||
pacURL = "".join(pacURL.splitlines())
|
||||
pacURL = "".join(pacURL.splitlines())
|
||||
|
||||
part = """
|
||||
part += """
|
||||
user_pref("network.proxy.type", 2);
|
||||
user_pref("network.proxy.autoconfig_url", "%(pacURL)s");
|
||||
|
||||
user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless to others
|
||||
""" % {"pacURL": pacURL}
|
||||
prefs.append(part)
|
||||
prefs.append(part)
|
||||
|
||||
for v in extraPrefs:
|
||||
thispref = v.split("=")
|
||||
|
|
|
@ -46,6 +46,7 @@ __all__ = [
|
|||
"processLeakLog",
|
||||
"getDebuggerInfo",
|
||||
"DEBUGGER_INFO",
|
||||
"replaceBackSlashes",
|
||||
]
|
||||
|
||||
# Map of debugging programs to information about them, like default arguments
|
||||
|
@ -323,3 +324,6 @@ def processLeakLog(leakLogFile, leakThreshold = 0):
|
|||
processType = m.group(1)
|
||||
processPID = m.group(2)
|
||||
processSingleLeakFile(thisFile, processPID, processType, leakThreshold)
|
||||
|
||||
def replaceBackSlashes(input):
|
||||
return input.replace('\\', '/')
|
||||
|
|
|
@ -72,6 +72,7 @@ if __name__ == '__main__':
|
|||
t.setDaemon(True)
|
||||
t.start()
|
||||
|
||||
automation.setServerInfo("localhost", PORT)
|
||||
automation.initializeProfile(PROFILE_DIRECTORY)
|
||||
browserEnv = automation.environment()
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ if __name__ == '__main__':
|
|||
t = threading.Thread(target=httpd.serve_forever)
|
||||
t.setDaemon(True) # don't hang on exit
|
||||
t.start()
|
||||
|
||||
|
||||
automation.setServerInfo("localhost", PORT)
|
||||
automation.initializeProfile(PROFILE_DIRECTORY)
|
||||
browserEnv = automation.environment()
|
||||
browserEnv["XPCOM_DEBUG_BREAK"] = "warn"
|
||||
|
|
|
@ -75,12 +75,16 @@
|
|||
#
|
||||
# This is the primary location from which tests run.
|
||||
#
|
||||
http://localhost:8888 primary,privileged
|
||||
http://mochi.test:8888 primary,privileged
|
||||
|
||||
#
|
||||
# These are a common set of prefixes scattered across one TLD with two ports and
|
||||
# another TLD on a single port.
|
||||
#
|
||||
http://127.0.0.1:80 privileged
|
||||
http://127.0.0.1:8888 privileged
|
||||
http://test:80 privileged
|
||||
http://mochi.test:8888 privileged
|
||||
http://example.org:80 privileged
|
||||
http://test1.example.org:80 privileged
|
||||
http://test2.example.org:80 privileged
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
|
||||
#define _beginthreadex(security, stack_size, start_proc, arg, flags, pid) \
|
||||
CreateThread(security, stack_size,(LPTHREAD_START_ROUTINE) start_proc, arg, flags, pid)
|
||||
CreateThread(security, stack_size ? stack_size : 65536L,(LPTHREAD_START_ROUTINE) start_proc, arg, flags | STACK_SIZE_PARAM_IS_A_RESERVATION, pid)
|
||||
|
|
|
@ -1061,7 +1061,11 @@ ReadAnnotationEntry(nsIObjectInputStream* aStream, nsHashKey** aKey,
|
|||
{
|
||||
nsresult rv;
|
||||
nsCStringKey* key = new nsCStringKey(aStream, &rv);
|
||||
if (!key)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
delete key;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,12 +92,11 @@ MOZ_PANGO = @MOZ_PANGO@
|
|||
MOZ_JS_LIBS = @MOZ_JS_LIBS@
|
||||
|
||||
MOZ_DEBUG = @MOZ_DEBUG@
|
||||
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
|
||||
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
|
||||
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
|
||||
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
|
||||
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
|
||||
MOZ_DEBUG_LDFLAGS=@MOZ_DEBUG_LDFLAGS@
|
||||
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
|
||||
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
|
||||
MOZ_IMG_DECODERS= @MOZ_IMG_DECODERS@
|
||||
MOZ_IMG_ENCODERS= @MOZ_IMG_ENCODERS@
|
||||
|
@ -591,7 +590,6 @@ MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
|
|||
# Win32 options
|
||||
MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@
|
||||
MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
|
||||
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
|
||||
MOZ_QUANTIFY = @MOZ_QUANTIFY@
|
||||
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
|
||||
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
|
||||
|
|
|
@ -162,73 +162,21 @@ endif
|
|||
_DEBUG_CFLAGS :=
|
||||
_DEBUG_LDFLAGS :=
|
||||
|
||||
ifndef MOZ_DEBUG
|
||||
# global debugging is disabled
|
||||
# check if it was explicitly enabled for this module
|
||||
ifneq (, $(findstring $(MODULE), $(MOZ_DEBUG_MODULES)))
|
||||
MOZ_DEBUG:=1
|
||||
endif
|
||||
else
|
||||
# global debugging is enabled
|
||||
# check if it was explicitly disabled for this module
|
||||
ifneq (, $(findstring ^$(MODULE), $(MOZ_DEBUG_MODULES)))
|
||||
MOZ_DEBUG:=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
|
||||
else
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
|
||||
XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
|
||||
endif
|
||||
|
||||
# determine if -g should be passed to the compiler, based on
|
||||
# the current module, and the value of MOZ_DBGRINFO_MODULES
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
MOZ_DBGRINFO_MODULES += ALL_MODULES
|
||||
pattern := ALL_MODULES ^ALL_MODULES
|
||||
else
|
||||
MOZ_DBGRINFO_MODULES += ^ALL_MODULES
|
||||
pattern := ALL_MODULES ^ALL_MODULES
|
||||
endif
|
||||
|
||||
ifdef MODULE
|
||||
# our current Makefile specifies a module name - add it to our pattern
|
||||
pattern += $(MODULE) ^$(MODULE)
|
||||
endif
|
||||
|
||||
# start by finding the first relevant module name
|
||||
# (remember that the order of the module names in MOZ_DBGRINFO_MODULES
|
||||
# is reversed from the order the user specified to configure -
|
||||
# this allows the user to put general names at the beginning
|
||||
# of the list, and to override them with explicit module names later
|
||||
# in the list)
|
||||
|
||||
first_match:=$(firstword $(filter $(pattern), $(MOZ_DBGRINFO_MODULES)))
|
||||
|
||||
ifeq ($(first_match), $(MODULE))
|
||||
# the user specified explicitly that
|
||||
# this module should be compiled with -g
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
else
|
||||
ifneq ($(first_match), ^$(MODULE))
|
||||
ifeq ($(first_match), ALL_MODULES)
|
||||
# the user didn't mention this module explicitly,
|
||||
# but wanted all modules to be compiled with -g
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
endif
|
||||
ifdef MOZ_DEBUG_SYMBOLS
|
||||
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
MOZALLOC_LIB = $(call EXPAND_MOZLIBNAME,mozalloc)
|
||||
|
||||
# append debug flags
|
||||
# (these might have been above when processing MOZ_DBGRINFO_MODULES)
|
||||
OS_CFLAGS += $(_DEBUG_CFLAGS)
|
||||
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
|
||||
OS_LDFLAGS += $(_DEBUG_LDFLAGS)
|
||||
|
|
88
configure.in
88
configure.in
|
@ -2016,7 +2016,7 @@ case "$target" in
|
|||
# -Os has been broken on Intel's C/C++ compilers for quite a
|
||||
# while; Intel recommends against using it.
|
||||
MOZ_OPTIMIZE_FLAGS="-O2"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline"
|
||||
MOZ_DEBUG_FLAGS="-g"
|
||||
elif test "$GNU_CC" || test "$GNU_CXX"; then
|
||||
GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
|
||||
case $GCC_VERSION in
|
||||
|
@ -2025,11 +2025,7 @@ case "$target" in
|
|||
MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
|
||||
esac
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb,
|
||||
# and that combo is not yet good at
|
||||
# debugging inlined functions (even
|
||||
# when using DWARF2 as the debugging
|
||||
# format)
|
||||
MOZ_DEBUG_FLAGS="-g"
|
||||
fi
|
||||
|
||||
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
|
||||
|
@ -2802,6 +2798,19 @@ AC_TYPE_MODE_T
|
|||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_MSG_CHECKING(for ssize_t)
|
||||
AC_CACHE_VAL(ac_cv_type_ssize_t,
|
||||
[AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <sys/types.h>],
|
||||
[ssize_t foo = 0;],
|
||||
[ac_cv_type_ssize_t=true],
|
||||
[ac_cv_type_ssize_t=false])])
|
||||
if test "$ac_cv_type_ssize_t" = true ; then
|
||||
AC_DEFINE(HAVE_SSIZE_T)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_STRUCT_ST_BLKSIZE
|
||||
AC_MSG_CHECKING(for siginfo_t)
|
||||
AC_CACHE_VAL(ac_cv_siginfo_t,
|
||||
|
@ -4695,7 +4704,6 @@ ENABLE_TESTS=1
|
|||
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
|
||||
MOZ_BRANDING_DIRECTORY=
|
||||
MOZ_OFFICIAL_BRANDING=
|
||||
MOZ_DBGRINFO_MODULES=
|
||||
MOZ_FEEDS=1
|
||||
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon"
|
||||
MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
|
||||
|
@ -6642,11 +6650,12 @@ fi
|
|||
|
||||
MOZ_ARG_ENABLE_STRING(debug,
|
||||
[ --enable-debug[=DBG] Enable building with developer debug info
|
||||
(Using compiler flags DBG)],
|
||||
(using compiler flags DBG)],
|
||||
[ if test "$enableval" != "no"; then
|
||||
MOZ_DEBUG=1
|
||||
if test -n "$enableval" && test "$enableval" != "yes"; then
|
||||
if test -n "$enableval" -a "$enableval" != "yes"; then
|
||||
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
|
||||
_MOZ_DEBUG_FLAGS_SET=1
|
||||
fi
|
||||
else
|
||||
MOZ_DEBUG=
|
||||
|
@ -6740,33 +6749,37 @@ AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
|
|||
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable/disable debug for specific modules only
|
||||
dnl = module names beginning with ^ will be disabled
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_STRING(debug-modules,
|
||||
[ --enable-debug-modules Enable/disable debug info for specific modules],
|
||||
[ MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` ] )
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable/disable generation of debugger info for specific modules only
|
||||
dnl = the special module name ALL_MODULES can be used to denote all modules
|
||||
dnl = module names beginning with ^ will be disabled
|
||||
dnl = (Deprecated) generation of debugger info for specific modules
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_STRING(debugger-info-modules,
|
||||
[ --enable-debugger-info-modules
|
||||
Enable/disable debugger info for specific modules],
|
||||
[ for i in `echo $enableval | sed 's/,/ /g'`; do
|
||||
dnl note that the list of module names is reversed as it is copied
|
||||
dnl this is important, as it will allow config.mk to interpret stuff like
|
||||
dnl "^ALL_MODULES xpcom" properly
|
||||
if test "$i" = "no"; then
|
||||
i="^ALL_MODULES"
|
||||
[ if test "$enableval" != "no"; then
|
||||
AC_MSG_WARN([--enable-debugger-info-modules is deprecated, use --enable-debug-symbols instead])
|
||||
MOZ_DEBUG_SYMBOLS=1
|
||||
fi ])
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable generation of debug symbols
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_STRING(debug-symbols,
|
||||
[ --enable-debug-symbols[=DBG] Enable debugging symbols
|
||||
(using compiler flags DBG)],
|
||||
[ if test "$enableval" != "no"; then
|
||||
MOZ_DEBUG_SYMBOLS=1
|
||||
if test -n "$enableval" -a "$enableval" != "yes"; then
|
||||
if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
|
||||
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
|
||||
else
|
||||
AC_MSG_ERROR([--enable-debug-symbols flags cannot be used with --enable-debug flags])
|
||||
fi
|
||||
fi
|
||||
if test "$i" = "yes"; then
|
||||
i="ALL_MODULES"
|
||||
fi
|
||||
MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
|
||||
done ])
|
||||
fi ])
|
||||
|
||||
if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
|
||||
AC_DEFINE(MOZ_DEBUG_SYMBOLS)
|
||||
export MOZ_DEBUG_SYMBOLS
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Disable runtime logging checks
|
||||
|
@ -8173,13 +8186,12 @@ AC_SUBST(MOZ_XSLT_STANDALONE)
|
|||
AC_SUBST(MOZ_JS_LIBS)
|
||||
AC_SUBST(MOZ_PSM)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_MODULES)
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
|
||||
AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
|
||||
AC_SUBST(MOZ_DEBUG_FLAGS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST(MOZ_DBGRINFO_MODULES)
|
||||
AC_SUBST(MOZ_EXTENSIONS)
|
||||
AC_SUBST(MOZ_IMG_DECODERS)
|
||||
AC_SUBST(MOZ_IMG_ENCODERS)
|
||||
|
@ -8268,7 +8280,6 @@ AC_SUBST(MOZ_PKG_SPECIAL)
|
|||
AC_SUBST(MOZILLA_OFFICIAL)
|
||||
|
||||
dnl win32 options
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_MAPINFO)
|
||||
AC_SUBST(MOZ_BROWSE_INFO)
|
||||
AC_SUBST(MOZ_TOOLS_DIR)
|
||||
|
@ -8735,7 +8746,14 @@ if test "$BUILD_CTYPES"; then
|
|||
ac_configure_args="$ac_configure_args --with-pic"
|
||||
fi
|
||||
if test "$CROSS_COMPILE"; then
|
||||
ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
|
||||
case "$target" in
|
||||
*-mingw*)
|
||||
ac_configure_args="$ac_configure_args --build=$build --host=${target_cpu}-${target_os} HOST_CC=\"$HOST_CC\" CC=\"$CC\""
|
||||
;;
|
||||
*)
|
||||
ac_configure_args="$ac_configure_args --build=$build --host=$target HOST_CC=\"$HOST_CC\" CC=\"$CC\""
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "$_MSC_VER"; then
|
||||
# Use a wrapper script for cl and ml that looks more like gcc.
|
||||
|
|
|
@ -359,31 +359,31 @@ protected:
|
|||
PRUint32 mDeflectedCount;
|
||||
|
||||
// How many times to deflect in interactive/perf modes
|
||||
PRInt32 mInteractiveDeflectCount;
|
||||
PRInt32 mPerfDeflectCount;
|
||||
PRUint32 mInteractiveDeflectCount;
|
||||
PRUint32 mPerfDeflectCount;
|
||||
|
||||
// 0 = don't check for pending events
|
||||
// 1 = don't deflect if there are pending events
|
||||
// 2 = bail if there are pending events
|
||||
PRInt32 mPendingEventMode;
|
||||
PRUint32 mPendingEventMode;
|
||||
|
||||
// How often to probe for pending events. 1=every token
|
||||
PRInt32 mEventProbeRate;
|
||||
PRUint32 mEventProbeRate;
|
||||
|
||||
// Is there currently a pending event?
|
||||
PRBool mHasPendingEvent;
|
||||
|
||||
// When to return to the main event loop
|
||||
PRInt32 mCurrentParseEndTime;
|
||||
PRUint32 mCurrentParseEndTime;
|
||||
|
||||
// How long to stay off the event loop in interactive/perf modes
|
||||
PRInt32 mInteractiveParseTime;
|
||||
PRInt32 mPerfParseTime;
|
||||
PRUint32 mInteractiveParseTime;
|
||||
PRUint32 mPerfParseTime;
|
||||
|
||||
// How long to be in interactive mode after an event
|
||||
PRInt32 mInteractiveTime;
|
||||
PRUint32 mInteractiveTime;
|
||||
// How long to stay in perf mode after initial loading
|
||||
PRInt32 mInitialPerfTime;
|
||||
PRUint32 mInitialPerfTime;
|
||||
|
||||
// Should we switch between perf-mode and interactive-mode
|
||||
PRBool mEnablePerfMode;
|
||||
|
|
|
@ -4574,7 +4574,7 @@ nsContentUtils::RemoveScriptBlocker()
|
|||
}
|
||||
|
||||
PRUint32 firstBlocker = sRunnersCountAtFirstBlocker;
|
||||
PRUint32 lastBlocker = sBlockedScriptRunners->Count();
|
||||
PRUint32 lastBlocker = (PRUint32)sBlockedScriptRunners->Count();
|
||||
sRunnersCountAtFirstBlocker = 0;
|
||||
NS_ASSERTION(firstBlocker <= lastBlocker,
|
||||
"bad sRunnersCountAtFirstBlocker");
|
||||
|
@ -4585,7 +4585,7 @@ nsContentUtils::RemoveScriptBlocker()
|
|||
--lastBlocker;
|
||||
|
||||
runnable->Run();
|
||||
NS_ASSERTION(lastBlocker == sBlockedScriptRunners->Count() &&
|
||||
NS_ASSERTION(lastBlocker == (PRUint32)sBlockedScriptRunners->Count() &&
|
||||
sRunnersCountAtFirstBlocker == 0,
|
||||
"Bad count");
|
||||
NS_ASSERTION(!sScriptBlockerCount, "This is really bad");
|
||||
|
|
|
@ -671,11 +671,11 @@ nsDocumentEncoder::SerializeRangeNodes(nsIDOMRange* aRange,
|
|||
// get start and end nodes for this recursion level
|
||||
nsCOMPtr<nsIContent> startNode, endNode;
|
||||
PRInt32 start = mStartRootIndex - aDepth;
|
||||
if (start >= 0 && start <= mStartNodes.Length())
|
||||
if (start >= 0 && (PRUint32)start <= mStartNodes.Length())
|
||||
startNode = mStartNodes[start];
|
||||
|
||||
PRInt32 end = mEndRootIndex - aDepth;
|
||||
if (end >= 0 && end <= mEndNodes.Length())
|
||||
if (end >= 0 && (PRUint32)end <= mEndNodes.Length())
|
||||
endNode = mEndNodes[end];
|
||||
|
||||
if ((startNode != content) && (endNode != content))
|
||||
|
|
|
@ -3002,14 +3002,13 @@ nsGenericElement::SetSMILOverrideStyleRule(nsICSSStyleRule* aStyleRule,
|
|||
|
||||
if (aNotify) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
// Only need to notify PresContexts if we're in a document. (We might not
|
||||
// Only need to request a restyle if we're in a document. (We might not
|
||||
// be in a document, if we're clearing animation effects on a target node
|
||||
// that's been detached since the previous animation sample.)
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIPresShell> shell = doc->GetPrimaryShell();
|
||||
if (shell) {
|
||||
nsPresContext* presContext = shell->GetPresContext();
|
||||
presContext->SMILOverrideStyleChanged(this);
|
||||
shell->RestyleForAnimation(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1386,7 +1386,7 @@ nsPlainTextSerializer::AddToLine(const PRUnichar * aLineFragment,
|
|||
// try to find another place to break
|
||||
goodSpace=(prefixwidth>mWrapColumn+1)?1:mWrapColumn-prefixwidth+1;
|
||||
if (mLineBreaker) {
|
||||
if (goodSpace < mCurrentLine.Length())
|
||||
if ((PRUint32)goodSpace < mCurrentLine.Length())
|
||||
goodSpace = mLineBreaker->Next(mCurrentLine.get(),
|
||||
mCurrentLine.Length(), goodSpace);
|
||||
if (goodSpace == NS_LINEBREAKER_NEED_MORE_TEXT)
|
||||
|
|
|
@ -1484,7 +1484,7 @@ nsXMLContentSerializer::AppendWrapped_NonWhitespaceSequence(
|
|||
PRBool thisSequenceStartsAtBeginningOfLine = !mColPos;
|
||||
PRBool onceAgainBecauseWeAddedBreakInFront = PR_FALSE;
|
||||
PRBool foundWhitespaceInLoop;
|
||||
PRInt32 length, colPos;
|
||||
PRUint32 length, colPos;
|
||||
|
||||
do {
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
|
|||
nsCString mCharset;
|
||||
|
||||
// current column position on the current line
|
||||
PRInt32 mColPos;
|
||||
PRUint32 mColPos;
|
||||
|
||||
// true = pretty formating should be done (OutputFormated flag)
|
||||
PRPackedBool mDoFormat;
|
||||
|
@ -367,7 +367,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
|
|||
PRPackedBool mDoWrap;
|
||||
|
||||
// number of maximum column in a line, in the wrap mode
|
||||
PRInt32 mMaxColumn;
|
||||
PRUint32 mMaxColumn;
|
||||
|
||||
// current indent value
|
||||
nsString mIndent;
|
||||
|
|
|
@ -343,6 +343,7 @@ _TEST_FILES = test_bug5141.html \
|
|||
test_CSP.html \
|
||||
file_CSP.sjs \
|
||||
file_CSP_main.html \
|
||||
file_CSP_main.html^headers^ \
|
||||
file_CSP_main.js \
|
||||
test_CSP_frameancestors.html \
|
||||
file_CSP_frameancestors.sjs \
|
||||
|
@ -352,8 +353,8 @@ _TEST_FILES = test_bug5141.html \
|
|||
file_CSP_inlinescript_main.html \
|
||||
file_CSP_inlinescript_main.html^headers^ \
|
||||
test_CSP_evalscript.html \
|
||||
file_CSP_evalscript.sjs \
|
||||
file_CSP_evalscript_main.html \
|
||||
file_CSP_evalscript_main.html^headers^ \
|
||||
file_CSP_evalscript_main.js \
|
||||
test_bug540854.html \
|
||||
bug540854.sjs \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function handleRequest(request, response) {
|
||||
response.setStatusLine(null, 302, "Found");
|
||||
response.setHeader("Location", "http://localhost:8888/tests/content/base/test/bug461735-post-redirect.js", false);
|
||||
response.setHeader("Location", "http://mochi.test:8888/tests/content/base/test/bug461735-post-redirect.js", false);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=421622
|
|||
<script type="application/javascript"><![CDATA[
|
||||
|
||||
/** Test for Bug 421622 **/
|
||||
const SJS_URL = "http://localhost:8888/tests/content/base/test/chrome/bug421622-referer.sjs";
|
||||
const SJS_URL = "http://mochi.test:8888/tests/content/base/test/chrome/bug421622-referer.sjs";
|
||||
const REFERER_URL = "http://www.mozilla.org/";
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
|
|
|
@ -14,31 +14,14 @@ function handleRequest(request, response)
|
|||
//avoid confusing cache behaviors
|
||||
response.setHeader("Cache-Control", "no-cache", false);
|
||||
|
||||
if ("main" in query) {
|
||||
var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance(Components.interfaces.nsIXMLHttpRequest);
|
||||
//serve the main page with a CSP header!
|
||||
// -- anything served from 'self' (localhost:8888) will be allowed,
|
||||
// -- anything served from other hosts (example.com:80) will be blocked.
|
||||
// -- XHR tests are set up in the file_CSP_main.js file which is sourced.
|
||||
response.setHeader("X-Content-Security-Policy",
|
||||
"allow 'self'",
|
||||
false);
|
||||
xhr.open("GET", "http://localhost:8888/tests/content/base/test/file_CSP_main.html", false);
|
||||
xhr.send(null);
|
||||
if(xhr.status == 200) {
|
||||
response.write(xhr.responseText);
|
||||
}
|
||||
if ("type" in query) {
|
||||
response.setHeader("Content-Type", unescape(query['type']), false);
|
||||
} else {
|
||||
if ("type" in query) {
|
||||
response.setHeader("Content-Type", unescape(query['type']), false);
|
||||
} else {
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
}
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
}
|
||||
|
||||
if ("content" in query) {
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
response.write(unescape(query['content']));
|
||||
}
|
||||
if ("content" in query) {
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
response.write(unescape(query['content']));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
// SJS file for CSP eval script mochitests
|
||||
|
||||
function handleRequest(request, response)
|
||||
{
|
||||
var query = {};
|
||||
request.queryString.split('&').forEach(function (val) {
|
||||
var [name, value] = val.split('=');
|
||||
query[name] = unescape(value);
|
||||
});
|
||||
|
||||
//avoid confusing cache behaviors
|
||||
response.setHeader("Cache-Control", "no-cache", false);
|
||||
|
||||
if ("main" in query) {
|
||||
var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance(Components.interfaces.nsIXMLHttpRequest);
|
||||
//serve the main page with a CSP header!
|
||||
// -- anything served from 'self' (localhost:8888) will be allowed,
|
||||
// -- anything served from other hosts (example.com:80) will be blocked.
|
||||
// -- XHR tests are set up in the file_CSP_main.js file which is sourced.
|
||||
response.setHeader("X-Content-Security-Policy",
|
||||
"allow 'self'",
|
||||
false);
|
||||
xhr.open("GET", "http://localhost:8888/tests/content/base/test/file_CSP_evalscript_main.html", false);
|
||||
xhr.send(null);
|
||||
if(xhr.status == 200) {
|
||||
response.write(xhr.responseText);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Cache-Control: no-cache
|
||||
X-Content-Security-Policy: allow 'self'
|
|
@ -5,11 +5,11 @@ function setupFrames() {
|
|||
var $ = function(v) { return document.getElementById(v); }
|
||||
var base = {
|
||||
self: '/tests/content/base/test/file_CSP_frameancestors.sjs',
|
||||
a: 'http://localhost:8888/tests/content/base/test/file_CSP_frameancestors.sjs',
|
||||
a: 'http://mochi.test:8888/tests/content/base/test/file_CSP_frameancestors.sjs',
|
||||
b: 'http://example.com/tests/content/base/test/file_CSP_frameancestors.sjs'
|
||||
};
|
||||
|
||||
var host = { a: 'http://localhost:8888', b: 'http://example.com:80' };
|
||||
var host = { a: 'http://mochi.test:8888', b: 'http://example.com:80' };
|
||||
|
||||
var innerframeuri = null;
|
||||
var elt = null;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
X-Content-Security-Policy: allow 'self'
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
try {
|
||||
var xhr_good = new XMLHttpRequest();
|
||||
var xhr_good_uri ="http://localhost:8888/tests/content/base/test/file_CSP.sjs?testid=xhr_good";
|
||||
var xhr_good_uri ="http://mochi.test:8888/tests/content/base/test/file_CSP.sjs?testid=xhr_good";
|
||||
xhr_good.open("GET", xhr_good_uri, true);
|
||||
xhr_good.send(null);
|
||||
} catch(e) {}
|
||||
|
|
|
@ -79,7 +79,7 @@ window.addEventListener("message", function(e) {
|
|||
}, false);
|
||||
|
||||
function post(e, res) {
|
||||
e.source.postMessage(res.toSource(), "http://localhost:8888");
|
||||
e.source.postMessage(res.toSource(), "http://mochi.test:8888");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -87,4 +87,4 @@ function post(e, res) {
|
|||
<body>
|
||||
Inner page
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Двоичные данные
content/base/test/file_CrossSiteXHR_inner.jar
Двоичные данные
content/base/test/file_CrossSiteXHR_inner.jar
Двоичный файл не отображается.
|
@ -11,7 +11,7 @@ adipiscing elit. Nam eu sapien. Sed viverra lacus. Donec quis ipsum.
|
|||
Nunc cursus aliquet lectus. Nunc vitae eros. Class aptent taciti <span>sociosqu
|
||||
ad
|
||||
litora</span> torquent <a
|
||||
href="http://localhost:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per
|
||||
href="http://mochi.test:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per
|
||||
conubia</a>
|
||||
nostra, per inceptos hymenaeos. </p>
|
||||
|
||||
|
@ -50,4 +50,4 @@ ut gravida eros leo ut libero
|
|||
<noscript>
|
||||
<p>Curabitur consectetuer urna a sem. Nunc & non urna. Cras in massa. Vestibulum ante ipsum primis in faucibus orci luctus</p></noscript>
|
||||
<p>Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus
|
||||
aliquet lectus. Nunc vitae eros. Class aptent taciti</p></body></html>
|
||||
aliquet lectus. Nunc vitae eros. Class aptent taciti</p></body></html>
|
||||
|
|
|
@ -57,4 +57,4 @@ ut gravida eros <br />leo ut libero
|
|||
lacus risus pulvinar ante.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -14,7 +14,7 @@ adipiscing elit. Nam eu sapien. Sed viverra lacus. Donec quis ipsum.
|
|||
Nunc cursus aliquet lectus. Nunc vitae eros. Class aptent taciti <span>sociosqu
|
||||
ad
|
||||
litora</span> torquent <a
|
||||
href="http://localhost:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per
|
||||
href="http://mochi.test:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per
|
||||
conubia</a>
|
||||
nostra, per inceptos hymenaeos. </p>
|
||||
|
||||
|
@ -68,4 +68,4 @@ pharetra rutrum, <br/>
|
|||
lacus risus pulvinar ante.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -119,7 +119,8 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
// save this for last so that our listeners are registered.
|
||||
// ... this loads the testbed of good and bad requests.
|
||||
document.getElementById('cspframe').src = 'file_CSP.sjs?main=1';
|
||||
|
||||
document.getElementById('cspframe').src = 'file_CSP_main.html';
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -54,7 +54,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
// save this for last so that our listeners are registered.
|
||||
// ... this loads the testbed of good and bad requests.
|
||||
document.getElementById('cspframe').src = 'file_CSP_evalscript.sjs?main';
|
||||
document.getElementById('cspframe').src = 'file_CSP_evalscript_main.html';
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче