Merge mozilla-central into services-central

This commit is contained in:
Gregory Szorc 2013-04-29 09:14:45 -07:00
Родитель 7c02bff22a e759067701
Коммит 507977f49c
830 изменённых файлов: 12797 добавлений и 7786 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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>

Просмотреть файл

@ -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

Просмотреть файл

@ -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();
}
/**

Просмотреть файл

@ -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);
},

Просмотреть файл

@ -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:
{

Просмотреть файл

@ -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;

Просмотреть файл

@ -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();
}
};

Просмотреть файл

@ -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");
}
}

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -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();
}

Просмотреть файл

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

Просмотреть файл

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

1
addon-sdk/source/app-extension/bootstrap.js поставляемый
Просмотреть файл

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

Просмотреть файл

@ -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 ###

Просмотреть файл

@ -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">

Просмотреть файл

@ -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>

Просмотреть файл

@ -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)

Просмотреть файл

@ -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));

Просмотреть файл

@ -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() {},

Просмотреть файл

@ -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;

Просмотреть файл

@ -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))

Просмотреть файл

@ -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

Просмотреть файл

@ -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))

Просмотреть файл

@ -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;
}
}
};

Просмотреть файл

@ -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"));

Просмотреть файл

@ -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

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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;

Просмотреть файл

@ -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":

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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);

Просмотреть файл

@ -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();

Просмотреть файл

@ -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();

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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);

Просмотреть файл

@ -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");

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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();
}
});
};

Просмотреть файл

@ -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();
};

Просмотреть файл

@ -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);

Просмотреть файл

@ -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));
});
}
});

Просмотреть файл

@ -271,9 +271,10 @@ pref("media.video-queue.default-size", 3);
// optimize images' memory usage
pref("image.mem.decodeondraw", true);
pref("content.image.allow_locking", true);
pref("image.mem.min_discard_timeout_ms", 10000);
pref("image.mem.max_decoded_image_kb", 5120); /* 5MB */
pref("content.image.allow_locking", false); /* don't allow image locking */
pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */
pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */
pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */
// XXX this isn't a good check for "are touch events supported", but
// we don't really have a better one at the moment.

Просмотреть файл

@ -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;

Просмотреть файл

@ -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"

Просмотреть файл

@ -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>

Просмотреть файл

@ -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"

Просмотреть файл

@ -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>

Просмотреть файл

@ -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"

Просмотреть файл

@ -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>

Просмотреть файл

@ -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

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1366143901000">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1366828228000">
<emItems>
<emItem blockID="i58" id="webmaster@buzzzzvideos.info">
<versionRange minVersion="0" maxVersion="*">
@ -202,6 +202,10 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i338" id="{1FD91A9C-410C-4090-BBCC-55D3450EF433}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i59" id="ghostviewer@youtube2.com">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -287,6 +291,10 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i109" id="{392e123b-b691-4a5e-b52f-c4c1027e749c}">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i286" id="{58bd07eb-0ee0-4df0-8121-dc9b693373df}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
@ -313,8 +321,8 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i109" id="{392e123b-b691-4a5e-b52f-c4c1027e749c}">
<versionRange minVersion="0" maxVersion="*">
<emItem blockID="i218" id="ffxtlbr@claro.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i76" id="crossriderapp3924@crossrider.com">
@ -364,6 +372,10 @@
</emItem>
<emItem blockID="i47" id="youtube@youtube2.com">
</emItem>
<emItem blockID="i336" id="CortonExt@ext.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i103" id="kdrgun@gmail.com">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -445,10 +457,6 @@
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i218" id="ffxtlbr@claro.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i70" id="psid-vhvxQHMZBOzUZA@jetpack">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>

Просмотреть файл

@ -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

Просмотреть файл

@ -15,7 +15,7 @@
<xul:window id="newtab-window" xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
disablefastfind="true" title="&newtab.pageTitle;">
title="&newtab.pageTitle;">
<div id="newtab-scrollbox">

Просмотреть файл

@ -437,10 +437,9 @@ nsContextMenu.prototype = {
},
inspectNode: function CM_inspectNode() {
let {devtools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
let gBrowser = this.browser.ownerDocument.defaultView.gBrowser;
let imported = {};
Cu.import("resource:///modules/devtools/Target.jsm", imported);
let tt = imported.TargetFactory.forTab(gBrowser.selectedTab);
let tt = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.showToolbox(tt, "inspector").then(function(toolbox) {
let inspector = toolbox.getCurrentPanel();
inspector.selection.setNode(this.target, "browser-context-menu");

Просмотреть файл

@ -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>
@ -1127,14 +1124,12 @@
// At this point, we now have a URI.
// Let's try to unescape it using a character set
// in case the URI is not ASCII.
if (!gMultiProcessBrowser) {
try {
var characterSet = browser.contentDocument.characterSet;
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
.getService(Components.interfaces.nsITextToSubURI);
title = textToSubURI.unEscapeNonAsciiURI(characterSet, title);
} catch(ex) { /* Do nothing. */ }
}
try {
var characterSet = browser.characterSet;
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
.getService(Components.interfaces.nsITextToSubURI);
title = textToSubURI.unEscapeNonAsciiURI(characterSet, title);
} catch(ex) { /* Do nothing. */ }
crop = "center";
@ -1265,6 +1260,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 +1284,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 +1322,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 +1391,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 +2691,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 +2738,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 +4231,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">

Просмотреть файл

@ -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 \

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -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>

Просмотреть файл

@ -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);
}
});
}

Просмотреть файл

@ -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) {

Просмотреть файл

@ -14,7 +14,7 @@
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
!define URLStubDownload "http://download.mozilla.org/?product=firefox-aurora-latest&os=win&lang=${AB_CD}"
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=aurora"
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=aurora&installer_lang=${AB_CD}"
!define Channel "aurora"
# The installer's certificate name and issuer expected by the stub installer

Просмотреть файл

@ -14,7 +14,7 @@
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
!define URLStubDownload "http://download.mozilla.org/?product=firefox-nightly-latest&os=win&lang=${AB_CD}"
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=nightly"
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=nightly&installer_lang=${AB_CD}"
!define Channel "nightly"
# The installer's certificate name and issuer expected by the stub installer

Просмотреть файл

@ -18,7 +18,7 @@
; set the update channel to beta.
!define OFFICIAL
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=release"
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
!define Channel "release"
# The installer's certificate name and issuer expected by the stub installer

Просмотреть файл

@ -14,7 +14,7 @@
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=release"
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
!define Channel "unofficial"
# The installer's certificate name and issuer expected by the stub installer

Просмотреть файл

@ -44,7 +44,7 @@ function makeURI(aURLSpec, aCharset) {
return null;
}
const XML_NS = "http://www.w3.org/XML/1998/namespace"
const XML_NS = "http://www.w3.org/XML/1998/namespace";
const HTML_NS = "http://www.w3.org/1999/xhtml";
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
@ -169,11 +169,15 @@ FeedWriter.prototype = {
_setContentText: function FW__setContentText(id, text) {
this._contentSandbox.element = this._document.getElementById(id);
this._contentSandbox.textNode = this._document.createTextNode(text);
this._contentSandbox.textNode = text.createDocumentFragment(this._contentSandbox.element);
var codeStr =
"while (element.hasChildNodes()) " +
" element.removeChild(element.firstChild);" +
"element.appendChild(textNode);";
if (text.base) {
this._contentSandbox.spec = text.base.spec;
codeStr += "element.setAttributeNS('" + XML_NS + "', 'base', spec);";
}
Cu.evalInSandbox(codeStr, this._contentSandbox);
this._contentSandbox.element = null;
this._contentSandbox.textNode = null;
@ -361,7 +365,7 @@ FeedWriter.prototype = {
_setTitleText: function FW__setTitleText(container) {
if (container.title) {
var title = container.title.plainText();
this._setContentText(TITLE_ID, title);
this._setContentText(TITLE_ID, container.title);
this._contentSandbox.document = this._document;
this._contentSandbox.title = title;
var codeStr = "document.title = title;"
@ -370,7 +374,7 @@ FeedWriter.prototype = {
var feed = container.QueryInterface(Ci.nsIFeed);
if (feed && feed.subtitle)
this._setContentText(SUBTITLE_ID, container.subtitle.plainText());
this._setContentText(SUBTITLE_ID, container.subtitle);
},
/**
@ -439,7 +443,11 @@ FeedWriter.prototype = {
// If the entry has a title, make it a link
if (entry.title) {
var a = this._document.createElementNS(HTML_NS, "a");
a.appendChild(this._document.createTextNode(entry.title.plainText()));
var span = this._document.createElementNS(HTML_NS, "span");
a.appendChild(span);
if (entry.title.base)
span.setAttributeNS(XML_NS, "base", entry.title.base.spec);
span.appendChild(entry.title.createDocumentFragment(a));
// Entries are not required to have links, so entry.link can be null.
if (entry.link)

Просмотреть файл

@ -18,6 +18,8 @@ MOCHITEST_FILES = bug408328-data.xml \
bug494328-data.xml \
test_bug589543.html \
bug589543-data.xml \
test_bug436801.html \
bug436801-data.xml \
test_registerHandler.html \
valid-feed.xml \
valid-unsniffable-feed.xml \

Просмотреть файл

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://www.example.com/">
<title type="xhtml" xml:base="/foo/bar/">
<div xmlns="http://www.w3.org/1999/xhtml">Example of a <em>special</em> feed (<img height="20px" src="baz.png" alt="base test sprite"/>)</div>
</title>
<subtitle type="html" xml:base="/foo/bar/">
<![CDATA[
With a <em>special</em> subtitle (<img height="20px" src="baz.png" alt="base test sprite"/>)
]]>
</subtitle>
<link href="http://example.org/"/>
<updated>2010-09-02T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:22906062-ecbd-46e2-b6a7-3039506a398f</id>
<entry>
<title type="xhtml" xml:base="/foo/bar/">
<div xmlns="http://www.w3.org/1999/xhtml">Some <abbr title="Extensible Hyper-text Mark-up Language">XHTML</abbr> examples (<img height="20px" src="baz.png" alt="base test sprite"/>)</div>
</title>
<id>urn:uuid:b48083a7-71a7-4c9c-8515-b7c0d22955e7</id>
<updated>2010-09-02T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
<entry>
<title type="html" xml:base="/foo/bar/">
<![CDATA[
Some <abbr title="Hyper-text Mark-up Language">HTML</abbr> examples (<img height="20px" src="baz.png" alt="base test sprite"/>)
]]>
</title>
<id>urn:uuid:1424967a-280a-414d-b0ab-8b11c4ac1bb7</id>
<updated>2010-09-02T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>

Просмотреть файл

@ -0,0 +1,119 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=436801
-->
<head>
<title>Test feed preview subscribe UI</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436801">Mozilla Bug 436801</a>
<p id="display"><iframe id="testFrame" src="bug436801-data.xml"></iframe></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
addLoadEvent(function () {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var doc = $("testFrame").contentDocument;
checkNode(doc.getElementById("feedTitleText"), [
"ELEMENT", "h1", { "xml:base": "http://www.example.com/foo/bar/" }, [
["TEXT", "Example of a "],
["ELEMENT", "em", [
["TEXT", "special"],
]],
["TEXT", " feed ("],
["ELEMENT", "img", { "src": "baz.png" }],
["TEXT", ")"],
]
]);
checkNode(doc.getElementById("feedSubtitleText"), [
"ELEMENT", "h2", { "xml:base": "http://www.example.com/foo/bar/" }, [
["TEXT", "With a "],
["ELEMENT", "em", [
["TEXT", "special"],
]],
["TEXT", " subtitle ("],
["ELEMENT", "img", { "src": "baz.png" }],
["TEXT", ")"],
]
]);
checkNode(doc.querySelector(".entry").firstChild.firstChild.firstChild, [
"ELEMENT", "span", { "xml:base": "http://www.example.com/foo/bar/" }, [
["TEXT", "Some "],
["ELEMENT", "abbr", { title: "Extensible Hyper-text Mark-up Language" }, [
["TEXT", "XHTML"],
]],
["TEXT", " examples ("],
["ELEMENT", "img", { "src": "baz.png" }],
["TEXT", ")"],
]
]);
checkNode(doc.querySelectorAll(".entry")[1].firstChild.firstChild.firstChild, [
"ELEMENT", "span", { "xml:base": "http://www.example.com/foo/bar/" }, [
["TEXT", "Some "],
["ELEMENT", "abbr", { title: "Hyper-text Mark-up Language" }, [
["TEXT", "HTML"],
]],
["TEXT", " examples ("],
["ELEMENT", "img", { "src": "baz.png" }],
["TEXT", ")"],
]
]);
});
addLoadEvent(SimpleTest.finish);
function checkNode(node, schema) {
var typeName = schema.shift() + "_NODE";
var type = Node[typeName];
is(node.nodeType, type, "Node should be expected type " + typeName);
if (type == Node.TEXT_NODE) {
var text = schema.shift();
is(node.data, text, "Text should match");
return;
}
// type == Node.ELEMENT_NODE
var tag = schema.shift();
is(node.localName, tag, "Element should have expected tag");
while (schema.length) {
var val = schema.shift();
if (Array.isArray(val))
var childSchema = val;
else
var attrSchema = val;
}
if (attrSchema) {
var nsTable = {
xml: "http://www.w3.org/XML/1998/namespace",
};
for (var name in attrSchema) {
var [ns, nsName] = name.split(":");
var val = nsName ? node.getAttributeNS(nsTable[ns], nsName) :
node.getAttribute(name);
is(val, attrSchema[name], "Attribute " + name + " should match");
}
}
if (childSchema) {
var numChildren = node.childNodes.length;
is(childSchema.length, numChildren,
"Element should have expected number of children");
for (var i = 0; i < numChildren; i++)
checkNode(node.childNodes[i], childSchema[i]);
}
}
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -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);

Просмотреть файл

@ -15,6 +15,9 @@ function test() {
* session store service the first history entry must be selected.
*/
const URL = "data:text/html,<h1>first</h1>";
const URL2 = "data:text/html,<h1>second</h1>";
function runTests() {
// Create a dummy window that is regarded as active. We need to do this
// because we always collect data for tabs of active windows no matter if
@ -24,8 +27,8 @@ function runTests() {
// Create a tab with two history entries.
let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
yield loadURI("about:robots");
yield loadURI("about:mozilla");
yield loadURI(URL);
yield loadURI(URL2);
// All windows currently marked as dirty will be written to disk
// and thus marked clean afterwards.
@ -35,7 +38,7 @@ function runTests() {
// will not fire a 'load' event but a 'pageshow' event with persisted=true.
waitForPageShow();
yield gBrowser.selectedBrowser.goBack();
is(tab.linkedBrowser.currentURI.spec, "about:robots", "url is about:robots");
is(tab.linkedBrowser.currentURI.spec, URL, "correct url after going back");
// If by receiving the 'pageshow' event the first window has correctly
// been marked as dirty, getBrowserState() should return the tab we created

Просмотреть файл

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

Просмотреть файл

@ -14,13 +14,13 @@ this.EXPORTED_SYMBOLS = [ "CmdAddonFlags", "CmdCommands" ];
Cu.import("resource:///modules/devtools/gcli.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/osfile.jsm")
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource:///modules/devtools/shared/event-emitter.js");
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
"resource:///modules/devtools/gDevTools.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
"resource:///modules/devtools/Target.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "devtools",
"resource:///modules/devtools/gDevTools.jsm");
/* CmdAddon ---------------------------------------------------------------- */
@ -405,9 +405,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
return global.Debugger;
});
XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
"resource:///modules/devtools/Target.jsm");
let debuggers = [];
/**
@ -437,7 +434,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
debuggers.push(dbg);
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
gDevTools.showToolbox(target, "webconsole");
return gcli.lookup("calllogStartReply");
@ -589,7 +586,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
}.bind(this);
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
gDevTools.showToolbox(target, "webconsole");
return gcli.lookup("calllogChromeStartReply");
@ -835,7 +832,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
description: gcli.lookup("consolecloseDesc"),
exec: function Command_consoleClose(args, context) {
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.closeToolbox(target);
}
});
@ -848,7 +845,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
description: gcli.lookup("consoleopenDesc"),
exec: function Command_consoleOpen(args, context) {
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.showToolbox(target, "webconsole");
}
});
@ -1599,6 +1596,75 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
}
}(this));
/* CmdTools -------------------------------------------------------------- */
(function(module) {
gcli.addCommand({
name: "tools",
description: gcli.lookup("toolsDesc"),
manual: gcli.lookup("toolsManual"),
get hidden() gcli.hiddenByChromePref(),
});
gcli.addCommand({
name: "tools srcdir",
description: gcli.lookup("toolsSrcdirDesc"),
manual: gcli.lookup("toolsSrcdirManual"),
get hidden() gcli.hiddenByChromePref(),
params: [
{
name: "srcdir",
type: "string",
description: gcli.lookup("toolsSrcdirDir")
}
],
returnType: "string",
exec: function(args, context) {
let promise = context.createPromise();
let existsPromise = OS.File.exists(args.srcdir + "/CLOBBER");
existsPromise.then(function(exists) {
if (exists) {
var str = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
str.data = args.srcdir;
Services.prefs.setComplexValue("devtools.loader.srcdir",
Components.interfaces.nsISupportsString, str);
devtools.reload();
promise.resolve(gcli.lookupFormat("toolsSrcdirReloaded", [args.srcdir]));
return;
}
promise.reject(gcli.lookupFormat("toolsSrcdirNotFound", [args.srcdir]));
});
return promise;
}
});
gcli.addCommand({
name: "tools builtin",
description: gcli.lookup("toolsBuiltinDesc"),
manual: gcli.lookup("toolsBuiltinManual"),
get hidden() gcli.hiddenByChromePref(),
returnType: "string",
exec: function(args, context) {
Services.prefs.clearUserPref("devtools.loader.srcdir");
devtools.reload();
return gcli.lookup("toolsBuiltinReloaded");
}
});
gcli.addCommand({
name: "tools reload",
description: gcli.lookup("toolsReloadDesc"),
get hidden() gcli.hiddenByChromePref() || !Services.prefs.prefHasUserValue("devtools.loader.srcdir"),
returnType: "string",
exec: function(args, context) {
devtools.reload();
return gcli.lookup("toolsReloaded");
}
});
}(this));
/* CmdRestart -------------------------------------------------------------- */
(function(module) {
@ -1993,7 +2059,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
function fireChange() {
eventEmitter.emit("changed", tab);
}
var target = TargetFactory.forTab(tab);
var target = devtools.TargetFactory.forTab(tab);
target.off("navigate", fireChange);
target.once("navigate", fireChange);
}

Просмотреть файл

@ -24,7 +24,8 @@ let require = (Cu.import("resource://gre/modules/devtools/Require.jsm", {})).req
Components.utils.import("resource:///modules/devtools/gcli.jsm", {});
let console = (Cu.import("resource://gre/modules/devtools/Console.jsm", {})).console;
let TargetFactory = (Cu.import("resource:///modules/devtools/Target.jsm", {})).TargetFactory;
let devtools = (Cu.import("resource:///modules/devtools/gDevTools.jsm", {})).devtools;
let TargetFactory = devtools.TargetFactory;
let Promise = (Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {})).Promise;
let assert = { ok: ok, is: is, log: info };

Просмотреть файл

@ -10,7 +10,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
this.EXPORTED_SYMBOLS = ["DebuggerPanel"];
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
Cu.import("resource:///modules/devtools/shared/event-emitter.js");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/commonjs/sdk/core/promise.js");

Просмотреть файл

@ -12,14 +12,14 @@ Cu.import("resource://gre/modules/devtools/dbg-server.jsm", tempScope);
Cu.import("resource://gre/modules/devtools/dbg-client.jsm", tempScope);
Cu.import("resource:///modules/source-editor.jsm", tempScope);
Cu.import("resource:///modules/devtools/gDevTools.jsm", tempScope);
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let Services = tempScope.Services;
let SourceEditor = tempScope.SourceEditor;
let DebuggerServer = tempScope.DebuggerServer;
let DebuggerTransport = tempScope.DebuggerTransport;
let DebuggerClient = tempScope.DebuggerClient;
let gDevTools = tempScope.gDevTools;
let TargetFactory = tempScope.TargetFactory;
let devtools = tempScope.devtools;
let TargetFactory = devtools.TargetFactory;
// Import the GCLI test helper
let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));

Просмотреть файл

@ -24,7 +24,8 @@ let require = (Cu.import("resource://gre/modules/devtools/Require.jsm", {})).req
Components.utils.import("resource:///modules/devtools/gcli.jsm", {});
let console = (Cu.import("resource://gre/modules/devtools/Console.jsm", {})).console;
let TargetFactory = (Cu.import("resource:///modules/devtools/Target.jsm", {})).TargetFactory;
let devtools = (Cu.import("resource:///modules/devtools/gDevTools.jsm", {})).devtools;
let TargetFactory = devtools.TargetFactory;
let Promise = (Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {})).Promise;
let assert = { ok: ok, is: is, log: info };

Просмотреть файл

@ -2,8 +2,8 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
let tempScope = {};
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
let {devtools, gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
let TargetFactory = devtools.TargetFactory;
let DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);

Просмотреть файл

@ -13,3 +13,4 @@ include $(topsrcdir)/config/rules.mk
libs::
$(NSINSTALL) $(srcdir)/*.jsm $(FINAL_TARGET)/modules/devtools
$(NSINSTALL) $(srcdir)/*.js $(FINAL_TARGET)/modules/devtools/framework

Просмотреть файл

@ -9,10 +9,10 @@
const Cu = Components.utils;
Cu.import("resource:///modules/devtools/Target.jsm");
Cu.import("resource:///modules/devtools/Toolbox.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/devtools/dbg-client.jsm");
let {devtools, gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
let gClient;
let gConnectionTimeout;
@ -169,8 +169,8 @@ function openToolbox(form, chrome=false) {
client: gClient,
chrome: chrome
};
TargetFactory.forRemoteTab(options).then((target) => {
gDevTools.showToolbox(target, "webconsole", Toolbox.HostType.WINDOW);
devtools.TargetFactory.forRemoteTab(options).then((target) => {
gDevTools.showToolbox(target, "webconsole", devtools.Toolbox.HostType.WINDOW);
window.close();
});
}

Просмотреть файл

@ -4,19 +4,192 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "gDevTools", "DevTools", "gDevToolsBrowser" ];
this.EXPORTED_SYMBOLS = [ "gDevTools", "DevTools", "gDevToolsBrowser", "devtools" ];
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/shared/event-emitter.js");
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
Cu.import("resource:///modules/devtools/ToolDefinitions.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Toolbox",
"resource:///modules/devtools/Toolbox.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
"resource:///modules/devtools/Target.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
let loader = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader;
// Used when the tools should be loaded from the Firefox package itself (the default)
var BuiltinProvider = {
load: function(done) {
this.loader = new loader.Loader({
paths: {
"": "resource://gre/modules/commonjs/",
"main" : "resource:///modules/devtools/main",
"devtools": "resource:///modules/devtools",
"devtools/toolkit": "resource://gre/modules/devtools"
},
globals: {},
});
this.main = loader.main(this.loader, "main");
return Promise.resolve(undefined);
},
unload: function(reason) {
loader.unload(this.loader, reason);
delete this.loader;
},
};
var SrcdirProvider = {
load: function(done) {
let srcdir = Services.prefs.getComplexValue("devtools.loader.srcdir",
Ci.nsISupportsString);
srcdir = OS.Path.normalize(srcdir.data.trim());
let devtoolsDir = OS.Path.join(srcdir, "browser/devtools");
let toolkitDir = OS.Path.join(srcdir, "toolkit/devtools");
this.loader = new loader.Loader({
paths: {
"": "resource://gre/modules/commonjs/",
"devtools/toolkit": "file://" + toolkitDir,
"devtools": "file://" + devtoolsDir,
"main": "file://" + devtoolsDir + "/main.js"
},
globals: {}
});
this.main = loader.main(this.loader, "main");
return this._writeManifest(devtoolsDir).then((data) => {
this._writeManifest(toolkitDir);
}).then(null, Cu.reportError);
},
unload: function(reason) {
loader.unload(this.loader, reason);
delete this.loader;
},
_readFile: function(filename) {
let deferred = Promise.defer();
let file = new FileUtils.File(filename);
NetUtil.asyncFetch(file, (inputStream, status) => {
if (!Components.isSuccessCode(status)) {
deferred.reject(new Error("Couldn't load manifest: " + filename + "\n"));
return;
}
var data = NetUtil.readInputStreamToString(inputStream, inputStream.available());
deferred.resolve(data);
});
return deferred.promise;
},
_writeFile: function(filename, data) {
let deferred = Promise.defer();
let file = new FileUtils.File(filename);
var ostream = FileUtils.openSafeFileOutputStream(file)
var converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
createInstance(Ci.nsIScriptableUnicodeConverter);
converter.charset = "UTF-8";
var istream = converter.convertToInputStream(data);
NetUtil.asyncCopy(istream, ostream, (status) => {
if (!Components.isSuccessCode(status)) {
deferred.reject(new Error("Couldn't write manifest: " + filename + "\n"));
return;
}
deferred.resolve(null);
});
return deferred.promise;
},
_writeManifest: function(dir) {
return this._readFile(dir + "/jar.mn").then((data) => {
// The file data is contained within inputStream.
// You can read it into a string with
let entries = [];
let lines = data.split(/\n/);
let preprocessed = /^\s*\*/;
let contentEntry = new RegExp("^\\s+content/(\\w+)/(\\S+)\\s+\\((\\S+)\\)");
for (let line of lines) {
if (preprocessed.test(line)) {
dump("Unable to override preprocessed file: " + line + "\n");
continue;
}
let match = contentEntry.exec(line);
if (match) {
let entry = "override chrome://" + match[1] + "/content/" + match[2] + "\tfile://" + dir + "/" + match[3];
entries.push(entry);
}
}
return this._writeFile(dir + "/chrome.manifest", entries.join("\n"));
}).then(() => {
Components.manager.addBootstrappedManifestLocation(new FileUtils.File(dir));
});
}
};
this.devtools = {
_provider: null,
get main() this._provider.main,
// This is a gross gross hack. In one place (computed-view.js) we use
// Iterator, but the addon-sdk loader takes Iterator off the global.
// Give computed-view.js a way to get back to the Iterator until we have
// a chance to fix that crap.
_Iterator: Iterator,
setProvider: function(provider) {
if (provider === this._provider) {
return;
}
if (this._provider) {
delete this.require;
this._provider.unload("newprovider");
gDevTools._teardown();
}
this._provider = provider;
this._provider.load();
this.require = loader.Require(this._provider.loader, { id: "devtools" })
let exports = this._provider.main;
// Let clients find exports on this object.
Object.getOwnPropertyNames(exports).forEach(key => {
XPCOMUtils.defineLazyGetter(this, key, () => exports[key]);
});
},
/**
* Choose a default tools provider based on the preferences.
*/
_chooseProvider: function() {
if (Services.prefs.prefHasUserValue("devtools.loader.srcdir")) {
this.setProvider(SrcdirProvider);
} else {
this.setProvider(BuiltinProvider);
}
},
/**
* Reload the current provider.
*/
reload: function() {
var events = devtools.require("sdk/system/events");
events.emit("startupcache-invalidate", {});
this._provider.unload("reload");
delete this._provider;
gDevTools._teardown();
this._chooseProvider();
},
};
const FORBIDDEN_IDS = new Set(["toolbox", ""]);
@ -34,11 +207,6 @@ this.DevTools = function DevTools() {
EventEmitter.decorate(this);
Services.obs.addObserver(this.destroy, "quit-application", false);
// Register the set of default tools
for (let definition of defaultTools) {
this.registerTool(definition);
}
}
DevTools.prototype = {
@ -107,13 +275,13 @@ DevTools.prototype = {
},
getDefaultTools: function DT_getDefaultTools() {
return defaultTools;
return devtools.defaultTools;
},
getAdditionalTools: function DT_getAdditionalTools() {
let tools = [];
for (let [key, value] of this._tools) {
if (defaultTools.indexOf(value) == -1) {
if (devtools.defaultTools.indexOf(value) == -1) {
tools.push(value);
}
}
@ -216,7 +384,7 @@ DevTools.prototype = {
}
else {
// No toolbox for target, create one
toolbox = new Toolbox(target, toolId, hostType);
toolbox = new devtools.Toolbox(target, toolId, hostType);
this._toolboxes.set(target, toolbox);
@ -269,6 +437,15 @@ DevTools.prototype = {
return toolbox.destroy();
},
/**
* Called to tear down a tools provider.
*/
_teardown: function DT_teardown() {
for (let [target, toolbox] of this._toolboxes) {
toolbox.destroy();
}
},
/**
* All browser windows have been closed, tidy up remaining objects.
*/
@ -311,12 +488,20 @@ let gDevToolsBrowser = {
* of there
*/
toggleToolboxCommand: function(gBrowser) {
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
let toolbox = gDevTools.getToolbox(target);
toolbox ? toolbox.destroy() : gDevTools.showToolbox(target);
},
toggleBrowserToolboxCommand: function(gBrowser) {
let target = devtools.TargetFactory.forWindow(gBrowser.ownerDocument.defaultView);
let toolbox = gDevTools.getToolbox(target);
toolbox ? toolbox.destroy()
: gDevTools.showToolbox(target, "inspector", Toolbox.HostType.WINDOW);
},
/**
* This function is for the benefit of Tools:{toolId} commands,
* triggered from the WebDeveloper menu and keyboard shortcuts.
@ -332,11 +517,11 @@ let gDevToolsBrowser = {
* and the host is a window, we raise the toolbox window
*/
selectToolCommand: function(gBrowser, toolId) {
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
let toolbox = gDevTools.getToolbox(target);
if (toolbox && toolbox.currentToolId == toolId) {
if (toolbox.hostType == Toolbox.HostType.WINDOW) {
if (toolbox.hostType == devtools.Toolbox.HostType.WINDOW) {
toolbox.raise();
} else {
toolbox.destroy();
@ -563,8 +748,8 @@ let gDevToolsBrowser = {
for (let win of gDevToolsBrowser._trackedBrowserWindows) {
let hasToolbox = false;
if (TargetFactory.isKnownTab(win.gBrowser.selectedTab)) {
let target = TargetFactory.forTab(win.gBrowser.selectedTab);
if (devtools.TargetFactory.isKnownTab(win.gBrowser.selectedTab)) {
let target = devtools.TargetFactory.forTab(win.gBrowser.selectedTab);
if (gDevTools._toolboxes.has(target)) {
hasToolbox = true;
}
@ -682,3 +867,6 @@ gDevTools.on("toolbox-ready", gDevToolsBrowser._updateMenuCheckbox);
gDevTools.on("toolbox-destroyed", gDevToolsBrowser._updateMenuCheckbox);
Services.obs.addObserver(gDevToolsBrowser.destroy, "quit-application", false);
// Now load the tools.
devtools._chooseProvider();

Просмотреть файл

@ -4,12 +4,8 @@
* 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 { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
this.EXPORTED_SYMBOLS = ["ToolSidebar"];
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
var Promise = require("sdk/core/promise");
var EventEmitter = require("devtools/shared/event-emitter");
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@ -24,7 +20,7 @@ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
* @param {Boolean} showTabstripe
* Show the tabs.
*/
this.ToolSidebar = function ToolSidebar(tabbox, panel, showTabstripe=true)
function ToolSidebar(tabbox, panel, showTabstripe=true)
{
EventEmitter.decorate(this);
@ -41,6 +37,8 @@ this.ToolSidebar = function ToolSidebar(tabbox, panel, showTabstripe=true)
}
}
exports.ToolSidebar = ToolSidebar;
ToolSidebar.prototype = {
/**
* Register a tab. A tab is a document.

Просмотреть файл

@ -4,17 +4,14 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "TargetFactory" ];
const {Cc, Ci, Cu} = require("chrome");
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var Promise = require("sdk/core/promise");
var EventEmitter = require("devtools/shared/event-emitter");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DebuggerServer",
"resource://gre/modules/devtools/dbg-server.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DebuggerClient",
"resource://gre/modules/devtools/dbg-client.jsm");
@ -24,7 +21,7 @@ const promiseTargets = new WeakMap();
/**
* Functions for creating Targets
*/
this.TargetFactory = {
exports.TargetFactory = {
/**
* Construct a Target
* @param {XULTab} tab
@ -95,8 +92,8 @@ this.TargetFactory = {
*/
allTargets: function TF_allTargets() {
let windows = [];
let wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
.getService(Ci.nsIWindowMediator);
let en = wm.getXULWindowEnumerator(null);
while (en.hasMoreElements()) {
windows.push(en.getNext());

Просмотреть файл

@ -7,10 +7,8 @@ const Cu = Components.utils;
const toolId = "test-tool";
let tempScope = {};
Cu.import("resource:///modules/devtools/EventEmitter.jsm", tempScope);
Cu.import("resource:///modules/devtools/shared/event-emitter.js", tempScope);
let EventEmitter = tempScope.EventEmitter;
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
function test() {
addTab("about:blank", function(aBrowser, aTab) {

Просмотреть файл

@ -8,8 +8,6 @@ const Cu = Components.utils;
let toolbox, target;
let tempScope = {};
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
function test() {
addTab("about:blank", function(aBrowser, aTab) {

Просмотреть файл

@ -2,10 +2,6 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
var tempScope = {};
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
var TargetFactory = tempScope.TargetFactory;
var target;
function test()

Просмотреть файл

@ -4,10 +4,6 @@
let toolbox;
let temp = {};
Cu.import("resource:///modules/devtools/Target.jsm", temp);
let TargetFactory = temp.TargetFactory;
function test()
{
waitForExplicitFinish();

Просмотреть файл

@ -6,11 +6,7 @@ let temp = {}
Cu.import("resource:///modules/devtools/gDevTools.jsm", temp);
let DevTools = temp.DevTools;
Cu.import("resource:///modules/devtools/Toolbox.jsm", temp);
let Toolbox = temp.Toolbox;
Cu.import("resource:///modules/devtools/Target.jsm", temp);
let TargetFactory = temp.TargetFactory;
let Toolbox = devtools.Toolbox;
let toolbox, target;

Просмотреть файл

@ -1,9 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
let tempScope = {};
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
let doc = null, toolbox = null, panelWin = null, index = 0, prefValues = [], prefNodes = [];
function test() {

Просмотреть файл

@ -2,10 +2,6 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
let tempScope = {};
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
function test()
{
waitForExplicitFinish();

Просмотреть файл

@ -3,11 +3,7 @@
function test() {
const Cu = Components.utils;
let tempScope = {};
Cu.import("resource:///modules/devtools/gDevTools.jsm", tempScope);
Cu.import("resource:///modules/devtools/Target.jsm", tempScope);
Cu.import("resource:///modules/devtools/Sidebar.jsm", tempScope);
let {TargetFactory: TargetFactory, gDevTools: gDevTools, ToolSidebar: ToolSidebar} = tempScope;
let {ToolSidebar} = devtools.require("devtools/framework/sidebar");
const toolURL = "data:text/xml;charset=utf8,<?xml version='1.0'?>" +
"<?xml-stylesheet href='chrome://browser/skin/devtools/common.css' type='text/css'?>" +

Просмотреть файл

@ -1,10 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
let temp = {};
Cu.import("resource:///modules/devtools/Toolbox.jsm", temp);
let Toolbox = temp.Toolbox;
temp = null;
let Toolbox = devtools.Toolbox;
let toolbox, toolIDs, idIndex;

Просмотреть файл

@ -1,16 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
let Toolbox = devtools.Toolbox;
let temp = {};
Cu.import("resource:///modules/devtools/Toolbox.jsm", temp);
let Toolbox = temp.Toolbox;
temp = {};
Cu.import("resource:///modules/devtools/Target.jsm", temp);
let TargetFactory = temp.TargetFactory;
temp = {};
Cu.import("resource:///modules/devtools/gDevTools.jsm", temp);
let gDevTools = temp.gDevTools;
temp = {};
Cu.import("resource://gre/modules/Services.jsm", temp);
let Services = temp.Services;
temp = null;

Просмотреть файл

@ -2,14 +2,17 @@
* 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/. */
let TargetFactory = gDevTools.TargetFactory;
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
Components.utils.import("resource://gre/modules/devtools/Console.jsm", tempScope);
let console = tempScope.console;
Components.utils.import("resource://gre/modules/commonjs/sdk/core/promise.js", tempScope);
let Promise = tempScope.Promise;
let {devtools} = Components.utils.import("resource:///modules/devtools/gDevTools.jsm", {});
let TargetFactory = devtools.TargetFactory;
/**
* Open a new tab at a URL and call a callback on load
*/

Просмотреть файл

@ -4,13 +4,12 @@
"use strict";
const Cu = Components.utils;
const {Cu} = require("chrome");
let Promise = require("sdk/core/promise");
let EventEmitter = require("devtools/shared/event-emitter");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
this.EXPORTED_SYMBOLS = [ "Hosts" ];
/**
* A toolbox host represents an object that contains a toolbox (e.g. the
@ -21,7 +20,7 @@ this.EXPORTED_SYMBOLS = [ "Hosts" ];
* destroy() - destroy the host's UI
*/
this.Hosts = {
exports.Hosts = {
"bottom": BottomHost,
"side": SidebarHost,
"window": WindowHost

Просмотреть файл

@ -4,16 +4,17 @@
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const {Cc, Ci, Cu} = require("chrome");
let Promise = require("sdk/core/promise");
let EventEmitter = require("devtools/shared/event-emitter");
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource:///modules/devtools/EventEmitter.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Hosts",
"resource:///modules/devtools/ToolboxHosts.jsm");
loader.lazyGetter(this, "Hosts", () => require("devtools/framework/toolbox-hosts").Hosts);
XPCOMUtils.defineLazyModuleGetter(this, "CommandUtils",
"resource:///modules/devtools/DeveloperToolbar.jsm");
@ -34,78 +35,14 @@ XPCOMUtils.defineLazyGetter(this, "toolboxStrings", function() {
});
XPCOMUtils.defineLazyGetter(this, "Requisition", function() {
Cu.import("resource://gre/modules/devtools/Require.jsm");
Cu.import("resource:///modules/devtools/gcli.jsm");
let scope = {};
Cu.import("resource://gre/modules/devtools/Require.jsm", scope);
Cu.import("resource:///modules/devtools/gcli.jsm", scope);
return require('gcli/cli').Requisition;
let req = scope.require;
return req('gcli/cli').Requisition;
});
this.EXPORTED_SYMBOLS = [ "Toolbox" ];
// This isn't the best place for this, but I don't know what is right now
/**
* Implementation of 'promised', while we wait for bug 790195 to be fixed.
* @see Consuming promises in https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/api-utils/promise.html
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=790195
* @see https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/promise.js#L179
*/
Promise.promised = (function() {
// Note: Define shortcuts and utility functions here in order to avoid
// slower property accesses and unnecessary closure creations on each
// call of this popular function.
var call = Function.call;
var concat = Array.prototype.concat;
// Utility function that does following:
// execute([ f, self, args...]) => f.apply(self, args)
function execute(args) { return call.apply(call, args); }
// Utility function that takes promise of `a` array and maybe promise `b`
// as arguments and returns promise for `a.concat(b)`.
function promisedConcat(promises, unknown) {
return promises.then(function(values) {
return Promise.resolve(unknown).then(function(value) {
return values.concat([ value ]);
});
});
}
return function promised(f, prototype) {
/**
Returns a wrapped `f`, which when called returns a promise that resolves to
`f(...)` passing all the given arguments to it, which by the way may be
promises. Optionally second `prototype` argument may be provided to be used
a prototype for a returned promise.
## Example
var promise = promised(Array)(1, promise(2), promise(3))
promise.then(console.log) // => [ 1, 2, 3 ]
**/
return function promised() {
// create array of [ f, this, args... ]
return concat.apply([ f, this ], arguments).
// reduce it via `promisedConcat` to get promised array of fulfillments
reduce(promisedConcat, Promise.resolve([], prototype)).
// finally map that to promise of `f.apply(this, args...)`
then(execute);
};
};
})();
/**
* Convert an array of promises to a single promise, which is resolved (with an
* array containing resolved values) only when all the component promises are
* resolved.
*/
Promise.all = Promise.promised(Array);
/**
* A "Toolbox" is the component that holds all the tools for one specific
* target. Visually, it's a document that includes the tools tabs and all
@ -118,7 +55,7 @@ Promise.all = Promise.promised(Array);
* @param {Toolbox.HostType} hostType
* Type of host that will host the toolbox (e.g. sidebar, window)
*/
this.Toolbox = function Toolbox(target, selectedTool, hostType) {
function Toolbox(target, selectedTool, hostType) {
this._target = target;
this._toolPanels = new Map();
@ -152,6 +89,7 @@ this.Toolbox = function Toolbox(target, selectedTool, hostType) {
gDevTools.on("tool-registered", this._toolRegistered);
gDevTools.on("tool-unregistered", this._toolUnregistered);
}
exports.Toolbox = Toolbox;
/**
* The toolbox can be 'hosted' either embedded in a browser window

Просмотреть файл

@ -10,8 +10,8 @@ Cu.import('resource://gre/modules/XPCOMUtils.jsm');
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
"resource:///modules/devtools/gDevTools.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
"resource:///modules/devtools/Target.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "devtools",
"resource:///modules/devtools/gDevTools.jsm");
/**
* 'inspect' command
@ -30,7 +30,7 @@ gcli.addCommand({
],
exec: function Command_inspect(args, context) {
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let target = TargetFactory.forTab(gBrowser.selectedTab);
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.showToolbox(target, "inspector").then(function(toolbox) {
toolbox.getCurrentPanel().selection.setNode(args.selector, "gcli");

Просмотреть файл

@ -13,3 +13,4 @@ include $(topsrcdir)/config/rules.mk
libs::
$(NSINSTALL) $(srcdir)/*.jsm $(FINAL_TARGET)/modules/devtools/
$(NSINSTALL) $(srcdir)/*.js $(FINAL_TARGET)/modules/devtools/inspector

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше