Merge mozilla-central to mozilla-inbound

This commit is contained in:
Ed Morley 2012-01-10 23:56:12 +00:00
commit 0b5b50b67c
62 changed files with 384 additions and 42 deletions

View File

@ -1049,7 +1049,7 @@ pref("devtools.styleeditor.enabled", true);
pref("devtools.chrome.enabled", false);
// Disable the GCLI enhanced command line.
pref("devtools.gcli.enable", false);
pref("devtools.gcli.enable", true);
// The last Web Console height. This is initially 0 which means that the Web
// Console will use the default height next time it shows.

View File

@ -84,6 +84,18 @@ gcli.addCommand({
});
/**
* 'console close' command
*/
gcli.addCommand({
name: "console close",
description: gcli.lookup("consolecloseDesc"),
exec: function(args, context) {
let tab = HUDService.getHudReferenceById(context.environment.hudId).tab;
HUDService.deactivateHUDForContext(tab);
}
});
/**
* 'inspect' command
*/

View File

@ -3661,7 +3661,7 @@ HeadsUpDisplay.prototype = {
consoleFilterToolbar.setAttribute("id", "viewGroup");
this.consoleFilterToolbar = consoleFilterToolbar;
this.hintNode = this.makeXULNode("div");
this.hintNode = this.makeXULNode("vbox");
this.hintNode.setAttribute("class", "gcliterm-hint-node");
let hintParentNode = this.makeXULNode("vbox");
@ -6835,7 +6835,7 @@ GcliTerm.prototype = {
this.inputStack.setAttribute("class", "gcliterm-stack-node");
this.element.appendChild(this.inputStack);
this.completeNode = this.document.createElement("div");
this.completeNode = this.document.createElementNS(HTML_NS, "div");
this.completeNode.setAttribute("class", "gcliterm-complete-node");
this.completeNode.setAttribute("aria-live", "polite");
this.inputStack.appendChild(this.completeNode);
@ -6867,16 +6867,16 @@ GcliTerm.prototype = {
if (aEvent.output.command.returnType == "html" && typeof output == "string") {
output = this.document.createRange().createContextualFragment(
'<div xmlns="' + HTML_NS + '" xmlns:xul="' + XUL_NS + '">' +
output + '</div>').firstChild;
output + '</div>');
}
// See https://github.com/mozilla/domtemplate/blob/master/README.md
// for docs on the template() function
let element = this.document.createRange().createContextualFragment(
'<richlistitem xmlns="' + XUL_NS + '" clipboardText="${clipboardText}"' +
' timestamp="${timestamp}" id="${id}" class="hud-msg-node">' +
' <label class="webconsole-timestamp" value="${timestampString}"/>' +
' <vbox class="webconsole-msg-icon-container" style="${iconContainerStyle}">' +
'<richlistitem xmlns="' + XUL_NS + '" _clipboardText="${clipboardText}"' +
' _timestamp="${timestamp}" _id="${id}" class="hud-msg-node">' +
' <label class="webconsole-timestamp" _value="${timestampString}"/>' +
' <vbox class="webconsole-msg-icon-container" _style="${iconContainerStyle}">' +
' <image class="webconsole-msg-icon"/>' +
' <spacer flex="1"/>' +
' </vbox>' +

View File

@ -3029,6 +3029,12 @@ JavascriptType.prototype.parse = function(arg) {
return new Conversion(typed, arg, Status.ERROR, beginning.err);
}
// If the current state is ParseState.COMPLEX, then we can't do completion.
// so bail out now
if (beginning.state === ParseState.COMPLEX) {
return new Conversion(typed, arg);
}
// If the current state is not ParseState.NORMAL, then we are inside of a
// string which means that no completion is possible.
if (beginning.state !== ParseState.NORMAL) {
@ -3068,7 +3074,7 @@ JavascriptType.prototype.parse = function(arg) {
// It would be nice to be able to report this error in some way but
// as it can happen just when someone types '{sessionStorage.', it
// almost doesn't really count as an error, so we ignore it
return new Conversion(typed, arg, Status.INCOMPLETE, '');
return new Conversion(typed, arg, Status.VALID, '');
}
}
}
@ -3246,8 +3252,26 @@ function isVendorPrefixed(name) {
* Constants used in return value of _findCompletionBeginning()
*/
var ParseState = {
/**
* We have simple input like window.foo, without any punctuation that makes
* completion prediction be confusing or wrong
*/
NORMAL: 0,
/**
* The cursor is in some Javascript that makes completion hard to predict,
* like console.log(
*/
COMPLEX: 1,
/**
* The cursor is inside single quotes (')
*/
QUOTE: 2,
/**
* The cursor is inside single quotes (")
*/
DQUOTE: 3
};
@ -3259,6 +3283,12 @@ var OPEN_CLOSE_BODY = {
'(': ')'
};
/**
* How we distinguish between simple and complex JS input. We attempt
* completion against simple JS.
*/
var simpleChars = /[a-zA-Z0-9.]/;
/**
* Analyzes a given string to find the last statement that is interesting for
* later completion.
@ -3277,8 +3307,13 @@ JavascriptType.prototype._findCompletionBeginning = function(text) {
var state = ParseState.NORMAL;
var start = 0;
var c;
var complex = false;
for (var i = 0; i < text.length; i++) {
c = text[i];
if (!simpleChars.test(c)) {
complex = true;
}
switch (state) {
// Normal JS state.
@ -3344,6 +3379,10 @@ JavascriptType.prototype._findCompletionBeginning = function(text) {
}
}
if (state === ParseState.NORMAL && complex) {
state = ParseState.COMPLEX;
}
return {
state: state,
startPos: start
@ -4338,7 +4377,6 @@ Requisition.prototype.toCanonicalString = function() {
}, this);
// Canonically, if we've opened with a { then we should have a } to close
var command = this.commandAssignment.getValue();
if (cmd === '{') {
if (this.getAssignment(0).getArg().suffix.indexOf('}') === -1) {
line.push(' }');
@ -5291,9 +5329,6 @@ define("text!gcli/commands/help_intro.html", [], "\n" +
"<h2>${l10n.introHeader}</h2>\n" +
"\n" +
"<p>\n" +
" <a target=\"_blank\" href=\"https://developer.mozilla.org/AppLinks/WebConsoleHelp?locale=${lang}\">\n" +
" ${l10n.introBody}\n" +
" </a>\n" +
"</p>\n" +
"");
@ -5374,7 +5409,7 @@ function Console(options) {
this.focusManager.addMonitoredElement(this.gcliTerm.hintNode, 'gcliTerm');
this.inputter = new Inputter({
document: options.contentDocument,
document: options.chromeDocument,
requisition: options.requisition,
inputElement: options.inputElement,
completeElement: options.completeElement,
@ -5384,14 +5419,14 @@ function Console(options) {
});
this.menu = new CommandMenu({
document: options.contentDocument,
document: options.chromeDocument,
requisition: options.requisition,
menuClass: 'gcliterm-menu'
});
this.hintElement.appendChild(this.menu.element);
this.argFetcher = new ArgFetcher({
document: options.contentDocument,
document: options.chromeDocument,
requisition: options.requisition,
argFetcherClass: 'gcliterm-argfetcher'
});
@ -5469,6 +5504,57 @@ Console.prototype.resizer = function() {
this.hintElement.style.borderBottomColor = 'white';
}
}
// We also try to make the max-width of any GCLI elements so they don't
// extend outside the scroll area.
var doc = this.hintElement.ownerDocument;
var outputNode = this.hintElement.parentNode.parentNode.children[1];
var outputs = outputNode.getElementsByClassName('gcliterm-msg-body');
var listItems = outputNode.getElementsByClassName('hud-msg-node');
// This is an top-side estimate. We could try to calculate it, maybe using
// something along these lines http://www.alexandre-gomes.com/?p=115 However
// experience has shown this to be hard to get to work reliably
// Also we don't need to be precise. If we use a number that is too big then
// the only down-side is too great a right margin
var scrollbarWidth = 20;
if (listItems.length > 0) {
var parentWidth = outputNode.getBoundingClientRect().width - scrollbarWidth;
var otherWidth;
var body;
for (var i = 0; i < listItems.length; ++i) {
var listItem = listItems[i];
// a.k.a 'var otherWidth = 132'
otherWidth = 0;
body = null;
for (var j = 0; j < listItem.children.length; j++) {
var child = listItem.children[j];
if (child.classList.contains('gcliterm-msg-body')) {
body = child.children[0];
}
else {
otherWidth += child.getBoundingClientRect().width;
}
var styles = doc.defaultView.getComputedStyle(child, null);
otherWidth += parseInt(styles.borderLeftWidth, 10) +
parseInt(styles.borderRightWidth, 10) +
parseInt(styles.paddingLeft, 10) +
parseInt(styles.paddingRight, 10) +
parseInt(styles.marginLeft, 10) +
parseInt(styles.marginRight, 10);
}
if (body) {
body.style.width = (parentWidth - otherWidth) + 'px';
}
}
}
};
exports.Console = Console;
@ -6039,7 +6125,7 @@ Completer.prototype.update = function(input) {
// <span class="gcli-in-closebrace" if="${unclosedJs}">}<span>
var document = this.element.ownerDocument;
var prompt = document.createElement('span');
var prompt = dom.createElement(document, 'span');
prompt.classList.add('gcli-prompt');
prompt.appendChild(document.createTextNode(this.completionPrompt + ' '));
this.element.appendChild(prompt);
@ -6071,7 +6157,7 @@ Completer.prototype.update = function(input) {
this.element.appendChild(document.createTextNode(prefix));
}
var suffix = document.createElement('span');
var suffix = dom.createElement(document, 'span');
suffix.classList.add('gcli-in-ontab');
suffix.appendChild(document.createTextNode(contents));
this.element.appendChild(suffix);
@ -6083,9 +6169,9 @@ Completer.prototype.update = function(input) {
var unclosedJs = command && command.name === '{' &&
this.requisition.getAssignment(0).getArg().suffix.indexOf('}') === -1;
if (unclosedJs) {
var close = document.createElement('span');
var close = dom.createElement(document, 'span');
close.classList.add('gcli-in-closebrace');
close.appendChild(document.createTextNode('}'));
close.appendChild(document.createTextNode(' }'));
this.element.appendChild(close);
}
};
@ -6111,7 +6197,7 @@ Completer.prototype.appendMarkupStatus = function(element, scores, input) {
console.error('No state at i=' + i + '. scores.len=' + scores.length);
state = Status.VALID;
}
span = document.createElement('span');
span = dom.createElement(document, 'span');
span.classList.add('gcli-in-' + state.toString().toLowerCase());
lastStatus = scores[i];
}

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testInputFocus, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testClosingAfterCompletion,
false);

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testGroups, false);
}

View File

@ -43,7 +43,12 @@
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-duplicate-error.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
expectUncaughtException();
addTab(TEST_DUPLICATE_ERROR_URI);
browser.addEventListener("DOMContentLoaded", testDuplicateErrors, false);

View File

@ -39,7 +39,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testCompletion, false);
}

View File

@ -38,7 +38,12 @@
const TEST_URI = "data:text/html,<p>bug 585991 - autocomplete popup keyboard usage test";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -38,7 +38,12 @@
const TEST_URI = "data:text/html,<p>bug 585991 - autocomplete popup test";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -10,7 +10,12 @@
const TEST_URI = "http://example.com/";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded",
testSelectionWhenMovingBetweenBoxes, false);

View File

@ -10,7 +10,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -11,8 +11,12 @@
const TEST_URI = "data:text/html,Web Console test for bug 588342";
let fm, notificationBox, input;
function test()
{
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
addTab(TEST_URI);
browser.addEventListener("load", tabLoad, true);

View File

@ -38,7 +38,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testInputExpansion, false);
}

View File

@ -13,7 +13,12 @@
// Tests that, when the user types an extraneous closing bracket, no error
// appears.
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,test for bug 592442");
browser.addEventListener("load", testExtraneousClosingBrackets, true);
}

View File

@ -154,7 +154,12 @@ function propertyPanelHidden(aEvent) {
});
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoad1, true);
}

View File

@ -155,7 +155,12 @@ function performTests() {
executeSoon(finishTest);
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 594497 and bug 619598");
browser.addEventListener("load", tabLoad, true);
}

View File

@ -172,6 +172,7 @@ function testNext() {
}
function testEnd() {
Services.prefs.clearUserPref("devtools.gcli.enable");
Services.console.unregisterListener(TestObserver);
output.removeEventListener("DOMNodeInserted", onDOMNodeInserted, false);
output = jsterm = null;
@ -191,6 +192,7 @@ function onDOMNodeInserted(aEvent) {
}
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
registerCleanupFunction(testEnd);
addTab("data:text/html,Web Console test for bug 595934 - message categories coverage.");

View File

@ -225,7 +225,12 @@ function testEnd() {
executeSoon(finishTest);
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoad, true);
}

View File

@ -57,7 +57,12 @@ function tabLoad(aEvent) {
});
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 601352");
browser.addEventListener("load", tabLoad, true);
}

View File

@ -32,12 +32,17 @@ function onContentLoaded()
finishTest();
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
/**
* Unit test for bug 611795:
* Repeated CSS messages get collapsed into one.
*/
function test()
{
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);

View File

@ -8,7 +8,12 @@
const TEST_URI = "data:text/html,Web Console test for bug 613280";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -36,7 +36,12 @@ function tabLoad(aEvent) {
finishTest();
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 614793: jsterm result scroll");
browser.addEventListener("load", tabLoad, true);
}

View File

@ -38,7 +38,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);

View File

@ -41,7 +41,12 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//t
let pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 618311 (private browsing)");
browser.addEventListener("load", function() {

View File

@ -42,7 +42,12 @@ function tabLoad(aEvent) {
}, content);
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoad, true);
}

View File

@ -2,7 +2,12 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
let itemsSet, HUD;
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 626484");
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -3,7 +3,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-632275-getters.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -38,7 +38,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-bug-632347-iterators-generators.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -76,7 +76,12 @@ function tabLoad(aEvent) {
EventUtils.synthesizeKey("u", {});
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoad, true);
}

View File

@ -12,7 +12,12 @@ const TEST_URI = "http://example.com/browser/browser/devtools/" +
var gOldPref, gHudId;
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 644419: Console should " +
"have user-settable log limits for each message category");
browser.addEventListener("load", onLoad, true);

View File

@ -8,7 +8,12 @@
Cu.import("resource:///modules/PropertyPanel.jsm");
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console autocompletion bug in document.body");
browser.addEventListener("load", onLoad, true);
}

View File

@ -133,8 +133,13 @@ function finishUp() {
finish();
}
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test()
{
Services.prefs.setBoolPref("devtools.gcli.enable", false);
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function() {

View File

@ -6,7 +6,12 @@
// Tests that the Console API implements the time() and timeEnd() methods.
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("http://example.com/browser/browser/devtools/webconsole/" +
"test/test-bug-658368-time-methods.html");
openConsole();

View File

@ -4,7 +4,12 @@
const TEST_URI = "data:text/html,<p>bug 660806 - history navigation must not show the autocomplete popup";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", tabLoaded, true);
}

View File

@ -7,7 +7,12 @@
// Tests that console.group/groupEnd works as intended.
const GROUP_INDENT = 12;
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab("data:text/html,Web Console test for bug 664131: Expand console " +
"object with group methods");
browser.addEventListener("load", onLoad, true);

View File

@ -40,7 +40,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testCompletion, false);
}

View File

@ -42,7 +42,12 @@
const TEST_URI = "chrome://browser/content/browser.xul";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testChrome, false);
}

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testCompletion, false);
}

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", onLoad, false);
}

View File

@ -11,8 +11,13 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-own-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test()
{
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);

View File

@ -12,8 +12,13 @@
const TEST_URI = "data:text/html,Web Console test for bug 586142";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test()
{
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", onLoad, false);
}

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testExecutionScope, false);
}

View File

@ -46,7 +46,12 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//t
const HISTORY_BACK = -1;
const HISTORY_FORWARD = 1;
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testHistory, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testHUDGetters, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testJSInputAndOutputStyling,
false);

View File

@ -42,7 +42,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testJSInputExpansion, false);
}

View File

@ -43,7 +43,12 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//t
let jsterm;
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testJSTerm, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testNullAndUndefinedOutput,
false);

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testOutputOrder, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testPropertyPanel, false);
}

View File

@ -43,7 +43,12 @@
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//test-console.html";
registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.gcli.enable");
});
function test() {
Services.prefs.setBoolPref("devtools.gcli.enable", false);
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", testPropertyProvider, false);
}

View File

@ -113,7 +113,7 @@ helpSearchDesc=Search string
# LOCALIZATION NOTE (helpSearchManual): A fuller description of the 'search'
# parameter to the 'help' command. Displayed when the user asks for help on
# what it does.
helpSearchManual=A search string to use in narrowing down the list of commands that are displayed to the user. Any part of the string can match, regular expressions are not supported.
helpSearchManual=A search string to use in narrowing down the list of commands that are displayed to the user. Any part of the command name can match, regular expressions are not supported.
# LOCALIZATION NOTE (helpManSynopsis): A heading shown at the top of a help
# page for a command in the console It labels a summary of the parameters to

View File

@ -55,3 +55,8 @@ inspectNodeDesc=CSS selector
# parameter to the 'inspect' command, displayed when the user asks for help
# on what it does.
inspectNodeManual=A CSS selector for use with Document.querySelector which identifies a single element
# LOCALIZATION NOTE (consolecloseDesc) A very short description of the
# 'console close' command. This string is designed to be shown in a menu
# alongside the command name, which is why it should be as short as possible.
consolecloseDesc=Close the console

View File

@ -67,11 +67,7 @@
color: GrayText;
margin-top: 0;
margin-bottom: 0;
}
.hud-msg-node {
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 12px "DejaVu Sans Mono", monospace;
}
.webconsole-msg-icon {
@ -91,6 +87,9 @@
-moz-margin-start: 3px;
-moz-margin-end: 6px;
white-space: pre-wrap;
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 12px "DejaVu Sans Mono", monospace;
}
.webconsole-msg-body-piece {
@ -133,7 +132,6 @@
color: inherit;
}
.hud-output-node,
.jsterm-input-node,
.jsterm-complete-node {
font: 12px "DejaVu Sans Mono", monospace;

View File

@ -70,11 +70,7 @@
color: GrayText;
margin-top: 0;
margin-bottom: 0;
}
.hud-msg-node {
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 11px Menlo, Monaco, monospace;
}
.webconsole-msg-icon {
@ -94,6 +90,9 @@
-moz-margin-start: 3px;
-moz-margin-end: 6px;
white-space: pre-wrap;
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 11px Menlo, Monaco, monospace;
}
.webconsole-msg-body-piece {
@ -136,7 +135,6 @@
color: inherit;
}
.hud-output-node,
.jsterm-input-node,
.jsterm-complete-node {
font: 11px Menlo, Monaco, monospace;

View File

@ -66,11 +66,7 @@
color: GrayText;
margin-top: 0;
margin-bottom: 0;
}
.hud-msg-node {
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 12px Consolas, Lucida Console, monospace;
}
.webconsole-msg-icon {
@ -90,6 +86,9 @@
-moz-margin-start: 3px;
-moz-margin-end: 6px;
white-space: pre-wrap;
list-style-image: url(chrome://browser/skin/devtools/webconsole.png);
-moz-image-region: rect(0, 1px, 0, 0);
font: 12px Consolas, Lucida Console, monospace;
}
.webconsole-msg-body-piece {
@ -132,7 +131,6 @@
color: inherit;
}
.hud-output-node,
.jsterm-input-node,
.jsterm-complete-node {
font: 12px Consolas, Lucida Console, monospace;

View File

@ -48,6 +48,7 @@ include $(topsrcdir)/config/config.mk
SUBMAKEFILES += \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
$(DEPTH)/mobile/locales/Makefile \
$(NULL)
PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/mobile-l10n.js) \

View File

@ -44,6 +44,7 @@ mobile/android/app/Makefile
mobile/android/app/profile/extensions/Makefile
mobile/android/base/Makefile
mobile/android/base/locales/Makefile
mobile/locales/Makefile
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
mobile/android/chrome/Makefile

View File

@ -56,6 +56,7 @@ endif
SUBMAKEFILES += \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
$(DEPTH)/mobile/locales/Makefile \
$(NULL)
MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox-mobile.mozilla.org

View File

@ -47,6 +47,7 @@ mobile/xul/components/build/Makefile
mobile/xul/modules/Makefile
mobile/xul/installer/Makefile
mobile/xul/locales/Makefile
mobile/locales/Makefile
mobile/xul/Makefile
mobile/xul/themes/core/Makefile
"