Merge m-c to fx-team.

This commit is contained in:
Ryan VanderMeulen 2013-03-19 09:44:37 -04:00
commit d823ae2553
800 changed files with 9754 additions and 21356 deletions

View File

@ -15,4 +15,8 @@
#
# Note: The description below will be part of the error message shown to users.
#
Bug 648407 - Fold NSPR, NSS and SQLite libraries all together on B2G, Android, OSX and Windows
# *** Important! ***
# If changing this file you must manually clobber immediately before landing,
# (due to bug 837323), using: https://secure.pub.build.mozilla.org/clobberer/
#
Bug 851908 - The WebIDL build system still has some problems.

View File

@ -128,9 +128,9 @@ gboolean fireRootAccessibleAddedCB(gpointer data)
}
bool
ApplicationAccessibleWrap::AppendChild(Accessible* aChild)
ApplicationAccessibleWrap::InsertChildAt(uint32_t aIdx, Accessible* aChild)
{
if (!ApplicationAccessible::AppendChild(aChild))
if (!ApplicationAccessible::InsertChildAt(aIdx, aChild))
return false;
AtkObject* atkAccessible = AccessibleWrap::GetAtkObject(aChild);

View File

@ -20,7 +20,7 @@ public:
// Accessible
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
virtual bool AppendChild(Accessible* aChild);
virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
virtual bool RemoveChild(Accessible* aChild);
/**

View File

@ -369,7 +369,8 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
{
// Ignore temporary, hiding, resource documents and documents without
// docshell.
if (aDocument->IsInitialDocument() || !aDocument->IsVisible() ||
if (aDocument->IsInitialDocument() ||
!aDocument->IsVisibleConsideringAncestors() ||
aDocument->IsResourceDoc() || !aDocument->IsActive())
return nullptr;

View File

@ -166,6 +166,7 @@ LogDocState(nsIDocument* aDocumentNode)
printf(", %sinitial", aDocumentNode->IsInitialDocument() ? "" : "not ");
printf(", %sshowing", aDocumentNode->IsShowing() ? "" : "not ");
printf(", %svisible", aDocumentNode->IsVisible() ? "" : "not ");
printf(", %svisible considering ancestors", aDocumentNode->IsVisibleConsideringAncestors() ? "" : "not ");
printf(", %sactive", aDocumentNode->IsActive() ? "" : "not ");
printf(", %sresource", aDocumentNode->IsResourceDoc() ? "" : "not ");
printf(", has %srole content",

View File

@ -1006,7 +1006,7 @@ ROLE(NOTE,
NSAccessibilityGroupRole,
USE_ROLE_STRING,
IA2_ROLE_NOTE,
eNameFromSubtreeRule)
eNameFromSubtreeIfReqRule)
ROLE(FIGURE,
"figure",

View File

@ -2639,41 +2639,31 @@ Accessible::InvalidateChildren()
SetChildrenFlag(eChildrenUninitialized);
}
bool
Accessible::AppendChild(Accessible* aChild)
{
if (!aChild)
return false;
if (!mChildren.AppendElement(aChild))
return false;
if (!nsAccUtils::IsEmbeddedObject(aChild))
SetChildrenFlag(eMixedChildren);
aChild->BindToParent(this, mChildren.Length() - 1);
return true;
}
bool
Accessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
{
if (!aChild)
return false;
if (!mChildren.InsertElementAt(aIndex, aChild))
return false;
if (aIndex == mChildren.Length()) {
if (!mChildren.AppendElement(aChild))
return false;
for (uint32_t idx = aIndex + 1; idx < mChildren.Length(); idx++) {
NS_ASSERTION(mChildren[idx]->mIndexInParent == idx - 1, "Accessible child index doesn't match");
mChildren[idx]->mIndexInParent = idx;
} else {
if (!mChildren.InsertElementAt(aIndex, aChild))
return false;
for (uint32_t idx = aIndex + 1; idx < mChildren.Length(); idx++) {
NS_ASSERTION(mChildren[idx]->mIndexInParent == idx - 1, "Accessible child index doesn't match");
mChildren[idx]->mIndexInParent = idx;
}
mEmbeddedObjCollector = nullptr;
}
if (!nsAccUtils::IsEmbeddedObject(aChild))
SetChildrenFlag(eMixedChildren);
mEmbeddedObjCollector = nullptr;
aChild->BindToParent(this, aIndex);
return true;
}

View File

@ -333,7 +333,8 @@ public:
/**
* Append/insert/remove a child. Return true if operation was successful.
*/
virtual bool AppendChild(Accessible* aChild);
bool AppendChild(Accessible* aChild)
{ return InsertChildAt(mChildren.Length(), aChild); }
virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild);
virtual bool RemoveChild(Accessible* aChild);

View File

@ -43,13 +43,6 @@ LeafAccessible::ChildAtPoint(int32_t aX, int32_t aY,
return this;
}
bool
LeafAccessible::AppendChild(Accessible* aChild)
{
NS_NOTREACHED("AppendChild called on leaf accessible!");
return false;
}
bool
LeafAccessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
{

View File

@ -34,8 +34,6 @@ public:
// Accessible
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild);
virtual bool AppendChild(Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
virtual bool RemoveChild(Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;

View File

@ -149,8 +149,10 @@ OuterDocAccessible::InvalidateChildren()
}
bool
OuterDocAccessible::AppendChild(Accessible* aAccessible)
OuterDocAccessible::InsertChildAt(uint32_t aIdx, Accessible* aAccessible)
{
NS_ASSERTION(aAccessible->IsDoc(),
"OuterDocAccessible should only have document child!");
// We keep showing the old document for a bit after creating the new one,
// and while building the new DOM and frame tree. That's done on purpose
// to avoid weird flashes of default background color.
@ -159,7 +161,7 @@ OuterDocAccessible::AppendChild(Accessible* aAccessible)
if (mChildren.Length())
mChildren[0]->Shutdown();
if (!AccessibleWrap::AppendChild(aAccessible))
if (!AccessibleWrap::InsertChildAt(0, aAccessible))
return false;
#ifdef A11Y_LOG

View File

@ -42,7 +42,7 @@ public:
EWhichChildAtPoint aWhichChild);
virtual void InvalidateChildren();
virtual bool AppendChild(Accessible* aAccessible);
virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
virtual bool RemoveChild(Accessible* aAccessible);
// ActionAccessible

View File

@ -49,7 +49,7 @@ public: // construction, destruction
virtual void Shutdown ();
virtual void InvalidateChildren();
virtual bool AppendChild(Accessible* aAccessible);
virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
virtual bool RemoveChild(Accessible* aAccessible);
virtual nsresult HandleAccEvent(AccEvent* aEvent);

View File

@ -198,14 +198,13 @@ AccessibleWrap::InvalidateChildren()
}
bool
AccessibleWrap::AppendChild(Accessible* aAccessible)
AccessibleWrap::InsertChildAt(uint32_t aIdx, Accessible* aAccessible)
{
bool appended = Accessible::AppendChild(aAccessible);
if (appended && mNativeObject)
bool inserted = Accessible::InsertChildAt(aIdx, aAccessible);
if (inserted && mNativeObject)
[mNativeObject appendChild:aAccessible];
return appended;
return inserted;
}
bool

View File

@ -19,11 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=452161
src="editabletext.js"></script>
<script type="application/javascript">
if (navigator.platform.startsWith("Mac")) {
SimpleTest.expectAssertions(0, 1);
} else {
SimpleTest.expectAssertions(1);
}
function addTestEditable(aID, aTestRun, aTrailChar)
{

View File

@ -24,9 +24,6 @@
<script type="application/javascript">
<![CDATA[
if (navigator.platform.startsWith("Linux")) {
SimpleTest.expectAssertions(1);
}
////////////////////////////////////////////////////////////////////////////
// Helpers
@ -118,8 +115,12 @@ if (!MAC) {
gQueue.invoke();
}
SimpleTest.waitForExplicitFinish();
openBrowserWindow(doTests, gInputDocURI);
if (navigator.oscpu.startsWith("Windows NT 6.1") || navigator.oscpu.startsWith("Windows NT 6.2")) {
todo(false, "fix the leak!");
} else {
SimpleTest.waitForExplicitFinish();
openBrowserWindow(doTests, gInputDocURI);
}
]]>
</script>

View File

@ -22,10 +22,6 @@
<script type="application/javascript">
if (navigator.platform.startsWith("Win")) {
SimpleTest.expectAssertions(1, 2);
} else if (navigator.platform.startsWith("Linux")) {
SimpleTest.expectAssertions(1);
} else if (navigator.platform.startsWith("Mac")) {
SimpleTest.expectAssertions(0, 1);
}

View File

@ -210,6 +210,11 @@
testName("img_eq", "x^2 + y^2 + z^2")
testName("txt_eq", "x^2 + y^2 + z^2")
////////////////////////////////////////////////////////////////////////
// tests for duplicate announcement of content
testName("test_note", null);
SimpleTest.finish();
}
@ -276,6 +281,11 @@
title="ARIA combobox selected value is not a part of name computation">
Bug 835666
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=833256"
title="role note shouldn't pick up the name from subtree">
Mozilla Bug 833256
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
@ -602,5 +612,8 @@
<span id="txt_eq" role="math" title="x^2 + y^2 + z^2">x<sup>2</sup> +
y<sup>2</sup> + z<sup>2</sup></span>
<!-- duplicate announcement -->
<div id="test_note" role="note">subtree</div>
</body>
</html>

View File

@ -95,9 +95,10 @@
gQueue.invoke(); // Will call SimpleTest.finish();
}
if (MAC) {
if (MAC && (navigator.userAgent.indexOf("Mac OS X 10.6") != -1)) {
todo(false,
"Re-enable on Mac after fixing bug 845095 - intermittent orange");
"Re-enable on Mac OS 10.6 after fixing bug 845095 - intermittent orange");
SimpleTest.finish();
} else {
SimpleTest.waitForExplicitFinish();

View File

@ -255,6 +255,7 @@ pref("layers.async-pan-zoom.enabled", true);
// Web Notifications
pref("notification.feature.enabled", true);
pref("dom.webnotifications.enabled", false);
// IndexedDB
pref("indexedDB.feature.enabled", true);

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,16 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Branding Makefile
# - jars chrome artwork
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,15 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Branding Makefile
# - jars chrome artwork
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -636,6 +636,7 @@ var CustomEventManager = {
dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n");
switch(detail.type) {
case 'desktop-notification-show':
case 'desktop-notification-click':
case 'desktop-notification-close':
AlertsHelper.handleEvent(detail);
@ -673,8 +674,16 @@ var AlertsHelper = {
if (!listener)
return;
let topic = detail.type == "desktop-notification-click" ? "alertclickcallback"
/* desktop-notification-close */ : "alertfinished";
let topic;
if (detail.type == "desktop-notification-click") {
topic = "alertclickcallback";
} else if (detail.type == "desktop-notification-show") {
topic = "alertshow";
} else {
/* desktop-notification-close */
topic = "alertfinished";
}
if (uid.startsWith("app-notif")) {
try {
listener.mm.sendAsyncMessage("app-notification-return", {
@ -707,10 +716,8 @@ var AlertsHelper = {
}
},
registerListener: function alert_registerListener(cookie, alertListener) {
let uid = "alert" + this._count++;
this._listeners[uid] = { observer: alertListener, cookie: cookie };
return uid;
registerListener: function alert_registerListener(alertId, cookie, alertListener) {
this._listeners[alertId] = { observer: alertListener, cookie: cookie };
},
registerAppListener: function alert_registerAppListener(uid, listener) {
@ -745,7 +752,8 @@ var AlertsHelper = {
textClickable,
cookie,
uid,
name,
bidi,
lang,
manifestUrl) {
function send(appName, appIcon) {
shell.sendChromeEvent({
@ -754,6 +762,8 @@ var AlertsHelper = {
icon: imageUrl,
title: title,
text: text,
bidi: bidi,
lang: lang,
appName: appName,
appIcon: appIcon,
manifestURL: manifestUrl
@ -779,10 +789,24 @@ var AlertsHelper = {
textClickable,
cookie,
alertListener,
name) {
let uid = this.registerListener(null, alertListener);
name,
bidi,
lang) {
let currentListener = this._listeners[name];
if (currentListener) {
currentListener.observer.observe(null, "alertfinished", currentListener.cookie);
}
this.registerListener(name, cookie, alertListener);
this.showNotification(imageUrl, title, text, textClickable, cookie,
uid, name, null);
name, bidi, lang, null);
},
closeAlert: function alert_closeAlert(name) {
shell.sendChromeEvent({
type: "desktop-notification-close",
id: name
});
},
receiveMessage: function alert_receiveMessage(aMessage) {
@ -804,7 +828,7 @@ var AlertsHelper = {
this.showNotification(data.imageURL, data.title, data.text,
data.textClickable, null,
data.uid, null, data.manifestURL);
data.uid, null, null, data.manifestURL);
},
}

View File

@ -46,11 +46,19 @@ AlertsService.prototype = {
aTextClickable,
aCookie,
aAlertListener,
aName) {
aName,
aBidi,
aLang) {
let browser = Services.wm.getMostRecentWindow("navigator:browser");
browser.AlertsHelper.showAlertNotification(aImageUrl, aTitle, aText,
aTextClickable, aCookie,
aAlertListener, aName);
aAlertListener, aName, aBidi,
aLang);
},
closeAlert: function(aName) {
let browser = Services.wm.getMostRecentWindow("navigator:browser");
browser.AlertsHelper.closeAlert(aName);
},
// nsIAppNotificationService

View File

@ -113,7 +113,9 @@
@BINPATH@/application.ini
@BINPATH@/platform.ini
#ifndef XP_OS2
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
#endif
#else
@BINPATH@/mozsqlt3@DLL_SUFFIX@
#endif
@ -469,9 +471,6 @@
@BINPATH@/components/DOMFMRadioChild.js
@BINPATH@/components/DOMFMRadio.manifest
#endif
#ifdef XP_MACOSX
@BINPATH@/components/libalerts.dylib
#endif
#ifdef MOZ_ENABLE_DBUS
@BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@
#endif

View File

@ -10,4 +10,13 @@ run-mozilla.sh
#endif
defaults/preferences/services-sync.js
defaults/preferences/healthreport-prefs.js
components/dom_sms.xpt
components/dom_sms.xpt
#ifdef MOZ_FOLD_LIBS
@DLL_PREFIX@nspr4@DLL_SUFFIX@
@DLL_PREFIX@plds4@DLL_SUFFIX@
@DLL_PREFIX@plc4@DLL_SUFFIX@
@DLL_PREFIX@ssl3@DLL_SUFFIX@
@DLL_PREFIX@smime3@DLL_SUFFIX@
@DLL_PREFIX@nssutil3@DLL_SUFFIX@
@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
#endif

View File

@ -1,2 +1,6 @@
mozprocess==0.8
mozdevice==0.18
mozprocess==0.9
mozrunner==5.15
mozdevice==0.21
mozcrash==0.2.1
mozfile==0.3
mozlog==1.1

View File

@ -22,7 +22,7 @@
<title>&abouthome.pageTitle;</title>
<link rel="icon" type="image/png" id="favicon"
href="chrome://branding/content/icon16.png"/>
href="chrome://branding/content/icon32.png"/>
<link rel="stylesheet" type="text/css" media="all"
href="chrome://browser/content/abouthome/aboutHome.css"/>

View File

@ -25,9 +25,8 @@ tabbrowser {
visibility: collapse;
}
#tabbrowser-tabs[overflow=true] > .tabbrowser-arrowscrollbox > .scrollbutton-up[collapsed=true],
#tabbrowser-tabs[overflow=true] > .tabbrowser-arrowscrollbox > .scrollbutton-down[collapsed=true] {
visibility: visible; /* keep a tab's close button under the cursor while it's closing tabs */
#tabbrowser-tabs:not([overflow="true"])[using-closing-tabs-spacer] ~ #alltabs-button {
visibility: hidden; /* temporary space to keep a tab's close button under the cursor */
}
.tabbrowser-tab {
@ -53,14 +52,6 @@ tabbrowser {
opacity 50ms ease-out 180ms /* hide the tab for the last 20ms of the max-width transition */;
}
.tabbrowser-tabs[dontresize] > .tabbrowser-tab[fadein]:not([pinned]) {
/* controlled in tabbrowser.xml */
}
.tabbrowser-tabs[dontanimate] > .tabbrowser-tab {
transition: none !important;
}
.tab-throbber:not([fadein]):not([pinned]),
.tab-label:not([fadein]):not([pinned]),
.tab-icon-image:not([fadein]):not([pinned]),

View File

@ -575,6 +575,7 @@
<image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>

View File

@ -49,6 +49,7 @@
<command id="cmd_imageDef" oncommand="onCheckboxClick('image');"/>
<command id="cmd_popupDef" oncommand="onCheckboxClick('popup');"/>
<command id="cmd_cookieDef" oncommand="onCheckboxClick('cookie');"/>
<command id="cmd_desktop-notificationDef" oncommand="onCheckboxClick('desktop-notification');"/>
<command id="cmd_installDef" oncommand="onCheckboxClick('install');"/>
<command id="cmd_fullscreenDef" oncommand="onCheckboxClick('fullscreen');"/>
<command id="cmd_geoDef" oncommand="onCheckboxClick('geo');"/>
@ -57,6 +58,7 @@
<command id="cmd_imageToggle" oncommand="onRadioClick('image');"/>
<command id="cmd_popupToggle" oncommand="onRadioClick('popup');"/>
<command id="cmd_cookieToggle" oncommand="onRadioClick('cookie');"/>
<command id="cmd_desktop-notificationToggle" oncommand="onRadioClick('desktop-notification');"/>
<command id="cmd_installToggle" oncommand="onRadioClick('install');"/>
<command id="cmd_fullscreenToggle" oncommand="onRadioClick('fullscreen');"/>
<command id="cmd_geoToggle" oncommand="onRadioClick('geo');"/>
@ -327,6 +329,18 @@
</radiogroup>
</hbox>
</vbox>
<vbox class="permission" id="permNotificationRow">
<label class="permissionLabel" id="permNotificationLabel"
value="&permNotifications;" control="desktop-notificationRadioGroup"/>
<hbox role="group" aria-labelledby="permNotificationLabel">
<checkbox id="desktop-notificationDef" command="cmd_desktop-notificationDef" label="&permUseDefault;"/>
<spacer flex="1"/>
<radiogroup id="desktop-notificationRadioGroup" orient="horizontal">
<radio id="desktop-notification#1" command="cmd_desktop-notificationToggle" label="&permAllow;"/>
<radio id="desktop-notification#2" command="cmd_desktop-notificationToggle" label="&permBlock;"/>
</radiogroup>
</hbox>
</vbox>
<vbox class="permission" id="permInstallRow">
<label class="permissionLabel" id="permInstallLabel"
value="&permInstall;" control="installRadioGroup"/>

View File

@ -29,6 +29,10 @@ var gPermObj = {
return SESSION;
return ALLOW;
},
"desktop-notification": function getNotificationDefaultPermission()
{
return BLOCK;
},
popup: function getPopupDefaultPermission()
{
if (gPrefs.getBoolPref("dom.disable_open_during_load"))

View File

@ -47,12 +47,11 @@ tabpanels {
}
.closing-tabs-spacer {
min-width: 0;
pointer-events: none;
}
.tabbrowser-tabs:not(:hover) > .tabbrowser-arrowscrollbox > .closing-tabs-spacer {
transition: min-width 150ms ease-out;
transition: width .15s ease-out;
}
/**

View File

@ -1578,6 +1578,7 @@
this.tabContainer._handleTabTelemetryStart(aTab);
this._blurTab(aTab);
aTab.style.maxWidth = ""; // ensure that fade-out transition happens
aTab.removeAttribute("fadein");
setTimeout(function (tab, tabbrowser) {
@ -1774,6 +1775,10 @@
// update tab close buttons state
this.tabContainer.adjustTabstrip();
setTimeout(function(tabs) {
tabs._lastTabClosedByMouse = false;
}, 0, this.tabContainer);
}
// update first-tab/last-tab/beforeselected/afterselected attributes
@ -2845,14 +2850,15 @@
return; // Ignore vertical events
var tabs = document.getBindingParent(this);
tabs.removeAttribute("overflow");
if (tabs._lastTabClosedByMouse)
tabs._expandSpacerBy(this._scrollButtonDown.clientWidth);
tabs.tabbrowser._removingTabs.forEach(tabs.tabbrowser.removeTab,
tabs.tabbrowser);
if (!tabs.hasAttribute("dontresize") && !tabs._closingTabsSpacer.style.minWidth) {
tabs.removeAttribute("overflow");
tabs._positionPinnedTabs();
}
tabs._positionPinnedTabs();
]]></handler>
<handler event="overflow"><![CDATA[
if (event.detail == 0)
@ -2892,7 +2898,8 @@
command="cmd_newNavigatorTab"
onclick="checkForMiddleClick(this, event);"
tooltiptext="&newTabButton.tooltip;"/>
<xul:spacer class="closing-tabs-spacer" anonid="closing-tabs-spacer"/>
<xul:spacer class="closing-tabs-spacer" anonid="closing-tabs-spacer"
style="width: 0;"/>
</xul:arrowscrollbox>
</content>
@ -3089,16 +3096,9 @@
document.getAnonymousElementByAttribute(this, "anonid", "closing-tabs-spacer");
</field>
<field name="_delayResizingRule" readonly="true"><![CDATA[
const href = "chrome://browser/content/browser.css";
const selector = ".tabbrowser-tabs[dontresize] > .tabbrowser-tab[fadein]:not([pinned])";
// XXX: document.styleSheets is not iterable (see bug 738196)
for (let sheet of Array.slice(document.styleSheets))
if (sheet.href == href)
for (let rule of Array.slice(sheet.cssRules))
if (rule.selectorText == selector) { rule; break; }
]]></field>
<field name="_tabDefaultMaxWidth">NaN</field>
<field name="_lastTabClosedByMouse">false</field>
<field name="_hasTabTempMaxWidth">false</field>
<!-- Try to keep the active tab's close button under the mouse cursor -->
<method name="_lockTabSizing">
@ -3108,67 +3108,85 @@
if (!tabs.length)
return;
this.tabbrowser.addEventListener("mousemove", this, false);
window.addEventListener("mouseout", this, false);
var isEndTab = (aTab._tPos > tabs[tabs.length-1]._tPos);
var tabWidth = aTab.getBoundingClientRect().width;
let isEndTab = (aTab._tPos > tabs[tabs.length-1]._tPos);
if (isEndTab) {
let spacer = this._closingTabsSpacer;
if (!spacer.style.minWidth)
spacer.style.minWidth = 0;
if (!this._tabDefaultMaxWidth)
this._tabDefaultMaxWidth =
parseFloat(window.getComputedStyle(aTab).maxWidth);
this._lastTabClosedByMouse = true;
// Locking is neither in effect nor needed, so let tabs expand normally
if (!this.hasAttribute("dontresize"))
if (this.getAttribute("overflow") == "true") {
// Don't need to do anything if we're in overflow mode and aren't scrolled
// all the way to the right, or if we're closing the last tab.
if (isEndTab || !this.mTabstrip._scrollButtonDown.disabled)
return;
spacer.style.MozBoxFlex = 1;
spacer.style.minWidth = getComputedStyle(spacer).width;
spacer.style.MozBoxFlex = "";
// If the tab has an owner that will become the active tab, the owner will
// be to the left of it, so we actually want the left tab to slide over.
// This can't be done as easily in non-overflow mode, so we don't bother.
if (aTab.owner)
return;
this.setAttribute("dontanimate", "true");
this.removeAttribute("dontresize");
this.clientTop;
this.removeAttribute("dontanimate");
return;
}
this._expandSpacerBy(tabWidth);
} else { // non-overflow mode
// Locking is neither in effect nor needed, so let tabs expand normally.
if (isEndTab && !this._hasTabTempMaxWidth)
return;
if (!this.hasAttribute("dontresize")) {
let tabWidth = aTab.getBoundingClientRect().width;
this._delayResizingRule.style.setProperty("max-width", tabWidth + "px", "important");
this.setAttribute("dontanimate", "true");
this.setAttribute("dontresize", "true");
this.clientTop; // flush styles to skip animation; see bug 649247
this.removeAttribute("dontanimate");
}
if (!this.mTabstrip._scrollButtonUp.disabled) {
let spacer = this._closingTabsSpacer;
let width = parseFloat(spacer.style.minWidth) || 0;
width += aTab.getBoundingClientRect().width;
if (!this.mTabstrip._scrollButtonDown.disabled) {
let scrollbox = this.mTabstrip._scrollbox;
width -= scrollbox.scrollLeftMax - scrollbox.scrollLeft;
let numPinned = this.tabbrowser._numPinnedTabs;
// Force tabs to stay the same width, unless we're closing the last tab,
// which case we need to let them expand just enough so that the overall
// tabbar width is the same.
if (isEndTab) {
let numNormalTabs = tabs.length - numPinned;
tabWidth = tabWidth * (numNormalTabs + 1) / numNormalTabs;
if (tabWidth > this._tabDefaultMaxWidth)
tabWidth = this._tabDefaultMaxWidth;
}
if (width >= 0)
spacer.style.minWidth = width + "px";
tabWidth += "px";
for (let i = numPinned; i < tabs.length; i++) {
let tab = tabs[i];
tab.style.setProperty("max-width", tabWidth, "important");
if (!isEndTab) { // keep tabs the same width
tab.style.transition = "none";
tab.clientTop; // flush styles to skip animation; see bug 649247
tab.style.transition = "";
}
}
this._hasTabTempMaxWidth = true;
this.tabbrowser.addEventListener("mousemove", this, false);
window.addEventListener("mouseout", this, false);
}
]]></body>
</method>
<method name="_expandSpacerBy">
<parameter name="pixels"/>
<body><![CDATA[
let spacer = this._closingTabsSpacer;
spacer.style.width = parseFloat(spacer.style.width) + pixels + "px";
this.setAttribute("using-closing-tabs-spacer", "true");
this.tabbrowser.addEventListener("mousemove", this, false);
window.addEventListener("mouseout", this, false);
]]></body>
</method>
<method name="_unlockTabSizing">
<body><![CDATA[
this.tabbrowser.removeEventListener("mousemove", this, false);
window.removeEventListener("mouseout", this, false);
this._closingTabsSpacer.style.minWidth = "";
this.removeAttribute("dontresize");
if (this._hasTabTempMaxWidth) {
this._hasTabTempMaxWidth = false;
let tabs = this.tabbrowser.visibleTabs;
for (let i = 0; i < tabs.length; i++)
tabs[i].style.maxWidth = "";
}
if (this.hasAttribute("overflow") &&
this.mTabstrip._scrollbox.scrollWidth <= this.mTabstrip._scrollbox.clientWidth) {
this.removeAttribute("overflow");
this._positionPinnedTabs();
if (this.hasAttribute("using-closing-tabs-spacer")) {
this.removeAttribute("using-closing-tabs-spacer");
this._closingTabsSpacer.style.width = 0;
}
]]></body>
</method>

View File

@ -153,12 +153,15 @@ var tests = {
function() { // the "load" callback.
executeSoon(function() {
todo_is(panelCallbackCount, 0, "Bug 833207 - should be no callback when error page loads.");
ok(SocialChatBar.chatbar.selectedChat.iframe.contentDocument.location.href.indexOf("about:socialerror?")==0, "is on social error page");
SocialChatBar.chatbar.selectedChat.close();
next();
let iframe = SocialChatBar.chatbar.selectedChat.iframe;
waitForCondition(function() iframe.contentDocument.location.href.indexOf("about:socialerror?")==0,
function() {
SocialChatBar.chatbar.selectedChat.close();
next();
},
"error page didn't appear");
});
}
);
}
}

View File

@ -24,7 +24,7 @@
function test1() {
let plugin = document.getElementById('plugin');
ok(plugin, 'got plugin element');
let objLC = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
let objLC = SpecialPowers.wrap(plugin);
ok(!objLC.activated, 'plugin should not be activated');
synthesizeMouseAtCenter(plugin, {});

View File

@ -7,6 +7,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Components.utils.import("resource:///modules/RecentWindow.jsm");
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
const PREF = "browser.newtab.url";
@ -58,12 +59,9 @@ function getTopWin(skipPopups) {
(!skipPopups || top.toolbar.visible))
return top;
if (skipPopups) {
return Components.classes["@mozilla.org/browser/browserglue;1"]
.getService(Components.interfaces.nsIBrowserGlue)
.getMostRecentBrowserWindow();
}
return Services.wm.getMostRecentWindow("navigator:browser");
let isPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
return RecentWindow.getMostRecentBrowserWindow({private: isPrivate,
allowPopups: !skipPopups});
}
function openTopWin(url) {

View File

@ -11,4 +11,5 @@ browser.jar:
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -11,4 +11,5 @@ browser.jar:
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -10,4 +10,5 @@ browser.jar:
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -11,4 +11,5 @@ browser.jar:
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon16.png (../default16.png)
content/branding/icon32.png (../default32.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -1,14 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1613,9 +1613,178 @@ ContentPermissionPrompt.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt]),
prompt: function CPP_prompt(request) {
_getChromeWindow: function CPP_getChromeWindow(aWindow) {
var chromeWin = aWindow
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow);
return chromeWin;
},
if (request.type != "geolocation") {
/**
* Show a permission prompt.
*
* @param aRequest The permission request.
* @param aMessage The message to display on the prompt.
* @param aPermission The type of permission to prompt.
* @param aActions An array of actions of the form:
* [main action, secondary actions, ...]
* Actions are of the form { stringId, action, expireType, callback }
* Permission is granted if action is null or ALLOW_ACTION.
* @param aNotificationId The id of the PopupNotification.
* @param aAnchorId The id for the PopupNotification anchor.
*/
_showPrompt: function CPP_showPrompt(aRequest, aMessage, aPermission, aActions,
aNotificationId, aAnchorId) {
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingWindow = aRequest.window.top;
var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject;
var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document);
var requestPrincipal = aRequest.principal;
// Transform the prompt actions into PopupNotification actions.
var popupNotificationActions = [];
for (var i = 0; i < aActions.length; i++) {
let promptAction = aActions[i];
// Don't offer action in PB mode if the action remembers permission for more than a session.
if (PrivateBrowsingUtils.isWindowPrivate(chromeWin) &&
promptAction.expireType != Ci.nsIPermissionManager.EXPIRE_SESSION &&
promptAction.action) {
continue;
}
var action = {
label: browserBundle.GetStringFromName(promptAction.stringId),
accessKey: browserBundle.GetStringFromName(promptAction.stringId + ".accesskey"),
callback: function() {
if (promptAction.callback) {
promptAction.callback();
}
// Remember permissions.
if (promptAction.action) {
Services.perms.addFromPrincipal(requestPrincipal, aPermission,
promptAction.action, promptAction.expireType);
}
// Grant permission if action is null or ALLOW_ACTION.
if (!promptAction.action || promptAction.action == Ci.nsIPermissionManager.ALLOW_ACTION) {
aRequest.allow();
} else {
aRequest.cancel();
}
},
};
popupNotificationActions.push(action);
}
var mainAction = popupNotificationActions[0];
var secondaryActions = popupNotificationActions.splice(1);
chromeWin.PopupNotifications.show(browser, aNotificationId, aMessage, aAnchorId,
mainAction, secondaryActions);
},
_promptGeo : function(aRequest) {
var secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingURI = aRequest.principal.URI;
var message;
// Share location action.
var actions = [{
stringId: "geolocation.shareLocation",
action: null,
expireType: null,
callback: function() {
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_SHARE_LOCATION);
},
}];
if (requestingURI.schemeIs("file")) {
message = browserBundle.formatStringFromName("geolocation.shareWithFile",
[requestingURI.path], 1);
} else {
message = browserBundle.formatStringFromName("geolocation.shareWithSite",
[requestingURI.host], 1);
// Always share location action.
actions.push({
stringId: "geolocation.alwaysShareLocation",
action: Ci.nsIPermissionManager.ALLOW_ACTION,
expireType: null,
callback: function() {
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_ALWAYS_SHARE);
},
});
// Never share location action.
actions.push({
stringId: "geolocation.neverShareLocation",
action: Ci.nsIPermissionManager.DENY_ACTION,
expireType: null,
callback: function() {
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_NEVER_SHARE);
},
});
}
var requestingWindow = aRequest.window.top;
var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject;
var link = chromeWin.document.getElementById("geolocation-learnmore-link");
link.value = browserBundle.GetStringFromName("geolocation.learnMore");
link.href = Services.urlFormatter.formatURLPref("browser.geolocation.warning.infoURL");
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST);
this._showPrompt(aRequest, message, "geo", actions, "geolocation", "geo-notification-icon");
},
_promptWebNotifications : function(aRequest) {
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingURI = aRequest.principal.URI;
var message = browserBundle.formatStringFromName("webNotifications.showFromSite",
[requestingURI.host], 1);
var actions = [
{
stringId: "webNotifications.showForSession",
action: Ci.nsIPermissionManager.ALLOW_ACTION,
expireType: Ci.nsIPermissionManager.EXPIRE_SESSION,
callback: function() {},
},
{
stringId: "webNotifications.alwaysShow",
action: Ci.nsIPermissionManager.ALLOW_ACTION,
expireType: null,
callback: function() {},
},
{
stringId: "webNotifications.neverShow",
action: Ci.nsIPermissionManager.DENY_ACTION,
expireType: null,
callback: function() {},
},
];
this._showPrompt(aRequest, message, "desktop-notification", actions,
"web-notifications",
"web-notifications-notification-icon");
},
prompt: function CPP_prompt(request) {
const kFeatureKeys = { "geolocation" : "geo",
"desktop-notification" : "desktop-notification" };
// Make sure that we support the request.
if (!(request.type in kFeatureKeys)) {
return;
}
@ -1626,7 +1795,8 @@ ContentPermissionPrompt.prototype = {
if (!(requestingURI instanceof Ci.nsIStandardURL))
return;
var result = Services.perms.testExactPermissionFromPrincipal(requestingPrincipal, "geo");
var permissionKey = kFeatureKeys[request.type];
var result = Services.perms.testExactPermissionFromPrincipal(requestingPrincipal, permissionKey);
if (result == Ci.nsIPermissionManager.ALLOW_ACTION) {
request.allow();
@ -1638,77 +1808,15 @@ ContentPermissionPrompt.prototype = {
return;
}
function getChromeWindow(aWindow) {
var chromeWin = aWindow
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow);
return chromeWin;
// Show the prompt.
switch (request.type) {
case "geolocation":
this._promptGeo(request);
break;
case "desktop-notification":
this._promptWebNotifications(request);
break;
}
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].
getService(Ci.nsITelemetry).
getHistogramById("SECURITY_UI");
var mainAction = {
label: browserBundle.GetStringFromName("geolocation.shareLocation"),
accessKey: browserBundle.GetStringFromName("geolocation.shareLocation.accesskey"),
callback: function() {
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_SHARE_LOCATION);
request.allow();
},
};
var message;
var secondaryActions = [];
var requestingWindow = request.window.top;
var chromeWin = getChromeWindow(requestingWindow).wrappedJSObject;
// Different message/options if it is a local file
if (requestingURI.schemeIs("file")) {
message = browserBundle.formatStringFromName("geolocation.shareWithFile",
[requestingURI.path], 1);
} else {
message = browserBundle.formatStringFromName("geolocation.shareWithSite",
[requestingURI.host], 1);
// Don't offer to "always/never share" in PB mode
if (!PrivateBrowsingUtils.isWindowPrivate(chromeWin)) {
secondaryActions.push({
label: browserBundle.GetStringFromName("geolocation.alwaysShareLocation"),
accessKey: browserBundle.GetStringFromName("geolocation.alwaysShareLocation.accesskey"),
callback: function () {
Services.perms.addFromPrincipal(requestingPrincipal, "geo", Ci.nsIPermissionManager.ALLOW_ACTION);
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_ALWAYS_SHARE);
request.allow();
}
});
secondaryActions.push({
label: browserBundle.GetStringFromName("geolocation.neverShareLocation"),
accessKey: browserBundle.GetStringFromName("geolocation.neverShareLocation.accesskey"),
callback: function () {
Services.perms.addFromPrincipal(requestingPrincipal, "geo", Ci.nsIPermissionManager.DENY_ACTION);
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST_NEVER_SHARE);
request.cancel();
}
});
}
}
var link = chromeWin.document.getElementById("geolocation-learnmore-link");
link.value = browserBundle.GetStringFromName("geolocation.learnMore");
link.href = Services.urlFormatter.formatURLPref("browser.geolocation.warning.infoURL");
var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document);
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_GEOLOCATION_REQUEST);
chromeWin.PopupNotifications.show(browser, "geolocation", message, "geo-notification-icon",
mainAction, secondaryActions);
}
};

View File

@ -1,14 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -277,6 +277,7 @@ var gPrivacyPane = {
shouldProceed = !cancelQuit.data;
if (shouldProceed) {
pref.value = autoStart.hasAttribute('checked');
document.documentElement.acceptDialog();
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
.getService(Ci.nsIAppStartup);

View File

@ -280,6 +280,7 @@ var gPrivacyPane = {
shouldProceed = !cancelQuit.data;
if (shouldProceed) {
pref.value = autoStart.hasAttribute('checked');
document.documentElement.acceptDialog();
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
.getService(Ci.nsIAppStartup);

View File

@ -12,4 +12,46 @@ include $(DEPTH)/config/autoconf.mk
MODULE = test_privatebrowsing
MOCHITEST_BROWSER_FILES = \
head.js \
browser_privatebrowsing_certexceptionsui.js \
browser_privatebrowsing_concurrent.js \
browser_privatebrowsing_concurrent_page.html \
browser_privatebrowsing_cookieacceptdialog.js \
browser_privatebrowsing_cookieacceptdialog.html \
browser_privatebrowsing_crh.js \
browser_privatebrowsing_downloadLastDir.js \
browser_privatebrowsing_downloadLastDir_c.js \
browser_privatebrowsing_downloadLastDir_toggle.js \
browser_privatebrowsing_DownloadLastDirWithCPS.js \
browser_privatebrowsing_geoprompt.js \
browser_privatebrowsing_geoprompt_page.html \
browser_privatebrowsing_lastpbcontextexited.js \
browser_privatebrowsing_localStorage.js \
browser_privatebrowsing_localStorage_before_after.js \
browser_privatebrowsing_localStorage_before_after_page.html \
browser_privatebrowsing_localStorage_before_after_page2.html \
browser_privatebrowsing_localStorage_page1.html \
browser_privatebrowsing_localStorage_page2.html \
browser_privatebrowsing_nonbrowser.js \
browser_privatebrowsing_opendir.js \
browser_privatebrowsing_openlocation.js \
browser_privatebrowsing_openLocationLastURL.js \
browser_privatebrowsing_placestitle.js \
browser_privatebrowsing_placesTitleNoUpdate.js \
browser_privatebrowsing_placesTitleNoUpdate.html \
browser_privatebrowsing_popupblocker.js \
browser_privatebrowsing_protocolhandler.js \
browser_privatebrowsing_protocolhandler_page.html \
browser_privatebrowsing_theming.js \
browser_privatebrowsing_ui.js \
browser_privatebrowsing_urlbarfocus.js \
browser_privatebrowsing_windowtitle.js \
browser_privatebrowsing_windowtitle_page.html \
browser_privatebrowsing_zoom.js \
browser_privatebrowsing_zoomrestore.js \
popup.html \
title.sjs \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -12,7 +12,7 @@
// Step 4: load a page in the tab from step 2 that checks the value of test is value and the total count in private storage is 1
function test() {
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_concurrent_page.html';
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_concurrent_page.html';
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
let non_private_tab = gBrowser.selectedBrowser;

View File

@ -8,7 +8,7 @@
function test() {
// initialization
const TEST_URL = "http://mochi.test:8888/browser/browser/components/" +
"privatebrowsing/test/browser/perwindow/" +
"privatebrowsing/test/browser/" +
"browser_privatebrowsing_cookieacceptdialog.html";
const BLANK_URL = "http://mochi.test:8888/";
let cp = Cc["@mozilla.org/embedcomp/cookieprompt-service;1"].

View File

@ -7,7 +7,7 @@
function test() {
const testPageURL = "http://mochi.test:8888/browser/" +
"browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_geoprompt_page.html";
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html";
waitForExplicitFinish();
function checkGeolocation(aPrivateMode, aWindow, aCallback) {

View File

@ -12,7 +12,7 @@ function test() {
browser.addEventListener('load', function() {
browser.removeEventListener('load', arguments.callee, true);
let tab2 = aWindow.gBrowser.selectedTab = aWindow.gBrowser.addTab();
browser.contentWindow.location = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/' +
browser.contentWindow.location = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
'browser_privatebrowsing_localStorage_page2.html';
browser.addEventListener('load', function() {
browser.removeEventListener('load', arguments.callee, true);
@ -21,7 +21,7 @@ function test() {
}, true);
}, true);
browser.loadURI('http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/' +
browser.loadURI('http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
'browser_privatebrowsing_localStorage_page1.html');
});
}

View File

@ -15,7 +15,7 @@ function test() {
waitForExplicitFinish();
let windowsToClose = [];
let testURI = "about:blank";
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/';
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/';
function doTest(aIsPrivateMode, aWindow, aCallback) {
aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {

View File

@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm");
function test() {
waitForExplicitFinish();
const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_placesTitleNoUpdate.html"
const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placesTitleNoUpdate.html"
const TEST_URI = Services.io.newURI(TEST_URL, null, null);
const TITLE_1 = "Title 1";
const TITLE_2 = "Title 2";

View File

@ -9,7 +9,7 @@ function test() {
waitForExplicitFinish();
const TEST_URL = "http://mochi.test:8888/browser/browser/components/" +
"privatebrowsing/test/browser/perwindow/title.sjs";
"privatebrowsing/test/browser/title.sjs";
let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
function waitForCleanup(aCallback) {

View File

@ -8,7 +8,7 @@ function test() {
// initialization
waitForExplicitFinish();
let testURI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/perwindow/popup.html";
let testURI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/popup.html";
let windowsToClose = [];
let oldPopupPolicy = gPrefService.getBoolPref("dom.disable_open_during_load");
gPrefService.setBoolPref("dom.disable_open_during_load", true);

View File

@ -11,7 +11,7 @@ function test() {
let windowsToClose = [];
let notificationValue = "Protocol Registration: testprotocol";
let testURI = "http://example.com/browser/" +
"browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_protocolhandler_page.html";
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_protocolhandler_page.html";
function doTest(aIsPrivateMode, aWindow, aCallback) {
aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {

View File

@ -7,7 +7,7 @@
function test() {
const testPageURL = "http://mochi.test:8888/browser/" +
"browser/components/privatebrowsing/test/browser/perwindow/browser_privatebrowsing_windowtitle_page.html";
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle_page.html";
waitForExplicitFinish();
requestLongerTimeout(2);

View File

@ -1,5 +0,0 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -3,15 +3,3 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# We have three category of browser-chrome tests:
# global: these tests focus on the global PB service implementation.
# perwindow: these tests focus on the per-window PB implementation.
# obsolete: these tests focus on the global mode, but the functionality
# that they are testing is specific to the global mode, and
# will never have a per-window counterpart.
#
# As a transition plan, we have divided the existing tests into the
# global and obsolete categories, and we'll then focus on rewriting the
# global tests to test the per-window mode.
DIRS += ['perwindow']

View File

@ -1,5 +0,0 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,55 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
MOCHITEST_BROWSER_FILES = \
head.js \
browser_privatebrowsing_certexceptionsui.js \
browser_privatebrowsing_concurrent.js \
browser_privatebrowsing_concurrent_page.html \
browser_privatebrowsing_cookieacceptdialog.js \
browser_privatebrowsing_cookieacceptdialog.html \
browser_privatebrowsing_crh.js \
browser_privatebrowsing_downloadLastDir.js \
browser_privatebrowsing_downloadLastDir_c.js \
browser_privatebrowsing_downloadLastDir_toggle.js \
browser_privatebrowsing_DownloadLastDirWithCPS.js \
browser_privatebrowsing_geoprompt.js \
browser_privatebrowsing_geoprompt_page.html \
browser_privatebrowsing_lastpbcontextexited.js \
browser_privatebrowsing_localStorage.js \
browser_privatebrowsing_localStorage_before_after.js \
browser_privatebrowsing_localStorage_before_after_page.html \
browser_privatebrowsing_localStorage_before_after_page2.html \
browser_privatebrowsing_localStorage_page1.html \
browser_privatebrowsing_localStorage_page2.html \
browser_privatebrowsing_nonbrowser.js \
browser_privatebrowsing_opendir.js \
browser_privatebrowsing_openlocation.js \
browser_privatebrowsing_openLocationLastURL.js \
browser_privatebrowsing_placestitle.js \
browser_privatebrowsing_placesTitleNoUpdate.js \
browser_privatebrowsing_placesTitleNoUpdate.html \
browser_privatebrowsing_popupblocker.js \
browser_privatebrowsing_protocolhandler.js \
browser_privatebrowsing_protocolhandler_page.html \
browser_privatebrowsing_theming.js \
browser_privatebrowsing_ui.js \
browser_privatebrowsing_urlbarfocus.js \
browser_privatebrowsing_windowtitle.js \
browser_privatebrowsing_windowtitle_page.html \
browser_privatebrowsing_zoom.js \
browser_privatebrowsing_zoomrestore.js \
popup.html \
title.sjs \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -1,5 +0,0 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -1,13 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -1,14 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk

Some files were not shown because too many files have changed in this diff Show More