Merge m-c to birch.

This commit is contained in:
Ryan VanderMeulen 2013-04-26 23:16:34 -04:00
commit fddafd4009
554 changed files with 7767 additions and 5541 deletions

View File

@ -303,11 +303,10 @@ nsAccessibilityService::CreatePluginAccessible(nsObjectFrame* aFrame,
nsresult rv = pluginInstance->GetValueFromPlugin(
NPPVpluginNativeAccessibleAtkPlugId, &plugId);
if (NS_SUCCEEDED(rv) && !plugId.IsEmpty()) {
AtkSocketAccessible* socketAccessible =
nsRefPtr<AtkSocketAccessible> socketAccessible =
new AtkSocketAccessible(aContent, aContext->Document(), plugId);
NS_ADDREF(socketAccessible);
return socketAccessible;
return socketAccessible.forget();
}
#endif
}
@ -1132,12 +1131,11 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
return nullptr;
if (type == nsIAccessibleProvider::OuterDoc) {
Accessible* accessible = new OuterDocAccessible(aContent, aDoc);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible = new OuterDocAccessible(aContent, aDoc);
return accessible.forget();
}
Accessible* accessible = nullptr;
nsRefPtr<Accessible> accessible;
switch (type)
{
#ifdef MOZ_XUL
@ -1322,8 +1320,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
return nullptr;
}
NS_IF_ADDREF(accessible);
return accessible;
return accessible.forget();
}
already_AddRefed<Accessible>
@ -1335,10 +1332,9 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
if (aContext->IsTableRow()) {
if (nsCoreUtils::IsHTMLTableHeader(aContent) &&
aContext->GetContent() == aContent->GetParent()) {
Accessible* accessible = new HTMLTableHeaderCellAccessibleWrap(aContent,
document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLTableHeaderCellAccessibleWrap(aContent, document);
return accessible.forget();
}
return nullptr;
@ -1347,41 +1343,40 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
// This method assumes we're in an HTML namespace.
nsIAtom* tag = aContent->Tag();
if (tag == nsGkAtoms::figcaption) {
Accessible* accessible = new HTMLFigcaptionAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLFigcaptionAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::figure) {
Accessible* accessible = new HTMLFigureAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLFigureAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::legend) {
Accessible* accessible = new HTMLLegendAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLLegendAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::option) {
Accessible* accessible = new HTMLSelectOptionAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLSelectOptionAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::optgroup) {
Accessible* accessible =
nsRefPtr<Accessible> accessible =
new HTMLSelectOptGroupAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
return accessible.forget();
}
if (tag == nsGkAtoms::ul || tag == nsGkAtoms::ol ||
tag == nsGkAtoms::dl) {
Accessible* accessible = new HTMLListAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLListAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::a) {
@ -1390,14 +1385,14 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aContent);
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
roleMapEntry->role != roles::LINK) {
Accessible* accessible = new HyperTextAccessibleWrap(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HyperTextAccessibleWrap(aContent, document);
return accessible.forget();
}
Accessible* accessible = new HTMLLinkAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLLinkAccessible(aContent, document);
return accessible.forget();
}
if (aContext->IsList()) {
@ -1406,15 +1401,15 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
// accessible for other elements styled as list items.
if (aContext->GetContent() == aContent->GetParent()) {
if (tag == nsGkAtoms::dt || tag == nsGkAtoms::li) {
Accessible* accessible = new HTMLLIAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLLIAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::dd) {
Accessible* accessible = new HyperTextAccessibleWrap(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HyperTextAccessibleWrap(aContent, document);
return accessible.forget();
}
}
@ -1432,22 +1427,21 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
tag == nsGkAtoms::h5 ||
tag == nsGkAtoms::h6 ||
tag == nsGkAtoms::q) {
Accessible* accessible = new HyperTextAccessibleWrap(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HyperTextAccessibleWrap(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::output) {
Accessible* accessible = new HTMLOutputAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new HTMLOutputAccessible(aContent, document);
return accessible.forget();
}
if (tag == nsGkAtoms::progress) {
Accessible* accessible =
nsRefPtr<Accessible> accessible =
new HTMLProgressMeterAccessible(aContent, document);
NS_ADDREF(accessible);
return accessible;
return accessible.forget();
}
return nullptr;
@ -1663,15 +1657,15 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
// Outline of list accessible.
if (count == 1) {
Accessible* accessible = new XULTreeAccessible(aContent, aDoc, treeFrame);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new XULTreeAccessible(aContent, aDoc, treeFrame);
return accessible.forget();
}
// Table or tree table accessible.
Accessible* accessible = new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
NS_ADDREF(accessible);
return accessible;
nsRefPtr<Accessible> accessible =
new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
return accessible.forget();
}
#endif

View File

@ -517,9 +517,9 @@ nsCoreUtils::GetTreeBodyBoxObject(nsITreeBoxObject *aTreeBoxObj)
if (!tcXULElm)
return nullptr;
nsIBoxObject *boxObj = nullptr;
tcXULElm->GetBoxObject(&boxObj);
return boxObj;
nsCOMPtr<nsIBoxObject> boxObj;
tcXULElm->GetBoxObject(getter_AddRefs(boxObj));
return boxObj.forget();
}
already_AddRefed<nsITreeBoxObject>

View File

@ -2847,9 +2847,7 @@ Accessible::SelectedItems()
while ((selected = iter.Next()))
selectedItems->AppendElement(selected, false);
nsIMutableArray* items = nullptr;
selectedItems.forget(&items);
return items;
return selectedItems.forget();
}
uint32_t

View File

@ -150,10 +150,8 @@ public:
*/
inline already_AddRefed<nsIDOMNode> DOMNode() const
{
nsIDOMNode *DOMNode = nullptr;
if (GetNode())
CallQueryInterface(GetNode(), &DOMNode);
return DOMNode;
nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
return DOMNode.forget();
}
/**

View File

@ -475,12 +475,18 @@ var Input = {
editState: {},
start: function start() {
Utils.win.document.addEventListener('keypress', this, true);
// XXX: This is too disruptive on desktop for now.
// Might need to add special modifiers.
if (Utils.MozBuildApp != 'browser') {
Utils.win.document.addEventListener('keypress', this, true);
}
Utils.win.addEventListener('mozAccessFuGesture', this, true);
},
stop: function stop() {
Utils.win.document.removeEventListener('keypress', this, true);
if (Utils.MozBuildApp != 'browser') {
Utils.win.document.removeEventListener('keypress', this, true);
}
Utils.win.removeEventListener('mozAccessFuGesture', this, true);
},

View File

@ -105,6 +105,13 @@ this.EventManager = {
Logger.debug('A11yEvent', Logger.eventToString(aEvent),
Logger.accessibleToString(aEvent.accessible));
// Don't bother with non-content events in firefox.
if (Utils.MozBuildApp == 'browser' &&
aEvent.eventType != Ci.nsIAccessibleEvent.EVENT_VIRTUALCURSOR_CHANGED &&
aEvent.accessibleDocument != Utils.CurrentContentDoc) {
return;
}
switch (aEvent.eventType) {
case Ci.nsIAccessibleEvent.EVENT_VIRTUALCURSOR_CHANGED:
{

View File

@ -361,11 +361,11 @@ this.Presentation = {
delete this.presenters;
this.presenters = [new VisualPresenter()];
if (Utils.MozBuildApp == 'b2g') {
if (Utils.MozBuildApp == 'mobile/android') {
this.presenters.push(new AndroidPresenter());
} else {
this.presenters.push(new SpeechPresenter());
this.presenters.push(new HapticPresenter());
} else if (Utils.MozBuildApp == 'mobile/android') {
this.presenters.push(new AndroidPresenter());
}
return this.presenters;

View File

@ -39,8 +39,8 @@ this.TouchAdapter = {
// maximum distance the mouse could move during a tap in inches
TAP_MAX_RADIUS: 0.2,
// The virtual touch ID generated by an Android hover event.
HOVER_ID: 'hover',
// The virtual touch ID generated by a mouse event.
MOUSE_ID: 'mouse',
start: function TouchAdapter_start() {
Logger.info('TouchAdapter.start');
@ -62,16 +62,10 @@ this.TouchAdapter = {
target = this.glass;
}
target.addEventListener('mousemove', this, true, true);
target.addEventListener('mouseenter', this, true, true);
target.addEventListener('mouseleave', this, true, true);
for each (let eventType in this.eventsOfInterest) {
target.addEventListener(eventType, this, true, true);
}
target.addEventListener('touchend', this, true, true);
target.addEventListener('touchmove', this, true, true);
target.addEventListener('touchstart', this, true, true);
if (Utils.OS != 'Android')
Mouse2Touch.start();
},
stop: function TouchAdapter_stop() {
@ -84,19 +78,38 @@ this.TouchAdapter = {
this.glass.parentNode.removeChild(this.glass);
}
target.removeEventListener('mousemove', this, true, true);
target.removeEventListener('mouseenter', this, true, true);
target.removeEventListener('mouseleave', this, true, true);
for each (let eventType in this.eventsOfInterest) {
target.removeEventListener(eventType, this, true, true);
}
},
target.removeEventListener('touchend', this, true, true);
target.removeEventListener('touchmove', this, true, true);
target.removeEventListener('touchstart', this, true, true);
get eventsOfInterest() {
delete this.eventsOfInterest;
if (Utils.OS != 'Android')
Mouse2Touch.stop();
if ('ontouchstart' in Utils.win) {
this.eventsOfInterest = ['touchstart', 'touchmove', 'touchend'];
if (Utils.MozBuildApp == 'mobile/android') {
this.eventsOfInterest.push.apply(
this.eventsOfInterest, ['mouseenter', 'mousemove', 'mouseleave']);
}
} else {
this.eventsOfInterest = ['mousedown', 'mousemove', 'mouseup'];
}
return this.eventsOfInterest;
},
handleEvent: function TouchAdapter_handleEvent(aEvent) {
// Don't bother with chrome mouse events.
if (Utils.MozBuildApp == 'browser' &&
aEvent.view.top instanceof Ci.nsIDOMChromeWindow) {
return;
}
if (aEvent.mozInputSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_UNKNOWN) {
return;
}
if (this._delayedEvent) {
Utils.win.clearTimeout(this._delayedEvent);
delete this._delayedEvent;
@ -108,13 +121,14 @@ this.TouchAdapter = {
// instead of milliseconds.
let timeStamp = (Utils.OS == 'Android') ? aEvent.timeStamp : Date.now();
switch (aEvent.type) {
case 'mousedown':
case 'mouseenter':
case 'touchstart':
for (var i = 0; i < changedTouches.length; i++) {
let touch = changedTouches[i];
let touchPoint = new TouchPoint(touch, timeStamp, this._dpi);
let identifier = (touch.identifier == undefined) ?
this.HOVER_ID : touch.identifier;
this.MOUSE_ID : touch.identifier;
this._touchPoints[identifier] = touchPoint;
this._lastExploreTime = timeStamp + this.SWIPE_MAX_DURATION;
}
@ -128,7 +142,7 @@ this.TouchAdapter = {
for (var i = 0; i < changedTouches.length; i++) {
let touch = changedTouches[i];
let identifier = (touch.identifier == undefined) ?
this.HOVER_ID : touch.identifier;
this.MOUSE_ID : touch.identifier;
let touchPoint = this._touchPoints[identifier];
if (touchPoint)
touchPoint.update(touch, timeStamp);
@ -138,12 +152,13 @@ this.TouchAdapter = {
this._lastExploreTime = timeStamp;
}
break;
case 'mouseup':
case 'mouseleave':
case 'touchend':
for (var i = 0; i < changedTouches.length; i++) {
let touch = changedTouches[i];
let identifier = (touch.identifier == undefined) ?
this.HOVER_ID : touch.identifier;
this.MOUSE_ID : touch.identifier;
let touchPoint = this._touchPoints[identifier];
if (touchPoint) {
touchPoint.update(touch, timeStamp);
@ -155,6 +170,7 @@ this.TouchAdapter = {
}
aEvent.preventDefault();
aEvent.stopImmediatePropagation();
},
cleanupTouches: function cleanupTouches() {
@ -239,13 +255,13 @@ this.TouchAdapter = {
// to single taps.
if (Utils.MozBuildApp == 'mobile/android' &&
Utils.AndroidSdkVersion >= 14 &&
aDetails.touches[0] != this.HOVER_ID) {
aDetails.touches[0] != this.MOUSE_ID) {
if (aDetails.touches.length == 1) {
if (aDetails.type == 'tap') {
emitDelay = 50;
aDetails.type = 'doubletap';
} else {
aDetails.touches.push(this.HOVER_ID);
aDetails.touches.push(this.MOUSE_ID);
}
}
}
@ -370,66 +386,3 @@ TouchPoint.prototype = {
return this.getDistanceToCoord(this.startX, this.startY);
}
};
var Mouse2Touch = {
_MouseToTouchMap: {
mousedown: 'touchstart',
mouseup: 'touchend',
mousemove: 'touchmove'
},
start: function Mouse2Touch_start() {
Utils.win.addEventListener('mousedown', this, true, true);
Utils.win.addEventListener('mouseup', this, true, true);
Utils.win.addEventListener('mousemove', this, true, true);
},
stop: function Mouse2Touch_stop() {
Utils.win.removeEventListener('mousedown', this, true, true);
Utils.win.removeEventListener('mouseup', this, true, true);
Utils.win.removeEventListener('mousemove', this, true, true);
},
handleEvent: function Mouse2Touch_handleEvent(aEvent) {
if (aEvent.buttons == 0)
return;
let name = this._MouseToTouchMap[aEvent.type];
let evt = Utils.win.document.createEvent("touchevent");
let points = [Utils.win.document.createTouch(
Utils.win, aEvent.target, 0,
aEvent.pageX, aEvent.pageY, aEvent.screenX, aEvent.screenY,
aEvent.clientX, aEvent.clientY, 1, 1, 0, 0)];
// Simulate another touch point at a 5px offset when ctrl is pressed.
if (aEvent.ctrlKey)
points.push(Utils.win.document.createTouch(
Utils.win, aEvent.target, 1,
aEvent.pageX + 5, aEvent.pageY + 5,
aEvent.screenX + 5, aEvent.screenY + 5,
aEvent.clientX + 5, aEvent.clientY + 5,
1, 1, 0, 0));
// Simulate another touch point at a -5px offset when alt is pressed.
if (aEvent.altKey)
points.push(Utils.win.document.createTouch(
Utils.win, aEvent.target, 2,
aEvent.pageX - 5, aEvent.pageY - 5,
aEvent.screenX - 5, aEvent.screenY - 5,
aEvent.clientX - 5, aEvent.clientY - 5,
1, 1, 0, 0));
let touches = Utils.win.document.createTouchList(points);
if (name == "touchend") {
let empty = Utils.win.document.createTouchList();
evt.initTouchEvent(name, true, true, Utils.win, 0,
false, false, false, false, empty, empty, touches);
} else {
evt.initTouchEvent(name, true, true, Utils.win, 0,
false, false, false, false, touches, touches, touches);
}
aEvent.target.dispatchEvent(evt);
aEvent.preventDefault();
aEvent.stopImmediatePropagation();
}
};

View File

@ -121,10 +121,17 @@ function activateCurrent(aMessage) {
let x = Math.round((objX.value - docX.value) + objW.value / 2);
let y = Math.round((objY.value - docY.value) + objH.value / 2);
let cwu = content.QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIDOMWindowUtils);
cwu.sendMouseEventToWindow('mousedown', x, y, 0, 1, 0, false);
cwu.sendMouseEventToWindow('mouseup', x, y, 0, 1, 0, false);
let node = aAccessible.DOMNode || aAccessible.parent.DOMNode;
function dispatchMouseEvent(aEventType) {
let evt = content.document.createEvent("MouseEvents");
evt.initMouseEvent(aEventType, true, true, content,
x, y, 0, 0, 0, false, false, false, false, 0, null);
node.dispatchEvent(evt);
}
dispatchMouseEvent("mousedown");
dispatchMouseEvent("mouseup");
}
}

View File

@ -300,10 +300,10 @@ XULLinkAccessible::AnchorURIAt(uint32_t aAnchorIndex)
nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
nsIDocument* document = mContent->OwnerDoc();
nsIURI* anchorURI = nullptr;
NS_NewURI(&anchorURI, href,
nsCOMPtr<nsIURI> anchorURI;
NS_NewURI(getter_AddRefs(anchorURI), href,
document->GetDocumentCharacterSet().get(),
baseURI);
return anchorURI;
return anchorURI.forget();
}

View File

@ -864,9 +864,6 @@ XULTextFieldAccessible::GetInputField() const
NS_ASSERTION(inputFieldDOMNode, "No input field for XULTextFieldAccessible");
nsIContent* inputField = nullptr;
if (inputFieldDOMNode)
CallQueryInterface(inputFieldDOMNode, &inputField);
return inputField;
nsCOMPtr<nsIContent> inputField = do_QueryInterface(inputFieldDOMNode);
return inputField.forget();
}

View File

@ -83,9 +83,7 @@ XULSelectControlAccessible::SelectedItems()
}
}
nsIMutableArray* items = nullptr;
selectedItems.forget(&items);
return items;
return selectedItems.forget();
}
Accessible*

View File

@ -275,9 +275,7 @@ XULTreeAccessible::SelectedItems()
}
}
nsIMutableArray* items = nullptr;
selectedItems.forget(&items);
return items;
return selectedItems.forget();
}
uint32_t

View File

@ -235,6 +235,7 @@ function startup(data, reasonCode) {
stopOnError: options.stopOnError,
verbose: options.verbose,
parseable: options.parseable,
checkMemory: options.check_memory,
}
}
});

View File

@ -76,6 +76,7 @@ We'd like to thank our many Jetpack project contributors! They include:
* Hrishikesh Kale
* Wes Kocher
* Lajos Koszti
* Kusanagi Kouichi
* [Vladimir Kukushkin](https://github.com/kukushechkin)
### L ###
@ -129,6 +130,7 @@ We'd like to thank our many Jetpack project contributors! They include:
* Dan Stevens
* [J. Ryan Stinnett](https://github.com/jryans)
* [Mihai Sucan](https://github.com/mihaisucan)
* Sunny ([darkowlzz](https://github.com/darkowlzz))
### T ###

View File

@ -94,26 +94,26 @@ Returns the value that is returned by `callee`.
Returns the return value of `callee`.
</api>
<api name="curry">
<api name="partial">
@function
[Curries](http://en.wikipedia.org/wiki/Currying) the given function with the arguments given.
Takes a function and bind values to one or more arguments, returning a new function of smaller arity.
let { curry } = require("sdk/lang/functional");
let { partial } = require("sdk/lang/functional");
let add = function add (x, y) { return x + y; }
let addOne = curry(add, 1);
let addOne = partial(add, 1);
addOne(5); // 6
addOne(10); // 11
curry(add, addOne(20))(2); // 23
partial(add, addOne(20))(2); // 23
@param fn {function}
Function to be curried.
Function on which partial application is to be performed.
@param arguments... {mixed}
Additional arguments
@returns {function}
The curried function.
The partial function.
</api>
<api name="compose">

View File

@ -0,0 +1,346 @@
<!-- 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/. -->
The `lang/type` module provides simple helper functions for working with type
detection.
<api name="isUndefined">
@function
Returns `true` if `value` is [`undefined`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined), `false` otherwise.
let { isUndefined } = require('sdk/lang/type');
var foo;
isUndefined(foo); // true
isUndefined(0); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is `undefined`.
</api>
<api name="isNull">
@function
Returns `true` if `value` is [`null`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/null), `false` otherwise.
let { isNull } = require('sdk/lang/type');
isNull(null); // true
isNull(false); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is `null`.
</api>
<api name="isString">
@function
Returns `true` if `value` is a [`String`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String),
`false` otherwise. Uses [`typeof`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/typeof)
operator to check type, and will only properly detect string primitives:
for example, a string created with `new String()` will always return false.
let { isString } = require('sdk/lang/type');
isString('my string'); // true
isString(100); // false
isString('100'); // true
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a `String`.
</api>
<api name="isNumber">
@function
Returns `true` if `value` is a [`Number`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number),
`false` otherwise. Uses [`typeof`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/typeof)
operator to check type, and will only properly detect number primitives:
for example, a number created with `new Number()` will always return false.
let { isNumber } = require('sdk/lang/type');
isNumber(3.1415); // true
isNumber(100); // true
isNumber('100'); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a `Number`.
</api>
<api name="isRegExp">
@function
Returns `true` if `value` is a [`RegExp`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp), `false` otherwise.
let { isRegExp } = require('sdk/lang/type');
isRegExp(/[^\.]*\.js$/); // true
isRegExp(new RegExp('substring')); // true
isRegExp(1000); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a `RegExp`.
</api>
<api name="isDate">
@function
Returns `true` if `value` is a [`Date`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date), `false` otherwise.
let { isDate } = require('sdk/lang/type');
isDate(new Date()); // true
isDate('3/1/2013'); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a `Date`.
</api>
<api name="isFunction">
@function
Returns `true` if `value` is a [`Function`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function), `false` otherwise.
let { isFunction } = require('sdk/lang/type');
let fn = function () {};
isFunction(fn); // true;
isFunction(otherFn); // true;
isFunction(function () {}); // true;
function otherFn () {}
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a `Function`.
</api>
<api name="isObject">
@function
Returns `true` if `value` is an [`Object`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object) and not null, `false` otherwise.
let { isObject } = require('sdk/lang/type');
isObject({}); // true
isObject(new Class()); // true
isObject(null); // false
isObject(5); // false
function Class () {}
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is an `Object`.
</api>
<api name="isArray">
@function
Returns `true` if `value` is an [`Array`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array), `false` otherwise. Uses native
[`Array.isArray`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/isArray).
let { isArray } = require('sdk/lang/type');
isArray([]); // true
isArray({}); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is an `Array`.
</api>
<api name="isArguments">
@function
Returns `true` if `value` is an array-like [`arguments`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/arguments) object,
`false` otherwise.
let { isArguments } = require('sdk/lang/type');
function run () {
isArguments(arguments); // true
isArguments([]); // false
isArguments(Array.slice(arguments)); // false
}
run(1, 2, 3);
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is an `arguments` object.
</api>
<api name="isPrimitive">
@function
Returns `true` if `value` is a primitive value: that is, any of [`null`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/null), [`undefined`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined), [`number`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/number),
[`boolean`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/boolean), or [`string`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/string). Returns `false` if `value` is not a primitive value.
let { isPrimitive } = require('sdk/lang/type');
isPrimitive(3); // true
isPrimitive('foo'); // true
isPrimitive({}); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a primitive.
</api>
<api name="isFlat">
@function
Returns `true` if `value` is a direct descendant of `Object.prototype` or `null`.
Similar to jQuery's [`isPlainObject`](http://api.jquery.com/jQuery.isPlainObject/).
let { isFlat } = require('sdk/lang/type');
isFlat({}); // true
isFlat(new Type()); // false
function Type () {}
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is a direct descendant of `Object.prototype` or `null`.
</api>
<api name="isEmpty">
@function
Returns `true` if `value` is an [`Object`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object) with no properties and `false` otherwise.
let { isEmpty } = require('sdk/lang/type');
isEmpty({}); // true
isEmpty({ init: false }); // false
@param value {object}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is an `Object` with no properties.
</api>
<api name="isJSON">
@function
Returns `true` if `value` is a string, number, boolean, null, array of JSON-serializable values, or an object whose property values are themselves JSON-serializable. Returns `false` otherwise.
let { isJSON } = require('sdk/lang/type');
isJSON({ value: 42 }); // true
isJSON({ fn: function () {} ); // false
@param value {mixed}
The variable to check.
@returns {boolean}
Boolean indicating if `value` is an `Array`/flat `Object` containing only
atomic values and other flat objects.
</api>
<api name="instanceOf">
@function
Returns `true` if `value` is an instance of a given `Type`. This is similar to the [`instanceof`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/instanceof) operator.
The difference is that the `Type` constructor can be from a scope that has
a different top level object: for example, it could be from a different iframe,
module or sandbox.
let { instanceOf } = require('sdk/lang/type');
instanceOf(new Class(), Class); // true
function Class() {}
@param value {object}
The variable to check.
@param Type {object}
The constructor to compare to `value`
@returns {boolean}
Boolean indicating if `value` is an instance of `Type`.
</api>
<api name="source">
@function
Returns the textual representation of `value`, containing property descriptors and types
of properties contained within the object.
let { source } = require('sdk/lang/type');
var obj = {
name: undefined,
twitter: '@horse_js',
tweets: [
{ id: 100, text: 'What happens to you if you break the monad laws?' },
{ id: 101, text: 'JAVASCRIPT DUBSTEP GENERATOR' }
]
};
console.log(source(obj));
// Prints the below
/*
{ // [object Object]
// writable configurable enumerable
name: undefined,
// writable configurable enumerable
twitter: "@horse_js",
// writable configurable enumerable
tweets: [
{ // [object Object]
// writable configurable enumerable
id: 100,
// writable configurable enumerable
text: "What happens to you if you break the monad laws?",
"__proto__": { // [object Object]
}
},
{ // [object Object]
// writable configurable enumerable
id: 101,
// writable configurable enumerable
text: "JAVASCRIPT DUBSTEP GENERATOR",
"__proto__": { // [object Object]
}
}
],
"__proto__": { // [object Object]
}
}
*/
@param value {mixed}
The source object to create a textual representation of.
@param indent {string}
Optional. `String` to be used as indentation in output. 4 spaces by default.
@param limit {number}
Optional. Number of properties to display per object.
@returns {string}
The textual representation of `value`.
</api>

View File

@ -192,6 +192,11 @@ registration.
Tabs emit all the events described in the Events section. Listeners are
passed the `Tab` object that triggered the event.
<api name="id">
@property {string}
The unique id for the tab. This property is read-only.
</api>
<api name="title">
@property {string}
The title of the tab (usually the title of the page currently loaded in the tab)

View File

@ -17,4 +17,4 @@ const { isBrowser } = require("../window/utils");
// implementation for `isBrowser`. Either way it's not really needed yet
// neither window tracker provides this event.
exports.events = filter(function({target}) isBrowser(target), events);
exports.events = filter(events, function({target}) isBrowser(target));

View File

@ -13,7 +13,7 @@ const self = require("../self");
const traceback = require("./traceback")
const prefs = require("../preferences/service");
const { merge } = require("../util/object");
const { curry } = require("../lang/functional");
const { partial } = require("../lang/functional");
const LEVELS = {
"all": Number.MIN_VALUE,
@ -102,13 +102,13 @@ function PlainTextConsole(print) {
}
merge(this, {
log: curry(message, print, "info"),
info: curry(message, print, "info"),
warn: curry(message, print, "warn"),
error: curry(message, print, "error"),
debug: curry(message, print, "debug"),
exception: curry(errorMessage, print),
trace: curry(traceMessage, print),
log: partial(message, print, "info"),
info: partial(message, print, "info"),
warn: partial(message, print, "warn"),
error: partial(message, print, "error"),
debug: partial(message, print, "debug"),
exception: partial(errorMessage, print),
trace: partial(traceMessage, print),
dir: function dir() {},
group: function group() {},

View File

@ -19,8 +19,7 @@ function initialize(instance) {
// Create an event handler that will dispose instance on unload.
function handler(event) {
if (event.subject.wrappedJSObject === unloadSubject) {
dispose(instance);
instance.dispose();
instance.destroy();
}
}
@ -66,8 +65,10 @@ let Disposable = Class({
destroy: function destroy() {
// Destroying disposable removes unload handler so that attempt to dispose
// won't be made at unload & delegates to dispose.
dispose(this);
this.dispose();
if (disposables.has(this)) {
dispose(this);
this.dispose();
}
}
});
exports.Disposable = Disposable;

View File

@ -25,7 +25,7 @@ let refs = (function() {
}
})();
function transform(f, input) {
function transform(input, f) {
let output = {};
// Since event listeners don't prevent `input` to be GC-ed we wanna presrve
@ -46,16 +46,16 @@ function transform(f, input) {
// High order event transformation function that takes `input` event channel
// and returns transformation containing only events on which `p` predicate
// returns `true`.
function filter(predicate, input) {
return transform(function(data, next) {
function filter(input, predicate) {
return transform(input, function(data, next) {
if (predicate(data)) next(data)
}, input);
});
}
exports.filter = filter;
// High order function that takes `input` and returns input of it's values
// mapped via given `f` function.
function map(f, input) transform(function(data, next) next(f(data)), input)
function map(input, f) transform(input, function(data, next) next(f(data)))
exports.map = map;
// High order function that takes `input` stream of streams and merges them
@ -97,7 +97,7 @@ function merge(inputs) {
}
exports.merge = merge;
function expand(f, inputs) merge(map(f, inputs))
function expand(inputs, f) merge(map(inputs, f))
exports.expand = expand;
function pipe(from, to) on(from, "*", emit.bind(emit, to))

View File

@ -13,6 +13,7 @@ module.metadata = {
};
const { setTimeout } = require("../timers");
const { deprecateFunction } = require("../util/deprecate");
/**
* Takes `lambda` function and returns a method. When returned method is
@ -55,14 +56,15 @@ function invoke(callee, params, self) callee.apply(self, params);
exports.invoke = invoke;
/**
* Curries a function with the arguments given.
* Takes a function and bind values to one or more arguments, returning a new
* function of smaller arity.
*
* @param {Function} fn
* The function to curry
* The function to partial
*
* @returns The function curried
* @returns The new function with binded values
*/
function curry(fn) {
function partial(fn) {
if (typeof fn !== "function")
throw new TypeError(String(fn) + " is not a function");
@ -70,7 +72,12 @@ function curry(fn) {
return function() fn.apply(this, args.concat(Array.slice(arguments)));
}
exports.curry = curry;
exports.partial = partial;
exports.curry = deprecateFunction(partial,
'curry is deprecated, ' +
'please use require("sdk/lang/functional").partial instead.'
);
/**
* Returns the composition of a list of functions, where each function consumes

View File

@ -63,9 +63,15 @@ function incompatibility(module) {
let applications = Object.keys(engines);
applications.forEach(xulappModule.is);
let versionRange = engines[xulappModule.name];
let versionRange;
applications.forEach(function(name) {
if (xulappModule.is(name)) {
versionRange = engines[name];
// Continue iteration. We want to ensure the module doesn't
// contain a typo in the applications' name or some unknown
// application - `is` function throws an exception in that case.
}
});
if (typeof(versionRange) === "string") {
if (xulappModule.satisfiesVersion(versionRange))

View File

@ -1,7 +1,6 @@
/* 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/. */
"use strict";
module.metadata = {
@ -64,7 +63,8 @@ var getRequestCount = exports.getRequestCount = function getRequestCount() {
};
var XMLHttpRequest = exports.XMLHttpRequest = function XMLHttpRequest() {
var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
let self = this;
let req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
.createInstance(Ci.nsIXMLHttpRequest);
// For the sake of simplicity, don't tie this request to any UI.
req.mozBackgroundRequest = true;
@ -73,31 +73,25 @@ var XMLHttpRequest = exports.XMLHttpRequest = function XMLHttpRequest() {
this._req = req;
this._orsc = null;
this._cleanup = this._cleanup.bind(this);
requests.push(this);
var self = this;
this._boundCleanup = function _boundCleanup() {
self._cleanup();
};
TERMINATE_EVENTS.forEach(
function(name) {
self._req.addEventListener(name, self._boundCleanup, false);
});
TERMINATE_EVENTS.forEach(function(name) {
self._req.addEventListener(name, self._cleanup, false);
});
};
XMLHttpRequest.prototype = {
_cleanup: function _cleanup() {
this.onreadystatechange = null;
var index = requests.indexOf(this);
let index = requests.indexOf(this);
if (index != -1) {
var self = this;
TERMINATE_EVENTS.forEach(
function(name) {
self._req.removeEventListener(name, self._boundCleanup, false);
});
let self = this;
TERMINATE_EVENTS.forEach(function(name) {
self._req.removeEventListener(name, self._cleanup, false);
});
requests.splice(index, 1);
}
},
@ -105,11 +99,11 @@ XMLHttpRequest.prototype = {
this._req.abort();
this._cleanup();
},
addEventListener: function addEventListener() {
throw new Error("not implemented");
addEventListener: function addEventListener(name, func) {
this._req.addEventListener(name, func);
},
removeEventListener: function removeEventListener() {
throw new Error("not implemented");
removeEventListener: function removeEventListener(name, func) {
this._req.removeEventListener(name, func);
},
set upload(newValue) {
throw new Error("not implemented");
@ -128,12 +122,15 @@ XMLHttpRequest.prototype = {
this._req.onreadystatechange = function() {
try {
self._orsc.apply(self, arguments);
} catch (e) {
}
catch (e) {
console.exception(e);
}
};
} else
}
else {
this._req.onreadystatechange = null;
}
}
};

View File

@ -32,9 +32,6 @@ const { filter, pipe } = require("./event/utils");
const { getNodeView, getActiveView } = require("./view/core");
const { isNil, isObject } = require("./lang/type");
if (isPrivateBrowsingSupported && isWindowPBSupported)
throw Error('The panel module cannot be used with per-window private browsing at the moment, see Bug 816257');
let isArray = Array.isArray;
let assetsURI = require("./self").data.url();
@ -251,24 +248,24 @@ const Panel = Class({
exports.Panel = Panel;
// Filter panel events to only panels that are create by this module.
let panelEvents = filter(function({target}) panelFor(target), events);
let panelEvents = filter(events, function({target}) panelFor(target));
// Panel events emitted after panel has being shown.
let shows = filter(function({type}) type === "sdk-panel-shown", panelEvents);
let shows = filter(panelEvents, function({type}) type === "sdk-panel-shown");
// Panel events emitted after panel became hidden.
let hides = filter(function({type}) type === "sdk-panel-hidden", panelEvents);
let hides = filter(panelEvents, function({type}) type === "sdk-panel-hidden");
// Panel events emitted after content inside panel is ready. For different
// panels ready may mean different state based on `contentScriptWhen` attribute.
// Weather given event represents readyness is detected by `getAttachEventType`
// helper function.
let ready = filter(function({type, target})
getAttachEventType(modelFor(panelFor(target))) === type, panelEvents);
let ready = filter(panelEvents, function({type, target})
getAttachEventType(modelFor(panelFor(target))) === type);
// Panel events emitted after content document in the panel has changed.
let change = filter(function({type}) type === "sdk-panel-content-changed",
panelEvents);
let change = filter(panelEvents, function({type})
type === "sdk-panel-content-changed");
// Forward panel show / hide events to panel's own event listeners.
on(shows, "data", function({target}) emit(panelFor(target), "show"));

View File

@ -39,13 +39,13 @@ function tabEventsFor(window) {
}
// Filter DOMContentLoaded events from all the browser events.
let readyEvents = filter(function(e) e.type === "DOMContentLoaded", events);
let readyEvents = filter(events, function(e) e.type === "DOMContentLoaded");
// Map DOMContentLoaded events to it's target browser windows.
let futureWindows = map(function(e) e.target, readyEvents);
let futureWindows = map(readyEvents, function(e) e.target);
// Expand all browsers that will become interactive to supported tab events
// on these windows. Result will be a tab events from all tabs of all windows
// that will become interactive.
let eventsFromFuture = expand(tabEventsFor, futureWindows);
let eventsFromFuture = expand(futureWindows, tabEventsFor);
// Above covers only windows that will become interactive in a future, but some
// windows may already be interactive so we pick those and expand to supported

View File

@ -57,6 +57,9 @@ var results = {
testRuns: []
};
// A list of the compartments and windows loaded after startup
var startLeaks;
// JSON serialization of last memory usage stats; we keep it stringified
// so we don't actually change the memory usage stats (in terms of objects)
// of the JSRuntime we're profiling.
@ -162,9 +165,32 @@ function reportMemoryUsage() {
var gWeakrefInfo;
function showResults() {
function checkMemory() {
memory.gc();
setTimeout(function () {
memory.gc();
setTimeout(function () {
let leaks = getPotentialLeaks();
let compartmentURLs = Object.keys(leaks.compartments).filter(function(url) {
return !(url in startLeaks.compartments);
});
let windowURLs = Object.keys(leaks.windows).filter(function(url) {
return !(url in startLeaks.windows);
});
for (let url of compartmentURLs)
console.warn("LEAKED", leaks.compartments[url]);
for (let url of windowURLs)
console.warn("LEAKED", leaks.windows[url]);
showResults();
});
});
}
function showResults() {
if (gWeakrefInfo) {
gWeakrefInfo.forEach(
function(info) {
@ -227,7 +253,7 @@ function cleanup() {
console.exception(e);
};
setTimeout(showResults, 1);
setTimeout(require('@test/options').checkMemory ? checkMemory : showResults, 1);
// dump the coverobject
if (Object.keys(coverObject).length){
@ -245,6 +271,123 @@ function cleanup() {
}
}
function getPotentialLeaks() {
memory.gc();
// Things we can assume are part of the platform and so aren't leaks
let WHITELIST_BASE_URLS = [
"chrome://",
"resource:///",
"resource://app/",
"resource://gre/",
"resource://gre-resources/",
"resource://pdf.js/",
"resource://pdf.js.components/",
"resource://services-common/",
"resource://services-crypto/",
"resource://services-sync/"
];
let ioService = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
let uri = ioService.newURI("chrome://global/content/", "UTF-8", null);
let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIChromeRegistry);
uri = chromeReg.convertChromeURL(uri);
let spec = uri.spec;
let pos = spec.indexOf("!/");
WHITELIST_BASE_URLS.push(spec.substring(0, pos + 2));
let compartmentRegexp = new RegExp("^explicit/js-non-window/compartments/non-window-global/compartment\\((.+)\\)/");
let compartmentDetails = new RegExp("^([^,]+)(?:, (.+?))?(?: \\(from: (.*)\\))?$");
let windowRegexp = new RegExp("^explicit/window-objects/top\\((.*)\\)/active");
let windowDetails = new RegExp("^(.*), id=.*$");
function isPossibleLeak(item) {
if (!item.location)
return false;
for (let whitelist of WHITELIST_BASE_URLS) {
if (item.location.substring(0, whitelist.length) == whitelist)
return false;
}
return true;
}
let compartments = {};
let windows = {};
function logReporter(process, path, kind, units, amount, description) {
let matches = compartmentRegexp.exec(path);
if (matches) {
if (matches[1] in compartments)
return;
let details = compartmentDetails.exec(matches[1]);
if (!details) {
console.error("Unable to parse compartment detail " + matches[1]);
return;
}
let item = {
path: matches[1],
principal: details[1],
location: details[2] ? details[2].replace("\\", "/", "g") : undefined,
source: details[3] ? details[3].split(" -> ").reverse() : undefined,
toString: function() this.location
};
if (!isPossibleLeak(item))
return;
compartments[matches[1]] = item;
return;
}
matches = windowRegexp.exec(path);
if (matches) {
if (matches[1] in windows)
return;
let details = windowDetails.exec(matches[1]);
if (!details) {
console.error("Unable to parse window detail " + matches[1]);
return;
}
let item = {
path: matches[1],
location: details[1].replace("\\", "/", "g"),
source: [details[1].replace("\\", "/", "g")],
toString: function() this.location
};
if (!isPossibleLeak(item))
return;
windows[matches[1]] = item;
}
}
let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
getService(Ci.nsIMemoryReporterManager);
let enm = mgr.enumerateReporters();
while (enm.hasMoreElements()) {
let reporter = enm.getNext().QueryInterface(Ci.nsIMemoryReporter);
logReporter(reporter.process, reporter.path, reporter.kind, reporter.units,
reporter.amount, reporter.description);
}
let enm = mgr.enumerateMultiReporters();
while (enm.hasMoreElements()) {
let mr = enm.getNext().QueryInterface(Ci.nsIMemoryMultiReporter);
mr.collectReports(logReporter, null);
}
return { compartments: compartments, windows: windows };
}
function nextIteration(tests) {
if (tests) {
results.passed += tests.passed;
@ -440,6 +583,12 @@ var runTests = exports.runTests = function runTests(options) {
global: {} // useful for storing things like coverage testing.
});
// Load these before getting initial leak stats as they will still be in
// memory when we check later
require("../deprecated/unit-test");
require("../deprecated/unit-test-finder");
startLeaks = getPotentialLeaks();
nextIteration();
} catch (e) {
let frames = fromException(e).reverse().reduce(function(frames, frame) {

View File

@ -6,6 +6,7 @@
const { Loader, resolveURI, Require,
unload, override, descriptor } = require('../loader/cuddlefish');
const { ensure } = require('../system/unload');
const addonWindow = require('../addon/window');
const { PlainTextConsole } = require("sdk/console/plain-text");
@ -19,7 +20,7 @@ function CustomLoader(module, globals, packaging) {
});
let loader = Loader(options);
return Object.create(loader, descriptor({
let wrapper = Object.create(loader, descriptor({
require: Require(loader, module),
sandbox: function(id) {
let requirement = loader.resolve(id, module.id);
@ -30,6 +31,8 @@ function CustomLoader(module, globals, packaging) {
unload(loader, reason);
}
}));
ensure(wrapper);
return wrapper;
};
exports.Loader = CustomLoader;

View File

@ -228,6 +228,12 @@ parser_groups = (
metavar=None,
default=False,
cmds=['sdocs'])),
(("", "--check-memory",), dict(dest="check_memory",
help="attempts to detect leaked compartments after a test run",
action="store_true",
default=False,
cmds=['test', 'testpkgs', 'testaddons',
'testall'])),
]
),
@ -660,7 +666,7 @@ def run(arguments=sys.argv[1:], target_cfg=None, pkg_cfg=None,
# a Mozilla application (which includes running tests).
use_main = False
inherited_options = ['verbose', 'enable_e10s', 'parseable']
inherited_options = ['verbose', 'enable_e10s', 'parseable', 'check_memory']
enforce_timeouts = False
if command == "xpi":

View File

@ -1,16 +1,83 @@
'use strict';
const { isWindowPBSupported } = require('sdk/private-browsing/utils');
const { open, focus, close } = require('sdk/window/helpers');
const { isPrivate } = require('sdk/private-browsing');
const { defer } = require('sdk/core/promise');
if (isWindowPBSupported) {
exports.testRequirePanel = function (assert) {
try {
require('panel');
const BROWSER = 'chrome://browser/content/browser.xul';
exports.testRequirePanel = function(assert) {
require('panel');
assert.ok('the panel module should not throw an error');
};
exports.testShowPanelInPrivateWindow = function(assert, done) {
let panel = require('sdk/panel').Panel({
contentURL: "data:text/html;charset=utf-8,"
});
testShowPanel(assert, panel).
then(makeEmptyPrivateBrowserWindow).
then(focus).
then(function(window) {
assert.equal(isPrivate(window), true, 'opened window is private');
assert.pass('private window was focused');
return window;
}).
then(function(window) {
let { promise, resolve } = defer();
assert.ok(!panel.isShowing, 'the panel is not showing [1]');
panel.once('show', function() {
assert.ok(panel.isShowing, 'the panel is showing');
panel.once('hide', function() {
assert.ok(!panel.isShowing, 'the panel is not showing [2]');
resolve(window);
});
panel.hide();
});
panel.show();
return promise;
}).
then(close).
then(done, assert.fail.bind(assert));
};
function makeEmptyPrivateBrowserWindow(options) {
options = options || {};
return open(BROWSER, {
features: {
chrome: true,
toolbar: true,
private: true
}
catch(e) {
assert.ok(e.message.match(/Bug 816257/), 'Bug 816257 is mentioned');
return;
}
assert.fail('the panel module should throw an error');
}
});
}
function testShowPanel(assert, panel) {
let { promise, resolve } = defer();
assert.ok(!panel.isShowing, 'the panel is not showing [1]');
panel.once('show', function() {
assert.ok(panel.isShowing, 'the panel is showing');
panel.once('hide', function() {
assert.ok(!panel.isShowing, 'the panel is not showing [2]');
resolve(null);
});
panel.hide();
})
panel.show();
return promise;
}

View File

@ -10,7 +10,7 @@ const { loader } = LoaderWithHookedConsole(module);
const pb = loader.require('sdk/private-browsing');
const pbUtils = loader.require('sdk/private-browsing/utils');
const xulApp = require("sdk/system/xul-app");
const { openDialog, getMostRecentBrowserWindow } = require('sdk/window/utils');
const { open: openWindow, getMostRecentBrowserWindow } = require('sdk/window/utils');
const { openTab, getTabContentWindow, getActiveTab, setTabURL, closeTab } = require('sdk/tabs/utils');
const promise = require("sdk/core/promise");
const windowHelpers = require('sdk/window/helpers');
@ -58,6 +58,7 @@ exports.openWebpage = function openWebpage(url, enablePrivate) {
let rawTab = openTab(chromeWindow, url, {
isPrivate: enablePrivate
});
return {
ready: promise.resolve(getTabContentWindow(rawTab)),
close: function () {
@ -68,8 +69,10 @@ exports.openWebpage = function openWebpage(url, enablePrivate) {
};
}
else {
let win = openDialog({
private: enablePrivate
let win = openWindow(null, {
features: {
private: enablePrivate
}
});
let deferred = promise.defer();
@ -77,7 +80,8 @@ exports.openWebpage = function openWebpage(url, enablePrivate) {
// that the window is really ready
events.on("browser-delayed-startup-finished", function onReady({subject}) {
if (subject == win) {
events.off("browser-delayed-startup-finished", onReady, true);
events.off("browser-delayed-startup-finished", onReady);
deferred.resolve(win);
let rawTab = getActiveTab(win);
setTabURL(rawTab, url);

View File

@ -192,33 +192,6 @@ exports.testTabLocation = function(test) {
});
};
// TEST: tab.reload()
exports.testTabReload = function(test) {
test.waitUntilDone();
let url = "data:text/html;charset=utf-8,<!doctype%20html><title></title>";
tabs.open({
url: url,
onReady: function onReady(tab) {
tab.removeListener('ready', onReady);
tab.once(
'ready',
function onReload() {
test.pass("the tab was loaded again");
test.assertEqual(tab.url, url, "the tab has the same URL");
// end test
tab.close(function() test.done());
}
);
tab.reload();
}
});
};
// TEST: tab.move()
exports.testTabMove = function(test) {
test.waitUntilDone();

View File

@ -300,39 +300,6 @@ exports.testTabClose = function(test) {
});
};
// TEST: tab.reload()
exports.testTabReload = function(test) {
test.waitUntilDone();
openBrowserWindow(function(window, browser) {
let tabs = require("sdk/tabs");
let url = "data:text/html;charset=utf-8,<!doctype%20html><title></title>";
tabs.open({ url: url, onReady: function onReady(tab) {
tab.removeListener("ready", onReady);
browser.addEventListener(
"load",
function onLoad() {
browser.removeEventListener("load", onLoad, true);
browser.addEventListener(
"load",
function onReload() {
browser.removeEventListener("load", onReload, true);
test.pass("the tab was loaded again");
test.assertEqual(tab.url, url, "the tab has the same URL");
closeBrowserWindow(window, function() test.done());
},
true
);
tab.reload();
},
true
);
}});
});
};
// TEST: tab.move()
exports.testTabMove = function(test) {
test.waitUntilDone();

View File

@ -9,6 +9,7 @@ let { Cc, Ci } = require("chrome");
const { Loader } = require('sdk/test/loader');
const timer = require("sdk/timers");
const { merge } = require("sdk/util/object");
// These should match the same constants in the module.
const ITEM_CLASS = "addon-context-menu-item";
@ -1944,6 +1945,7 @@ exports.testParentMenu = function (test) {
});
};
// Existing context menu modifications should apply to new windows.
exports.testNewWindow = function (test) {
test = new TestHelper(test);
@ -1981,6 +1983,73 @@ exports.testNewWindowMultipleModules = function (test) {
};
// Existing context menu modifications should not apply to new private windows.
exports.testNewPrivateWindow = function (test) {
test = new TestHelper(test);
let loader = test.newLoader();
let item = new loader.cm.Item({ label: "item" });
test.showMenu(null, function (popup) {
test.checkMenu([item], [], []);
popup.hidePopup();
test.withNewPrivateWindow(function () {
test.showMenu(null, function (popup) {
test.checkMenu([], [], []);
test.done();
});
});
});
};
// Existing context menu modifications should apply to new private windows when
// private browsing support is enabled.
exports.testNewPrivateEnabledWindow = function (test) {
test = new TestHelper(test);
let loader = test.newPrivateLoader();
let item = new loader.cm.Item({ label: "item" });
test.showMenu(null, function (popup) {
test.checkMenu([item], [], []);
popup.hidePopup();
test.withNewPrivateWindow(function () {
test.showMenu(null, function (popup) {
test.checkMenu([item], [], []);
test.done();
});
});
});
};
// Existing context menu modifications should apply to new private windows when
// private browsing support is enabled unless unloaded.
exports.testNewPrivateEnabledWindowUnloaded = function (test) {
test = new TestHelper(test);
let loader = test.newPrivateLoader();
let item = new loader.cm.Item({ label: "item" });
test.showMenu(null, function (popup) {
test.checkMenu([item], [], []);
popup.hidePopup();
loader.unload();
test.withNewPrivateWindow(function () {
test.showMenu(null, function (popup) {
test.checkMenu([], [], []);
test.done();
});
});
});
};
// Items in the context menu should be sorted according to locale.
exports.testSorting = function (test) {
test = new TestHelper(test);
@ -3339,6 +3408,37 @@ TestHelper.prototype = {
return wrapper;
},
// As above but the loader has private-browsing support enabled.
newPrivateLoader: function() {
let base = require("@loader/options");
// Clone current loader's options adding the private-browsing permission
let options = merge({}, base, {
metadata: merge({}, base.metadata || {}, {
permissions: merge({}, base.metadata.permissions || {}, {
'private-browsing': true
})
})
});
const self = this;
let loader = Loader(module, null, options);
let wrapper = {
loader: loader,
cm: loader.require("sdk/context-menu"),
globalScope: loader.sandbox("sdk/context-menu"),
unload: function () {
loader.unload();
let idx = self.loaders.indexOf(wrapper);
if (idx < 0)
throw new Error("Test error: tried to unload nonexistent loader");
self.loaders.splice(idx, 1);
}
};
this.loaders.push(wrapper);
return wrapper;
},
// Returns true if the count crosses the overflow threshold.
shouldOverflow: function (count) {
return count >
@ -3405,6 +3505,15 @@ TestHelper.prototype = {
this.browserWindow = win;
},
// Opens a new private browser window. The window will be closed
// automatically when done() is called.
withNewPrivateWindow: function (onloadCallback) {
let win = this.browserWindow.OpenBrowserWindow({private: true});
this.delayedEventListener(win, "load", onloadCallback, true);
this.oldBrowserWindow = this.browserWindow;
this.browserWindow = win;
},
// Opens a new tab with our test page in the current window. The tab will
// be closed automatically when done() is called.
withTestDoc: function (onloadCallback) {

View File

@ -188,4 +188,38 @@ exports["test disposables that throw"] = function(assert) {
assert.equal(disposals, 0, "no disposal if constructor threw");
}
exports["test multiple destroy"] = function(assert) {
let loader = Loader(module);
let { Disposable } = loader.require("sdk/core/disposable");
let disposals = 0
let Foo = Class({
extends: Disposable,
dispose: function dispose() {
disposals = disposals + 1
}
})
let foo1 = Foo();
let foo2 = Foo();
let foo3 = Foo();
assert.equal(disposals, 0, "no disposals yet");
foo1.destroy();
assert.equal(disposals, 1, "disposed properly");
foo1.destroy();
assert.equal(disposals, 1, "didn't attempt to dispose twice");
foo2.destroy();
assert.equal(disposals, 2, "other instances still dispose fine");
foo2.destroy();
assert.equal(disposals, 2, "but not twice");
loader.unload();
assert.equal(disposals, 3, "unload only disposed the remaining instance");
}
require('test').run(exports);

View File

@ -13,7 +13,7 @@ function inc(x) x + 1
exports["test filter events"] = function(assert) {
let input = {};
let evens = filter(isEven, input);
let evens = filter(input, isEven);
let actual = [];
on(evens, "data", function(e) actual.push(e));
@ -23,28 +23,28 @@ exports["test filter events"] = function(assert) {
};
exports["test filter emits"] = $.emits(function(input, assert) {
let output = filter(isEven, input);
let output = filter(input, isEven);
assert(output, [1, 2, 3, 4, 5], [2, 4], "this is `output` & evens passed");
});;
exports["test filter reg once"] = $.registerOnce(function(input, assert) {
assert(filter(isEven, input), [1, 2, 3, 4, 5, 6], [2, 4, 6],
assert(filter(input, isEven), [1, 2, 3, 4, 5, 6], [2, 4, 6],
"listener can be registered only once");
});
exports["test filter ignores new"] = $.ignoreNew(function(input, assert) {
assert(filter(isEven, input), [1, 2, 3], [2],
assert(filter(input, isEven), [1, 2, 3], [2],
"new listener is ignored")
});
exports["test filter is FIFO"] = $.FIFO(function(input, assert) {
assert(filter(isEven, input), [1, 2, 3, 4], [2, 4],
assert(filter(input, isEven), [1, 2, 3, 4], [2, 4],
"listeners are invoked in fifo order")
});
exports["test map events"] = function(assert) {
let input = {};
let incs = map(inc, input);
let incs = map(input, inc);
let actual = [];
on(incs, "data", function(e) actual.push(e));
@ -54,22 +54,22 @@ exports["test map events"] = function(assert) {
};
exports["test map emits"] = $.emits(function(input, assert) {
let output = map(inc, input);
let output = map(input, inc);
assert(output, [1, 2, 3], [2, 3, 4], "this is `output` & evens passed");
});;
exports["test map reg once"] = $.registerOnce(function(input, assert) {
assert(map(inc, input), [1, 2, 3], [2, 3, 4],
assert(map(input, inc), [1, 2, 3], [2, 3, 4],
"listener can be registered only once");
});
exports["test map ignores new"] = $.ignoreNew(function(input, assert) {
assert(map(inc, input), [1], [2],
assert(map(input, inc), [1], [2],
"new listener is ignored")
});
exports["test map is FIFO"] = $.FIFO(function(input, assert) {
assert(map(inc, input), [1, 2, 3, 4], [2, 3, 4, 5],
assert(map(input, inc), [1, 2, 3, 4], [2, 3, 4, 5],
"listeners are invoked in fifo order")
});
@ -115,28 +115,28 @@ exports["test merge array[stream]"] = function(assert) {
};
exports["test merge emits"] = $.emits(function(input, assert) {
let evens = filter(isEven, input)
let evens = filter(input, isEven)
let output = merge([evens, input]);
assert(output, [1, 2, 3], [1, 2, 2, 3], "this is `output` & evens passed");
});
exports["test merge reg once"] = $.registerOnce(function(input, assert) {
let evens = filter(isEven, input)
let evens = filter(input, isEven)
let output = merge([input, evens]);
assert(output, [1, 2, 3, 4], [1, 2, 2, 3, 4, 4],
"listener can be registered only once");
});
exports["test merge ignores new"] = $.ignoreNew(function(input, assert) {
let evens = filter(isEven, input)
let evens = filter(input, isEven)
let output = merge([input, evens])
assert(output, [1], [1],
"new listener is ignored")
});
exports["test marge is FIFO"] = $.FIFO(function(input, assert) {
let evens = filter(isEven, input)
let evens = filter(input, isEven)
let output = merge([input, evens])
assert(output, [1, 2, 3, 4], [1, 2, 2, 3, 4, 4],
@ -148,7 +148,7 @@ exports["test expand"] = function(assert) {
let inputs = {};
let actual = [];
on(expand(function($) $(), inputs), "data", function($) actual.push($))
on(expand(inputs, function($) $()), "data", function($) actual.push($))
emit(inputs, "data", function() a);
emit(a, "data", "a1");

View File

@ -2,9 +2,11 @@
* 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/. */
const { setTimeout } = require('sdk/timers');
const utils = require('sdk/lang/functional');
const { invoke, defer, curry, compose, memoize, once, delay, wrap } = utils;
const { invoke, defer, partial, compose, memoize, once, delay, wrap } = utils;
const { LoaderWithHookedConsole } = require('sdk/test/loader');
exports['test forwardApply'] = function(assert) {
function sum(b, c) this.a + b + c
@ -29,17 +31,33 @@ exports['test deferred function'] = function(assert, done) {
nextTurn = true;
};
exports['test partial function'] = function(assert) {
function sum(b, c) this.a + b + c;
let foo = { a : 5 };
foo.sum7 = partial(sum, 7);
foo.sum8and4 = partial(sum, 8, 4);
assert.equal(foo.sum7(2), 14, 'partial one arguments works');
assert.equal(foo.sum8and4(), 17, 'partial both arguments works');
};
exports['test curry function'] = function(assert) {
let { loader, messages } = LoaderWithHookedConsole(module);
let { curry } = loader.require('sdk/lang/functional');
function sum(b, c) this.a + b + c;
let foo = { a : 5 };
foo.sum7 = curry(sum, 7);
foo.sum8and4 = curry(sum, 8, 4);
assert.equal(foo.sum7(2), 14, 'curry one arguments works');
assert.equal(messages.length, 1, "only one error is dispatched");
assert.ok(messages[0].msg.indexOf('curry is deprecated') > -1);
assert.equal(foo.sum8and4(), 17, 'curry both arguments works');
loader.unload();
};
exports['test compose'] = function(assert) {

View File

@ -1058,6 +1058,8 @@ exports.testEvents = function(test) {
exports["test page-mod on private tab"] = function (test) {
test.waitUntilDone();
let fail = test.fail.bind(test);
let privateUri = "data:text/html;charset=utf-8," +
"<iframe src=\"data:text/html;charset=utf-8,frame\" />";
let nonPrivateUri = "data:text/html;charset=utf-8,non-private";
@ -1072,17 +1074,24 @@ exports["test page-mod on private tab"] = function (test) {
nonPrivateUri,
"page-mod should only attach to the non-private tab");
}
test.assert(!isPrivate(worker),
"The worker is really non-private");
test.assert(!isPrivate(worker.tab),
"The document is really non-private");
pageMod.destroy();
page1.close().then(page2.close).then(test.done.bind(test));
page1.close().
then(page2.close).
then(test.done.bind(test), fail);
}
});
let page1 = openWebpage(privateUri, true);
let page2 = openWebpage(nonPrivateUri, false);
let page1, page2;
page1 = openWebpage(privateUri, true);
page1.ready.then(function() {
page2 = openWebpage(nonPrivateUri, false);
}, fail);
}
exports["test page-mod on private tab in global pb"] = function (test) {

View File

@ -120,9 +120,11 @@ exports["test Document Reload"] = function(assert, done) {
let content =
"<script>" +
"setTimeout(function () {" +
" window.location = 'about:blank';" +
"}, 250);" +
"window.onload = function() {" +
" setTimeout(function () {" +
" window.location = 'about:blank';" +
" }, 0);" +
"}" +
"</script>";
let messageCount = 0;
let panel = Panel({
@ -132,7 +134,7 @@ exports["test Document Reload"] = function(assert, done) {
onMessage: function (message) {
messageCount++;
if (messageCount == 1) {
assert.ok(/data:text\/html/.test(message), "First document had a content script");
assert.ok(/data:text\/html/.test(message), "First document had a content script " + message);
}
else if (messageCount == 2) {
assert.equal(message, "about:blank", "Second document too");
@ -141,6 +143,7 @@ exports["test Document Reload"] = function(assert, done) {
}
}
});
assert.pass('Panel was created');
};
exports["test Parent Resize Hack"] = function(assert, done) {

View File

@ -381,3 +381,30 @@ exports.testImmediateClosing = function (test) {
}
});
}
// TEST: tab.reload()
exports.testTabReload = function(test) {
test.waitUntilDone();
let url = "data:text/html;charset=utf-8,<!doctype%20html><title></title>";
tabs.open({
url: url,
onReady: function onReady(tab) {
tab.removeListener('ready', onReady);
tab.once(
'ready',
function onReload() {
test.pass("the tab was loaded again");
test.assertEqual(tab.url, url, "the tab has the same URL");
// end test
tab.close(function() test.done());
}
);
tab.reload();
}
});
};

View File

@ -208,30 +208,20 @@ exports['test window watcher unregs 4 loading wins'] = function(assert, done) {
}
exports['test window watcher without untracker'] = function(assert, done) {
var myWindow;
var finished = false;
var delegate = {
let myWindow;
let wt = new windowUtils.WindowTracker({
onTrack: function(window) {
if (window == myWindow) {
assert.pass("onTrack() called with our test window");
timer.setTimeout(function() {
myWindow.close();
if (!finished) {
finished = true;
myWindow = null;
wt.unload();
done();
} else {
assert.fail("onTrack() called multiple times.");
}
}, 1);
close(myWindow).then(function() {
wt.unload();
done();
}, assert.fail);
}
}
};
});
var wt = new windowUtils.WindowTracker(delegate);
myWindow = makeEmptyWindow();
};

View File

@ -1,12 +1,13 @@
/* 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/. */
'use strict'
var xhr = require("sdk/net/xhr");
var timer = require("sdk/timers");
var { Loader } = require("sdk/test/loader");
var xulApp = require("sdk/system/xul-app");
const xhr = require('sdk/net/xhr');
const { Loader } = require('sdk/test/loader');
const xulApp = require('sdk/system/xul-app');
// TODO: rewrite test below
/* Test is intentionally disabled until platform bug 707256 is fixed.
exports.testAbortedXhr = function(test) {
var req = new xhr.XMLHttpRequest();
@ -16,67 +17,76 @@ exports.testAbortedXhr = function(test) {
};
*/
exports.testLocalXhr = function(test) {
exports.testLocalXhr = function(assert, done) {
var req = new xhr.XMLHttpRequest();
req.overrideMimeType("text/plain");
req.open("GET", module.uri);
let ready = false;
req.overrideMimeType('text/plain');
req.open('GET', module.uri);
req.onreadystatechange = function() {
if (req.readyState == 4 && (req.status == 0 || req.status == 200)) {
test.assertMatches(req.responseText,
/onreadystatechange/,
"XMLHttpRequest should get local files");
timer.setTimeout(
function() { test.assertEqual(xhr.getRequestCount(), 0);
test.done(); },
0
);
ready = true;
assert.ok(req.responseText.match(/onreadystatechange/i),
'XMLHttpRequest should get local files');
}
};
req.addEventListener('load', function onload() {
req.removeEventListener('load', onload);
assert.pass('addEventListener for load event worked');
assert.ok(ready, 'onreadystatechange listener worked');
assert.equal(xhr.getRequestCount(), 0, 'request count is 0');
done();
});
req.send(null);
test.assertEqual(xhr.getRequestCount(), 1);
test.waitUntilDone(4000);
assert.equal(xhr.getRequestCount(), 1, 'request count is 1');
};
exports.testUnload = function(test) {
exports.testUnload = function(assert) {
var loader = Loader(module);
var sbxhr = loader.require("sdk/net/xhr");
var sbxhr = loader.require('sdk/net/xhr');
var req = new sbxhr.XMLHttpRequest();
req.overrideMimeType("text/plain");
req.overrideMimeType('text/plain');
req.open("GET", module.uri);
req.send(null);
test.assertEqual(sbxhr.getRequestCount(), 1);
assert.equal(sbxhr.getRequestCount(), 1, 'request count is 1');
loader.unload();
test.assertEqual(sbxhr.getRequestCount(), 0);
assert.equal(sbxhr.getRequestCount(), 0, 'request count is 0');
};
exports.testResponseHeaders = function(test) {
exports.testResponseHeaders = function(assert, done) {
var req = new xhr.XMLHttpRequest();
req.overrideMimeType("text/plain");
req.open("GET", module.uri);
req.overrideMimeType('text/plain');
req.open('GET', module.uri);
req.onreadystatechange = function() {
if (req.readyState == 4 && (req.status == 0 || req.status == 200)) {
var headers = req.getAllResponseHeaders();
if (xulApp.versionInRange(xulApp.platformVersion, "13.0a1", "*")) {
if (xulApp.satisfiesVersion(xulApp.platformVersion, '>=13.0a1')) {
headers = headers.split("\r\n");
if(headers.length == 1) {
if (headers.length == 1) {
headers = headers[0].split("\n");
}
for(let i in headers) {
if(headers[i] && headers[i].search("Content-Type") >= 0) {
test.assertEqual(headers[i], "Content-Type: text/plain",
"XHR's headers are valid");
for (let i in headers) {
if (headers[i] && headers[i].search('Content-Type') >= 0) {
assert.equal(headers[i], 'Content-Type: text/plain',
'XHR\'s headers are valid');
}
}
}
else {
test.assert(headers === null || headers === "",
"XHR's headers are empty");
assert.ok(headers === null || headers === '',
'XHR\'s headers are empty');
}
test.done();
done();
}
};
req.send(null);
test.assertEqual(xhr.getRequestCount(), 1);
test.waitUntilDone(4000);
assert.equal(xhr.getRequestCount(), 1, 'request count is 1');
}
require('test').run(exports);

View File

@ -296,15 +296,6 @@ exports.testTrackWindows = function(test) {
"activate 2", "global activate 2"
];
function shutdown(window) {
if (this.length === 1) {
test.assertEqual(actions.join(), expects.join(),
"correct activate and deactivate sequence")
test.done();
}
}
function openWindow() {
windows.push(browserWindows.open({
url: "data:text/html;charset=utf-8,<i>testTrackWindows</i>",
@ -312,18 +303,28 @@ exports.testTrackWindows = function(test) {
onActivate: function(window) {
let index = windows.indexOf(window);
test.assertEqual(actions.join(), expects.slice(0, index*4).join(), expects[index*4]);
actions.push("activate " + index);
if (windows.length < 3)
if (windows.length < 3) {
openWindow()
else
for each (let win in windows)
win.close(shutdown)
}
else {
let count = windows.length;
for each (let win in windows) {
win.close(function() {
if (--count == 0) {
test.done();
}
});
}
}
},
onDeactivate: function(window) {
let index = windows.indexOf(window);
test.assertEqual(actions.join(), expects.slice(0, index*4 + 2).join(), expects[index*4 + 2]);
actions.push("deactivate " + index)
}
}));
@ -334,6 +335,8 @@ exports.testTrackWindows = function(test) {
// only concerned with windows opened for this test
if (index < 0)
return;
test.assertEqual(actions.join(), expects.slice(0, index*4 + 1).join(), expects[index*4 + 1]);
actions.push("global activate " + index)
})
@ -342,6 +345,8 @@ exports.testTrackWindows = function(test) {
// only concerned with windows opened for this test
if (index < 0)
return;
test.assertEqual(actions.join(), expects.slice(0, index*4 + 3).join(), expects[index*4 + 3]);
actions.push("global deactivate " + index)
})
@ -361,9 +366,7 @@ exports.testWindowOpenPrivateDefault = function(test) {
test.assertEqual(tab.url, 'about:mozilla', 'opened correct tab');
test.assertEqual(isPrivate(tab), false, 'tab is not private');
window.close(function() {
test.done();
});
window.close(test.done.bind(test));
});
}
});

View File

@ -84,6 +84,14 @@ function debug(str) {
dump(' -*- Shell.js: ' + str + '\n');
}
#ifdef MOZ_CRASHREPORTER
function debugCrashReport(aStr) {
dump('Crash reporter : ' + aStr);
}
#else
function debugCrashReport(aStr) {}
#endif
var shell = {
get CrashSubmit() {
@ -92,6 +100,7 @@ var shell = {
Cu.import("resource://gre/modules/CrashSubmit.jsm", this);
return this.CrashSubmit;
#else
dump('Crash reporter : disabled at build time.');
return this.CrashSubmit = null;
#endif
},
@ -111,7 +120,10 @@ var shell = {
crashID = Cc["@mozilla.org/xre/app-info;1"]
.getService(Ci.nsIXULRuntime).lastRunCrashID;
}
} catch(e) { }
} catch(e) {
debugCrashReport('Failed to fetch crash id. Crash ID is "' + crashID
+ '" Exception: ' + e);
}
// Bail if there isn't a valid crashID.
if (!this.CrashSubmit || !crashID && !this.CrashSubmit.pendingIDs().length) {
@ -123,10 +135,14 @@ var shell = {
try {
// Check if we should automatically submit this crash.
if (Services.prefs.getBoolPref("app.reportCrashes")) {
if (Services.prefs.getBoolPref('app.reportCrashes')) {
this.submitCrash(crashID);
} else {
debugCrashReport('app.reportCrashes is disabled');
}
} catch (e) { }
} catch (e) {
debugCrashReport('Can\'t fetch app.reportCrashes. Exception: ' + e);
}
// We can get here if we're just submitting old pending crashes.
// Check that there's a valid crashID so that we only notify the
@ -146,6 +162,7 @@ var shell = {
// submit the pending queue.
let pending = shell.CrashSubmit.pendingIDs();
for (let crashid of pending) {
debugCrashReport('Submitting crash: ' + crashid);
shell.CrashSubmit.submit(crashid);
}
},
@ -157,6 +174,8 @@ var shell = {
return;
}
debugCrashReport('Not online, postponing.');
Services.obs.addObserver(function observer(subject, topic, state) {
let network = subject.QueryInterface(Ci.nsINetworkInterface);
if (network.state == Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED
@ -242,7 +261,7 @@ var shell = {
});
#endif
} catch(e) {
dump("exception: " + e);
debugCrashReport('exception: ' + e);
}
let homeURL = this.homeURL;

View File

@ -24,8 +24,6 @@
},
"gecko_l10n_root": "http://hg.mozilla.org/l10n-central",
"gaia": {
"vcs": "hgtool",
"repo": "http://hg.mozilla.org/integration/gaia-central",
"l10n": {
"vcs": "hgtool",
"root": "http://hg.mozilla.org/gaia-l10n"

View File

@ -1,110 +0,0 @@
<?xml version="1.0" ?><manifest>
<!-- This is only a record of which revisions were pulled to generate the
gonk.tar.xz snapshot referred to by releng-otoro.tt -->
<remote fetch="https://android.googlesource.com/" name="aosp"/>
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<remote fetch="git://github.com/mozilla-b2g/" name="b2g"/>
<remote fetch="git://github.com/mozilla/" name="mozilla"/>
<remote fetch="git://codeaurora.org/" name="caf"/>
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="a56a09f9b3342e5d5cb05699288913035f4f6e48">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6b8f901c98fe50a775b388af972f98500bb3f4ff"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/>
<!-- Information: librecovery is tagged with B2G_1_0_0_20130125190500 --><project name="librecovery" path="librecovery" remote="b2g" revision="601fc18b28c9d7cf6954b281ddd3b705c74a9215"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="c2cd096baa69d4f5c2473523d352fba1a94c5cf4"/>
<!-- Stock Android things -->
<!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<!-- Information: platform/bionic is tagged with M8960AAAAANLYA100715A --><project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
<!-- Information: platform/bootable/recovery is tagged with M8960AAAAANLYA100715A --><project name="platform/bootable/recovery" path="bootable/recovery" revision="e0a9ac010df3afaa47ba107192c05ac8b5516435"/>
<!-- Information: platform/development is tagged with M8960AAAAANLYA100715A --><project name="platform/development" path="development" revision="a384622f5fcb1d2bebb9102591ff7ae91fe8ed2d"/>
<!-- Information: device/common is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/>
<!-- Information: device/sample is tagged with M8960AAAAANLYA100715A --><project name="device/sample" path="device/sample" revision="c328f3d4409db801628861baa8d279fb8855892f"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/>
<!-- Information: platform/external/bluetooth/bluez is tagged with M76XXUSNEKNLYA2040 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="1023c91c66e9c3bd1132480051993bf7827770f6"/>
<!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/>
<!-- Information: platform/external/bluetooth/hcidump is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/>
<!-- Information: platform/external/bsdiff is tagged with M8960AAAAANLYA20234 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/>
<!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/>
<!-- Information: platform/external/dbus is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dbus" path="external/dbus" revision="c7517b6195dc6926728352113e6cc335da3f9c9e"/>
<!-- Information: platform/external/dhcpcd is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="1e00fb67022d0921af0fead263f81762781b9ffa"/>
<!-- Information: platform/external/dnsmasq is tagged with M8960AAAAANLYA20234 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/>
<!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/>
<!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/>
<!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/>
<!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/>
<!-- Information: platform/external/giflib is tagged with M8960AAAAANLYA20234 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/>
<project name="platform/external/gtest" path="external/gtest" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/>
<!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/>
<!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/>
<!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/>
<!-- Information: platform/external/jpeg is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/>
<!-- Information: platform/external/libgsm is tagged with M8960AAAAANLYA20234 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/>
<!-- Information: platform/external/liblzf is tagged with M8064AAAAANLYA1203 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/>
<!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/>
<!-- Information: platform/external/libnl-headers is tagged with M8064AAAAANLYA1203 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/>
<!-- Information: platform/external/libpng is tagged with M8960AAAAANLYA100715A --><project name="platform/external/libpng" path="external/libpng" revision="9c3730f0efa69f580f03463c237cd928f3196404"/>
<!-- Information: platform/external/libvpx is tagged with AU_LINUX_ANDROID_ICS_STRAWBERRY_RB5.04.00.04.29.023 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/>
<!-- Information: platform/external/llvm is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/>
<!-- Information: platform/external/mksh is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/>
<!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<!-- Information: platform/external/openssl is tagged with AU_LINUX_ANDROID_ICS.04.00.04.00.110 --><project name="platform/external/openssl" path="external/openssl" revision="27d333cce9a31c806b4bfa042925f045c727aecd"/>
<!-- Information: platform/external/protobuf is tagged with M8960AAAAANLYA20234 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/>
<!-- Information: platform/external/safe-iop is tagged with M8960AAAAANLYA20234 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/>
<!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<!-- Information: platform/external/skia is tagged with M8960AAAAANLYA100715A --><project name="platform/external/skia" path="external/skia" revision="7d90c85f2c0e3b747f7c7eff8bc9253b0063b439"/>
<!-- Information: platform/external/sonivox is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/>
<!-- Information: platform/external/speex is tagged with M8960AAAAANLYA20234 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/>
<project name="platform/external/sqlite" path="external/sqlite" revision="fb30e613139b8836fdc8e81e166cf3a76e5fa17f"/>
<!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/>
<!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/>
<!-- Information: platform/external/tagsoup is tagged with M8064AAAAANLYA1203 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/>
<!-- Information: platform/external/tinyalsa is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/>
<!-- Information: platform/external/tremolo is tagged with M8960AAAAANLYA20234 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/>
<!-- Information: unbootimg is tagged with B2G_1_0_0_20130125190500 --><project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/>
<!-- Information: platform/external/webp is tagged with M8960AAAAANLYA20234 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/>
<!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/>
<!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/>
<!-- Information: platform/external/hostap is tagged with M8960AAAAANLYA1047 --><project name="platform/external/hostap" path="external/hostap" revision="bf04b0faadbdeb4b7943f2e2c4c5aa59df872bb1"/>
<!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/>
<!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/>
<!-- Information: platform/frameworks/base is tagged with M76XXUSNEKNLYA2040 --><project name="platform/frameworks/base" path="frameworks/base" revision="eb2bc75803ca179353c24c364a9c8a8ce23e8b78"/>
<!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/>
<!-- Information: platform/frameworks/support is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/>
<!-- Information: platform/hardware/libhardware is tagged with M8960AAAAANLYA1049B --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="4a619901847621f8a7305edf42dd07347a140484"/>
<!-- Information: platform/hardware/libhardware_legacy is tagged with M8960AAAAANLYA153611 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="87b4d7afa8f854b445e2d0d95091f6f6069f2b30"/>
<!-- Information: platform/libcore is tagged with M8960AAAAANLYA100715A --><project name="platform/libcore" path="libcore" revision="30841f9fba9ccd5c54f4f079f495994db97f283e"/>
<!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/>
<!-- Information: platform/prebuilt is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/>
<!-- Information: platform/system/bluetooth is tagged with M8960AAAAANLYA100703 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="7772cad4823f1f427ce1d4df84a55982386d6d18"/>
<!-- Information: platform/system/core is tagged with M76XXUSNEKNLYA2040 --><project name="platform/system/core" path="system/core" revision="bf1970408676ce570b8f4dc3efa038e47552137f"/>
<!-- Information: platform/system/extras is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/>
<!-- Information: platform/system/media is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/>
<!-- Information: platform/system/netd is tagged with M8960AAAAANLYA1049 --><project name="platform/system/netd" path="system/netd" revision="306e765248e3900041bf2737e9f57b1b5694a4ce"/>
<!-- Information: platform/system/vold is tagged with M8960AAAAANLYA100715A --><project name="platform/system/vold" path="system/vold" revision="99fff257d53cc045d1460841edca5d901dacfcf5"/>
<!-- Otoro/Unagi/Inari specific things -->
<!-- Information: device/qcom/common is tagged with M8960AAAAANLYA100715A --><project name="device/qcom/common" path="device/qcom/common" revision="b9cdab8e1e1a215a8c65b8d5816f666bec7be205"/>
<!-- Information: platform/vendor/qcom/msm7627a is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom/msm7627a" path="device/qcom/msm7627a" revision="d920a502ba17cf4d716f8b1a615f07e796b0501a"/>
<project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="89f106ed6a538f2868bb873d11b68ea7b2e62f26"/>
<!-- Information: android-device-unagi is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="6c014552d1b26bee611d9a9b23bd4cd014e392ee"/>
<project name="device-inari" path="device/qcom/inari" remote="b2g" revision="6b5d034f86da7938af9887308ecff6e391e6928a"/>
<!-- Information: codeaurora_kernel_msm is tagged with B2G_1_0_0_20130125190500 --><project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/>
<!-- Information: platform/hardware/qcom/camera is tagged with M76XXUSNEKNLYA2040 --><project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="1acf77a75e30f3fc8b1eed2057c97adf1cb1633f"/>
<!-- Information: hardware_qcom_display is tagged with B2G_1_0_0_20130125190500 --><project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/>
<!-- Information: platform/hardware/qcom/media is tagged with M8960AAAAANLYA100715A --><project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="552c3ddb7174a01f3508782d40c4d8c845ab441a"/>
<!-- Information: platform/hardware/qcom/gps is tagged with M8960AAAAANLYA100705 --><project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="23d5707b320d7fc69f8ba3b7d84d78a1c5681708"/>
<!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/>
<!-- Information: platform/vendor/qcom-opensource/omx/mm-core is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom-opensource/omx/mm-core" path="vendor/qcom/opensource/omx/mm-core" revision="ab17ac9a074b4bb69986a8436336bdfbbaf9cd39"/>
<!-- Information: platform/hardware/ril is tagged with M76XXUSNEKNLYA1610 --><project name="platform/hardware/ril" path="hardware/ril" remote="caf" revision="fe9a3f63922143b57e79ed570bab2328df8c83a5"/>
</manifest>

View File

@ -15,8 +15,6 @@
"b2g_manifest": "pandaboard.xml",
"gecko_l10n_root": "http://hg.mozilla.org/l10n-central",
"gaia": {
"vcs": "hgtool",
"repo": "http://hg.mozilla.org/integration/gaia-central",
"l10n": {
"vcs": "hgtool",
"root": "http://hg.mozilla.org/gaia-l10n"

View File

@ -1,103 +0,0 @@
<?xml version="1.0" ?><manifest>
<!-- This is only a record of which revisions were pulled to generate the
gonk.tar.xz snapshot referred to by releng-pandaboard.tt -->
<remote fetch="https://android.googlesource.com/" name="aosp"/>
<remote fetch="git://github.com/mozilla-b2g/" name="b2g"/>
<remote fetch="http://android.git.linaro.org/git-ro/" name="linaro"/>
<remote fetch="git://codeaurora.org/" name="caf"/>
<remote fetch="git://github.com/mozilla/" name="mozilla"/>
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="a56a09f9b3342e5d5cb05699288913035f4f6e48">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6b8f901c98fe50a775b388af972f98500bb3f4ff"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="c2cd096baa69d4f5c2473523d352fba1a94c5cf4"/>
<!-- Stock Android things -->
<!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="c7bab8cb8483e7869eabdbd4add7c9e5beeecc80"/>
<!-- Information: platform/bootable/recovery is tagged with android-4.0.4_r2.1 --><project name="platform/bootable/recovery" path="bootable/recovery" revision="fadc5ac81d6400ebdd041f7d4ea64021596d6b7d"/>
<!-- Information: device/common is tagged with android-sdk-adt_r20 --><project name="device/common" path="device/common" revision="7d4526582f88808a3194e1a3b304abb369d2745c"/>
<!-- Information: device/sample is tagged with android-4.0.4_r2.1 --><project name="device/sample" path="device/sample" revision="ef228b8b377a9663e94be4b1aeb6c2bf7a07d098"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/>
<!-- Information: platform/external/bluetooth/bluez is tagged with android-4.0.4_r2.1 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="966afbd88f0bfc325bf80274ad2723c238883fa1"/>
<!-- Information: platform/external/bluetooth/glib is tagged with android-cts-4.1_r2 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="1143b9918eab068401b604eb11c3f651f4e38b25"/>
<!-- Information: platform/external/bluetooth/hcidump is tagged with android-cts-4.1_r2 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="7322661808c2006b7848e79e6bb72b37fbcf6710"/>
<!-- Information: platform/external/bsdiff is tagged with M8960AAAAANLYA20234 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/>
<project name="platform/external/busybox" path="external/busybox" remote="linaro" revision="2e461c8029a50d986dfe4ab07ae5a1834b5c40f0"/>
<!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/>
<!-- Information: platform/external/dbus is tagged with android-cts-4.1_r2 --><project name="platform/external/dbus" path="external/dbus" revision="537eaff5de9aace3348436166d4cde7adc1e488e"/>
<!-- Information: platform/external/dhcpcd is tagged with android-sdk-adt_r20 --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="ddaa48f57b54b2862b3e6dcf18a44c9647f3baaa"/>
<!-- Information: platform/external/dnsmasq is tagged with M8960AAAAANLYA20234 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/>
<!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/>
<!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/>
<!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/>
<!-- Information: platform/external/giflib is tagged with M8960AAAAANLYA20234 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/>
<project name="platform/external/gtest" path="external/gtest" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/>
<!-- Information: platform/external/harfbuzz is tagged with android-sdk-adt_r20 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="bae491c03a00757d83ede8d855b7d85d246bde3d"/>
<!-- icu4c is missing the default tag in caf, that's the *only* reason for the hardcode -->
<!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/>
<!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/>
<!-- Information: platform/external/jhead is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/jhead" path="external/jhead" revision="754078052c687f6721536009c816644c73e4f145"/>
<!-- Information: platform/external/jpeg is tagged with android-cts-4.1_r2 --><project name="platform/external/jpeg" path="external/jpeg" revision="d4fad7f50f79626455d88523207e05b868819cd8"/>
<!-- Information: platform/external/libgsm is tagged with M8960AAAAANLYA20234 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/>
<!-- Information: platform/external/liblzf is tagged with M8064AAAAANLYA1203 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/>
<!-- Information: platform/external/libnfc-nxp is tagged with android-4.0.4_r2.1 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="533c14450e6239cce8acb74f4e4dea2c89f8f219"/>
<!-- Information: platform/external/libnl-headers is tagged with M8064AAAAANLYA1203 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/>
<!-- Information: platform/external/libpng is tagged with android-4.0.4_r2.1 --><project name="platform/external/libpng" path="external/libpng" revision="84d92c718ab9f48faec0f640747c4b6f7a995607"/>
<!-- Information: platform/external/libvpx is tagged with AU_LINUX_ANDROID_ICS_STRAWBERRY_RB5.04.00.04.29.023 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/>
<!-- Information: platform/external/mksh is tagged with M8960AAAAANLYA1099D --><project name="platform/external/mksh" path="external/mksh" revision="5155f1c7438ef540d7b25eb70aa1639579795b07"/>
<!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<!-- Information: platform/external/openssl is tagged with android-4.0.4_r2.1 --><project name="platform/external/openssl" path="external/openssl" revision="ce96fb211b9a44bbd7fb5ef7ed0e6c1244045c2e"/>
<!-- Information: platform/external/protobuf is tagged with M8960AAAAANLYA20234 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/>
<!-- Information: platform/external/safe-iop is tagged with M8960AAAAANLYA20234 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/>
<!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<!-- Information: platform/external/skia is tagged with android-4.0.4_r2.1 --><project name="platform/external/skia" path="external/skia" revision="5c67a309e16bffe7013defda8f1217b3ce2420b4"/>
<!-- Information: platform/external/sonivox is tagged with android-sdk-adt_r20 --><project name="platform/external/sonivox" path="external/sonivox" revision="5f9600971859fe072f31b38a51c38157f5f9b381"/>
<!-- Information: platform/external/speex is tagged with M8960AAAAANLYA20234 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/>
<!-- Information: platform/external/sqlite is tagged with android-4.0.4_r2.1 --><project name="platform/external/sqlite" path="external/sqlite" revision="c999ff8c12a4cf81cb9ad628f47b2720effba5e5"/>
<!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/>
<!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/>
<!-- Information: platform/external/tagsoup is tagged with M8064AAAAANLYA1203 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/>
<!-- Information: platform/external/tinyalsa is tagged with android-4.0.4_r2.1 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="495239e683a728957c890c124b239f9b7b8ef5a8"/>
<!-- Information: platform/external/tremolo is tagged with M8960AAAAANLYA20234 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/>
<!-- Information: platform/external/webp is tagged with M8960AAAAANLYA20234 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/>
<!-- Information: platform/external/webrtc is tagged with android-sdk-adt_r20 --><project name="platform/external/webrtc" path="external/webrtc" revision="4b6dc1ec58105d17dc8c2f550124cc0621dc93b7"/>
<!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="6dd24fc3792d71edccef9b09140f9a44b063a553"/>
<!-- Information: platform/external/zlib is tagged with android-4.0.4_r2.1 --><project name="platform/external/zlib" path="external/zlib" revision="69e5801bd16a495e1c1666669fe827b1ddb8d56b"/>
<!-- Information: platform/external/yaffs2 is tagged with android-4.0.4-aah_r1 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="6232e2d5ab34a40d710e4b05ab0ec6e3727804e7"/>
<!-- Information: platform/frameworks/base is tagged with android-4.0.4_r2.1 --><project name="platform/frameworks/base" path="frameworks/base" revision="df331873c8576e0ae34ae1ee3cc258beed373535"/>
<!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/>
<!-- Information: platform/frameworks/support is tagged with android-4.0.4_r2.1 --><project name="platform/frameworks/support" path="frameworks/support" revision="bfc8e01b7b0d5ea70ce89d0409b72b7f7d540f43"/>
<!-- Information: platform/hardware/libhardware is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="a9b677fce432b29ab8f61e13796f34880dc0fe0f"/>
<!-- Information: platform/hardware/libhardware_legacy is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="153d0f1a27e0a157cabb6ca9d0d88248630f5695"/>
<!-- Information: platform/hardware/ril is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/ril" path="hardware/ril" revision="300105d1487f5238940c18792b879793826b61f4"/>
<!-- Information: platform/libcore is tagged with android-4.0.4_r2.1 --><project name="platform/libcore" path="libcore" revision="fc294a48d80d9e2b2ac126edf93ad316f5f6cf72"/>
<!-- Information: platform/ndk is tagged with android-4.0.4_r2.1 --><project name="platform/ndk" path="ndk" revision="2d77f5a05f60029c981f299b222cfe28db18ccf7"/>
<!-- Information: platform/prebuilt is tagged with tungsten-bootloader-ics-aah --><project name="platform/prebuilt" path="prebuilt" revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/>
<!-- Information: platform/system/bluetooth is tagged with android-4.0.4_r2.1 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="2588cd802f322650ed737dfb7a10e9ad94064e99"/>
<!-- Information: platform/system/core is tagged with android-4.0.4_r2.1 --><project name="platform/system/core" path="system/core" revision="c2db4ffb874783220abf967ca4ccd0e6cf1ba57f"/>
<!-- Information: platform/system/extras is tagged with android-4.0.4_r2.1 --><project name="platform/system/extras" path="system/extras" revision="fa351ab265957fa8815df3c4ca1f3c105f253e8b"/>
<!-- Information: platform/system/media is tagged with android-4.0.4_r2.1 --><project name="platform/system/media" path="system/media" revision="a8eea50f80327f15cb04bbdfee2d1cfcc4c3ce4a"/>
<!-- Information: platform/system/netd is tagged with android-4.0.4_r2.1 --><project name="platform/system/netd" path="system/netd" revision="3c903b555975fa59d6688a0a6417ac7512c202e7"/>
<!-- Information: platform/system/vold is tagged with android-4.0.4_r2.1 --><project name="platform/system/vold" path="system/vold" revision="3ad9072a5d6f6bda32123b367545649364e3c11d"/>
<!-- Pandaboard specific things -->
<project name="android-device-panda" path="device/ti/panda" remote="b2g" revision="b0cde710220dc884fbf92934a4d54456ecc0c693"/>
<!-- Information: platform/hardware/ti/omap4xxx is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/ti/omap4xxx" path="hardware/ti/omap4xxx" revision="8be8e9a68c96b6cf43c08a58e7ecd7708737c599"/>
<project name="platform/hardware/ti/wlan" path="hardware/ti/wlan" revision="60dfeb6e4448bfed707946ebca6612980f525e69"/>
<project name="platform/hardware/ti/wpan" path="hardware/ti/wpan" revision="3ece7d9e08052989401e008bc397dbcd2557cfd0"/>
<project name="Negatus" path="external/negatus" remote="mozilla" revision="5009c0738def17e68855b1c7084fd38ac8fd7545"/>
<project name="orangutan" path="external/orangutan" remote="b2g" revision="1735c3c4d6008d7f9e929d55ed0e06b995156fa2"/>
</manifest>

View File

@ -27,8 +27,6 @@
},
"gecko_l10n_root": "http://hg.mozilla.org/l10n-central",
"gaia": {
"vcs": "hgtool",
"repo": "http://hg.mozilla.org/integration/gaia-central",
"l10n": {
"vcs": "hgtool",
"root": "http://hg.mozilla.org/gaia-l10n"

View File

@ -1,110 +0,0 @@
<?xml version="1.0" ?><manifest>
<!-- This is only a record of which revisions were pulled to generate the
gonk.tar.xz snapshot referred to by releng-unagi.tt -->
<remote fetch="https://android.googlesource.com/" name="aosp"/>
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<remote fetch="git://github.com/mozilla-b2g/" name="b2g"/>
<remote fetch="git://github.com/mozilla/" name="mozilla"/>
<remote fetch="git://codeaurora.org/" name="caf"/>
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="eef073ce712b741f799192fc86a4e009834760ab">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6b8f901c98fe50a775b388af972f98500bb3f4ff"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/>
<!-- Information: librecovery is tagged with B2G_1_0_0_20130125190500 --><project name="librecovery" path="librecovery" remote="b2g" revision="601fc18b28c9d7cf6954b281ddd3b705c74a9215"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="c2cd096baa69d4f5c2473523d352fba1a94c5cf4"/>
<!-- Stock Android things -->
<!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<!-- Information: platform/bionic is tagged with M8960AAAAANLYA100715A --><project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
<!-- Information: platform/bootable/recovery is tagged with M8960AAAAANLYA100715A --><project name="platform/bootable/recovery" path="bootable/recovery" revision="e0a9ac010df3afaa47ba107192c05ac8b5516435"/>
<!-- Information: platform/development is tagged with M8960AAAAANLYA100715A --><project name="platform/development" path="development" revision="a384622f5fcb1d2bebb9102591ff7ae91fe8ed2d"/>
<!-- Information: device/common is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/>
<!-- Information: device/sample is tagged with M8960AAAAANLYA100715A --><project name="device/sample" path="device/sample" revision="c328f3d4409db801628861baa8d279fb8855892f"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/>
<!-- Information: platform/external/bluetooth/bluez is tagged with M76XXUSNEKNLYA2040 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="1023c91c66e9c3bd1132480051993bf7827770f6"/>
<!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/>
<!-- Information: platform/external/bluetooth/hcidump is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/>
<!-- Information: platform/external/bsdiff is tagged with M8960AAAAANLYA20234 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/>
<!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/>
<!-- Information: platform/external/dbus is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dbus" path="external/dbus" revision="c7517b6195dc6926728352113e6cc335da3f9c9e"/>
<!-- Information: platform/external/dhcpcd is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="1e00fb67022d0921af0fead263f81762781b9ffa"/>
<!-- Information: platform/external/dnsmasq is tagged with M8960AAAAANLYA20234 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/>
<!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/>
<!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/>
<!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/>
<!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/>
<!-- Information: platform/external/giflib is tagged with M8960AAAAANLYA20234 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/>
<project name="platform/external/gtest" path="external/gtest" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/>
<!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/>
<!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/>
<!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/>
<!-- Information: platform/external/jpeg is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/>
<!-- Information: platform/external/libgsm is tagged with M8960AAAAANLYA20234 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/>
<!-- Information: platform/external/liblzf is tagged with M8960AAAAANLYA23232 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/>
<!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/>
<!-- Information: platform/external/libnl-headers is tagged with M8960AAAAANLYA23232 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/>
<!-- Information: platform/external/libpng is tagged with M8960AAAAANLYA100715A --><project name="platform/external/libpng" path="external/libpng" revision="9c3730f0efa69f580f03463c237cd928f3196404"/>
<!-- Information: platform/external/libvpx is tagged with AU_LINUX_ANDROID_ICS_STRAWBERRY_RB5.04.00.04.29.023 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/>
<!-- Information: platform/external/llvm is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/>
<!-- Information: platform/external/mksh is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/>
<!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<!-- Information: platform/external/openssl is tagged with AU_LINUX_ANDROID_ICS.04.00.04.00.110 --><project name="platform/external/openssl" path="external/openssl" revision="27d333cce9a31c806b4bfa042925f045c727aecd"/>
<!-- Information: platform/external/protobuf is tagged with M8960AAAAANLYA20234 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/>
<!-- Information: platform/external/safe-iop is tagged with M8960AAAAANLYA20234 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/>
<!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<!-- Information: platform/external/skia is tagged with M8960AAAAANLYA100715A --><project name="platform/external/skia" path="external/skia" revision="7d90c85f2c0e3b747f7c7eff8bc9253b0063b439"/>
<!-- Information: platform/external/sonivox is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/>
<!-- Information: platform/external/speex is tagged with M8960AAAAANLYA20234 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/>
<project name="platform/external/sqlite" path="external/sqlite" revision="fb30e613139b8836fdc8e81e166cf3a76e5fa17f"/>
<!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/>
<!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/>
<!-- Information: platform/external/tagsoup is tagged with M8960AAAAANLYA23232 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/>
<!-- Information: platform/external/tinyalsa is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/>
<!-- Information: platform/external/tremolo is tagged with M8960AAAAANLYA20234 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/>
<!-- Information: unbootimg is tagged with B2G_1_0_0_20130125190500 --><project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/>
<!-- Information: platform/external/webp is tagged with M8960AAAAANLYA20234 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/>
<!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/>
<!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/>
<!-- Information: platform/external/hostap is tagged with M8960AAAAANLYA1047 --><project name="platform/external/hostap" path="external/hostap" revision="bf04b0faadbdeb4b7943f2e2c4c5aa59df872bb1"/>
<!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/>
<!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/>
<!-- Information: platform/frameworks/base is tagged with M76XXUSNEKNLYA2040 --><project name="platform/frameworks/base" path="frameworks/base" revision="eb2bc75803ca179353c24c364a9c8a8ce23e8b78"/>
<!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/>
<!-- Information: platform/frameworks/support is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/>
<!-- Information: platform/hardware/libhardware is tagged with M8960AAAAANLYA1049B --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="4a619901847621f8a7305edf42dd07347a140484"/>
<!-- Information: platform/hardware/libhardware_legacy is tagged with M8960AAAAANLYA153611 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="87b4d7afa8f854b445e2d0d95091f6f6069f2b30"/>
<!-- Information: platform/libcore is tagged with M8960AAAAANLYA100715A --><project name="platform/libcore" path="libcore" revision="30841f9fba9ccd5c54f4f079f495994db97f283e"/>
<!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.065 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/>
<!-- Information: platform/prebuilt is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/>
<!-- Information: platform/system/bluetooth is tagged with M8960AAAAANLYA100703 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="7772cad4823f1f427ce1d4df84a55982386d6d18"/>
<!-- Information: platform/system/core is tagged with M76XXUSNEKNLYA2040 --><project name="platform/system/core" path="system/core" revision="bf1970408676ce570b8f4dc3efa038e47552137f"/>
<!-- Information: platform/system/extras is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/>
<!-- Information: platform/system/media is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/>
<!-- Information: platform/system/netd is tagged with M8960AAAAANLYA1049 --><project name="platform/system/netd" path="system/netd" revision="306e765248e3900041bf2737e9f57b1b5694a4ce"/>
<!-- Information: platform/system/vold is tagged with M8960AAAAANLYA100715A --><project name="platform/system/vold" path="system/vold" revision="99fff257d53cc045d1460841edca5d901dacfcf5"/>
<!-- Otoro/Unagi/Inari specific things -->
<!-- Information: device/qcom/common is tagged with M8960AAAAANLYA100715A --><project name="device/qcom/common" path="device/qcom/common" revision="b9cdab8e1e1a215a8c65b8d5816f666bec7be205"/>
<!-- Information: platform/vendor/qcom/msm7627a is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom/msm7627a" path="device/qcom/msm7627a" revision="d920a502ba17cf4d716f8b1a615f07e796b0501a"/>
<project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="89f106ed6a538f2868bb873d11b68ea7b2e62f26"/>
<!-- Information: android-device-unagi is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="6c014552d1b26bee611d9a9b23bd4cd014e392ee"/>
<project name="device-inari" path="device/qcom/inari" remote="b2g" revision="6b5d034f86da7938af9887308ecff6e391e6928a"/>
<!-- Information: codeaurora_kernel_msm is tagged with B2G_1_0_0_20130125190500 --><project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/>
<!-- Information: platform/hardware/qcom/camera is tagged with M76XXUSNEKNLYA2040 --><project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="1acf77a75e30f3fc8b1eed2057c97adf1cb1633f"/>
<!-- Information: hardware_qcom_display is tagged with B2G_1_0_0_20130125190500 --><project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/>
<!-- Information: platform/hardware/qcom/media is tagged with M8960AAAAANLYA100715A --><project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="552c3ddb7174a01f3508782d40c4d8c845ab441a"/>
<!-- Information: platform/hardware/qcom/gps is tagged with M8960AAAAANLYA100705 --><project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="23d5707b320d7fc69f8ba3b7d84d78a1c5681708"/>
<!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/>
<!-- Information: platform/vendor/qcom-opensource/omx/mm-core is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom-opensource/omx/mm-core" path="vendor/qcom/opensource/omx/mm-core" revision="ab17ac9a074b4bb69986a8436336bdfbbaf9cd39"/>
<!-- Information: platform/hardware/ril is tagged with M76XXUSNEKNLYA1610 --><project name="platform/hardware/ril" path="hardware/ril" remote="caf" revision="fe9a3f63922143b57e79ed570bab2328df8c83a5"/>
</manifest>

View File

@ -25,6 +25,7 @@ MOZ_CAPTIVEDETECT=1
MOZ_WEBSMS_BACKEND=1
MOZ_DISABLE_CRYPTOLEGACY=1
MOZ_APP_STATIC_INI=1
NSS_NO_LIBPKIX=1
if test "$OS_TARGET" = "Android"; then
MOZ_CAPTURE=1

View File

@ -389,7 +389,7 @@
<key id="key_sanitize_mac" command="Tools:Sanitize" keycode="VK_BACK" modifiers="accel,shift"/>
#endif
#ifdef XP_UNIX
<key id="key_quitApplication" key="&quitApplicationCmdMac.key;" command="cmd_quitApplication" modifiers="accel"/>
<key id="key_quitApplication" key="&quitApplicationCmdUnix.key;" command="cmd_quitApplication" modifiers="accel"/>
#endif
#ifdef FULL_BROWSER_WINDOW

View File

@ -28,10 +28,7 @@
<xul:notificationbox flex="1">
<xul:hbox flex="1" class="browserSidebarContainer">
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" disablehistory="true"
xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup"/>
</xul:stack>
<xul:stack flex="1" class="browserStack" anonid="browserStack"/>
</xul:vbox>
</xul:hbox>
</xul:notificationbox>
@ -1265,6 +1262,7 @@
<parameter name="aAllowThirdPartyFixup"/>
<body>
<![CDATA[
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var aFromExternal;
var aRelatedToCurrent;
var aSkipAnimation;
@ -1288,9 +1286,7 @@
if (this.mCurrentTab.owner)
this.mCurrentTab.owner = null;
var t = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
var t = document.createElementNS(NS_XUL, "tab");
var uriIsAboutBlank = !aURI || aURI == "about:blank";
@ -1328,56 +1324,38 @@
if (aOwner)
t.owner = aOwner;
var b = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"browser");
var b = this._createBrowserElement();
b.setAttribute("type", "content-targetable");
b.setAttribute("message", "true");
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
if (Services.prefs.getPrefType("browser.tabs.remote") == Services.prefs.PREF_BOOL &&
Services.prefs.getBoolPref("browser.tabs.remote")) {
b.setAttribute("remote", "true");
}
if (window.gShowPageResizers && document.getElementById("addon-bar").collapsed &&
window.windowState == window.STATE_NORMAL) {
b.setAttribute("showresizer", "true");
}
if (this.hasAttribute("autocompletepopup"))
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
b.setAttribute("autoscrollpopup", this._autoScrollPopup.id);
// Create the browserStack container
var stack = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"stack");
var stack = document.createElementNS(NS_XUL, "stack");
stack.className = "browserStack";
stack.appendChild(b);
stack.setAttribute("flex", "1");
// Create the browserContainer
var browserContainer = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"vbox");
var browserContainer = document.createElementNS(NS_XUL, "vbox");
browserContainer.className = "browserContainer";
browserContainer.appendChild(stack);
browserContainer.setAttribute("flex", "1");
// Create the sidebar container
var browserSidebarContainer = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"hbox");
var browserSidebarContainer = document.createElementNS(NS_XUL,
"hbox");
browserSidebarContainer.className = "browserSidebarContainer";
browserSidebarContainer.appendChild(browserContainer);
browserSidebarContainer.setAttribute("flex", "1");
// Add the Message and the Browser to the box
var notificationbox = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"notificationbox");
var notificationbox = document.createElementNS(NS_XUL,
"notificationbox");
notificationbox.setAttribute("flex", "1");
notificationbox.appendChild(browserSidebarContainer);
@ -1415,7 +1393,6 @@
this.mTabFilters[position] = filter;
b._fastFind = this.fastFind;
b.droppedLinkHandler = handleDroppedLink;
// Dispatch a new tab notification. We do this once we're
// entirely done, so that things are in a consistent state
@ -2716,9 +2693,37 @@
]]></body>
</method>
<method name="_createBrowserElement">
<body><![CDATA[
var b = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"browser");
b.setAttribute("message", "true");
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
if (this.hasAttribute("autocompletepopup"))
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
if (Services.prefs.getBoolPref("browser.tabs.remote"))
b.setAttribute("remote", "true");
b.droppedLinkHandler = handleDroppedLink;
return b;
]]></body>
</method>
<constructor>
<![CDATA[
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
let browser = this._createBrowserElement();
this.mCurrentBrowser = browser;
browser.setAttribute("type", "content-primary");
browser.setAttribute("disablehistory", "true");
let stack = document.getAnonymousElementByAttribute(this, "anonid", "browserStack");
stack.appendChild(browser);
this.mCurrentTab = this.tabContainer.firstChild;
document.addEventListener("keypress", this, false);
window.addEventListener("sizemodechange", this, false);
@ -2735,7 +2740,6 @@
this._autoScrollPopup.id = "autoscroller";
this.appendChild(this._autoScrollPopup);
this.mCurrentBrowser.setAttribute("autoscrollpopup", this._autoScrollPopup.id);
this.mCurrentBrowser.droppedLinkHandler = handleDroppedLink;
this.updateWindowResizers();
// Hook up the event listeners to the first browser
@ -4229,16 +4233,17 @@
*/
var clickedOnce = false;
function enableDblClick(event) {
if (event.detail == 1 && !clickedOnce) {
var target = event.originalTarget;
if (target.className == 'tab-close-button')
target._ignoredClick = true;
if (!clickedOnce) {
clickedOnce = true;
return;
}
setTimeout(function() {
tabContainer._blockDblClick = false;
}, 0);
tabContainer.removeEventListener("click", enableDblClick, false);
tabContainer._blockDblClick = false;
tabContainer.removeEventListener("click", enableDblClick, true);
}
tabContainer.addEventListener("click", enableDblClick, false);
tabContainer.addEventListener("click", enableDblClick, true);
]]></handler>
<handler event="dblclick" button="0" phase="capturing">

View File

@ -153,6 +153,7 @@ _BROWSER_FILES = \
browser_bug735471.js \
browser_bug743421.js \
browser_bug749738.js \
browser_bug752516.js \
browser_bug763468_perwindowpb.js \
browser_bug767836_perwindowpb.js \
browser_bug771331.js \
@ -274,6 +275,7 @@ _BROWSER_FILES = \
plugin_clickToPlayDeny.html \
plugin_bug744745.html \
plugin_bug749455.html \
plugin_bug752516.html \
plugin_bug787619.html \
plugin_bug797677.html \
plugin_bug818009.html \

View File

@ -0,0 +1,46 @@
/* 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/. */
Components.utils.import("resource://gre/modules/Services.jsm");
var gTestBrowser = null;
function test() {
waitForExplicitFinish();
registerCleanupFunction(function() {
Services.prefs.clearUserPref("plugins.click_to_play");
let plugin = getTestPlugin();
plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
gBrowser.removeCurrentTab();
window.focus();
});
Services.prefs.setBoolPref("plugins.click_to_play", true);
let plugin = getTestPlugin();
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
gBrowser.selectedTab = gBrowser.addTab();
gTestBrowser = gBrowser.selectedBrowser;
let gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
gTestBrowser.contentWindow.location = gHttpTestRoot + "plugin_bug752516.html";
gTestBrowser.addEventListener("load", tabLoad, true);
}
function tabLoad() {
// The plugin events are async dispatched and can come after the load event
// This just allows the events to fire before we proceed
executeSoon(actualTest);
}
function actualTest() {
let doc = gTestBrowser.contentDocument;
let plugin = doc.getElementById("test");
let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
ok(!objLoadingContent.activated, "Plugin should not be activated");
EventUtils.synthesizeMouseAtCenter(plugin, {}, gTestBrowser.contentWindow);
let condition = function() objLoadingContent.activated;
waitForCondition(condition, finish, "Waited too long for plugin to activate");
}

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style type="text/css">
div {
padding: 2%;
position: absolute;
top: 0; bottom: 0;
left: 0; right: 0;
text-align: center;
border: 4px solid red;
}
</style>
</head>
<body>
<div id="container">
<object id="test" type="application/x-test" width="159" height="91"></object>
</div>
<div id="overlay">
<h1>overlay</h1>
</div>
</body>
</html>

View File

@ -29,8 +29,7 @@ function test() {
waitForExplicitFinish();
runSocialTests(tests, undefined, undefined, function () {
resetBlocklist(); //restore to original pref
finish();
resetBlocklist(finish); //restore to original pref
});
}
@ -129,21 +128,22 @@ var tests = {
ok(true, "window closed");
});
function finish(good) {
ok(good, "blocklisted provider removed");
Services.prefs.clearUserPref("social.manifest.blocked");
setAndUpdateBlocklist(blocklistEmpty, next);
}
setManifestPref("social.manifest.blocked", manifest_bad);
SocialService.addProvider(manifest_bad, function(provider) {
if (provider) {
setAndUpdateBlocklist(blocklistURL, function() {
// the act of blocking should cause a 'provider-removed' notification
// from SocialService.
SocialService.registerProviderListener(function providerListener() {
SocialService.unregisterProviderListener(providerListener);
SocialService.getProvider(provider.origin, function(p) {
finish(p==null);
})
ok(p==null, "blocklisted provider removed");
Services.prefs.clearUserPref("social.manifest.blocked");
setAndUpdateBlocklist(blocklistEmpty, next);
});
});
} else {
finish(false);
// no callback - the act of updating should cause the listener above
// to fire.
setAndUpdateBlocklist(blocklistURL);
}
});
}

View File

@ -220,16 +220,14 @@ function updateBlocklist(aCallback) {
blocklistNotifier.notify(null);
}
var _originalTestBlocklistURL = null;
function setAndUpdateBlocklist(aURL, aCallback) {
if (!_originalTestBlocklistURL)
_originalTestBlocklistURL = Services.prefs.getCharPref("extensions.blocklist.url");
Services.prefs.setCharPref("extensions.blocklist.url", aURL);
updateBlocklist(aCallback);
}
function resetBlocklist() {
Services.prefs.setCharPref("extensions.blocklist.url", _originalTestBlocklistURL);
function resetBlocklist(aCallback) {
Services.prefs.clearUserPref("extensions.blocklist.url");
updateBlocklist(aCallback);
}
function setManifestPref(name, manifest) {

View File

@ -83,6 +83,8 @@ Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", this);
XPCOMUtils.defineLazyServiceGetter(this, "gSessionStartup",
"@mozilla.org/browser/sessionstartup;1", "nsISessionStartup");
XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
"@mozilla.org/gfx/screenmanager;1", "nsIScreenManager");
// List of docShell capabilities to (re)store. These are automatically
// retrieved from a given docShell if not already collected before.
@ -3543,6 +3545,31 @@ let SessionStoreInternal = {
var _this = this;
function win_(aName) { return _this._getWindowDimension(win, aName); }
// find available space on the screen where this window is being placed
let screen = gScreenManager.screenForRect(aLeft, aTop, aWidth, aHeight);
if (screen) {
let screenLeft = {}, screenTop = {}, screenWidth = {}, screenHeight = {};
screen.GetAvailRectDisplayPix(screenLeft, screenTop, screenWidth, screenHeight);
// constrain the dimensions to the actual space available
if (aWidth > screenWidth.value) {
aWidth = screenWidth.value;
}
if (aHeight > screenHeight.value) {
aHeight = screenHeight.value;
}
// and then pull the window within the screen's bounds
if (aLeft < screenLeft.value) {
aLeft = screenLeft.value;
} else if (aLeft + aWidth > screenLeft.value + screenWidth.value) {
aLeft = screenLeft.value + screenWidth.value - aWidth;
}
if (aTop < screenTop.value) {
aTop = screenTop.value;
} else if (aTop + aHeight > screenTop.value + screenHeight.value) {
aTop = screenTop.value + screenHeight.value - aHeight;
}
}
// only modify those aspects which aren't correct yet
if (aWidth && aHeight && (aWidth != win_("width") || aHeight != win_("height"))) {
aWindow.resizeTo(aWidth, aHeight);

View File

@ -11,7 +11,7 @@ function test() {
// This test reopens the network monitor a bunch of times, for different
// hosts (bottom, side, window). This seems to be slow on debug builds.
requestLongerTimeout(2);
requestLongerTimeout(3);
let prefsToCheck = {
networkDetailsWidth: {

View File

@ -538,7 +538,8 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY quitApplicationCmd.label "Quit">
<!ENTITY quitApplicationCmd.accesskey "Q">
<!ENTITY quitApplicationCmdMac.label "Quit &brandShortName;">
<!ENTITY quitApplicationCmdMac.key "Q">
<!-- LOCALIZATION NOTE(quitApplicationCmdUnix.key): This keyboard shortcut is used by both Linux and OSX builds. -->
<!ENTITY quitApplicationCmdUnix.key "Q">
<!ENTITY closeCmd.label "Close">
<!ENTITY closeCmd.key "W">

View File

@ -76,46 +76,79 @@ let TopSites = {
this._sitesDirty.clear();
},
pinSite: function(aSite, aSlotIndex) {
if (!(aSite && aSite.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
// pinned state is a pref, using Storage apis therefore sync
NewTabUtils.pinnedLinks.pin(aSite, aSlotIndex);
this.dirty(aSite);
this.update();
},
unpinSite: function(aSite) {
if (!(aSite && aSite.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
// pinned state is a pref, using Storage apis therefore sync
NewTabUtils.pinnedLinks.unpin(aSite);
this.dirty(aSite);
this.update();
},
hideSite: function(aSite) {
if (!(aSite && aSite.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
/**
* Pin top site at a given index
* @param aSites array of sites to be pinned
* @param aSlotIndices indices corresponding to the site to be pinned
*/
pinSites: function(aSites, aSlotIndices) {
if (aSites.length !== aSlotIndices.length)
throw new Error("TopSites.pinSites: Mismatched sites/indices arguments");
aSite._restorePinIndex = NewTabUtils.pinnedLinks._indexOfLink(aSite);
// blocked state is a pref, using Storage apis therefore sync
NewTabUtils.blockedLinks.block(aSite);
for (let i=0; i<aSites.length && i<aSlotIndices.length; i++){
let site = aSites[i],
idx = aSlotIndices[i];
if (!(site && site.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
// pinned state is a pref, using Storage apis therefore sync
NewTabUtils.pinnedLinks.pin(site, idx);
this.dirty(site);
}
this.update();
},
/**
* Unpin top sites
* @param aSites array of sites to be unpinned
*/
unpinSites: function(aSites) {
for (let site of aSites) {
if (!(site && site.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
// pinned state is a pref, using Storage apis therefore sync
NewTabUtils.pinnedLinks.unpin(site);
this.dirty(site);
}
this.update();
},
/**
* Hide (block) top sites
* @param aSites array of sites to be unpinned
*/
hideSites: function(aSites) {
for (let site of aSites) {
if (!(site && site.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
site._restorePinIndex = NewTabUtils.pinnedLinks._indexOfLink(site);
// blocked state is a pref, using Storage apis therefore sync
NewTabUtils.blockedLinks.block(site);
}
// clear out the cache, we'll fetch and re-render
this._sites = null;
this._sitesDirty.clear();
this.update();
},
restoreSite: function(aSite) {
if (!(aSite && aSite.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
NewTabUtils.blockedLinks.unblock(aSite);
let pinIndex = aSite._restorePinIndex;
if (!isNaN(pinIndex) && pinIndex > -1) {
NewTabUtils.pinnedLinks.pin(aSite, pinIndex);
/**
* Un-hide (restore) top sites
* @param aSites array of sites to be restored
*/
restoreSites: function(aSites) {
for (let site of aSites) {
if (!(site && site.url)) {
throw Cr.NS_ERROR_INVALID_ARG
}
NewTabUtils.blockedLinks.unblock(site);
let pinIndex = site._restorePinIndex;
if (!isNaN(pinIndex) && pinIndex > -1) {
NewTabUtils.pinnedLinks.pin(site, pinIndex);
}
}
// clear out the cache, we'll fetch and re-render
this._sites = null;
@ -168,47 +201,41 @@ TopSitesView.prototype = {
doActionOnSelectedTiles: function(aActionName, aEvent) {
let tileGroup = this._set;
let selectedTiles = tileGroup.selectedItems;
let sites = Array.map(selectedTiles, TopSites._linkFromNode);
let nextContextActions = new Set();
switch (aActionName){
case "delete":
Array.forEach(selectedTiles, function(aNode) {
let site = TopSites._linkFromNode(aNode);
for (let aNode of selectedTiles) {
// add some class to transition element before deletion?
aNode.contextActions.delete('delete');
// we need new context buttons to show (the tile node will go away though)
nextContextActions.add('restore');
TopSites.hideSite(site);
if (!this._lastSelectedSites) {
this._lastSelectedSites = [];
}
this._lastSelectedSites.push(site);
}, this);
}
this._lastSelectedSites = (this._lastSelectedSites || []).concat(sites);
nextContextActions.add('restore');
TopSites.hideSites(sites);
break;
case "restore":
// usually restore is an undo action, so there's no tiles/selection to act on
if (this._lastSelectedSites) {
for (let site of this._lastSelectedSites) {
TopSites.restoreSite(site);
}
TopSites.restoreSites(this._lastSelectedSites);
}
break;
case "pin":
let pinIndices = [];
Array.forEach(selectedTiles, function(aNode) {
let site = TopSites._linkFromNode(aNode);
let index = Array.indexOf(aNode.control.children, aNode);
pinIndices.push( Array.indexOf(aNode.control.children, aNode) );
aNode.contextActions.delete('pin');
aNode.contextActions.add('unpin');
TopSites.pinSite(site, index);
});
TopSites.pinSites(sites, pinIndices);
break;
case "unpin":
Array.forEach(selectedTiles, function(aNode) {
let site = TopSites._linkFromNode(aNode);
aNode.contextActions.delete('unpin');
aNode.contextActions.add('pin');
TopSites.unpinSite(site);
});
TopSites.unpinSites(sites);
break;
// default: no action
}

View File

@ -225,15 +225,29 @@
<parameter name="aSkipArrange"/>
<body>
<![CDATA[
let removal = this.getItemAtIndex(anIndex);
this.removeChild(removal);
if (!aSkipArrange)
this.arrangeItems();
let item = this.getItemAtIndex(anIndex);
return item ? this.removeItem(item, aSkipArrange) : null;
]]>
</body>
</method>
<method name="removeItem">
<parameter name="aItem"/>
<parameter name="aSkipArrange"/>
<body>
<![CDATA[
let removal = aItem.parentNode == this && this.removeChild(aItem);
if (removal && !aSkipArrange)
this.arrangeItems();
// note that after removal the node is unbound
// so none of the richgriditem binding methods & properties are available
return removal;
]]>
</body>
</method>
<method name="getIndexOfItem">
<parameter name="anItem"/>
<body>
@ -241,7 +255,7 @@
if (!anItem)
return -1;
return Array.prototype.indexOf.call(this.children, anItem);
return Array.indexOf(this.children, anItem);
]]>
</body>
</method>
@ -257,6 +271,15 @@
</body>
</method>
<method name="getItemsByUrl">
<parameter name="aUrl"/>
<body>
<![CDATA[
return this.querySelectorAll('richgriditem[value="'+aUrl+'"]');
]]>
</body>
</method>
<!-- Interface for offsetting selection and checking bounds -->
<property name="isSelectionAtStart" readonly="true"

View File

@ -39,6 +39,19 @@
<richgriditem value="about:blank" id="grid4_item2" label="2nd item"/>
</richgrid>
</hbox>
<hbox>
<richgrid id="grid5" seltype="single" flex="1">
<richgriditem value="about:blank" id="grid5_item1" label="First item"/>
<richgriditem value="http://bugzilla.mozilla.org/" id="grid5_item2" label="2nd item"/>
<richgriditem value="about:blank" id="grid5_item3" label="3rd item"/>
<richgriditem value="http://bugzilla.mozilla.org/" id="grid5_item4" label="4th item"/>
</richgrid>
</hbox>
<hbox>
<richgrid id="grid6" seltype="single" flex="1">
<richgriditem value="about:blank" id="grid6_item1" label="First item"/>
</richgrid>
</hbox>
<hbox>
<richgrid id="grid-select1" seltype="single" flex="1">
<richgriditem value="about:blank" id="grid-select1_item1" label="First item"/>

View File

@ -1,4 +1,4 @@
let doc, win;
let doc;
function test() {
waitForExplicitFinish();
@ -170,6 +170,60 @@ gTests.push({
}
});
gTests.push({
desc: "getItemsByUrl",
run: function() {
let grid = doc.querySelector("#grid5");
is(grid.itemCount, 4, "4 items total");
is(typeof grid.getItemsByUrl, "function", "getItemsByUrl is a function on the grid");
['about:blank', 'http://bugzilla.mozilla.org/'].forEach(function(testUrl) {
let items = grid.getItemsByUrl(testUrl);
is(items.length, 2, "2 matching items in the test grid");
is(items.item(0).url, testUrl, "Matched item has correct url property");
is(items.item(1).url, testUrl, "Matched item has correct url property");
});
let badUrl = 'http://gopher.well.com:70/';
let items = grid.getItemsByUrl(badUrl);
is(items.length, 0, "0 items matched url: "+badUrl);
}
});
gTests.push({
desc: "removeItem",
run: function() {
let grid = doc.querySelector("#grid5");
is(grid.itemCount, 4, "4 items total");
is(typeof grid.removeItem, "function", "removeItem is a function on the grid");
let arrangeStub = stubMethod(grid, "arrangeItems");
let removedFirst = grid.removeItem( grid.children[0] );
is(arrangeStub.callCount, 1, "arrangeItems is called when we removeItem");
let removed2nd = grid.removeItem( grid.children[0], true);
is(removed2nd.getAttribute("label"), "2nd item", "the next item was returned");
is(grid.itemCount, 2, "2 items remain");
// callCount should still be at 1
is(arrangeStub.callCount, 1, "arrangeItems is not called when we pass the truthy skipArrange param");
let otherItem = grid.ownerDocument.querySelector("#grid6_item1");
let removedFail = grid.removeItem(otherItem);
ok(!removedFail, "Falsy value returned when non-child item passed");
is(grid.itemCount, 2, "2 items remain");
// callCount should still be at 1
is(arrangeStub.callCount, 1, "arrangeItems is not called when nothing is matched");
arrangeStub.restore();
}
});
gTests.push({
desc: "selections (single)",
run: function() {

View File

@ -20,6 +20,13 @@ function mockLinks(aLinks) {
return links;
}
function siteFromNode(aNode) {
return {
url: aNode.getAttribute("value"),
title: aNode.getAttribute("label")
};
}
function clearHistory() {
PlacesUtils.history.removeAllPages();
}
@ -32,7 +39,6 @@ function fillHistory(aLinks) {
let updateDeferred = Promise.defer();
for (let link of aLinks.reverse()) {
info("fillHistory with link: " + JSON.stringify(link));
let place = {
uri: Util.makeURI(link.url),
title: link.title,
@ -254,10 +260,10 @@ gTests.push({
title = tile.getAttribute("label");
info(this.desc + ": pinning site at index 2");
TopSites.pinSite({
url: url,
title: title
}, 2);
TopSites.pinSites([{
url: url,
title: title
}], [2]);
yield waitForCondition(function(){
return !grid.controller.isUpdating;
@ -320,7 +326,7 @@ gTests.push({
ok( NewTabUtils.pinnedLinks.isPinned(site), "2nd item is pinned" );
ok( items[1].hasAttribute("pinned"), "2nd item has pinned attribute" );
TopSites.unpinSite(site);
TopSites.unpinSites([site]);
yield waitForCondition(function(){
return !grid.controller.isUpdating;
@ -337,7 +343,7 @@ gTests.push({
setUp: function() {
// setup - set topsites to known state
yield setLinks(
"brian,dougal,dylan,ermintrude,florence,moose,sgtsam,train,zebedee,zeebad",
"brian,dougal,dylan,ermintrude,florence,moose,sgtsam,train,zebedee,zeebad,basic,coral",
",dougal"
);
yield updatePagesAndWait();
@ -356,17 +362,12 @@ gTests.push({
items = grid.children;
is(items.length, 8, this.desc + ": should be 8 topsites");
let brianSite = {
url: items[0].getAttribute("value"),
title: items[0].getAttribute("label")
};
let dougalSite = {
url: items[1].getAttribute("value"),
title: items[1].getAttribute("label")
};
let brianSite = siteFromNode(items[0]);
let dougalSite = siteFromNode(items[1]);
let dylanSite = siteFromNode(items[2]);
// we'll block brian (he's not pinned)
TopSites.hideSite(brianSite);
TopSites.hideSites([brianSite]);
// pause until the update has fired and the view is finished updating
yield waitForCondition(function(){
@ -381,8 +382,8 @@ gTests.push({
// make sure the empty slot was backfilled
is(items.length, 8, this.desc + ": should be 8 topsites");
// block dougal, who is currently pinned at index 1
TopSites.hideSite(dougalSite);
// block dougal,dylan. dougal is currently pinned at index 1
TopSites.hideSites([dougalSite, dylanSite]);
// pause until the update has fired and the view is finished updating
yield waitForCondition(function(){
@ -395,17 +396,22 @@ gTests.push({
ok( !NewTabUtils.pinnedLinks.isPinned(dougalSite), "Blocked Site is no longer pinned" );
is( grid.querySelectorAll("[value='"+dougalSite.url+"']").length, 0, "Blocked site was removed from grid");
// make sure the empty slot was backfilled
// verify dylan is blocked and removed from the grid
ok( (new Site(dylanSite)).blocked, "Site has truthy blocked property" );
ok( NewTabUtils.blockedLinks.isBlocked(dylanSite), "Site was blocked" );
ok( !NewTabUtils.pinnedLinks.isPinned(dylanSite), "Blocked Site is no longer pinned" );
is( grid.querySelectorAll("[value='"+dylanSite.url+"']").length, 0, "Blocked site was removed from grid");
// make sure the empty slots were backfilled
is(items.length, 8, this.desc + ": should be 8 topsites");
TopSites.restoreSite(brianSite);
TopSites.restoreSite(dougalSite);
TopSites.restoreSites([brianSite, dougalSite, dylanSite]);
yield waitForCondition(function(){
return !grid.controller.isUpdating;
});
// verify brian and dougal are unblocked and back in the grid
// verify brian, dougal and dyland are unblocked and back in the grid
ok( !NewTabUtils.blockedLinks.isBlocked(brianSite), "site was unblocked" );
is( grid.querySelectorAll("[value='"+brianSite.url+"']").length, 1, "Unblocked site is back in the grid");
@ -415,7 +421,11 @@ gTests.push({
ok( NewTabUtils.pinnedLinks.isPinned(dougalSite), "Restoring previously pinned site makes it pinned again" );
is( grid.children[1].getAttribute("value"), dougalSite.url, "Blocked Site restored to pinned index" );
ok( !NewTabUtils.blockedLinks.isBlocked(dylanSite), "site was unblocked" );
is( grid.querySelectorAll("[value='"+dylanSite.url+"']").length, 1, "Unblocked site is back in the grid");
} catch(ex) {
ok(false, this.desc+": Caught exception in test: " + ex);
info("trace: " + ex.stack);
}

View File

@ -490,6 +490,11 @@ richgriditem[selected] .richgrid-item-content::after {
background-size: 35px 35px;
border: @metro_border_xthick@ solid @selected_color@;
}
richgriditem[crosssliding] {
z-index: 1;
}
/* ease the return to original position when cross-sliding */
richgriditem:not([crosssliding]) {
transition: transform ease-out 0.2s;

View File

@ -101,8 +101,8 @@ richlistitem[type="download"]:first-child {
.downloadTypeIcon {
-moz-margin-end: 8px;
/* Prevent flickering when changing states. */
min-height: 32px;
min-width: 32px;
height: 32px;
width: 32px;
}
.blockedIcon {

View File

@ -52,5 +52,6 @@
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.GET_TASKS"></uses-permission>
</manifest>

View File

@ -107,7 +107,7 @@ public class DoCommand {
String ffxProvider = "org.mozilla.ffxcp";
String fenProvider = "org.mozilla.fencp";
private final String prgVersion = "SUTAgentAndroid Version 1.16";
private final String prgVersion = "SUTAgentAndroid Version 1.17";
public enum Command
{
@ -178,6 +178,7 @@ public class DoCommand {
TZSET ("tzset"),
ADB ("adb"),
CHMOD ("chmod"),
TOPACTIVITY ("activity"),
UNKNOWN ("unknown");
private final String theCmd;
@ -824,6 +825,10 @@ public class DoCommand {
strReturn = sErrorPrefix + "Wrong number of arguments for chmod command!";
break;
case TOPACTIVITY:
strReturn = TopActivity();
break;
case HELP:
strReturn = PrintUsage();
break;
@ -3844,6 +3849,29 @@ private void CancelNotification()
return(sRet);
}
public String TopActivity()
{
String sRet = "";
ActivityManager aMgr = (ActivityManager) contextWrapper.getSystemService(Activity.ACTIVITY_SERVICE);
List< ActivityManager.RunningTaskInfo > taskInfo = null;
ComponentName componentInfo = null;
if (aMgr != null)
{
taskInfo = aMgr.getRunningTasks(1);
}
if (taskInfo != null)
{
// topActivity: "The activity component at the top of the history stack of the task.
// This is what the user is currently doing."
componentInfo = taskInfo.get(0).topActivity;
}
if (componentInfo != null)
{
sRet = componentInfo.getPackageName();
}
return(sRet);
}
private String PrintUsage()
{
String sRet =
@ -3905,6 +3933,7 @@ private void CancelNotification()
"tzget - returns the current timezone set on the device\n" +
"rebt - reboot device\n" +
"adb ip|usb - set adb to use tcp/ip on port 5555 or usb\n" +
"activity - print package name of top (foreground) activity\n" +
"quit - disconnect SUTAgent\n" +
"exit - close SUTAgent\n" +
"ver - SUTAgent version\n" +

View File

@ -136,7 +136,7 @@ public class RedirOutputThread extends Thread
}
}
// wait for process to end, if it has not already, then destroy it
// wait for process to end; if it has not already ended, then destroy it
try
{
pProc.waitFor();
@ -144,8 +144,8 @@ public class RedirOutputThread extends Thread
catch (InterruptedException e)
{
e.printStackTrace();
pProc.destroy();
}
pProc.destroy();
buffer = null;
System.gc();
}

Binary file not shown.

View File

@ -0,0 +1,34 @@
-----BEGIN CERTIFICATE-----
MIIF9zCCBN+gAwIBAgIBAzANBgkqhkiG9w0BAQUFADCB4TELMAkGA1UEBhMCVVMx
CzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MSMwIQYDVQQKExpN
b3ppbGxhIC0gRVYgZGVidWcgdGVzdCBDQTEdMBsGA1UECxMUU2VjdXJpdHkgRW5n
aW5lZXJpbmcxJjAkBgNVBAMTHUVWIFRlc3RpbmcgKHVudHJ1c3R3b3J0aHkpIENB
MRMwEQYDVQQpEwpldi10ZXN0LWNhMSwwKgYJKoZIhvcNAQkBFh1jaGFybGF0YW5A
dGVzdGluZy5leGFtcGxlLmNvbTAeFw0xMzAyMTQxNzU5MDlaFw0yMzAyMTIxNzU5
MDlaMIHRMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50
YWluIFZpZXcxIzAhBgNVBAoTGk1vemlsbGEgLSBFViBkZWJ1ZyB0ZXN0IENBMR0w
GwYDVQQLExRTZWN1cml0eSBFbmdpbmVlcmluZzEWMBQGA1UEAxMNaW50ZXJtZWRp
YXRlMzETMBEGA1UEKRMKZXYtdGVzdC1jYTEsMCoGCSqGSIb3DQEJARYdY2hhcmxh
dGFuQHRlc3RpbmcuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDAfzrlJdawr7v8m7lslODk5FTqCiBO7tPxnWhAOEL5g05knLTZTc5J
3ywmGoW6ae6RwPlWuqRuFd2Ea+yCawyjkUoLOpFH/xziDzvaS6LXNdJoxQqWk/LX
8YYQVFfmxh8E11fz74IoCzX++mY1byaNONf3bLU2HU8vnVvENr1gy9Bzpm8wUuKm
HkBYuG0SVzaeym2H/mo5PJICPVhPa+YxfEVS8EIFCigXGH7xrz/bPXnpfgsSJTnN
4amBNkORfjf7H9x6IWkJGEkIvkVoYKT4iQ9q6/C4YDjWa9p5lA4F/qxnJefezH/I
6hcqEODSaDsY+I6vsN8ks8r8MTTnd7BjAgMBAAGjggHGMIIBwjAdBgNVHQ4EFgQU
fluXMAT0ZS21pV13vv46m8k7nRkwggEYBgNVHSMEggEPMIIBC4AUyJg651hwk+3B
V0rQvQZv9n2bWPahgeekgeQwgeExCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEW
MBQGA1UEBxMNTW91bnRhaW4gVmlldzEjMCEGA1UEChMaTW96aWxsYSAtIEVWIGRl
YnVnIHRlc3QgQ0ExHTAbBgNVBAsTFFNlY3VyaXR5IEVuZ2luZWVyaW5nMSYwJAYD
VQQDEx1FViBUZXN0aW5nICh1bnRydXN0d29ydGh5KSBDQTETMBEGA1UEKRMKZXYt
dGVzdC1jYTEsMCoGCSqGSIb3DQEJARYdY2hhcmxhdGFuQHRlc3RpbmcuZXhhbXBs
ZS5jb22CCQCvxT0iZiZJMjAMBgNVHRMEBTADAQH/MDYGA1UdHwQvMC0wK6ApoCeG
JWh0dHA6Ly9leGFtcGxlLmNvbS9yb290LWV2LXRlc3Rlci5jcmwwPwYDVR0gBDgw
NjA0BgRVHSAAMCwwKgYIKwYBBQUHAgEWHmh0dHA6Ly9teXRlc3Rkb21haW4ubG9j
YWwvY3BzOzANBgkqhkiG9w0BAQUFAAOCAQEAC4grNTV5K8yqiAJ/0f6oIkTMqyJ4
lyHXvvKXMHTpRZ7Jdy0aq5KTSHswx64ZRN7V2ds+czzDWgxX3rBuZZAgOW1JYva3
Ps3XRYUiaTW8eeaWjuVRFAp7ytRmSsOGeOtHbez8jDmTqPRQ1mTMsMzpY4bFD8do
5y0xsbz4DYIeeNnX9+XGB5u2ml8t5L8Cj65wwMAx9HlsjTrfQTMIwpwbNle6GuZ3
9FzmE2piAND73yCgU5W66K2lZg8N6vHBq0UhPDCF72y8MlHxQOpTr3/jIGr4X7k9
uyYq0Pw5Y/LKyGbyW5iMFdLzabm1ua8IWAf7DSFMH6L3WlK8mngCfJ1icQ==
-----END CERTIFICATE-----

32
build/pgo/certs/evroot.ca Normal file
View File

@ -0,0 +1,32 @@
-----BEGIN CERTIFICATE-----
MIIFljCCBH6gAwIBAgIJAK/FPSJmJkkyMA0GCSqGSIb3DQEBBQUAMIHhMQswCQYD
VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxIzAh
BgNVBAoTGk1vemlsbGEgLSBFViBkZWJ1ZyB0ZXN0IENBMR0wGwYDVQQLExRTZWN1
cml0eSBFbmdpbmVlcmluZzEmMCQGA1UEAxMdRVYgVGVzdGluZyAodW50cnVzdHdv
cnRoeSkgQ0ExEzARBgNVBCkTCmV2LXRlc3QtY2ExLDAqBgkqhkiG9w0BCQEWHWNo
YXJsYXRhbkB0ZXN0aW5nLmV4YW1wbGUuY29tMB4XDTEzMDIxNDE3NDkwMFoXDTIz
MDIxMjE3NDkwMFowgeExCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UE
BxMNTW91bnRhaW4gVmlldzEjMCEGA1UEChMaTW96aWxsYSAtIEVWIGRlYnVnIHRl
c3QgQ0ExHTAbBgNVBAsTFFNlY3VyaXR5IEVuZ2luZWVyaW5nMSYwJAYDVQQDEx1F
ViBUZXN0aW5nICh1bnRydXN0d29ydGh5KSBDQTETMBEGA1UEKRMKZXYtdGVzdC1j
YTEsMCoGCSqGSIb3DQEJARYdY2hhcmxhdGFuQHRlc3RpbmcuZXhhbXBsZS5jb20w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCk+k5mvnrxhVdVnhaxCeDG
ZC5kcC8951K3xTkh2JMtUpSQL2IoGLOZOWTNY+2wGNyHbdJjKDv1d0bzZfz3yDkB
AbY6OcxS4WkwccKsyIzkdacpYWhi7kEFevm9p7TI8jdrpKmItrlqfZKfteh+K+DF
XZF7xp6zpoUis6dykmk5v8RivpCZl7HIlsOW0wSqCocXWH/WWFgAQyozjW8MgGOL
/eV2aLsx+yg7it9GMMtyidggwvlYM7O8vY0gJqQKXntbHq1zV7jIJ3bXzJceur+G
Ce4HvsRHAQUSl6jUfm00aKkqS+1t3svZURIKM6qWAuIKMGcspv+L8lyn1KImG8M5
AgMBAAGjggFNMIIBSTAdBgNVHQ4EFgQUyJg651hwk+3BV0rQvQZv9n2bWPYwggEY
BgNVHSMEggEPMIIBC4AUyJg651hwk+3BV0rQvQZv9n2bWPahgeekgeQwgeExCzAJ
BgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEj
MCEGA1UEChMaTW96aWxsYSAtIEVWIGRlYnVnIHRlc3QgQ0ExHTAbBgNVBAsTFFNl
Y3VyaXR5IEVuZ2luZWVyaW5nMSYwJAYDVQQDEx1FViBUZXN0aW5nICh1bnRydXN0
d29ydGh5KSBDQTETMBEGA1UEKRMKZXYtdGVzdC1jYTEsMCoGCSqGSIb3DQEJARYd
Y2hhcmxhdGFuQHRlc3RpbmcuZXhhbXBsZS5jb22CCQCvxT0iZiZJMjAMBgNVHRME
BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAcKVLC9MbdSZjzkVBseCm6t49aIIBm
xQrsTNV2Gnp5eIXBfUhNAfD0zbBcKHK9AfHmNT8ZK6iABjiOrnn6yQNufW5MMdNx
+/4FtTmdlBPLpyuBY7re+XbIaPxr/jB9jJ1pmh52xH3wMkO7ATDQ2fqFnODFrUKS
UpXzuydPnsCdu32KPSnewIrkDB10Sah7vw3uwASO2GWqaFtUDFWGpt6rYQTcOF8g
7a6Zj0johBMQFHE3HDRebWxiOf21ppN/tvv0gtGiA0ZIXBezeLaJ+Hob1xTbi4sw
sGYDKHPCrLuTZWXmkv0rAIkLLK4VHbsA5xYPQNJJsTpX3u0Z0vZxJd9/
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -101,6 +101,8 @@ https://mismatch.expired.example.com:443 privileged,cert=expired
https://mismatch.untrusted.example.com:443 privileged,cert=untrusted
https://untrusted-expired.example.com:443 privileged,cert=untrustedandexpired
https://mismatch.untrusted-expired.example.com:443 privileged,cert=untrustedandexpired
https://ev-valid.example.com:443 privileged,cert=evvalid
https://ev-invalid.example.com:443 priviliged,cert=evinvalid
# This is here so that we don't load the default live bookmark over
# the network in every test suite.

View File

@ -133,8 +133,8 @@ nsChromeRegistry::GetService()
if (!gChromeRegistry)
return nullptr;
}
NS_ADDREF(gChromeRegistry);
return gChromeRegistry;
nsCOMPtr<nsIChromeRegistry> registry = gChromeRegistry;
return registry.forget();
}
nsresult
@ -632,8 +632,8 @@ already_AddRefed<nsChromeRegistry>
nsChromeRegistry::GetSingleton()
{
if (gChromeRegistry) {
NS_ADDREF(gChromeRegistry);
return gChromeRegistry;
nsRefPtr<nsChromeRegistry> registry = gChromeRegistry;
return registry.forget();
}
nsRefPtr<nsChromeRegistry> cr;

View File

@ -36,6 +36,7 @@
#include "nsIObserverService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
#include "mozilla/Preferences.h"
#include "nsIResProtocolHandler.h"
#include "nsIScriptError.h"
#include "nsIVersionComparator.h"
@ -48,6 +49,7 @@
#define MATCH_OS_LOCALE_PREF "intl.locale.matchOS"
#define SELECTED_LOCALE_PREF "general.useragent.locale"
#define SELECTED_SKIN_PREF "general.skins.selectedSkin"
#define PACKAGE_OVERRIDE_BRANCH "chrome.override_package."
using namespace mozilla;
@ -196,20 +198,25 @@ NS_IMETHODIMP
nsChromeRegistryChrome::GetLocalesForPackage(const nsACString& aPackage,
nsIUTF8StringEnumerator* *aResult)
{
nsCString realpackage;
nsresult rv = OverrideLocalePackage(aPackage, realpackage);
if (NS_FAILED(rv))
return rv;
nsTArray<nsCString> *a = new nsTArray<nsCString>;
if (!a)
return NS_ERROR_OUT_OF_MEMORY;
PackageEntry* entry =
static_cast<PackageEntry*>(PL_DHashTableOperate(&mPackagesHash,
& aPackage,
& realpackage,
PL_DHASH_LOOKUP));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
entry->locales.EnumerateToArray(a);
}
nsresult rv = NS_NewAdoptingUTF8StringEnumerator(aResult, a);
rv = NS_NewAdoptingUTF8StringEnumerator(aResult, a);
if (NS_FAILED(rv))
delete a;
@ -267,9 +274,13 @@ nsresult
nsChromeRegistryChrome::GetSelectedLocale(const nsACString& aPackage,
nsACString& aLocale)
{
nsCString realpackage;
nsresult rv = OverrideLocalePackage(aPackage, realpackage);
if (NS_FAILED(rv))
return rv;
PackageEntry* entry =
static_cast<PackageEntry*>(PL_DHashTableOperate(&mPackagesHash,
& aPackage,
& realpackage,
PL_DHASH_LOOKUP));
if (PL_DHASH_ENTRY_IS_FREE(entry))
@ -282,6 +293,21 @@ nsChromeRegistryChrome::GetSelectedLocale(const nsACString& aPackage,
return NS_OK;
}
nsresult
nsChromeRegistryChrome::OverrideLocalePackage(const nsACString& aPackage,
nsACString& aOverride)
{
const nsACString& pref = NS_LITERAL_CSTRING(PACKAGE_OVERRIDE_BRANCH) + aPackage;
nsAdoptingCString override = mozilla::Preferences::GetCString(PromiseFlatCString(pref).get());
if (override) {
aOverride = override;
}
else {
aOverride = aPackage;
}
return NS_OK;
}
nsresult
nsChromeRegistryChrome::SelectLocaleFromPref(nsIPrefBranch* prefs)
{

View File

@ -50,6 +50,8 @@ class nsChromeRegistryChrome : public nsChromeRegistry
PLDHashEntryHdr *entry,
uint32_t number, void *arg);
nsresult OverrideLocalePackage(const nsACString& aPackage,
nsACString& aOverride);
nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,

View File

@ -0,0 +1,4 @@
locale basepack en-US jar:en-US.jar!/locale/en-US/global/
locale basepack fr jar:en-US.jar!/locale/en-US/global/
locale overpack en-US jar:en-US.jar!/locale/en-US/global/
locale overpack de jar:en-US.jar!/locale/en-US/global/

View File

@ -0,0 +1,48 @@
/* 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/.
*/
var MANIFESTS = [
do_get_file("data/test_bug848297.manifest")
];
// Stub in the locale service so we can control what gets returned as the OS locale setting
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
registerManifests(MANIFESTS);
var chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"]
.getService(Ci.nsIXULChromeRegistry)
.QueryInterface(Ci.nsIToolkitChromeRegistry);
chromeReg.checkForNewChrome();
var prefService = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService)
.QueryInterface(Ci.nsIPrefBranch);
function enum_to_array(strings) {
let rv = [];
while (strings.hasMore()) {
rv.push(strings.getNext());
}
rv.sort();
return rv;
}
function run_test() {
// without override
prefService.setCharPref("general.useragent.locale", "de");
do_check_eq(chromeReg.getSelectedLocale("basepack"), "en-US");
do_check_eq(chromeReg.getSelectedLocale("overpack"), "de");
do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")),
['en-US', 'fr']);
// with override
prefService.setCharPref("chrome.override_package.basepack", "overpack");
do_check_eq(chromeReg.getSelectedLocale("basepack"), "de");
do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")),
['de', 'en-US']);
}

View File

@ -11,6 +11,7 @@ tail =
[test_bug415367.js]
[test_bug519468.js]
[test_bug564667.js]
[test_bug848297.js]
[test_crlf.js]
[test_data_protocol_registration.js]
[test_no_remote_registration.js]

View File

@ -223,7 +223,6 @@ if test -n "$gonkdir" ; then
AC_DEFINE(HAVE_PTHREADS)
CROSS_COMPILE=1
MOZ_CHROME_FILE_FORMAT=omni
NSS_NO_LIBPKIX=1
direct_nspr_config=1
else
MOZ_ANDROID_NDK
@ -4268,6 +4267,7 @@ MOZ_SYS_MSG=
MOZ_TIME_MANAGER=
MOZ_PAY=
MOZ_AUDIO_CHANNEL_MANAGER=
NSS_NO_LIBPKIX=
case "$target_os" in
mingw*)
@ -6395,7 +6395,7 @@ MOZ_ARG_ENABLE_BOOL(gtest,
MOZ_ENABLE_GTEST= )
if test -n "$MOZ_ENABLE_GTEST"; then
if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux"; then
if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux" -o "${OS_TARGET}" = "Android"; then
MOZ_ENABLE_GTEST=1
GTEST_HAS_RTTI=0
AC_DEFINE(MOZ_ENABLE_GTEST)
@ -6405,6 +6405,14 @@ if test -n "$MOZ_ENABLE_GTEST"; then
else
AC_MSG_ERROR([Cannot build with --enable-gtest on this platform.])
fi
if test "${OS_TARGET}" = "Android"; then
AC_DEFINE(GTEST_OS_LINUX_ANDROID)
AC_DEFINE(GTEST_USE_OWN_TR1_TUPLE)
AC_DEFINE_UNQUOTED(GTEST_HAS_CLONE, 0)
AC_SUBST(GTEST_OS_LINUX_ANDROID)
AC_SUBST(GTEST_USE_OWN_TR1_TUPLE)
AC_SUBST(GTEST_HAS_CLONE)
fi
fi
dnl ========================================================
@ -6429,6 +6437,15 @@ if test -n "$MOZ_DISABLE_CRYPTOLEGACY"; then
fi
AC_SUBST(MOZ_DISABLE_CRYPTOLEGACY)
dnl ========================================================
dnl = Disable libpkix
dnl ========================================================
if test -n "$NSS_NO_LIBPKIX"; then
AC_DEFINE(NSS_NO_LIBPKIX)
fi
AC_SUBST(NSS_NO_LIBPKIX)
dnl ========================================================
dnl =
dnl = Module specific options
@ -8525,8 +8542,6 @@ AC_SUBST(MOZ_PERMISSIONS)
AC_SUBST(MOZ_PREF_EXTENSIONS)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
AC_DEFINE(NSS_NO_LIBPKIX)
AC_SUBST(NSS_NO_LIBPKIX)
AC_SUBST(MOZ_DEBUG)
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
@ -8570,6 +8585,7 @@ AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
AC_SUBST(MOZ_ONLY_TOUCH_EVENTS)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
AC_SUBST(MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS)
AC_SUBST(MOZ_MAINTENANCE_SERVICE)
AC_SUBST(MOZ_STUB_INSTALLER)
AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE)

View File

@ -247,11 +247,8 @@ public:
*/
already_AddRefed<nsILoadGroup> GetDocumentLoadGroup() const
{
nsILoadGroup *group = nullptr;
if (mDocumentLoadGroup)
CallQueryReferent(mDocumentLoadGroup.get(), &group);
return group;
nsCOMPtr<nsILoadGroup> group = do_QueryReferent(mDocumentLoadGroup);
return group.forget();
}
/**
@ -1080,11 +1077,8 @@ public:
*/
already_AddRefed<nsISupports> GetContainer() const
{
nsISupports* container = nullptr;
if (mDocumentContainer)
CallQueryReferent(mDocumentContainer.get(), &container);
return container;
nsCOMPtr<nsISupports> container = do_QueryReferent(mDocumentContainer);
return container.forget();
}
/**

View File

@ -133,7 +133,6 @@ Attr::GetName(nsAString& aName)
already_AddRefed<nsIAtom>
Attr::GetNameAtom(nsIContent* aContent)
{
nsIAtom* result = nullptr;
if (!mNsAware &&
mNodeInfo->NamespaceID() == kNameSpaceID_None &&
aContent->IsInHTMLDocument() &&
@ -142,13 +141,10 @@ Attr::GetNameAtom(nsIContent* aContent)
mNodeInfo->GetName(name);
nsAutoString lowercaseName;
nsContentUtils::ASCIIToLower(name, lowercaseName);
nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(lowercaseName);
nameAtom.swap(result);
} else {
nsCOMPtr<nsIAtom> nameAtom = mNodeInfo->NameAtom();
nameAtom.swap(result);
return do_GetAtom(lowercaseName);
}
return result;
nsCOMPtr<nsIAtom> nameAtom = mNodeInfo->NameAtom();
return nameAtom.forget();
}
NS_IMETHODIMP

View File

@ -1443,17 +1443,17 @@ Element::GetExistingAttrNameFromQName(const nsAString& aStr) const
return nullptr;
}
nsINodeInfo* nodeInfo;
nsCOMPtr<nsINodeInfo> nodeInfo;
if (name->IsAtom()) {
nodeInfo = mNodeInfo->NodeInfoManager()->
GetNodeInfo(name->Atom(), nullptr, kNameSpaceID_None,
nsIDOMNode::ATTRIBUTE_NODE).get();
nsIDOMNode::ATTRIBUTE_NODE);
}
else {
NS_ADDREF(nodeInfo = name->NodeInfo());
nodeInfo = name->NodeInfo();
}
return nodeInfo;
return nodeInfo.forget();
}
// static

View File

@ -691,9 +691,7 @@ FragmentOrElement::GetChildren(uint32_t aFilter)
}
}
nsINodeList* returnList = nullptr;
list.forget(&returnList);
return returnList;
return list.forget();
}
static nsIContent*

View File

@ -16,7 +16,7 @@ Text::SplitText(uint32_t aOffset, ErrorResult& rv)
if (rv.Failed()) {
return nullptr;
}
return static_cast<Text*>(newChild.forget().get());
return newChild.forget().downcast<Text>();
}
} // namespace dom

View File

@ -209,7 +209,7 @@ nsAttrAndChildArray::TakeChildAt(uint32_t aPos)
memmove(pos, pos + 1, (childCount - aPos - 1) * sizeof(nsIContent*));
SetChildCount(childCount - 1);
return child;
return dont_AddRef(child);
}
int32_t

View File

@ -739,9 +739,8 @@ nsAttrValue::GetAsAtom() const
case eAtom:
{
nsIAtom* atom = GetAtomValue();
NS_ADDREF(atom);
return atom;
nsCOMPtr<nsIAtom> atom = GetAtomValue();
return atom.forget();
}
default:
@ -1229,9 +1228,9 @@ nsAttrValue::ParseAtom(const nsAString& aValue)
{
ResetIfSet();
nsIAtom* atom = NS_NewAtom(aValue);
nsCOMPtr<nsIAtom> atom = NS_NewAtom(aValue);
if (atom) {
SetPtrValueAndType(atom, eAtomBase);
SetPtrValueAndType(atom.forget().get(), eAtomBase);
}
}
@ -1712,9 +1711,10 @@ nsAttrValue::SetMiscAtomOrString(const nsAString* aValue)
"Empty string?");
MiscContainer* cont = GetMiscContainer();
if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
nsIAtom* atom = NS_NewAtom(*aValue);
nsCOMPtr<nsIAtom> atom = NS_NewAtom(*aValue);
if (atom) {
cont->mStringBits = reinterpret_cast<uintptr_t>(atom) | eAtomBase;
cont->mStringBits =
reinterpret_cast<uintptr_t>(atom.forget().get()) | eAtomBase;
}
} else {
nsStringBuffer* buf = GetStringBuffer(*aValue);

View File

@ -274,8 +274,8 @@ DragDataProducer::FindParentLinkNode(nsIContent* inNode)
for (; content; content = content->GetParent()) {
if (nsContentUtils::IsDraggableLink(content)) {
NS_ADDREF(content);
return content;
nsCOMPtr<nsIContent> ret = content;
return ret.forget();
}
}

View File

@ -196,7 +196,7 @@ NS_GetContentList(nsINode* aRootNode,
{
NS_ASSERTION(aRootNode, "content list has to have a root");
nsContentList* list = nullptr;
nsRefPtr<nsContentList> list;
static PLDHashTableOps hash_table_ops =
{
@ -255,9 +255,7 @@ NS_GetContentList(nsINode* aRootNode,
}
}
NS_ADDREF(list);
return list;
return list.forget();
}
#ifdef DEBUG
@ -319,7 +317,7 @@ GetFuncStringContentList(nsINode* aRootNode,
{
NS_ASSERTION(aRootNode, "content list has to have a root");
nsCacheableFuncStringContentList* list = nullptr;
nsRefPtr<nsCacheableFuncStringContentList> list;
static PLDHashTableOps hash_table_ops =
{
@ -373,11 +371,9 @@ GetFuncStringContentList(nsINode* aRootNode,
}
}
NS_ADDREF(list);
// Don't cache these lists globally
return list;
return list.forget();
}
already_AddRefed<nsContentList>

View File

@ -2535,11 +2535,11 @@ nsContentUtils::SplitQName(const nsIContent* aNamespaceResolver,
if (*aNamespace == kNameSpaceID_Unknown)
return NS_ERROR_FAILURE;
*aLocalName = NS_NewAtom(Substring(colon + 1, end));
*aLocalName = NS_NewAtom(Substring(colon + 1, end)).get();
}
else {
*aNamespace = kNameSpaceID_None;
*aLocalName = NS_NewAtom(aQName);
*aLocalName = NS_NewAtom(aQName).get();
}
NS_ENSURE_TRUE(aLocalName, NS_ERROR_OUT_OF_MEMORY);
return NS_OK;
@ -2624,7 +2624,7 @@ nsContentUtils::SplitExpatName(const PRUnichar *aExpatName, nsIAtom **aPrefix,
nameStart = (uriEnd + 1);
if (nameEnd) {
const PRUnichar *prefixStart = nameEnd + 1;
*aPrefix = NS_NewAtom(Substring(prefixStart, pos));
*aPrefix = NS_NewAtom(Substring(prefixStart, pos)).get();
}
else {
nameEnd = pos;
@ -2637,7 +2637,7 @@ nsContentUtils::SplitExpatName(const PRUnichar *aExpatName, nsIAtom **aPrefix,
nameEnd = pos;
*aPrefix = nullptr;
}
*aLocalName = NS_NewAtom(Substring(nameStart, nameEnd));
*aLocalName = NS_NewAtom(Substring(nameStart, nameEnd)).get();
}
// static
@ -4233,7 +4233,7 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode,
nsCOMPtr<nsIDOMDocumentFragment> frag;
aRv = ParseFragmentXML(aFragment, document, tagStack,
aPreventScriptExecution, getter_AddRefs(frag));
return static_cast<DocumentFragment*>(frag.forget().get());
return frag.forget().downcast<DocumentFragment>();
}
/* static */
@ -5261,12 +5261,12 @@ nsContentUtils::HidePopupsInDocument(nsIDocument* aDocument)
already_AddRefed<nsIDragSession>
nsContentUtils::GetDragSession()
{
nsIDragSession* dragSession = nullptr;
nsCOMPtr<nsIDragSession> dragSession;
nsCOMPtr<nsIDragService> dragService =
do_GetService("@mozilla.org/widget/dragservice;1");
if (dragService)
dragService->GetCurrentSession(&dragSession);
return dragSession;
dragService->GetCurrentSession(getter_AddRefs(dragSession));
return dragSession.forget();
}
/* static */
@ -5836,15 +5836,13 @@ nsContentUtils::GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)
nsCOMPtr<nsIDOMWindow> window =
do_QueryInterface(aScriptContext->GetGlobalObject());
nsIDocument *doc = nullptr;
nsCOMPtr<nsIDocument> doc;
if (window) {
nsCOMPtr<nsIDOMDocument> domdoc;
window->GetDocument(getter_AddRefs(domdoc));
if (domdoc) {
CallQueryInterface(domdoc, &doc);
}
doc = do_QueryInterface(domdoc);
}
return doc;
return doc.forget();
}
/* static */

View File

@ -7664,17 +7664,17 @@ nsDocument::RemovedFromDocShell()
already_AddRefed<nsILayoutHistoryState>
nsDocument::GetLayoutHistoryState() const
{
nsILayoutHistoryState* state = nullptr;
nsCOMPtr<nsILayoutHistoryState> state;
if (!mScriptGlobalObject) {
NS_IF_ADDREF(state = mLayoutHistoryState);
state = mLayoutHistoryState;
} else {
nsCOMPtr<nsIDocShell> docShell(do_QueryReferent(mDocumentContainer));
if (docShell) {
docShell->GetLayoutHistoryState(&state);
docShell->GetLayoutHistoryState(getter_AddRefs(state));
}
}
return state;
return state.forget();
}
void

View File

@ -242,11 +242,9 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
void *node = PL_HashTableLookup(mNodeInfoHash, &tmpKey);
if (node) {
nsINodeInfo* nodeInfo = static_cast<nsINodeInfo *>(node);
nsCOMPtr<nsINodeInfo> nodeInfo = static_cast<nsINodeInfo*>(node);
NS_ADDREF(nodeInfo);
return nodeInfo;
return nodeInfo.forget();
}
nsRefPtr<nsNodeInfo> newNodeInfo =
@ -263,10 +261,7 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
NS_IF_ADDREF(mDocument);
}
nsNodeInfo *nodeInfo = nullptr;
newNodeInfo.swap(nodeInfo);
return nodeInfo;
return newNodeInfo.forget();
}

View File

@ -986,9 +986,8 @@ nsObjectLoadingContent::GetFrameLoader(nsIFrameLoader** aFrameLoader)
NS_IMETHODIMP_(already_AddRefed<nsFrameLoader>)
nsObjectLoadingContent::GetFrameLoader()
{
nsFrameLoader* loader = mFrameLoader;
NS_IF_ADDREF(loader);
return loader;
nsRefPtr<nsFrameLoader> loader = mFrameLoader;
return loader.forget();
}
NS_IMETHODIMP

View File

@ -1533,22 +1533,17 @@ RangeSubtreeIterator::Init(nsIDOMRange *aRange)
already_AddRefed<nsIDOMNode>
RangeSubtreeIterator::GetCurrentNode()
{
nsIDOMNode *node = nullptr;
nsCOMPtr<nsIDOMNode> node;
if (mIterState == eUseStart && mStart) {
NS_ADDREF(node = mStart);
} else if (mIterState == eUseEnd && mEnd)
NS_ADDREF(node = mEnd);
else if (mIterState == eUseIterator && mIter)
{
nsINode* n = mIter->GetCurrentNode();
if (n) {
CallQueryInterface(n, &node);
}
node = mStart;
} else if (mIterState == eUseEnd && mEnd) {
node = mEnd;
} else if (mIterState == eUseIterator && mIter) {
node = do_QueryInterface(mIter->GetCurrentNode());
}
return node;
return node.forget();
}
void

View File

@ -599,6 +599,7 @@ MOCHITEST_FILES_C= \
file_mixed_content_main_bug803225.html \
file_mixed_content_main_bug803225_websocket_wsh.py \
bug803225_test_mailto.html \
test_mixed_content_blocker_frameNavigation.html \
file_mixed_content_frameNavigation.html \
file_mixed_content_frameNavigation_innermost.html \
file_mixed_content_frameNavigation_grandchild.html \
@ -664,9 +665,6 @@ MOCHITEST_FILES_PARTS = $(foreach s,A B C,MOCHITEST_FILES_$(s))
# test_XHR_timeout.js \
# file_XHR_timeout.sjs \
# Disabled for frequent failures (bug 855730).
# test_mixed_content_blocker_frameNavigation.html \
MOCHITEST_BROWSER_FILES = \
browser_bug593387.js \
$(NULL)

View File

@ -60,16 +60,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
setTimeout(navigationStatus, TIMEOUT_INTERVAL, iframe_test1);
// Test 2: Navigate secure grandchild iframe to insecure grandchild iframe on a page that has at least one secure parent (in this example, both the parent and grandparent are https)
var iframe_test2 = document.createElement("iframe");
iframe_test2.src = "https://example.com/tests/content/base/test/file_mixed_content_frameNavigation_secure_grandchild.html";
iframe_test2.onerror = function() {
parent.postMessage({"test": "securePage_navigate_grandchild", "msg": "got an onerror event when loading or navigating testing iframe"}, "http://mochi.test:8888");
};
testContent.appendChild(iframe_test2);
// Test 3: Open an http page in a new tab from a link click with target=_blank.
// Test 2: Open an http page in a new tab from a link click with target=_blank.
var iframe_test3 = document.createElement("iframe");
iframe_test3.src = "https://example.com/tests/content/base/test/file_mixed_content_frameNavigation_blankTarget.html";
iframe_test3.onerror = function() {

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