Merge last green mozilla-central changeset to mozilla-inbound

This commit is contained in:
Daniel Holbert 2011-07-28 14:53:21 -07:00
Родитель 0d04f93519 4185f0f17e
Коммит 1bfbc2bfd3
258 изменённых файлов: 977 добавлений и 779 удалений

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

@ -45,6 +45,7 @@ include $(topsrcdir)/config/config.mk
PARALLEL_DIRS = \
base \
components \
devtools \
fuel \
locales \
themes \

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

@ -528,6 +528,7 @@ Highlighter.prototype = {
*/
var InspectorUI = {
browser: null,
tools: {},
showTextNodesWithWhitespace: false,
inspecting: false,
treeLoaded: false,
@ -859,6 +860,13 @@ var InspectorUI = {
delete this.domplateUtils;
}
this.saveToolState(this.winID);
this.toolsDo(function IUI_toolsHide(aTool) {
if (aTool.panel) {
aTool.panel.hidePopup();
}
});
this.inspectCmd.setAttribute("checked", false);
this.browser = this.win = null; // null out references to browser and window
this.winID = null;
@ -880,6 +888,7 @@ var InspectorUI = {
*/
startInspecting: function IUI_startInspecting()
{
document.getElementById("inspector-inspect-toolbutton").checked = true;
this.attachPageListeners();
this.inspecting = true;
this.highlighter.veilTransparentBox.removeAttribute("locked");
@ -895,6 +904,7 @@ var InspectorUI = {
return;
}
document.getElementById("inspector-inspect-toolbutton").checked = false;
this.detachPageListeners();
this.inspecting = false;
if (this.highlighter.node) {
@ -926,6 +936,11 @@ var InspectorUI = {
}
this.ioBox.select(this.selection, true, true, aScroll);
}
this.toolsDo(function IUI_toolsOnSelect(aTool) {
if (aTool.panel.state == "open") {
aTool.onSelect.apply(aTool.context, [aNode]);
}
});
},
/////////////////////////////////////////////////////////////////////////
@ -974,6 +989,7 @@ var InspectorUI = {
}, INSPECTOR_NOTIFICATIONS.CLOSED, false);
} else {
this.openInspectorUI();
this.restoreToolState(winID);
}
}
@ -1222,7 +1238,113 @@ var InspectorUI = {
}
this._log("END TRACE");
},
}
/**
* Register an external tool with the inspector.
*
* aRegObj = {
* id: "toolname",
* context: myTool,
* label: "Button label",
* icon: "chrome://somepath.png",
* tooltiptext: "Button tooltip",
* accesskey: "S",
* onSelect: object.method,
* onShow: object.method,
* onHide: object.method,
* panel: myTool.panel
* }
*
* @param aRegObj
*/
registerTool: function IUI_RegisterTool(aRegObj) {
if (this.tools[aRegObj.id]) {
return;
} else {
let id = aRegObj.id;
let buttonId = "inspector-" + id + "-toolbutton";
aRegObj.buttonId = buttonId;
aRegObj.panel.addEventListener("popuphiding",
function IUI_toolPanelHiding() {
btn.setAttribute("checked", "false");
}, false);
aRegObj.panel.addEventListener("popupshowing",
function IUI_toolPanelShowing() {
btn.setAttribute("checked", "true");
}, false);
this.tools[id] = aRegObj;
}
let toolbar = document.getElementById("inspector-toolbar");
let btn = document.createElement("toolbarbutton");
btn.setAttribute("id", aRegObj.buttonId);
btn.setAttribute("label", aRegObj.label);
btn.setAttribute("tooltiptext", aRegObj.tooltiptext);
btn.setAttribute("accesskey", aRegObj.accesskey);
btn.setAttribute("class", "toolbarbutton-text");
btn.setAttribute("image", aRegObj.icon || "");
toolbar.appendChild(btn);
btn.addEventListener("click",
function IUI_ToolButtonClick(aEvent) {
if (btn.getAttribute("checked") == "true") {
aRegObj.onHide.apply(aRegObj.context);
} else {
aRegObj.onShow.apply(aRegObj.context, [InspectorUI.selection]);
aRegObj.onSelect.apply(aRegObj.context, [InspectorUI.selection]);
}
}, false);
},
/**
* Save a list of open tools to the inspector store.
*
* @param aWinID The ID of the window used to save the associated tools
*/
saveToolState: function IUI_saveToolState(aWinID)
{
let openTools = {};
this.toolsDo(function IUI_toolsSetId(aTool) {
if (aTool.panel.state == "open") {
openTools[aTool.id] = true;
}
});
InspectorStore.setValue(aWinID, "openTools", openTools);
},
/**
* Restore tools previously save using saveToolState().
*
* @param aWinID The ID of the window to which the associated tools are to be
* restored.
*/
restoreToolState: function IUI_restoreToolState(aWinID)
{
let openTools = InspectorStore.getValue(aWinID, "openTools");
InspectorUI.selection = InspectorUI.selection;
if (openTools) {
this.toolsDo(function IUI_toolsOnShow(aTool) {
if (aTool.id in openTools) {
aTool.onShow.apply(aTool.context, [InspectorUI.selection]);
}
});
}
},
/**
* Loop through all registered tools and pass each into the provided function
*
* @param aFunction The function to which each tool is to be passed
*/
toolsDo: function IUI_toolsDo(aFunction)
{
for each (let tool in this.tools) {
aFunction(tool);
}
},
};
/**
* The Inspector store is used for storing data specific to each tab window.
@ -1357,4 +1479,3 @@ var InspectorStore = {
XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
return document.getElementById("Tools:Inspect");
});

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

@ -3060,7 +3060,7 @@
data._maxWidth = draggedTab.style.maxWidth;
draggedTab.style.maxWidth = "";
}
delete draggedTab._dropIndex;
delete data._dropIndex;
let label = dragPanel.firstChild;
let preview = dragPanel.lastChild;
label.value = draggedTab.label;
@ -3887,7 +3887,6 @@
return;
this._tabDropIndicator.collapsed = true;
this._continueScroll(event);
event.stopPropagation();
]]></handler>
</handlers>

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

@ -526,12 +526,15 @@ let Utils = {
// Pass as many arguments as you want, it'll print them all.
trace: function Utils_trace() {
var text = this.expandArgumentsForLog(arguments);
// cut off the first two lines of the stack trace, because they're just this function.
let stack = Error().stack.replace(/^.*?\n.*?\n/, "");
// cut off the first line of the stack trace, because that's just this function.
let stack = Error().stack.split("\n").slice(1);
// if the caller was assert, cut out the line for the assert function as well.
if (this.trace.caller.name == 'Utils_assert')
stack = stack.replace(/^.*?\n/, "");
this.log('trace: ' + text + '\n' + stack);
if (stack[0].indexOf("Utils_assert(") == 0)
stack.splice(0, 1);
this.log('trace: ' + text + '\n' + stack.join("\n"));
},
// ----------
@ -560,10 +563,10 @@ let Utils = {
else
text = "tabview assert: " + label;
// cut off the first two lines of the stack trace, because they're just this function.
text += Error().stack.replace(/^.*?\n.*?\n/, "");
// cut off the first line of the stack trace, because that's just this function.
let stack = Error().stack.split("\n").slice(1);
throw text;
throw text + "\n" + stack.join("\n");
}
},

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

@ -1003,6 +1003,9 @@ let UI = {
[
#ifdef XP_UNIX
"redo",
#endif
#ifdef XP_MACOSX
"fullScreen",
#endif
"closeWindow", "tabview", "undoCloseTab", "undoCloseWindow",
"privatebrowsing"

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

@ -54,6 +54,7 @@ _BROWSER_FILES = \
browser_inspector_treePanel_output.js \
browser_inspector_treePanel_input.html \
browser_inspector_treePanel_result.html \
browser_inspector_registertools.js \
browser_inspector_bug_665880.js \
$(NULL)

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

@ -0,0 +1,275 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Inspector Highlighter Tests.
*
* The Initial Developer of the Original Code is
* The Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Michael Ratcliffe <mratcliffe@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
let doc;
let h1;
let tool1;
let tool2;
let tool3;
function createDocument()
{
let div = doc.createElement("div");
let h1 = doc.createElement("h1");
let p1 = doc.createElement("p");
let p2 = doc.createElement("p");
let div2 = doc.createElement("div");
let p3 = doc.createElement("p");
doc.title = "Inspector Tree Selection Test";
h1.textContent = "Inspector Tree Selection Test";
p1.textContent = "This is some example text";
p2.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
p3.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
div.appendChild(h1);
div.appendChild(p1);
div.appendChild(p2);
div2.appendChild(p3);
doc.body.appendChild(div);
doc.body.appendChild(div2);
setupHighlighterTests();
}
function setupHighlighterTests()
{
h1 = doc.querySelectorAll("h1")[0];
ok(h1, "we have the header node");
Services.obs.addObserver(inspectorOpen, "inspector-opened", false);
InspectorUI.toggleInspectorUI();
}
function inspectorOpen()
{
info("we received the inspector-opened notification");
Services.obs.removeObserver(inspectorOpen, "inspector-opened", false);
Services.obs.addObserver(startToolTests, "inspector-highlighting", false);
let rect = h1.getBoundingClientRect();
executeSoon(function() {
EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content);
});
}
function startToolTests(evt)
{
info("we received the inspector-highlighting notification");
Services.obs.removeObserver(startToolTests, "inspector-highlighting", false);
InspectorUI.stopInspecting();
info("Getting InspectorUI.tools");
let tools = InspectorUI.tools;
tool1 = InspectorUI.tools["tool_1"];
tool2 = InspectorUI.tools["tool_2"];
tool3 = InspectorUI.tools["tool_3"];
info("Checking panel states 1");
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
info("Calling show method for all tools");
tool1.onShow.apply(tool1.context, [h1]);
tool2.onShow.apply(tool2.context, [h1]);
tool3.onShow.apply(tool3.context, [h1]);
info("Checking panel states 2");
ok(tool1.context.panelIsOpen, "Panel 1 is open");
ok(tool2.context.panelIsOpen, "Panel 2 is open");
ok(tool3.context.panelIsOpen, "Panel 3 is open");
info("Calling selectNode method for all tools");
tool1.onSelect.apply(tool1.context, [h1]);
tool2.onSelect.apply(tool2.context, [h1]);
tool3.onSelect.apply(tool3.context, [h1]);
info("Calling hide method for all tools");
tool1.onHide.apply(tool1.context, [h1]);
tool2.onHide.apply(tool2.context, [h1]);
tool3.onHide.apply(tool3.context, [h1]);
info("Checking panel states 3");
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
info("Showing tools 1 & 3");
tool1.onShow.apply(tool1.context, [h1]);
tool3.onShow.apply(tool3.context, [h1]);
info("Checking panel states 4");
ok(tool1.context.panelIsOpen, "Panel 1 is open");
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
ok(tool3.context.panelIsOpen, "Panel 3 is open");
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function() {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
waitForFocus(testSecondTab, content);
}, true);
content.location = "data:text/html,registertool new tab test for inspector";
}
function testSecondTab()
{
info("Opened second tab");
info("Checking panel states 5");
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
info("Closing current tab");
gBrowser.removeCurrentTab();
info("Checking panel states 6");
ok(tool1.context.panelIsOpen, "Panel 1 is open");
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
ok(tool3.context.panelIsOpen, "Panel 3 is open");
executeSoon(finishUp);
}
function finishUp() {
InspectorUI.closeInspectorUI(true);
gBrowser.removeCurrentTab();
finish();
}
function test()
{
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function() {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
doc = content.document;
waitForFocus(registerTools, content);
}, true);
content.location = "data:text/html,registertool tests for inspector";
}
function registerTools()
{
createDocument();
registerTool(new testTool("tool_1", "Tool 1", "Tool 1 tooltip", "I"));
registerTool(new testTool("tool_2", "Tool 2", "Tool 2 tooltip", "J"));
registerTool(new testTool("tool_3", "Tool 3", "Tool 3 tooltip", "K"));
}
function registerTool(aTool)
{
InspectorUI.registerTool({
id: aTool.id,
label: aTool.label,
tooltiptext: aTool.tooltip,
accesskey: aTool.accesskey,
context: aTool,
onSelect: aTool.selectNode,
onShow: aTool.show,
onHide: aTool.hide,
panel: aTool.panel
});
}
// Tool Object
function testTool(aToolId, aLabel, aTooltip, aAccesskey)
{
this.id = aToolId;
this.label = aLabel;
this.tooltip = aTooltip;
this.accesskey = aAccesskey
this.panel = this.createPanel();
}
testTool.prototype = {
get panelIsOpen()
{
return this.panel.state == "open" || this.panel.state == "showing";
},
get panelIsClosed()
{
return this.panel.state == "closed" || this.panel.state == "hiding";
},
selectNode: function BIR_selectNode(aNode) {
is(InspectorUI.selection, aNode,
"selectNode: currently selected node was passed: " + this.id);
},
show: function BIR_show(aNode) {
this.panel.openPopup(gBrowser.selectedBrowser,
"end_before", 0, 20, false, false);
is(InspectorUI.selection, aNode,
"show: currently selected node was passed: " + this.id);
},
hide: function BIR_hide() {
info(this.id + " hide");
this.panel.hidePopup();
},
createPanel: function BIR_createPanel() {
let popupSet = document.getElementById("mainPopupSet");
let ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
let panel = this.panel = document.createElementNS(ns, "panel");
panel.setAttribute("orient", "vertical");
panel.setAttribute("noautofocus", "true");
panel.setAttribute("noautohide", "true");
panel.setAttribute("titlebar", "normal");
panel.setAttribute("close", "true");
panel.setAttribute("label", "Panel for " + this.id);
panel.setAttribute("width", 200);
panel.setAttribute("height", 400);
popupSet.appendChild(panel);
ok(panel.parentNode == popupSet, "Panel created and appended successfully");
return panel;
},
};

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

@ -25,7 +25,7 @@ function onTabViewWindowLoaded() {
// create a group item
let groupItem = createGroupItemWithBlankTabs(window, 300, 300, 400, 1);
groupItemId = groupItem.id;
let groupItemId = groupItem.id;
is(groupItem.getChildren().length, 1, "The new group has a tab item");
// start the tests
waitForFocus(function() {

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

@ -93,5 +93,3 @@ browser.jar:
# the following files are browser-specific overrides
* content/browser/license.html (/toolkit/content/license.html)
% override chrome://global/content/license.html chrome://browser/content/license.html
# XXXkhuey This really should live in browser/, but it's too late in the release cycle to move
+ content/browser/NetworkPanel.xhtml (/toolkit/components/console/hudservice/NetworkPanel.xhtml)

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

@ -47,8 +47,6 @@ endif
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
tier_app_dirs += toolkit/components/console/hudservice
ifdef MOZ_SERVICES_SYNC
tier_app_dirs += services
endif

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

@ -250,7 +250,7 @@ SessionStartup.prototype = {
/* ........ Public API ................*/
/**
* Get the session state as a string
* Get the session state as a jsval
*/
get state() {
return this._initialState;

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

@ -116,7 +116,7 @@ const CAPABILITIES = [
// These keys are for internal use only - they shouldn't be part of the JSON
// that gets saved to disk nor part of the strings returned by the API.
const INTERNAL_KEYS = ["_tabStillLoading", "_hosts", "_formDataSaved",
"_shouldRestore"];
"_shouldRestore", "_host", "_scheme"];
// These are tab events that we listen to.
const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
@ -1770,7 +1770,15 @@ SessionStoreService.prototype = {
_serializeHistoryEntry:
function sss_serializeHistoryEntry(aEntry, aFullData, aIsPinned) {
var entry = { url: aEntry.URI.spec };
try {
entry._host = aEntry.URI.host;
entry._scheme = aEntry.URI.scheme;
}
catch (ex) {
// We just won't attempt to get cookies for this entry.
}
if (aEntry.title && aEntry.title != entry.url) {
entry.title = aEntry.title;
}
@ -2178,21 +2186,20 @@ SessionStoreService.prototype = {
*/
_extractHostsForCookies:
function sss__extractHostsForCookies(aEntry, aHosts, aCheckPrivacy, aIsPinned) {
let match;
if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
if (!aHosts[match[1]] &&
(!aCheckPrivacy ||
this._checkPrivacyLevel(this._getURIFromString(aEntry.url).schemeIs("https"),
aIsPinned))) {
// By setting this to true or false, we can determine when looking at
// the host in _updateCookies if we should check for privacy.
aHosts[match[1]] = aIsPinned;
}
// _host and _scheme may not be set (for about: urls for example), in which
// case testing _scheme will be sufficient.
if (/https?/.test(aEntry._scheme) && !aHosts[aEntry._host] &&
(!aCheckPrivacy ||
this._checkPrivacyLevel(aEntry._scheme == "https", aIsPinned))) {
// By setting this to true or false, we can determine when looking at
// the host in _updateCookies if we should check for privacy.
aHosts[aEntry._host] = aIsPinned;
}
else if ((match = /^file:\/\/([^\/]*)/.exec(aEntry.url)) != null) {
aHosts[match[1]] = true;
else if (aEntry._scheme == "file") {
aHosts[aEntry._host] = true;
}
if (aEntry.children) {
aEntry.children.forEach(function(entry) {
this._extractHostsForCookies(entry, aHosts, aCheckPrivacy, aIsPinned);

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

@ -12,14 +12,15 @@
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Rob Campbell <rcampbell@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -35,4 +36,21 @@
#
# ***** END LICENSE BLOCK *****
include $(CORE_DEPTH)/coreconf/Linux.mk
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
DIRS = \
webconsole \
$(NULL)
ifdef ENABLE_TESTS
# DIRS += test # no tests yet
endif
include $(topsrcdir)/config/rules.mk

2
browser/devtools/jar.mn Normal file
Просмотреть файл

@ -0,0 +1,2 @@
browser.jar:
content/browser/NetworkPanel.xhtml (webconsole/NetworkPanel.xhtml)

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

@ -1730,7 +1730,7 @@ HUD_SERVICE.prototype =
hud.consoleWindowUnregisterOnHide = false;
// Remove the HUDBox and the consolePanel if the Web Console is inside a
// floating xul:panel.
// floating panel.
hud.HUDBox.parentNode.removeChild(hud.HUDBox);
if (hud.consolePanel) {
hud.consolePanel.parentNode.removeChild(hud.consolePanel);
@ -2505,20 +2505,20 @@ HUD_SERVICE.prototype =
let outputNode = this.hudReferences[hudId].outputNode;
let chromeDocument = outputNode.ownerDocument;
let msgNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
let msgNode = chromeDocument.createElementNS(XUL_NS, "hbox");
let methodNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
let methodNode = chromeDocument.createElementNS(XUL_NS, "label");
methodNode.setAttribute("value", aActivityObject.method);
methodNode.classList.add("webconsole-msg-body-piece");
msgNode.appendChild(methodNode);
let linkNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
let linkNode = chromeDocument.createElementNS(XUL_NS, "hbox");
linkNode.setAttribute("flex", "1");
linkNode.classList.add("webconsole-msg-body-piece");
linkNode.classList.add("webconsole-msg-link");
msgNode.appendChild(linkNode);
let urlNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
let urlNode = chromeDocument.createElementNS(XUL_NS, "label");
urlNode.setAttribute("crop", "center");
urlNode.setAttribute("flex", "1");
urlNode.setAttribute("title", aActivityObject.url);
@ -2528,7 +2528,7 @@ HUD_SERVICE.prototype =
urlNode.classList.add("webconsole-msg-url");
linkNode.appendChild(urlNode);
let statusNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
let statusNode = chromeDocument.createElementNS(XUL_NS, "label");
statusNode.setAttribute("value", "");
statusNode.classList.add("hud-clickable");
statusNode.classList.add("webconsole-msg-body-piece");
@ -3040,7 +3040,7 @@ HeadsUpDisplay.prototype = {
*/
get tab()
{
// TODO: we should only keep a reference to the xul:tab object and use
// TODO: we should only keep a reference to the tab object and use
// getters to determine the rest of objects we need - the chrome window,
// document, etc. We should simplify the entire code to use only a single
// tab object ref. See bug 656231.
@ -3136,12 +3136,15 @@ HeadsUpDisplay.prototype = {
panel.addEventListener("popupshown", onPopupShown,false);
let onPopupHiding = (function HUD_onPopupHiding(aEvent) {
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
if (aEvent.target != panel) {
return;
}
panel.removeEventListener("popuphiding", onPopupHiding, false);
panel.removeEventListener("popuphidden", onPopupHidden, false);
if (panel.parentNode) {
panel.parentNode.removeChild(panel);
}
let width = 0;
try {
@ -3149,12 +3152,15 @@ HeadsUpDisplay.prototype = {
}
catch (ex) { }
if (width > -1) {
if (width > 0) {
Services.prefs.setIntPref("devtools.webconsole.width", panel.clientWidth);
}
Services.prefs.setIntPref("devtools.webconsole.top", panel.popupBoxObject.y);
Services.prefs.setIntPref("devtools.webconsole.left", panel.popupBoxObject.x);
/*
* Removed because of bug 674562
* Services.prefs.setIntPref("devtools.webconsole.top", panel.panelBox.y);
* Services.prefs.setIntPref("devtools.webconsole.left", panel.panelBox.x);
*/
// Make sure we are not going to close again, drop the hudId reference of
// the panel.
@ -3170,19 +3176,6 @@ HeadsUpDisplay.prototype = {
this.consolePanel = null;
}).bind(this);
panel.addEventListener("popuphiding", onPopupHiding, false);
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
if (aEvent.target != panel) {
return;
}
panel.removeEventListener("popuphidden", onPopupHidden, false);
if (panel.parentNode) {
panel.parentNode.removeChild(panel);
}
}).bind(this);
panel.addEventListener("popuphidden", onPopupHidden, false);
let lastIndex = -1;
@ -3249,10 +3242,14 @@ HeadsUpDisplay.prototype = {
positionConsole: function HUD_positionConsole(aPosition)
{
if (!(aPosition in this.positions)) {
throw new Error("Incorrect argument: " + aPosition + ". Cannot position Web Console");
throw new Error("Incorrect argument: " + aPosition +
". Cannot position Web Console");
}
if (aPosition == "window") {
let closeButton = this.consoleFilterToolbar.
querySelector(".webconsole-close-button");
closeButton.setAttribute("hidden", "true");
this.createOwnWindowPanel();
this.positionMenuitems.window.setAttribute("checked", true);
if (this.positionMenuitems.last) {
@ -3308,6 +3305,10 @@ HeadsUpDisplay.prototype = {
this.outputNode.ensureIndexIsVisible(lastIndex);
}
let closeButton = this.consoleFilterToolbar.
getElementsByClassName("webconsole-close-button")[0];
closeButton.removeAttribute("hidden");
this.uiInOwnWindow = false;
if (this.consolePanel) {
this.HUDBox.removeAttribute("flex");
@ -3584,7 +3585,7 @@ HeadsUpDisplay.prototype = {
* Creates the UI for re-positioning the console
*
* @return nsIDOMNode
* The xul:toolbarbutton which holds the menu that allows the user to
* The toolbarbutton which holds the menu that allows the user to
* change the console position.
*/
createPositionUI: function HUD_createPositionUI()
@ -5396,22 +5397,22 @@ ConsoleUtils = {
// Make the icon container, which is a vertical box. Its purpose is to
// ensure that the icon stays anchored at the top of the message even for
// long multi-line messages.
let iconContainer = aDocument.createElementNS(XUL_NS, "xul:vbox");
let iconContainer = aDocument.createElementNS(XUL_NS, "vbox");
iconContainer.classList.add("webconsole-msg-icon-container");
// Make the icon node. It's sprited and the actual region of the image is
// determined by CSS rules.
let iconNode = aDocument.createElementNS(XUL_NS, "xul:image");
let iconNode = aDocument.createElementNS(XUL_NS, "image");
iconNode.classList.add("webconsole-msg-icon");
iconContainer.appendChild(iconNode);
// Make the spacer that positions the icon.
let spacer = aDocument.createElementNS(XUL_NS, "xul:spacer");
let spacer = aDocument.createElementNS(XUL_NS, "spacer");
spacer.setAttribute("flex", "1");
iconContainer.appendChild(spacer);
// Create the message body, which contains the actual text of the message.
let bodyNode = aDocument.createElementNS(XUL_NS, "xul:description");
let bodyNode = aDocument.createElementNS(XUL_NS, "description");
bodyNode.setAttribute("flex", "1");
bodyNode.classList.add("webconsole-msg-body");
@ -5425,15 +5426,15 @@ ConsoleUtils = {
bodyNode.appendChild(aBody);
let repeatContainer = aDocument.createElementNS(XUL_NS, "xul:hbox");
let repeatContainer = aDocument.createElementNS(XUL_NS, "hbox");
repeatContainer.setAttribute("align", "start");
let repeatNode = aDocument.createElementNS(XUL_NS, "xul:label");
let repeatNode = aDocument.createElementNS(XUL_NS, "label");
repeatNode.setAttribute("value", "1");
repeatNode.classList.add("webconsole-msg-repeat");
repeatContainer.appendChild(repeatNode);
// Create the timestamp.
let timestampNode = aDocument.createElementNS(XUL_NS, "xul:label");
let timestampNode = aDocument.createElementNS(XUL_NS, "label");
timestampNode.classList.add("webconsole-timestamp");
let timestamp = ConsoleUtils.timestamp();
let timestampString = ConsoleUtils.timestampString(timestamp);
@ -5448,7 +5449,7 @@ ConsoleUtils = {
}
// Create the containing node and append all its elements to it.
let node = aDocument.createElementNS(XUL_NS, "xul:richlistitem");
let node = aDocument.createElementNS(XUL_NS, "richlistitem");
node.clipboardText = aClipboardText;
node.classList.add("hud-msg-node");
@ -5523,7 +5524,7 @@ ConsoleUtils = {
createLocationNode:
function ConsoleUtils_createLocationNode(aDocument, aSourceURL,
aSourceLine) {
let locationNode = aDocument.createElementNS(XUL_NS, "xul:label");
let locationNode = aDocument.createElementNS(XUL_NS, "label");
// Create the text, which consists of an abbreviated version of the URL
// plus an optional line number.
@ -5662,7 +5663,7 @@ ConsoleUtils = {
function ConsoleUtils_filterRepeatedConsole(aNode, aOutput) {
let lastMessage = aOutput.lastChild;
// childNodes[2] is the xul:description element
// childNodes[2] is the description element
if (lastMessage &&
aNode.childNodes[2].textContent ==
lastMessage.childNodes[2].textContent) {

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

@ -21,6 +21,7 @@
#
# Contributor(s):
# David Dahl <ddahl@mozilla.com>
# Rob Campbell <rcampbell@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -36,14 +37,15 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../..
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_JS_MODULES = HUDService.jsm \
EXTRA_JS_MODULES = \
HUDService.jsm \
PropertyPanel.jsm \
NetworkHelper.jsm \
AutocompletePopup.jsm \
@ -51,7 +53,7 @@ EXTRA_JS_MODULES = HUDService.jsm \
ifdef ENABLE_TESTS
ifneq (mobile,$(MOZ_BUILD_APP))
DIRS += tests
DIRS += test
endif
endif

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

@ -36,15 +36,13 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../../..
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = test_hudservice
DIRS = browser
include $(topsrcdir)/config/rules.mk

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

@ -21,6 +21,7 @@
# David Dahl <ddahl@mozilla.com>
# Patrick Walton <pcwalton@mozilla.com>
# Mihai Șucan <mihai.sucan@gmail.com>
# Rob Campbell <rcampbell@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -36,11 +37,11 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../../../..
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = toolkit/components/console/hudservice/tests/browser
relativesrcdir = browser/devtools/webconsole/test/browser
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

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

@ -37,7 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_REPLACED_API_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console-replaced-api.html";
const TEST_REPLACED_API_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console-replaced-api.html";
function test() {
waitForExplicitFinish();

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

@ -41,7 +41,7 @@
// Tests that the page's resources are displayed in the console as they're
// loaded
const TEST_NETWORK_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network.html" + "?_date=" + Date.now();
const TEST_NETWORK_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network.html" + "?_date=" + Date.now();
function test() {
addTab("data:text/html,Web Console basic network logging test");

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

@ -39,7 +39,7 @@
* ***** END LICENSE BLOCK ***** */
// Tests that the console object still exists after a page reload.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that the input field is focused when the console is opened.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -41,7 +41,7 @@
// Tests to ensure that errors don't appear when the console is closed while a
// completion is being performed.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that errors still show up in the Web Console after a page reload.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-error.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-error.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that console groups behave properly.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -12,7 +12,7 @@
Cu.import("resource:///modules/HUDService.jsm");
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -10,7 +10,7 @@
// Tests that the Web Console close button functions.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -41,7 +41,7 @@
// Tests that exceptions thrown by content don't show up twice in the Web
// Console.
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-duplicate-error.html";
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-duplicate-error.html";
function test() {
addTab(TEST_DUPLICATE_ERROR_URI);

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let HUD, inputNode;

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

@ -12,7 +12,7 @@
// Tests that the Web Console limits the number of lines displayed according to
// the user's preferences.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-585956-console-trace.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-585956-console-trace.html";
function test() {
addTab(TEST_URI);

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that adding text to one of the output labels doesn't cause errors.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-593003-iframe-wrong-hud.html";
const TEST_IFRAME_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud-iframe.html";
const TEST_IFRAME_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-593003-iframe-wrong-hud-iframe.html";
const TEST_DUMMY_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_DUMMY_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let tab1, tab2;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let HUD;
let outputItem;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TESTS_PATH = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/";
const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/test//browser/";
const TESTS = [
{ // #0
file: "test-bug-595934-css-loader.html",

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let tab1, tab2, win1, win2;
let noErrors = true;

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

@ -8,8 +8,8 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/" +
"hudservice/tests/browser/test-bug-597136-external-script-" +
const TEST_URI = "http://example.com/browser/browser/devtools/" +
"webconsole/test/browser/test-bug-597136-external-script-" +
"errors.html";
function test() {

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network.html";
function tabLoad(aEvent) {
browser.removeEventListener(aEvent.type, arguments.callee, true);

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-597756-reopen-closed-tab.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-597756-reopen-closed-tab.html";
let newTabIsOpen = false;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let testEnded = false;
let pos = -1;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-599725-response-headers.sjs";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-599725-response-headers.sjs";
let lastFinishedRequest = null;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-600183-charset.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-600183-charset.html";
let lastFinishedRequest = null;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-601177-log-levels.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-601177-log-levels.html";
let msgs;

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-603750-websocket.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-603750-websocket.html";
const pref_ws = "network.websocket.enabled";
const pref_block = "network.websocket.override-security-block";

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

@ -8,7 +8,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-613013-console-api-iframe.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-613013-console-api-iframe.html";
let TestObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),

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

@ -26,7 +26,7 @@
// Tests that network log messages bring up the network panel.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-618078-network-exceptions.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-618078-network-exceptions.html";
let testEnded = false;

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);

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

@ -7,7 +7,7 @@
* Mihai Sucan <mihai.sucan@gmail.com>
*/
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-621644-jsterm-dollar.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-621644-jsterm-dollar.html";
function tabLoad(aEvent) {
browser.removeEventListener(aEvent.type, arguments.callee, true);

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

@ -7,7 +7,7 @@
* Mihai Sucan <mihai.sucan@gmail.com>
*/
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-630733-response-redirect-headers.sjs";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-630733-response-redirect-headers.sjs";
let lastFinishedRequests = {};

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

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-632275-getters.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-632275-getters.html";
function test() {
addTab(TEST_URI);

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-632347-iterators-generators.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-632347-iterators-generators.html";
function test() {
addTab(TEST_URI);

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

@ -4,9 +4,9 @@
// Tests that network log messages bring up the network panel.
const TEST_NETWORK_REQUEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network-request.html";
const TEST_NETWORK_REQUEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network-request.html";
const TEST_IMG = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-image.png";
const TEST_IMG = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-image.png";
const TEST_DATA_JSON_CONTENT =
'{ id: "test JSON data", myArray: [ "foo", "bar", "baz", "biff" ] }';

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

@ -7,8 +7,8 @@
// Tests that the Web Console limits the number of lines displayed according to
// the limit set for each category.
const TEST_URI = "http://example.com/browser/toolkit/components/console/" +
"hudservice/tests/browser/test-bug-644419-log-limits.html";
const TEST_URI = "http://example.com/browser/browser/devtools/" +
"webconsole/test/browser/test-bug-644419-log-limits.html";
var gOldPref, gHudId;

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

@ -42,8 +42,8 @@
// Tests that console logging methods display the method location along with
// the output in the console.
const TEST_URI = "http://example.com/browser/toolkit/components/console/" +
"hudservice/tests/browser/" +
const TEST_URI = "http://example.com/browser/browser/devtools/" +
"webconsole/test/browser/" +
"test-bug-646025-console-file-location.html";
function test() {

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

@ -5,18 +5,21 @@
const TEST_URI = "data:text/html,<p>test for bug 663443. test1";
const POSITION_PREF = "devtools.webconsole.position";
const POSITION_ABOVE = "above"; // default
const POSITION_WINDOW = "window";
function tabLoad(aEvent) {
browser.removeEventListener(aEvent.type, arguments.callee, true);
Services.prefs.setCharPref(POSITION_PREF, "window");
Services.prefs.setCharPref(POSITION_PREF, POSITION_WINDOW);
openConsole();
document.addEventListener("popupshown", function() {
document.removeEventListener("popupshown", arguments.callee, false);
document.addEventListener("popupshown", function popupShown() {
document.removeEventListener("popupshown", popupShown, false);
let hudId = HUDService.getHudIdByWindow(content);
ok(hudId, "Web Console is open");
let HUD = HUDService.hudReferences[hudId];
@ -30,9 +33,11 @@ function tabLoad(aEvent) {
isnot(HUD.consolePanel.label.indexOf("test2"), -1,
"panel title is correct after page navigation");
Services.prefs.clearUserPref(POSITION_PREF);
HUD.positionConsole(POSITION_ABOVE);
executeSoon(finish);
closeConsole();
executeSoon(finishTest);
}, true);
content.location = "data:text/html,<p>test2 for bug 663443";

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

@ -40,7 +40,7 @@
// Tests that code completion works properly.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -37,7 +37,7 @@
// Tests that the basic console.log()-style APIs and filtering work.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console-extras.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console-extras.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that the basic console.log()-style APIs and filtering work.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -9,7 +9,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-own-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-own-console.html";
function test()
{

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

@ -40,7 +40,7 @@
// Tests that commands run by the user are executed in content space.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests the console history feature accessed via the up and down arrow keys.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
// Constants used for defining the direction of JSTerm input history navigation.
const HISTORY_BACK = -1;

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

@ -41,7 +41,7 @@
// Tests that the HUD can be accessed via the HUD references in the HUD
// service.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -41,7 +41,7 @@
// Tests that the correct CSS styles are applied to the lines of console
// output.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -40,7 +40,7 @@
// Tests that the input box expands as the user types long lines.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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

@ -39,7 +39,7 @@
*
* ***** END LICENSE BLOCK ***** */
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
let jsterm;

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

@ -40,7 +40,7 @@
// Tests that the message type filter checkboxes work.
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
function test() {
addTab(TEST_URI);

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