mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge m-c to fx-team
This commit is contained in:
commit
f451b249b7
@ -9,7 +9,6 @@
|
||||
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/webconsole.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
|
@ -42,33 +42,41 @@ function testCallLogExec() {
|
||||
outputMatch: /No call logging/,
|
||||
});
|
||||
|
||||
let hud = null;
|
||||
function onWebConsoleOpen(aSubject) {
|
||||
Services.obs.removeObserver(onWebConsoleOpen, "web-console-created");
|
||||
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
hud = imported.HUDService.getHudReferenceById(aSubject.data);
|
||||
ok(hud.hudId in imported.HUDService.hudReferences, "console open");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "calllog stop",
|
||||
args: { },
|
||||
outputMatch: /Stopped call logging/,
|
||||
});
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console clear",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
let labels = hud.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
is(labels.length, 0, "no output in console");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console close",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
}
|
||||
|
||||
Services.obs.addObserver(onWebConsoleOpen, "web-console-created", false);
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "calllog start",
|
||||
args: { },
|
||||
outputMatch: /Call logging started/,
|
||||
});
|
||||
|
||||
let hud = imported.HUDService.getHudByWindow(content);
|
||||
ok(hud.hudId in imported.HUDService.hudReferences, "console open");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "calllog stop",
|
||||
args: { },
|
||||
outputMatch: /Stopped call logging/,
|
||||
});
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console clear",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
let labels = hud.jsterm.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
is(labels.length, 0, "no output in console");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console close",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
}
|
||||
|
@ -29,38 +29,47 @@ function testEcho() {
|
||||
}
|
||||
|
||||
function testConsole(tab) {
|
||||
let hud = null;
|
||||
function onWebConsoleOpen(aSubject) {
|
||||
Services.obs.removeObserver(onWebConsoleOpen, "web-console-created");
|
||||
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
hud = imported.HUDService.getHudReferenceById(aSubject.data);
|
||||
ok(hud.hudId in imported.HUDService.hudReferences, "console open");
|
||||
|
||||
hud.jsterm.execute("pprint(window)", onExecute);
|
||||
}
|
||||
|
||||
Services.obs.addObserver(onWebConsoleOpen, "web-console-created", false);
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console open",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
let hud = imported.HUDService.getHudByWindow(content);
|
||||
ok(hud.hudId in imported.HUDService.hudReferences, "console open");
|
||||
function onExecute() {
|
||||
let labels = hud.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
ok(labels.length > 0, "output for pprint(window)");
|
||||
|
||||
hud.jsterm.execute("pprint(window)");
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console clear",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
/*
|
||||
// The web console is async and we can't force it with hud._flushMessageQueue
|
||||
// So we are skipping the test for output until we have an event to wait on
|
||||
let labels = hud.jsterm.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
ok(labels.length > 0, "output for pprint(window)");
|
||||
*/
|
||||
let labels = hud.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
is(labels.length, 0, "no output in console");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console clear",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console close",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
let labels = hud.jsterm.outputNode.querySelectorAll(".webconsole-msg-output");
|
||||
is(labels.length, 0, "no output in console");
|
||||
ok(!(hud.hudId in imported.HUDService.hudReferences), "console closed");
|
||||
|
||||
DeveloperToolbarTest.exec({
|
||||
typed: "console close",
|
||||
args: {},
|
||||
blankOutput: true,
|
||||
});
|
||||
|
||||
ok(!(hud.hudId in imported.HUDService.hudReferences), "console closed");
|
||||
imported = undefined;
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ browser.jar:
|
||||
content/browser/inspector.html (highlighter/inspector.html)
|
||||
content/browser/NetworkPanel.xhtml (webconsole/NetworkPanel.xhtml)
|
||||
content/browser/devtools/HUDService-content.js (webconsole/HUDService-content.js)
|
||||
content/browser/devtools/webconsole.js (webconsole/webconsole.js)
|
||||
* content/browser/devtools/webconsole.xul (webconsole/webconsole.xul)
|
||||
* content/browser/scratchpad.xul (scratchpad/scratchpad.xul)
|
||||
content/browser/scratchpad.js (scratchpad/scratchpad.js)
|
||||
content/browser/splitview.css (shared/splitview.css)
|
||||
|
@ -155,9 +155,9 @@ function test() {
|
||||
}
|
||||
|
||||
function doClearConsoleButton(hud) {
|
||||
let clearButton = hud.HUDBox
|
||||
let clearButton = hud.ui.rootElement
|
||||
.querySelector(".webconsole-clear-console-button");
|
||||
EventUtils.synthesizeMouse(clearButton, 2, 2, {}, window);
|
||||
EventUtils.synthesizeMouse(clearButton, 2, 2, {}, hud.iframeWindow);
|
||||
|
||||
is(hud.outputNode.textContent.indexOf("foobarBug762996click"), -1,
|
||||
"clear console button worked");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ VPATH = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
HUDService.jsm \
|
||||
PropertyPanel.jsm \
|
||||
NetworkHelper.jsm \
|
||||
NetworkPanel.jsm \
|
||||
@ -18,10 +19,6 @@ EXTRA_JS_MODULES = \
|
||||
WebConsoleUtils.jsm \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_JS_MODULES = \
|
||||
HUDService.jsm \
|
||||
$(NULL)
|
||||
|
||||
TEST_DIRS = test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -642,6 +642,28 @@ var WebConsoleUtils = {
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine if the given request mixes HTTP with HTTPS content.
|
||||
*
|
||||
* @param string aRequest
|
||||
* Location of the requested content.
|
||||
* @param string aLocation
|
||||
* Location of the current page.
|
||||
* @return boolean
|
||||
* True if the content is mixed, false if not.
|
||||
*/
|
||||
isMixedHTTPSRequest: function WCU_isMixedHTTPSRequest(aRequest, aLocation)
|
||||
{
|
||||
try {
|
||||
let requestURI = Services.io.newURI(aRequest, null, null);
|
||||
let contentURI = Services.io.newURI(aLocation, null, null);
|
||||
return (contentURI.scheme == "https" && requestURI.scheme != "https");
|
||||
}
|
||||
catch (ex) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -15,11 +15,11 @@ function test() {
|
||||
function testInputFocus() {
|
||||
browser.removeEventListener("DOMContentLoaded", testInputFocus, false);
|
||||
|
||||
openConsole();
|
||||
openConsole(null, function(hud) {
|
||||
let inputNode = hud.jsterm.inputNode;
|
||||
ok(inputNode.getAttribute("focused"), "input node is focused");
|
||||
|
||||
let inputNode = HUDService.getHudByWindow(content).jsterm.inputNode;
|
||||
ok(inputNode.getAttribute("focused"), "input node is focused");
|
||||
|
||||
finishTest();
|
||||
finishTest();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,17 +10,14 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testClosingAfterCompletion,
|
||||
false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testClosingAfterCompletion);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testClosingAfterCompletion() {
|
||||
browser.removeEventListener("DOMContentLoaded",
|
||||
testClosingAfterCompletion, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let inputNode = HUDService.getHudByWindow(content).jsterm.inputNode;
|
||||
function testClosingAfterCompletion(hud) {
|
||||
let inputNode = hud.jsterm.inputNode;
|
||||
|
||||
let errorWhileClosing = false;
|
||||
function errorListener(evt) {
|
||||
@ -33,7 +30,7 @@ function testClosingAfterCompletion() {
|
||||
inputNode.focus();
|
||||
EventUtils.synthesizeKey("k", { accelKey: true, shiftKey: true });
|
||||
|
||||
// We can't test for errors right away, because the error occures after a
|
||||
// We can't test for errors right away, because the error occurs after a
|
||||
// setTimeout(..., 0) in the WebConsole code.
|
||||
executeSoon(function() {
|
||||
browser.removeEventListener("error", errorListener, false);
|
||||
|
@ -14,33 +14,24 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testCloseButton, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testCloseButton);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testCloseButton() {
|
||||
browser.removeEventListener("DOMContentLoaded", testCloseButton, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
function testCloseButton(hud) {
|
||||
let hudId = hud.hudId;
|
||||
|
||||
HUDService.disableAnimation(hudId);
|
||||
executeSoon(function() {
|
||||
let closeButton = hud.HUDBox.querySelector(".webconsole-close-button");
|
||||
waitForFocus(function() {
|
||||
let closeButton = hud.ui.closeButton;
|
||||
ok(closeButton != null, "we have the close button");
|
||||
|
||||
// XXX: ASSERTION: ###!!! ASSERTION: XPConnect is being called on a scope without a 'Components' property!: 'Error', file /home/ddahl/code/moz/mozilla-central/mozilla-central/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 795
|
||||
EventUtils.synthesizeMouse(closeButton, 2, 2, {}, hud.iframeWindow);
|
||||
|
||||
closeButton.addEventListener("command", function() {
|
||||
closeButton.removeEventListener("command", arguments.callee, false);
|
||||
ok(!(hudId in HUDService.hudReferences), "the console is closed when " +
|
||||
"the close button is pressed");
|
||||
|
||||
ok(!(hudId in HUDService.hudReferences), "the console is closed when " +
|
||||
"the close button is pressed");
|
||||
closeButton = null;
|
||||
finishTest();
|
||||
}, false);
|
||||
|
||||
EventUtils.synthesizeMouse(closeButton, 2, 2, {});
|
||||
});
|
||||
finishTest();
|
||||
}, hud.iframeWindow);
|
||||
}
|
||||
|
@ -7,15 +7,14 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/br
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testCompletion, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testCompletion);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testCompletion() {
|
||||
browser.removeEventListener("DOMContentLoaded", testCompletion, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
var jsterm = HUDService.getHudByWindow(content).jsterm;
|
||||
function testCompletion(hud) {
|
||||
var jsterm = hud.jsterm;
|
||||
var input = jsterm.inputNode;
|
||||
|
||||
jsterm.setInputValue("");
|
||||
|
@ -7,21 +7,19 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>bug 585991 - autocomplete popu
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", tabLoaded, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function tabLoaded() {
|
||||
browser.removeEventListener("load", tabLoaded, true);
|
||||
openConsole();
|
||||
|
||||
function consoleOpened(HUD) {
|
||||
let items = [
|
||||
{label: "item0", value: "value0"},
|
||||
{label: "item1", value: "value1"},
|
||||
{label: "item2", value: "value2"},
|
||||
];
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
let HUD = HUDService.hudReferences[hudId];
|
||||
let popup = HUD.jsterm.autocompletePopup;
|
||||
|
||||
ok(!popup.isOpen, "popup is not open");
|
||||
|
@ -47,7 +47,7 @@ function performTestsAfterOutput(hud) {
|
||||
|
||||
// Test that the global Firefox "Select All" functionality (e.g. Edit >
|
||||
// Select All) works properly in the Web Console.
|
||||
let commandController = window.webConsoleCommandController;
|
||||
let commandController = hud.ui._commandController;
|
||||
ok(commandController != null, "the window has a command controller object");
|
||||
|
||||
commandController.selectAll(outputNode);
|
||||
@ -60,17 +60,16 @@ function performTestsAfterOutput(hud) {
|
||||
// Test the context menu "Select All" (which has a different code path) works
|
||||
// properly as well.
|
||||
let contextMenuId = outputNode.getAttribute("context");
|
||||
let contextMenu = document.getElementById(contextMenuId);
|
||||
let contextMenu = hud.ui.document.getElementById(contextMenuId);
|
||||
ok(contextMenu != null, "the output node has a context menu");
|
||||
|
||||
let selectAllItem = contextMenu.querySelector("*[buttonType=\"selectAll\"]");
|
||||
let selectAllItem = contextMenu.querySelector("*[command='cmd_selectAll']");
|
||||
ok(selectAllItem != null,
|
||||
"the context menu on the output node has a \"Select All\" item");
|
||||
|
||||
let commandEvent = document.createEvent("XULCommandEvent");
|
||||
commandEvent.initCommandEvent("command", true, true, window, 0, false, false,
|
||||
false, false, null);
|
||||
selectAllItem.dispatchEvent(commandEvent);
|
||||
outputNode.focus();
|
||||
|
||||
selectAllItem.doCommand();
|
||||
|
||||
is(outputNode.selectedCount, outputNode.childNodes.length, "all console " +
|
||||
"messages are selected after performing a select-all operation from " +
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-console.html";
|
||||
|
||||
let HUD, outputNode;
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
@ -18,7 +20,9 @@ function test() {
|
||||
}, true);
|
||||
}
|
||||
|
||||
function consoleOpened(HUD) {
|
||||
function consoleOpened(aHud) {
|
||||
HUD = aHud;
|
||||
|
||||
// See bugs 574036, 586386 and 587617.
|
||||
outputNode = HUD.outputNode;
|
||||
let selection = getSelection();
|
||||
@ -61,18 +65,17 @@ function consoleOpened(HUD) {
|
||||
// properly as well.
|
||||
function testContextMenuCopy() {
|
||||
let contextMenuId = outputNode.getAttribute("context");
|
||||
let contextMenu = document.getElementById(contextMenuId);
|
||||
let contextMenu = HUD.ui.document.getElementById(contextMenuId);
|
||||
ok(contextMenu, "the output node has a context menu");
|
||||
|
||||
let copyItem = contextMenu.querySelector("*[buttonType=\"copy\"]");
|
||||
let copyItem = contextMenu.querySelector("*[command='cmd_copy']");
|
||||
ok(copyItem, "the context menu on the output node has a \"Copy\" item");
|
||||
|
||||
let commandEvent = document.createEvent("XULCommandEvent");
|
||||
commandEvent.initCommandEvent("command", true, true, window, 0, false, false,
|
||||
false, false, null);
|
||||
copyItem.dispatchEvent(commandEvent);
|
||||
copyItem.doCommand();
|
||||
|
||||
let selectedNode = outputNode.getItemAtIndex(0);
|
||||
|
||||
HUD = outputNode = null;
|
||||
waitForClipboard(getExpectedClipboardText(selectedNode), clipboardSetup,
|
||||
finishTest, finishTest);
|
||||
}
|
||||
|
@ -9,60 +9,31 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 588342";
|
||||
let fm, notificationBox, input;
|
||||
let fm;
|
||||
|
||||
function test() {
|
||||
fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", tabLoad, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function tabLoad(aEvent) {
|
||||
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
||||
|
||||
notificationBox = gBrowser.getNotificationBox(browser);
|
||||
let DOMNodeInserted = false;
|
||||
|
||||
document.addEventListener("DOMNodeInserted", function(aEvent) {
|
||||
input = notificationBox.querySelector(".jsterm-input-node");
|
||||
if (input && !DOMNodeInserted) {
|
||||
DOMNodeInserted = true;
|
||||
document.removeEventListener(aEvent.type, arguments.callee, false);
|
||||
if (!input.getAttribute("focused")) {
|
||||
input.addEventListener("focus", function(aEvent) {
|
||||
input.removeEventListener(aEvent.type, arguments.callee, false);
|
||||
executeSoon(runTest);
|
||||
}, false);
|
||||
}
|
||||
else {
|
||||
executeSoon(runTest);
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
function consoleOpened(hud) {
|
||||
waitForFocus(function() {
|
||||
openConsole();
|
||||
}, content);
|
||||
is(hud.jsterm.inputNode.getAttribute("focused"), "true",
|
||||
"jsterm input is focused on web console open");
|
||||
isnot(fm.focusedWindow, content, "content document has no focus");
|
||||
closeConsole(null, consoleClosed);
|
||||
}, hud.iframeWindow);
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
is(input.getAttribute("focused"), "true", "input node is focused");
|
||||
isnot(fm.focusedWindow, content, "content document has no focus");
|
||||
function consoleClosed() {
|
||||
is(fm.focusedWindow, browser.contentWindow,
|
||||
"content document has focus");
|
||||
|
||||
let DOMNodeRemoved = false;
|
||||
function domNodeRemoved(aEvent) {
|
||||
executeSoon(function() {
|
||||
if (!DOMNodeRemoved && !notificationBox.querySelector(".hud-box")) {
|
||||
DOMNodeRemoved = true;
|
||||
document.removeEventListener(aEvent.type, domNodeRemoved, false);
|
||||
is(fm.focusedWindow, browser.contentWindow,
|
||||
"content document has focus");
|
||||
input = notificationBox = fm = null;
|
||||
finishTest();
|
||||
}
|
||||
});
|
||||
}
|
||||
document.addEventListener("DOMNodeRemoved", domNodeRemoved, false);
|
||||
HUDService.deactivateHUDForContext(tab);
|
||||
fm = null;
|
||||
finishTest();
|
||||
}
|
||||
|
||||
|
@ -7,15 +7,14 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testInputExpansion, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testInputExpansion);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testInputExpansion() {
|
||||
browser.removeEventListener("DOMContentLoaded", testInputExpansion, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let input = HUDService.getHudByWindow(content).jsterm.inputNode;
|
||||
function testInputExpansion(hud) {
|
||||
let input = hud.jsterm.inputNode;
|
||||
|
||||
input.focus();
|
||||
|
||||
|
@ -30,13 +30,13 @@ function onContentLoaded()
|
||||
},
|
||||
successFn: function()
|
||||
{
|
||||
HUDService.setFilterState(hudId, "cssparser", false);
|
||||
HUD.setFilterState("cssparser", false);
|
||||
|
||||
let msg = "the unknown CSS property warning is not displayed, " +
|
||||
"after filtering";
|
||||
testLogEntry(outputNode, "foobarCssParser", msg, true, true);
|
||||
|
||||
HUDService.setFilterState(hudId, "cssparser", true);
|
||||
HUD.setFilterState("cssparser", true);
|
||||
finishTest();
|
||||
},
|
||||
failureFn: finishTest,
|
||||
@ -53,9 +53,10 @@ function test()
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
|
||||
openConsole();
|
||||
browser.addEventListener("load", onContentLoaded, true);
|
||||
content.location.reload();
|
||||
openConsole(null, function() {
|
||||
browser.addEventListener("load", onContentLoaded, true);
|
||||
content.location.reload();
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
@ -15,15 +15,14 @@
|
||||
|
||||
function test() {
|
||||
addTab("data:text/html;charset=utf-8,test for bug 592442");
|
||||
browser.addEventListener("load", testExtraneousClosingBrackets, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testExtraneousClosingBrackets);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testExtraneousClosingBrackets(aEvent) {
|
||||
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
||||
|
||||
openConsole();
|
||||
|
||||
let jsterm = HUDService.getHudByWindow(content).jsterm;
|
||||
function testExtraneousClosingBrackets(hud) {
|
||||
let jsterm = hud.jsterm;
|
||||
|
||||
jsterm.setInputValue("document.getElementById)");
|
||||
|
||||
@ -37,7 +36,6 @@ function testExtraneousClosingBrackets(aEvent) {
|
||||
|
||||
ok(!error, "no error was thrown when an extraneous bracket was inserted");
|
||||
|
||||
HUDService.deactivateHUDForContext(tab);
|
||||
finishTest();
|
||||
}
|
||||
|
||||
|
@ -11,14 +11,9 @@
|
||||
let inputNode, values;
|
||||
|
||||
function tabLoad(aEvent) {
|
||||
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
||||
|
||||
waitForFocus(function() {
|
||||
openConsole();
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
let HUD = HUDService.hudReferences[hudId];
|
||||
browser.removeEventListener(aEvent.type, tabLoad, true);
|
||||
|
||||
openConsole(null, function(HUD) {
|
||||
inputNode = HUD.jsterm.inputNode;
|
||||
|
||||
inputNode.focus();
|
||||
@ -35,7 +30,7 @@ function tabLoad(aEvent) {
|
||||
}
|
||||
|
||||
performTests();
|
||||
}, content);
|
||||
});
|
||||
}
|
||||
|
||||
function performTests() {
|
||||
|
@ -57,7 +57,8 @@ function openConsoles() {
|
||||
let tab = openTabs[i];
|
||||
openConsole(tab, function(index, hud) {
|
||||
ok(hud, "HUD is open for tab " + index);
|
||||
hud.browser.contentWindow.console.log("message for tab " + index);
|
||||
let window = hud.tab.linkedBrowser.contentWindow;
|
||||
window.console.log("message for tab " + index);
|
||||
consolesOpen++;
|
||||
}.bind(null, i));
|
||||
}
|
||||
|
@ -14,15 +14,15 @@ const TEST_URI = "http://example.com/browser/browser/devtools/" +
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", tabLoaded, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function tabLoaded(aEvent) {
|
||||
browser.removeEventListener("load", tabLoaded, true);
|
||||
openConsole();
|
||||
|
||||
function consoleOpened(hud) {
|
||||
let button = content.document.querySelector("button");
|
||||
let outputNode = HUDService.getHudByWindow(content).outputNode;
|
||||
let outputNode = hud.outputNode;
|
||||
|
||||
expectUncaughtException();
|
||||
EventUtils.sendMouseEvent({ type: "click" }, button, content);
|
||||
|
@ -17,11 +17,11 @@ function consoleOpened(aHud) {
|
||||
content.console.log("test message " + i);
|
||||
}
|
||||
|
||||
HUDService.setFilterState(hud.hudId, "network", false);
|
||||
HUDService.setFilterState(hud.hudId, "networkinfo", false);
|
||||
hud.setFilterState("network", false);
|
||||
hud.setFilterState("networkinfo", false);
|
||||
|
||||
hud.filterBox.value = "test message";
|
||||
HUDService.updateFilterText(hud.filterBox);
|
||||
hud.ui.filterBox.value = "test message";
|
||||
hud.ui.adjustVisibilityOnSearchStringChange();
|
||||
|
||||
let waitForNetwork = {
|
||||
name: "network message",
|
||||
@ -67,8 +67,8 @@ function testScroll() {
|
||||
ok(scrollBox.scrollTop >= scrollBox.scrollHeight - scrollBox.clientHeight -
|
||||
nodeHeight * 2, "scroll location is correct");
|
||||
|
||||
HUDService.setFilterState(hud.hudId, "network", true);
|
||||
HUDService.setFilterState(hud.hudId, "networkinfo", true);
|
||||
hud.setFilterState("network", true);
|
||||
hud.setFilterState("networkinfo", true);
|
||||
|
||||
executeSoon(finishTest);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ function test()
|
||||
if (initialLoad) {
|
||||
openConsole(null, function(hud) {
|
||||
|
||||
hud.saveRequestAndResponseBodies = true;
|
||||
hud.ui.saveRequestAndResponseBodies = true;
|
||||
HUDService.lastFinishedRequestCallback = performTest;
|
||||
|
||||
content.location = TEST_URI;
|
||||
|
@ -7,16 +7,16 @@ const TEST_URI = "http://example.com/";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", testFilterButtons, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testFilterButtons);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testFilterButtons() {
|
||||
browser.removeEventListener("load", testFilterButtons, true);
|
||||
openConsole();
|
||||
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
function testFilterButtons(aHud) {
|
||||
hud = aHud;
|
||||
hudId = hud.hudId;
|
||||
hudBox = hud.HUDBox;
|
||||
hudBox = hud.ui.rootElement;
|
||||
|
||||
testMenuFilterButton("net");
|
||||
testMenuFilterButton("css");
|
||||
@ -52,7 +52,7 @@ function testMenuFilterButton(aCategory) {
|
||||
chooseMenuItem(menuItem);
|
||||
ok(isChecked(menuItem), "menu item " + prefKey + " for category " +
|
||||
aCategory + " is checked after clicking it");
|
||||
ok(HUDService.filterPrefs[hudId][prefKey], prefKey + " messages are " +
|
||||
ok(hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
|
||||
"on after clicking the appropriate menu item");
|
||||
menuItem = menuItem.nextSibling;
|
||||
}
|
||||
@ -64,13 +64,13 @@ function testMenuFilterButton(aCategory) {
|
||||
chooseMenuItem(firstMenuItem);
|
||||
ok(!isChecked(firstMenuItem), "the first menu item for category " +
|
||||
aCategory + " is no longer checked after clicking it");
|
||||
ok(!HUDService.filterPrefs[hudId][prefKey], prefKey + " messages are " +
|
||||
ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
|
||||
"turned off after clicking the appropriate menu item");
|
||||
ok(isChecked(button), "the button for category " + aCategory + " is still " +
|
||||
"checked after turning off its first menu item");
|
||||
|
||||
// Turn all the filters off by clicking the main part of the button.
|
||||
let anonymousNodes = document.getAnonymousNodes(button);
|
||||
let anonymousNodes = hud.ui.document.getAnonymousNodes(button);
|
||||
let subbutton;
|
||||
for (let i = 0; i < anonymousNodes.length; i++) {
|
||||
let node = anonymousNodes[i];
|
||||
@ -90,7 +90,7 @@ function testMenuFilterButton(aCategory) {
|
||||
let prefKey = menuItem.getAttribute("prefKey");
|
||||
ok(!isChecked(menuItem), "menu item " + prefKey + " for category " +
|
||||
aCategory + " is no longer checked after clicking the button");
|
||||
ok(!HUDService.filterPrefs[hudId][prefKey], prefKey + " messages are " +
|
||||
ok(!hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
|
||||
"off after clicking the button");
|
||||
menuItem = menuItem.nextSibling;
|
||||
}
|
||||
@ -106,7 +106,7 @@ function testMenuFilterButton(aCategory) {
|
||||
let prefKey = menuItem.getAttribute("prefKey");
|
||||
ok(isChecked(menuItem), "menu item " + prefKey + " for category " +
|
||||
aCategory + " is checked after clicking the button");
|
||||
ok(HUDService.filterPrefs[hudId][prefKey], prefKey + " messages are " +
|
||||
ok(hud.ui.filterPrefs[prefKey], prefKey + " messages are " +
|
||||
"on after clicking the button");
|
||||
menuItem = menuItem.nextSibling;
|
||||
}
|
||||
|
@ -16,18 +16,11 @@ const MINIMUM_CONSOLE_HEIGHT = 150;
|
||||
const MINIMUM_PAGE_HEIGHT = 50;
|
||||
const HEIGHT_PREF = "devtools.hud.height";
|
||||
|
||||
let hud, newHeight, height;
|
||||
let hud, newHeight, height, innerHeight;
|
||||
|
||||
function performTests(aEvent)
|
||||
function performTests(aWebConsole)
|
||||
{
|
||||
browser.removeEventListener(aEvent, arguments.callee, true);
|
||||
|
||||
let innerHeight = content.innerHeight;
|
||||
|
||||
openConsole();
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
hud = HUDService.hudReferences[hudId].HUDBox;
|
||||
hud = aWebConsole.iframe;
|
||||
height = parseInt(hud.style.height);
|
||||
|
||||
toggleConsole();
|
||||
@ -78,7 +71,7 @@ function toggleConsole()
|
||||
openConsole();
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
hud = HUDService.hudReferences[hudId].HUDBox;
|
||||
hud = HUDService.hudReferences[hudId].iframe;
|
||||
newHeight = parseInt(hud.style.height);
|
||||
}
|
||||
|
||||
@ -91,6 +84,10 @@ function setHeight(aHeight)
|
||||
function test()
|
||||
{
|
||||
addTab("data:text/html;charset=utf-8,Web Console test for bug 601909");
|
||||
browser.addEventListener("load", performTests, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
innerHeight = content.innerHeight;
|
||||
openConsole(null, performTests);
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,10 @@ function test()
|
||||
browser.addEventListener("load", function onLoad1(aEvent) {
|
||||
browser.removeEventListener(aEvent.type, onLoad1, true);
|
||||
|
||||
openConsole(null, function() {
|
||||
openConsole(null, function(aHud) {
|
||||
info("iframe1 height " + aHud.iframe.clientHeight);
|
||||
info("iframe1 root height " + aHud.ui.rootElement.clientHeight);
|
||||
|
||||
// open tab 2
|
||||
addTab("data:text/html;charset=utf-8,Web Console test for bug 602572: log bodies checkbox. tab 2");
|
||||
tabs.push(tab);
|
||||
@ -27,7 +30,11 @@ function test()
|
||||
browser.addEventListener("load", function onLoad2(aEvent) {
|
||||
browser.removeEventListener(aEvent.type, onLoad2, true);
|
||||
|
||||
openConsole(null, startTest);
|
||||
openConsole(null, function(aHud) {
|
||||
info("iframe2 height " + aHud.iframe.clientHeight);
|
||||
info("iframe2 root height " + aHud.ui.rootElement.clientHeight);
|
||||
waitForFocus(startTest, aHud.iframeWindow);
|
||||
});
|
||||
}, true);
|
||||
});
|
||||
}, true);
|
||||
@ -41,12 +48,14 @@ function startTest()
|
||||
huds[1] = HUDService.hudReferences[hudId2];
|
||||
HUDService.disableAnimation(hudId2);
|
||||
|
||||
menuitems[1] = huds[1].HUDBox.querySelector("menuitem[buttonType=saveBodies]");
|
||||
menupopups[1] = huds[1].HUDBox.querySelector("menupopup");
|
||||
menuitems[1] = huds[1].ui.rootElement.querySelector("#saveBodies");
|
||||
menupopups[1] = huds[1].ui.rootElement.querySelector("menupopup");
|
||||
|
||||
// Open the context menu from tab 2.
|
||||
menupopups[1].addEventListener("popupshown", onpopupshown2, false);
|
||||
menupopups[1].openPopup(huds[1].outputNode, "overlap", 10, 10, true, false);
|
||||
executeSoon(function() {
|
||||
menupopups[1].openPopup();
|
||||
});
|
||||
}
|
||||
|
||||
function onpopupshown2(aEvent)
|
||||
@ -57,19 +66,24 @@ function onpopupshown2(aEvent)
|
||||
isnot(menuitems[1].getAttribute("checked"), "true",
|
||||
"menuitems[1] is not checked");
|
||||
|
||||
ok(!huds[1].saveRequestAndResponseBodies, "bodies are not logged");
|
||||
ok(!huds[1].ui.saveRequestAndResponseBodies, "bodies are not logged");
|
||||
|
||||
// Enable body logging.
|
||||
huds[1].saveRequestAndResponseBodies = true;
|
||||
huds[1].ui.saveRequestAndResponseBodies = true;
|
||||
|
||||
menupopups[1].addEventListener("popuphidden", function _onhidden(aEvent) {
|
||||
menupopups[1].removeEventListener(aEvent.type, _onhidden, false);
|
||||
|
||||
// Reopen the context menu.
|
||||
menupopups[1].addEventListener("popupshown", onpopupshown2b, false);
|
||||
menupopups[1].openPopup(huds[1].outputNode, "overlap", 11, 11, true, false);
|
||||
executeSoon(function() {
|
||||
menupopups[1].openPopup();
|
||||
});
|
||||
}, false);
|
||||
menupopups[1].hidePopup();
|
||||
|
||||
executeSoon(function() {
|
||||
menupopups[1].hidePopup();
|
||||
});
|
||||
}
|
||||
|
||||
function onpopupshown2b(aEvent)
|
||||
@ -89,14 +103,20 @@ function onpopupshown2b(aEvent)
|
||||
huds[0] = HUDService.hudReferences[hudId1];
|
||||
HUDService.disableAnimation(hudId1);
|
||||
|
||||
menuitems[0] = huds[0].HUDBox.querySelector("menuitem[buttonType=saveBodies]");
|
||||
menupopups[0] = huds[0].HUDBox.querySelector("menupopup");
|
||||
info("iframe1 height " + huds[0].iframe.clientHeight);
|
||||
info("iframe1 root height " + huds[0].ui.rootElement.clientHeight);
|
||||
|
||||
menuitems[0] = huds[0].ui.rootElement.querySelector("#saveBodies");
|
||||
menupopups[0] = huds[0].ui.rootElement.querySelector("menupopup");
|
||||
|
||||
menupopups[0].addEventListener("popupshown", onpopupshown1, false);
|
||||
menupopups[0].openPopup(huds[0].outputNode, "overlap", 12, 12, true, false);
|
||||
menupopups[0].openPopup();
|
||||
}, tabs[0].linkedBrowser.contentWindow);
|
||||
}, false);
|
||||
menupopups[1].hidePopup();
|
||||
|
||||
executeSoon(function() {
|
||||
menupopups[1].hidePopup();
|
||||
});
|
||||
}
|
||||
|
||||
function onpopupshown1(aEvent)
|
||||
@ -108,7 +128,7 @@ function onpopupshown1(aEvent)
|
||||
"menuitems[0] is not checked");
|
||||
|
||||
// Enable body logging for tab 1 as well.
|
||||
huds[0].saveRequestAndResponseBodies = true;
|
||||
huds[0].ui.saveRequestAndResponseBodies = true;
|
||||
|
||||
// Close the menu, and switch back to tab 2.
|
||||
menupopups[0].addEventListener("popuphidden", function _onhidden(aEvent) {
|
||||
@ -118,10 +138,13 @@ function onpopupshown1(aEvent)
|
||||
waitForFocus(function() {
|
||||
// Reopen the context menu from tab 2.
|
||||
menupopups[1].addEventListener("popupshown", onpopupshown2c, false);
|
||||
menupopups[1].openPopup(huds[1].outputNode, "overlap", 13, 13, true, false);
|
||||
menupopups[1].openPopup();
|
||||
}, tabs[1].linkedBrowser.contentWindow);
|
||||
}, false);
|
||||
menupopups[0].hidePopup();
|
||||
|
||||
executeSoon(function() {
|
||||
menupopups[0].hidePopup();
|
||||
});
|
||||
}
|
||||
|
||||
function onpopupshown2c(aEvent)
|
||||
@ -140,5 +163,8 @@ function onpopupshown2c(aEvent)
|
||||
executeSoon(finishTest);
|
||||
});
|
||||
}, false);
|
||||
menupopups[1].hidePopup();
|
||||
|
||||
executeSoon(function() {
|
||||
menupopups[1].hidePopup();
|
||||
});
|
||||
}
|
||||
|
@ -99,12 +99,11 @@ function performTest() {
|
||||
successFn: function()
|
||||
{
|
||||
let jstermMessage = HUD.outputNode.querySelector(".webconsole-msg-output");
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, networkLink, HUD.iframeWindow);
|
||||
},
|
||||
failureFn: finishTest,
|
||||
});
|
||||
|
@ -124,12 +124,12 @@ function performTest() {
|
||||
successFn: function()
|
||||
{
|
||||
let jstermMessage = HUD.outputNode.querySelector(".webconsole-msg-output");
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, networkLink);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, jstermMessage, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink, HUD.iframeWindow);
|
||||
EventUtils.sendMouseEvent({ type: "click" }, networkLink, HUD.iframeWindow);
|
||||
},
|
||||
failureFn: finishTest,
|
||||
});
|
||||
|
@ -1,30 +1,30 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let prefService = Services.prefs;
|
||||
|
||||
let prefs = {
|
||||
"net": [
|
||||
"network",
|
||||
"networkinfo"
|
||||
],
|
||||
"css": [
|
||||
"csserror",
|
||||
"cssparser"
|
||||
],
|
||||
"js": [
|
||||
"exception",
|
||||
"jswarn"
|
||||
],
|
||||
"logging": [
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"log"
|
||||
]
|
||||
};
|
||||
|
||||
function test() {
|
||||
let prefService = Services.prefs;
|
||||
|
||||
let prefs = {
|
||||
"net": [
|
||||
"network",
|
||||
"networkinfo"
|
||||
],
|
||||
"css": [
|
||||
"csserror",
|
||||
"cssparser"
|
||||
],
|
||||
"js": [
|
||||
"exception",
|
||||
"jswarn"
|
||||
],
|
||||
"logging": [
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"log"
|
||||
]
|
||||
};
|
||||
|
||||
// Set all prefs to true
|
||||
for (let category in prefs) {
|
||||
prefs[category].forEach(function(pref) {
|
||||
@ -33,18 +33,20 @@ function test() {
|
||||
}
|
||||
|
||||
addTab("about:blank");
|
||||
openConsole();
|
||||
openConsole(null, onConsoleOpen);
|
||||
}
|
||||
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
function onConsoleOpen(hud) {
|
||||
let hudBox = hud.ui.rootElement;
|
||||
|
||||
// Check if the filters menuitems exists and are checked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
let button = hudBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isChecked(button), "main button for " + category + " category is checked");
|
||||
|
||||
prefs[category].forEach(function(pref) {
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isChecked(menuitem), "menuitem for " + pref + " is checked");
|
||||
});
|
||||
}
|
||||
@ -52,47 +54,53 @@ function test() {
|
||||
// Set all prefs to false
|
||||
for (let category in prefs) {
|
||||
prefs[category].forEach(function(pref) {
|
||||
HUDService.setFilterState(hud.hudId, pref, false);
|
||||
hud.setFilterState(pref, false);
|
||||
});
|
||||
}
|
||||
|
||||
//Re-init the console
|
||||
closeConsole();
|
||||
openConsole();
|
||||
closeConsole(null, function() {
|
||||
openConsole(null, onConsoleReopen1);
|
||||
});
|
||||
}
|
||||
|
||||
hud = HUDService.getHudByWindow(content);
|
||||
function onConsoleReopen1(hud) {
|
||||
let hudBox = hud.ui.rootElement;
|
||||
|
||||
// Check if the filter button and menuitems are unchecked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
let button = hudBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isUnchecked(button), "main button for " + category + " category is not checked");
|
||||
|
||||
prefs[category].forEach(function(pref) {
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isUnchecked(menuitem), "menuitem for " + pref + " is not checked");
|
||||
});
|
||||
}
|
||||
|
||||
// Set first pref in each category to true
|
||||
for (let category in prefs) {
|
||||
HUDService.setFilterState(hud.hudId, prefs[category][0], true);
|
||||
hud.setFilterState(prefs[category][0], true);
|
||||
}
|
||||
|
||||
// Re-init the console
|
||||
closeConsole();
|
||||
openConsole();
|
||||
closeConsole(null, function() {
|
||||
openConsole(null, onConsoleReopen2);
|
||||
});
|
||||
}
|
||||
|
||||
hud = HUDService.getHudByWindow(content);
|
||||
function onConsoleReopen2(hud) {
|
||||
let hudBox = hud.ui.rootElement;
|
||||
|
||||
// Check the main category button is checked and first menuitem is checked
|
||||
for (let category in prefs) {
|
||||
let button = hud.HUDBox.querySelector(".webconsole-filter-button[category=\""
|
||||
let button = hudBox.querySelector(".webconsole-filter-button[category=\""
|
||||
+ category + "\"]");
|
||||
ok(isChecked(button), category + " button is checked when first pref is true");
|
||||
|
||||
let pref = prefs[category][0];
|
||||
let menuitem = hud.HUDBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
let menuitem = hudBox.querySelector("menuitem[prefKey=" + pref + "]");
|
||||
ok(isChecked(menuitem), "first " + category + " menuitem is checked");
|
||||
}
|
||||
|
||||
@ -103,8 +111,9 @@ function test() {
|
||||
});
|
||||
}
|
||||
|
||||
prefs = prefService = null;
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
finishTest();
|
||||
}
|
||||
|
||||
function isChecked(aNode) {
|
||||
|
@ -65,7 +65,7 @@ function test()
|
||||
browser.removeEventListener(aEvent.type, onLoad1, true);
|
||||
|
||||
openConsole(null, function(hud) {
|
||||
hud.saveRequestAndResponseBodies = true;
|
||||
hud.ui.saveRequestAndResponseBodies = true;
|
||||
HUDService.lastFinishedRequestCallback = requestDoneCallback;
|
||||
|
||||
browser.addEventListener("load", function onLoad2(aEvent) {
|
||||
|
@ -85,7 +85,7 @@ function consoleOpened(HUD) {
|
||||
}, false);
|
||||
|
||||
let node = HUD.outputNode.querySelector(".webconsole-msg-output");
|
||||
EventUtils.synthesizeMouse(node, 2, 2, {});
|
||||
EventUtils.synthesizeMouse(node, 2, 2, {}, HUD.iframeWindow);
|
||||
},
|
||||
failureFn: finishTest,
|
||||
});
|
||||
|
@ -177,7 +177,7 @@ function testLiveFilteringOnSearchStrings() {
|
||||
function countMessageNodes() {
|
||||
let messageNodes = hud.outputNode.querySelectorAll(".hud-msg-node");
|
||||
let displayedMessageNodes = 0;
|
||||
let view = hud.chromeWindow;
|
||||
let view = hud.iframeWindow;
|
||||
for (let i = 0; i < messageNodes.length; i++) {
|
||||
let computedStyle = view.getComputedStyle(messageNodes[i], null);
|
||||
if (computedStyle.display !== "none")
|
||||
@ -189,6 +189,6 @@ function countMessageNodes() {
|
||||
|
||||
function setStringFilter(aValue)
|
||||
{
|
||||
hud.filterBox.value = aValue;
|
||||
HUDService.adjustVisibilityOnSearchStringChange(hud.hudId, aValue);
|
||||
hud.ui.filterBox.value = aValue;
|
||||
hud.ui.adjustVisibilityOnSearchStringChange();
|
||||
}
|
||||
|
@ -29,29 +29,18 @@ function test() {
|
||||
}
|
||||
|
||||
function populateConsoleRepeats(aHudRef) {
|
||||
let hud = aHudRef.HUDBox;
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
let node = ConsoleUtils.createMessageNode(hud.ownerDocument,
|
||||
CATEGORY_CSS,
|
||||
SEVERITY_WARNING,
|
||||
"css log x",
|
||||
aHudRef.hudId);
|
||||
aHudRef.outputMessage(CATEGORY_CSS, node);
|
||||
let node = aHudRef.ui.createMessageNode(CATEGORY_CSS, SEVERITY_WARNING,
|
||||
"css log x");
|
||||
aHudRef.ui.outputMessage(CATEGORY_CSS, node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function populateConsole(aHudRef) {
|
||||
let hud = aHudRef.HUDBox;
|
||||
|
||||
for (let i = 0; i < LOG_LIMIT + 5; i++) {
|
||||
let node = ConsoleUtils.createMessageNode(hud.ownerDocument,
|
||||
CATEGORY_CSS,
|
||||
SEVERITY_WARNING,
|
||||
"css log " + i,
|
||||
aHudRef.hudId);
|
||||
aHudRef.outputMessage(CATEGORY_CSS, node);
|
||||
let node = aHudRef.ui.createMessageNode(CATEGORY_CSS, SEVERITY_WARNING,
|
||||
"css log " + i);
|
||||
aHudRef.ui.outputMessage(CATEGORY_CSS, node);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +55,8 @@ function testCSSPruning(hudRef) {
|
||||
},
|
||||
successFn: function()
|
||||
{
|
||||
ok(!hudRef.cssNodes["css log x"], "repeated nodes pruned from cssNodes");
|
||||
ok(!hudRef.ui._cssNodes["css log x"],
|
||||
"repeated nodes pruned from cssNodes");
|
||||
finishTest();
|
||||
},
|
||||
failureFn: finishTest,
|
||||
@ -76,7 +66,7 @@ function testCSSPruning(hudRef) {
|
||||
name: "repeated nodes in cssNodes",
|
||||
validatorFn: function()
|
||||
{
|
||||
return hudRef.cssNodes["css log x"];
|
||||
return hudRef.ui._cssNodes["css log x"];
|
||||
},
|
||||
successFn: function()
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ function testPropertyPanel()
|
||||
}, false);
|
||||
|
||||
let node = gHUD.outputNode.querySelector(".webconsole-msg-output");
|
||||
EventUtils.synthesizeMouse(node, 2, 2, {});
|
||||
EventUtils.synthesizeMouse(node, 2, 2, {}, gHUD.iframeWindow);
|
||||
},
|
||||
failureFn: finishTest,
|
||||
});
|
||||
|
@ -6,21 +6,19 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>bug 660806 - history navigatio
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", tabLoaded, true);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function tabLoaded()
|
||||
function consoleOpened(HUD)
|
||||
{
|
||||
browser.removeEventListener("load", tabLoaded, true);
|
||||
openConsole();
|
||||
|
||||
content.wrappedJSObject.foobarBug660806 = {
|
||||
"location": "value0",
|
||||
"locationbar": "value1",
|
||||
};
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
let HUD = HUDService.hudReferences[hudId];
|
||||
let jsterm = HUD.jsterm;
|
||||
let popup = jsterm.autocompletePopup;
|
||||
popup._panel.addEventListener("popupshown", function() {
|
||||
|
@ -9,15 +9,14 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testCompletion, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testCompletion);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testCompletion() {
|
||||
browser.removeEventListener("DOMContentLoaded", testCompletion, false);
|
||||
|
||||
openConsole();
|
||||
|
||||
var jsterm = HUDService.getHudByWindow(content).jsterm;
|
||||
function testCompletion(hud) {
|
||||
var jsterm = hud.jsterm;
|
||||
var input = jsterm.inputNode;
|
||||
|
||||
// Test typing 'var d = 5;' and press RETURN
|
||||
|
@ -72,7 +72,8 @@ function testClickOpenNewTab(warningNode) {
|
||||
linkOpened = true;
|
||||
}
|
||||
|
||||
EventUtils.synthesizeMouse(warningNode, 2, 2, {});
|
||||
EventUtils.synthesizeMouse(warningNode, 2, 2, {},
|
||||
warningNode.ownerDocument.defaultView);
|
||||
|
||||
ok(linkOpened, "Clicking the Mixed Content Warning node opens the desired page");
|
||||
|
||||
|
@ -16,7 +16,7 @@ function test() {
|
||||
function testChrome(hud) {
|
||||
ok(hud, "we have a console");
|
||||
|
||||
ok(hud.HUDBox, "we have the console display");
|
||||
ok(hud.iframe, "we have the console iframe");
|
||||
|
||||
let jsterm = hud.jsterm;
|
||||
ok(jsterm, "we have a jsterm");
|
||||
|
@ -60,7 +60,7 @@ function testConsoleLoggingAPI(aMethod) {
|
||||
|
||||
hud.jsterm.clearOutput();
|
||||
|
||||
setStringFilter(hudId, "foo");
|
||||
setStringFilter("foo");
|
||||
console[aMethod]("foo-bar-baz");
|
||||
console[aMethod]("bar-baz");
|
||||
|
||||
@ -85,8 +85,8 @@ function testConsoleLoggingAPI(aMethod) {
|
||||
// now toggle the current method off - make sure no visible message
|
||||
|
||||
// TODO: move all filtering tests into a separate test file: see bug 608135
|
||||
setStringFilter(hudId, "");
|
||||
HUDService.setFilterState(hudId, aMethod, false);
|
||||
setStringFilter("");
|
||||
hud.setFilterState(aMethod, false);
|
||||
console[aMethod]("foo-bar-baz");
|
||||
|
||||
waitForSuccess({
|
||||
@ -102,7 +102,7 @@ function testConsoleLoggingAPI(aMethod) {
|
||||
yield;
|
||||
|
||||
hud.jsterm.clearOutput();
|
||||
HUDService.setFilterState(hudId, aMethod, true);
|
||||
hud.setFilterState(aMethod, true);
|
||||
console[aMethod]("foo-bar-baz");
|
||||
|
||||
waitForSuccess({
|
||||
@ -118,7 +118,7 @@ function testConsoleLoggingAPI(aMethod) {
|
||||
yield;
|
||||
|
||||
hud.jsterm.clearOutput();
|
||||
setStringFilter(hudId, "");
|
||||
setStringFilter("");
|
||||
|
||||
// test for multiple arguments.
|
||||
console[aMethod]("foo", "bar");
|
||||
@ -139,8 +139,8 @@ function testConsoleLoggingAPI(aMethod) {
|
||||
yield;
|
||||
}
|
||||
|
||||
function setStringFilter(aId, aValue) {
|
||||
hud.filterBox.value = aValue;
|
||||
HUDService.adjustVisibilityOnSearchStringChange(aId, aValue);
|
||||
function setStringFilter(aValue) {
|
||||
hud.ui.filterBox.value = aValue;
|
||||
hud.ui.adjustVisibilityOnSearchStringChange();
|
||||
}
|
||||
|
||||
|
@ -9,16 +9,14 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", testJSInputExpansion, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, testJSInputExpansion);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function testJSInputExpansion() {
|
||||
browser.removeEventListener("DOMContentLoaded", testJSInputExpansion,
|
||||
false);
|
||||
|
||||
openConsole();
|
||||
|
||||
let jsterm = HUDService.getHudByWindow(content).jsterm;
|
||||
function testJSInputExpansion(hud) {
|
||||
let jsterm = hud.jsterm;
|
||||
let input = jsterm.inputNode;
|
||||
input.focus();
|
||||
|
||||
@ -30,9 +28,7 @@ function testJSInputExpansion() {
|
||||
input.selectionStart = length;
|
||||
function getHeight()
|
||||
{
|
||||
let h = browser.contentDocument.defaultView.getComputedStyle(input, null)
|
||||
.getPropertyValue("height");
|
||||
return parseInt(h);
|
||||
return input.clientHeight;
|
||||
}
|
||||
let initialHeight = getHeight();
|
||||
// Performs an "d". This will trigger/test for the input event that should
|
||||
|
@ -37,14 +37,12 @@ function consoleOpened(aHud) {
|
||||
}
|
||||
|
||||
function testLiveFilteringOfMessageTypes() {
|
||||
// TODO: bug 744732 - broken live filtering tests.
|
||||
|
||||
HUDService.setFilterState(hud.hudId, "log", false);
|
||||
hud.setFilterState("log", false);
|
||||
is(countMessageNodes(), 0, "the log nodes are hidden when the " +
|
||||
"corresponding filter is switched off");
|
||||
|
||||
HUDService.setFilterState(hud.hudId, "log", true);
|
||||
isnot(countMessageNodes(), 0, "the log nodes reappear when the " +
|
||||
hud.setFilterState("log", true);
|
||||
is(countMessageNodes(), 50, "the log nodes reappear when the " +
|
||||
"corresponding filter is switched on");
|
||||
|
||||
finishTest();
|
||||
@ -53,7 +51,7 @@ function testLiveFilteringOfMessageTypes() {
|
||||
function countMessageNodes() {
|
||||
let messageNodes = hud.outputNode.querySelectorAll(".hud-log");
|
||||
let displayedMessageNodes = 0;
|
||||
let view = hud.chromeWindow;
|
||||
let view = hud.iframeWindow;
|
||||
for (let i = 0; i < messageNodes.length; i++) {
|
||||
let computedStyle = view.getComputedStyle(messageNodes[i], null);
|
||||
if (computedStyle.display !== "none") {
|
||||
|
@ -38,8 +38,6 @@ function consoleOpened(aHud) {
|
||||
}
|
||||
|
||||
function testLiveFilteringOnSearchStrings() {
|
||||
// TODO: bug 744732 - broken live filtering tests.
|
||||
|
||||
setStringFilter("http");
|
||||
isnot(countMessageNodes(), 0, "the log nodes are not hidden when the " +
|
||||
"search string is set to \"http\"");
|
||||
@ -88,7 +86,7 @@ function countMessageNodes() {
|
||||
|
||||
let messageNodes = outputNode.querySelectorAll(".hud-log");
|
||||
let displayedMessageNodes = 0;
|
||||
let view = hud.chromeWindow;
|
||||
let view = hud.iframeWindow;
|
||||
for (let i = 0; i < messageNodes.length; i++) {
|
||||
let computedStyle = view.getComputedStyle(messageNodes[i], null);
|
||||
if (computedStyle.display !== "none") {
|
||||
@ -101,7 +99,7 @@ function countMessageNodes() {
|
||||
|
||||
function setStringFilter(aValue)
|
||||
{
|
||||
hud.filterBox.value = aValue;
|
||||
HUDService.adjustVisibilityOnSearchStringChange(hud.hudId, aValue);
|
||||
hud.ui.filterBox.value = aValue;
|
||||
hud.ui.adjustVisibilityOnSearchStringChange();
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ function testPageLoadBody()
|
||||
let requestCallbackInvoked = false;
|
||||
|
||||
// Turn on logging of request bodies and check again.
|
||||
hud.saveRequestAndResponseBodies = true;
|
||||
hud.ui.saveRequestAndResponseBodies = true;
|
||||
requestCallback = function() {
|
||||
ok(lastRequest, "Page load was logged again");
|
||||
is(lastRequest.response.content.text.indexOf("<!DOCTYPE HTML>"), 0,
|
||||
@ -165,8 +165,8 @@ function testNetworkPanel()
|
||||
{
|
||||
// Open the NetworkPanel. The functionality of the NetworkPanel is tested
|
||||
// within separate test files.
|
||||
let networkPanel = HUDService.openNetworkPanel(hud.filterBox, lastActivity);
|
||||
is(networkPanel, hud.filterBox._netPanel,
|
||||
let networkPanel = hud.ui.openNetworkPanel(hud.ui.filterBox, lastActivity);
|
||||
is(networkPanel, hud.ui.filterBox._netPanel,
|
||||
"Network panel stored on anchor node");
|
||||
|
||||
networkPanel.panel.addEventListener("load", function onLoad(aEvent) {
|
||||
|
@ -61,7 +61,8 @@ function checkNodeKeyValue(aPanel, aId, aKey, aValue) {
|
||||
}
|
||||
|
||||
function testGen() {
|
||||
let filterBox = HUDService.getHudByWindow(content).filterBox;
|
||||
let hud = HUDService.getHudByWindow(content);
|
||||
let filterBox = hud.ui.filterBox;
|
||||
|
||||
let tempScope = {};
|
||||
Cu.import("resource:///modules/WebConsoleUtils.jsm", tempScope);
|
||||
@ -96,7 +97,7 @@ function testGen() {
|
||||
|
||||
let entry = httpActivity.log.entries[0];
|
||||
|
||||
let networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
let networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
|
||||
is(filterBox._netPanel, networkPanel,
|
||||
"Network panel stored on the anchor object");
|
||||
@ -215,7 +216,7 @@ function testGen() {
|
||||
);
|
||||
entry.response.content.text = "get out here";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
is(filterBox._netPanel, networkPanel,
|
||||
"Network panel stored on httpActivity object");
|
||||
|
||||
@ -250,7 +251,7 @@ function testGen() {
|
||||
entry.response.content.mimeType = "image/png";
|
||||
entry.request.url = TEST_IMG;
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -299,7 +300,7 @@ function testGen() {
|
||||
entry.response.status = 304;
|
||||
entry.response.statusText = "Not Modified";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -331,7 +332,7 @@ function testGen() {
|
||||
"name=rob&age=20"
|
||||
].join("\n");
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -358,7 +359,7 @@ function testGen() {
|
||||
info("test 10: no space after Content-Type header in post data");
|
||||
entry.request.postData.text = "Content-Type:application/x-www-form-urlencoded\n";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -388,7 +389,7 @@ function testGen() {
|
||||
entry.response.content.mimeType = "application/json";
|
||||
entry.response.content.text = "my cached data is here!";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -419,7 +420,7 @@ function testGen() {
|
||||
entry.response.headers[1].value = "application/x-shockwave-flash";
|
||||
entry.response.content.mimeType = "application/x-shockwave-flash";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.panel.addEventListener("load", function onLoad() {
|
||||
networkPanel.panel.removeEventListener("load", onLoad, true);
|
||||
testDriver.next();
|
||||
@ -455,7 +456,7 @@ function testGen() {
|
||||
delete httpActivity.response.header["Content-Type"];
|
||||
httpActivity.url = "http://www.test.com/someCrazyFile.swf?done=right&ending=txt";
|
||||
|
||||
networkPanel = HUDService.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel = hud.ui.openNetworkPanel(filterBox, httpActivity);
|
||||
networkPanel.isDoneCallback = function NP_doneCallback() {
|
||||
networkPanel.isDoneCallback = null;
|
||||
testDriver.next();
|
||||
|
@ -10,13 +10,19 @@ const LEFT_PREF = "devtools.webconsole.left";
|
||||
const WIDTH_PREF = "devtools.webconsole.width";
|
||||
const HEIGHT_PREF = "devtools.hud.height";
|
||||
|
||||
let hudRef, boxHeight, panelWidth;
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("DOMContentLoaded", onLoad, false);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
registerCleanupFunction(testEnd);
|
||||
}
|
||||
|
||||
function testEnd() {
|
||||
hudRef = null;
|
||||
Services.prefs.clearUserPref(POSITION_PREF);
|
||||
Services.prefs.clearUserPref(WIDTH_PREF);
|
||||
Services.prefs.clearUserPref(HEIGHT_PREF);
|
||||
@ -24,109 +30,48 @@ function testEnd() {
|
||||
Services.prefs.clearUserPref(LEFT_PREF);
|
||||
}
|
||||
|
||||
function onLoad() {
|
||||
browser.removeEventListener("DOMContentLoaded", onLoad, false);
|
||||
|
||||
openConsole();
|
||||
function waitForPosition(aPosition, aCallback) {
|
||||
waitForSuccess({
|
||||
name: "web console position changed to '" + aPosition + "'",
|
||||
validatorFn: function()
|
||||
{
|
||||
return hudRef._currentUIPosition == aPosition;
|
||||
},
|
||||
successFn: aCallback,
|
||||
failureFn: finishTest,
|
||||
});
|
||||
}
|
||||
|
||||
function consoleOpened(aHudRef) {
|
||||
hudRef = aHudRef;
|
||||
testMenuitems();
|
||||
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
let hudRef = HUDService.hudReferences[hudId];
|
||||
let hudBox = hudRef.HUDBox;
|
||||
let hudBox = hudRef.iframe;
|
||||
|
||||
is(hudBox.parentNode.childNodes[2].getAttribute("id"), hudId,
|
||||
is(hudBox.parentNode.childNodes[2].getAttribute("id"), hudRef.hudId,
|
||||
"initial console position is correct");
|
||||
|
||||
is(hudRef.positionMenuitems.below.getAttribute("checked"), "true",
|
||||
is(hudRef.ui.positionMenuitems.below.getAttribute("checked"), "true",
|
||||
"position menu checkbox is below");
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "below", "pref is below");
|
||||
|
||||
hudRef.positionConsole("above");
|
||||
let id = hudBox.parentNode.childNodes[0].getAttribute("id");
|
||||
is(id, hudId, "above position is correct");
|
||||
|
||||
is(hudRef.positionMenuitems.above.getAttribute("checked"), "true",
|
||||
waitForPosition("above", onPositionAbove);
|
||||
}
|
||||
|
||||
function onPositionAbove() {
|
||||
let hudBox = hudRef.iframe;
|
||||
|
||||
let id = hudBox.parentNode.childNodes[0].getAttribute("id");
|
||||
is(id, hudRef.hudId, "above position is correct");
|
||||
|
||||
is(hudRef.ui.positionMenuitems.above.getAttribute("checked"), "true",
|
||||
"position menu checkbox is above");
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "above", "pref is above");
|
||||
|
||||
// listen for the panel popupshown event.
|
||||
document.addEventListener("popupshown", function popupShown() {
|
||||
document.removeEventListener("popupshown", popupShown, false);
|
||||
|
||||
document.addEventListener("popuphidden", function popupHidden() {
|
||||
document.removeEventListener("popuphidden", popupHidden, false);
|
||||
|
||||
id = hudBox.parentNode.childNodes[2].getAttribute("id");
|
||||
is(id, hudId, "below position is correct after reopen");
|
||||
|
||||
diffHeight = Math.abs(hudBox.clientHeight - boxHeight);
|
||||
// dump("Diffheight: " + diffHeight + " clientHeight: " + hudBox.clientHeight + " boxHeight: " + boxHeight + "\n");
|
||||
// XXX TODO bug 702707
|
||||
todo(diffHeight < 3, "hudBox height is still correct");
|
||||
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "below", "pref is below");
|
||||
|
||||
// following three disabled due to bug 674562
|
||||
// is(Services.prefs.getIntPref(WIDTH_PREF), panelWidth, "width pref updated - bug 674562");
|
||||
// isnot(Services.prefs.getIntPref(TOP_PREF), 50, "top location pref updated - bug 674562");
|
||||
// isnot(Services.prefs.getIntPref(LEFT_PREF), 51, "left location pref updated - bug 674562");
|
||||
|
||||
// Close the window console via the toolbar button
|
||||
let btn = hudBox.querySelector(".webconsole-close-button");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, btn);
|
||||
|
||||
openConsole();
|
||||
|
||||
hudId = HUDService.getHudIdByWindow(content);
|
||||
hudRef = HUDService.hudReferences[hudId];
|
||||
hudBox = hudRef.HUDBox;
|
||||
|
||||
id = hudBox.parentNode.childNodes[2].getAttribute("id");
|
||||
is(id, hudId, "below position is correct after another reopen");
|
||||
|
||||
is(hudRef.positionMenuitems.below.getAttribute("checked"), "true",
|
||||
"position menu checkbox is below");
|
||||
|
||||
executeSoon(finishTest);
|
||||
}, false);
|
||||
|
||||
let diffHeight = Math.abs(hudBox.clientHeight - boxHeight);
|
||||
ok(diffHeight < 8, "hudBox height is correct");
|
||||
|
||||
let consolePanel = hudRef.consolePanel;
|
||||
|
||||
is(consolePanel.getAttribute("width"), panelWidth, "panel width is correct");
|
||||
is(consolePanel.getAttribute("top"), 50, "panel top position is correct");
|
||||
is(consolePanel.getAttribute("left"), 51, "panel left position is correct");
|
||||
|
||||
let panelHeight = parseInt(consolePanel.getAttribute("height"));
|
||||
let boxWidth = hudBox.clientWidth;
|
||||
boxHeight = hudBox.clientHeight;
|
||||
|
||||
hudRef.consolePanel.sizeTo(panelWidth - 15, panelHeight - 13);
|
||||
|
||||
let popupBoxObject = consolePanel.popupBoxObject;
|
||||
let screenX = popupBoxObject.screenX;
|
||||
let screenY = popupBoxObject.screenY;
|
||||
consolePanel.moveTo(screenX - 11, screenY - 13);
|
||||
|
||||
isnot(hudBox.clientWidth, boxWidth, "hudBox width was updated");
|
||||
isnot(hudBox.clientHeight, boxHeight, "hudBox height was updated");
|
||||
|
||||
isnot(popupBoxObject.screenX, screenX, "panel screenX was updated");
|
||||
isnot(popupBoxObject.screenY, screenY, "panel screenY was updated");
|
||||
|
||||
panelWidth = consolePanel.clientWidth;
|
||||
boxHeight = hudBox.clientHeight;
|
||||
|
||||
executeSoon(function() {
|
||||
hudRef.positionConsole("below");
|
||||
});
|
||||
}, false);
|
||||
|
||||
let boxHeight = content.innerHeight * 0.5;
|
||||
let panelWidth = content.innerWidth * 0.5;
|
||||
boxHeight = content.innerHeight * 0.5;
|
||||
panelWidth = content.innerWidth * 0.5;
|
||||
|
||||
hudBox.style.height = boxHeight + "px";
|
||||
|
||||
@ -137,16 +82,101 @@ function onLoad() {
|
||||
Services.prefs.setIntPref(LEFT_PREF, 51);
|
||||
|
||||
hudRef.positionConsole("window");
|
||||
id = hudBox.parentNode.getAttribute("id");
|
||||
is(id, "console_window_" + hudId, "window position is correct");
|
||||
waitForPosition("window", onPositionWindow);
|
||||
}
|
||||
|
||||
function onPositionWindow() {
|
||||
let hudBox = hudRef.iframe;
|
||||
|
||||
let id = hudBox.parentNode.getAttribute("id");
|
||||
is(id, "console_window_" + hudRef.hudId, "window position is correct");
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "window", "pref is window");
|
||||
|
||||
let diffHeight = Math.abs(hudBox.clientHeight - boxHeight);
|
||||
ok(diffHeight < 8, "hudBox height is correct");
|
||||
|
||||
let consolePanel = hudRef.consolePanel;
|
||||
|
||||
is(consolePanel.getAttribute("width"), panelWidth, "panel width is correct");
|
||||
is(consolePanel.getAttribute("top"), 50, "panel top position is correct");
|
||||
is(consolePanel.getAttribute("left"), 51, "panel left position is correct");
|
||||
|
||||
let panelHeight = parseInt(consolePanel.getAttribute("height"));
|
||||
let boxWidth = hudBox.clientWidth;
|
||||
boxHeight = hudBox.clientHeight;
|
||||
|
||||
hudRef.consolePanel.sizeTo(panelWidth - 15, panelHeight - 13);
|
||||
|
||||
let popupBoxObject = consolePanel.popupBoxObject;
|
||||
let screenX = popupBoxObject.screenX;
|
||||
let screenY = popupBoxObject.screenY;
|
||||
consolePanel.moveTo(screenX - 11, screenY - 13);
|
||||
|
||||
isnot(hudBox.clientWidth, boxWidth, "hudBox width was updated");
|
||||
isnot(hudBox.clientHeight, boxHeight, "hudBox height was updated");
|
||||
|
||||
isnot(popupBoxObject.screenX, screenX, "panel screenX was updated");
|
||||
isnot(popupBoxObject.screenY, screenY, "panel screenY was updated");
|
||||
|
||||
panelWidth = consolePanel.clientWidth;
|
||||
boxHeight = hudBox.clientHeight;
|
||||
|
||||
executeSoon(function() {
|
||||
hudRef.positionConsole("below");
|
||||
waitForPosition("below", onPositionBelow);
|
||||
});
|
||||
}
|
||||
|
||||
function onPositionBelow() {
|
||||
let hudBox = hudRef.iframe;
|
||||
|
||||
let id = hudBox.parentNode.childNodes[2].getAttribute("id");
|
||||
is(id, hudRef.hudId, "below position is correct after reopen");
|
||||
|
||||
let diffHeight = Math.abs(hudBox.clientHeight - boxHeight);
|
||||
// dump("Diffheight: " + diffHeight + " clientHeight: " + hudBox.clientHeight + " boxHeight: " + boxHeight + "\n");
|
||||
// XXX TODO bug 702707
|
||||
ok(diffHeight < 8, "hudBox height is still correct");
|
||||
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "below", "pref is below");
|
||||
|
||||
// following three disabled due to bug 674562
|
||||
// is(Services.prefs.getIntPref(WIDTH_PREF), panelWidth, "width pref updated - bug 674562");
|
||||
// isnot(Services.prefs.getIntPref(TOP_PREF), 50, "top location pref updated - bug 674562");
|
||||
// isnot(Services.prefs.getIntPref(LEFT_PREF), 51, "left location pref updated - bug 674562");
|
||||
|
||||
Services.obs.addObserver(onConsoleClose, "web-console-destroyed", false);
|
||||
|
||||
// Close the window console via the toolbar button
|
||||
let btn = hudRef.ui.closeButton;
|
||||
executeSoon(function() {
|
||||
EventUtils.synthesizeMouse(btn, 2, 2, {}, hudRef.iframeWindow);
|
||||
});
|
||||
}
|
||||
|
||||
function onConsoleClose()
|
||||
{
|
||||
Services.obs.removeObserver(onConsoleClose, "web-console-destroyed");
|
||||
|
||||
executeSoon(function() {
|
||||
hudRef = null;
|
||||
openConsole(null, onConsoleReopen);
|
||||
});
|
||||
}
|
||||
|
||||
function onConsoleReopen(aHudRef) {
|
||||
let hudBox = aHudRef.iframe;
|
||||
|
||||
let id = hudBox.parentNode.childNodes[2].getAttribute("id");
|
||||
is(id, aHudRef.hudId, "below position is correct after another reopen");
|
||||
|
||||
is(aHudRef.ui.positionMenuitems.below.getAttribute("checked"), "true",
|
||||
"position menu checkbox is below");
|
||||
|
||||
executeSoon(finishTest);
|
||||
}
|
||||
|
||||
function testMenuitems() {
|
||||
let hudId = HUDService.getHudIdByWindow(content);
|
||||
let hudRef = HUDService.hudReferences[hudId];
|
||||
let hudBox = hudRef.HUDBox;
|
||||
|
||||
let positionConsole = hudRef.positionConsole;
|
||||
is(typeof positionConsole, "function", "positionConsole() is available");
|
||||
|
||||
@ -157,15 +187,15 @@ function testMenuitems() {
|
||||
|
||||
// Make sure the menuitems call the correct method.
|
||||
|
||||
hudRef.positionMenuitems.above.doCommand();
|
||||
hudRef.ui.positionMenuitems.above.doCommand();
|
||||
|
||||
is(param, "above", "menuitem for above positioning calls positionConsole() correctly");
|
||||
|
||||
hudRef.positionMenuitems.below.doCommand();
|
||||
hudRef.ui.positionMenuitems.below.doCommand();
|
||||
|
||||
is(param, "below", "menuitem for below positioning calls positionConsole() correctly");
|
||||
|
||||
hudRef.positionMenuitems.window.doCommand();
|
||||
hudRef.ui.positionMenuitems.window.doCommand();
|
||||
|
||||
is(param, "window", "menuitem for window positioning calls positionConsole() correctly");
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
let tempScope = {};
|
||||
Cu.import("resource:///modules/HUDService.jsm", tempScope);
|
||||
let HUDService = tempScope.HUDService;
|
||||
let ConsoleUtils = tempScope.ConsoleUtils;
|
||||
Cu.import("resource:///modules/WebConsoleUtils.jsm", tempScope);
|
||||
let WebConsoleUtils = tempScope.WebConsoleUtils;
|
||||
|
||||
|
3257
browser/devtools/webconsole/webconsole.js
Normal file
3257
browser/devtools/webconsole/webconsole.js
Normal file
File diff suppressed because it is too large
Load Diff
121
browser/devtools/webconsole/webconsole.xul
Normal file
121
browser/devtools/webconsole/webconsole.xul
Normal file
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % webConsoleDTD SYSTEM "chrome://browser/locale/devtools/webConsole.dtd">
|
||||
%webConsoleDTD;
|
||||
]>
|
||||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/devtools/webconsole.css"
|
||||
type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&window.title;"
|
||||
windowtype="devtools:webconsole"
|
||||
persist="screenX screenY width height sizemode">
|
||||
<script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="text/javascript" src="webconsole.js"/>
|
||||
|
||||
<commandset id="editMenuCommands"/>
|
||||
<keyset id="editMenuKeys"/>
|
||||
|
||||
<popupset id="mainPopupSet">
|
||||
<menupopup id="output-contextmenu">
|
||||
<menuitem id="saveBodies" type="checkbox" label="&saveBodies.label;"
|
||||
accesskey="&saveBodies.accesskey;"/>
|
||||
<menuitem id="menu_copy"/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
|
||||
<vbox class="hud-outer-wrapper" flex="1">
|
||||
<vbox class="hud-console-wrapper" flex="1">
|
||||
<toolbar class="hud-console-filter-toolbar" mode="full">
|
||||
#ifdef XP_MACOSX
|
||||
<toolbarbutton class="webconsole-close-button"
|
||||
tooltiptext="&btnClose.tooltip;"/>
|
||||
#endif
|
||||
|
||||
<toolbarbutton label="&btnPageNet.label;" type="menu-button"
|
||||
category="net" class="webconsole-filter-button"
|
||||
tooltiptext="&btnPageNet.tooltip;">
|
||||
<menupopup>
|
||||
<menuitem label="&btnConsoleErrors;" type="checkbox" autocheck="false"
|
||||
prefKey="network"/>
|
||||
<menuitem label="&btnConsoleLog;" type="checkbox" autocheck="false"
|
||||
prefKey="networkinfo"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton label="&btnPageCSS.label;" type="menu-button"
|
||||
category="css" class="webconsole-filter-button"
|
||||
tooltiptext="&btnPageCSS.tooltip;">
|
||||
<menupopup>
|
||||
<menuitem label="&btnConsoleErrors;" type="checkbox" autocheck="false"
|
||||
prefKey="csserror"/>
|
||||
<menuitem label="&btnConsoleWarnings;" type="checkbox"
|
||||
autocheck="false" prefKey="cssparser"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton label="&btnPageJS.label;" type="menu-button"
|
||||
category="js" class="webconsole-filter-button"
|
||||
tooltiptext="&btnPageJS.tooltip;">
|
||||
<menupopup>
|
||||
<menuitem label="&btnConsoleErrors;" type="checkbox"
|
||||
autocheck="false" prefKey="exception"/>
|
||||
<menuitem label="&btnConsoleWarnings;" type="checkbox"
|
||||
autocheck="false" prefKey="jswarn"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton label="&btnPageLogging.label;" type="menu-button"
|
||||
category="logging" class="webconsole-filter-button"
|
||||
tooltiptext="&btnPageLogging.tooltip;">
|
||||
<menupopup>
|
||||
<menuitem label="&btnConsoleErrors;" type="checkbox"
|
||||
autocheck="false" prefKey="error"/>
|
||||
<menuitem label="&btnConsoleWarnings;" type="checkbox"
|
||||
autocheck="false" prefKey="warn"/>
|
||||
<menuitem label="&btnConsoleInfo;" type="checkbox" autocheck="false"
|
||||
prefKey="info"/>
|
||||
<menuitem label="&btnConsoleLog;" type="checkbox" autocheck="false"
|
||||
prefKey="log"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<spacer flex="1"/>
|
||||
|
||||
<toolbarbutton label="&btnPosition.label;" type="menu"
|
||||
tooltiptext="&btnPosition.tooltip;">
|
||||
<menupopup>
|
||||
<menuitem label="&positionMenu.above;" type="checkbox"
|
||||
autocheck="false" consolePosition="above"/>
|
||||
<menuitem label="&positionMenu.below;" type="checkbox"
|
||||
autocheck="false" consolePosition="below"/>
|
||||
<menuitem label="&positionMenu.window;" type="checkbox"
|
||||
autocheck="false" consolePosition="window"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<textbox class="compact hud-filter-box" type="search"
|
||||
placeholder="&filterBox.placeholder;"/>
|
||||
<toolbarbutton class="webconsole-clear-console-button"
|
||||
label="&btnClear.label;" tooltiptext="&btnClear.tooltip;"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<toolbarbutton class="webconsole-close-button"
|
||||
tooltiptext="&btnClose.tooltip;"/>
|
||||
#endif
|
||||
</toolbar>
|
||||
<richlistbox class="hud-output-node" orient="vertical" flex="1"
|
||||
seltype="multiple" context="output-contextmenu"
|
||||
style="direction:ltr;"/>
|
||||
<hbox class="jsterm-input-container" style="direction:ltr">
|
||||
<stack class="jsterm-stack-node" flex="1">
|
||||
<textbox class="jsterm-complete-node" multiline="true" rows="1"
|
||||
tabindex="-1"/>
|
||||
<textbox class="jsterm-input-node" multiline="true" rows="1"/>
|
||||
</stack>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</window>
|
@ -8,6 +8,8 @@
|
||||
- A good criteria is the language in which you'd find the best
|
||||
- documentation on web development on the web. -->
|
||||
|
||||
<!ENTITY window.title "Web Console">
|
||||
|
||||
<!ENTITY networkPanel.requestURL "Request URL">
|
||||
<!ENTITY networkPanel.requestMethod "Request Method">
|
||||
<!ENTITY networkPanel.statusCode "Status Code">
|
||||
@ -24,3 +26,55 @@
|
||||
<!ENTITY networkPanel.responseNoBody "No Response Body">
|
||||
<!ENTITY networkPanel.responseImage "Received Image">
|
||||
<!ENTITY networkPanel.responseImageCached "Cached Image">
|
||||
|
||||
<!-- LOCALIZATION NOTE (saveBodies.label): You can see this string in the Web
|
||||
- Console context menu. -->
|
||||
<!ENTITY saveBodies.label "Log Request and Response Bodies">
|
||||
<!ENTITY saveBodies.accesskey "L">
|
||||
|
||||
<!-- LOCALIZATION NOTE (btnPageNet.label): This string is used for the menu
|
||||
- button that allows users to toggle the network logging output.
|
||||
- This string and the following strings toggle various kinds of output
|
||||
- filters. -->
|
||||
<!ENTITY btnPageNet.label "Net">
|
||||
<!ENTITY btnPageNet.tooltip "Log network access">
|
||||
<!ENTITY btnPageCSS.label "CSS">
|
||||
<!ENTITY btnPageCSS.tooltip "Log CSS parsing errors">
|
||||
<!ENTITY btnPageJS.label "JS">
|
||||
<!ENTITY btnPageJS.tooltip "Log JavaScript exceptions">
|
||||
|
||||
<!-- LOCALIZATION NOTE (btnPageLogging): This is used as the text of the
|
||||
- the toolbar. It shows or hides messages that the web developer inserted on
|
||||
- the page for debugging purposes, using calls such console.log() and
|
||||
- console.error(). -->
|
||||
<!ENTITY btnPageLogging.label "Logging">
|
||||
<!ENTITY btnPageLogging.tooltip "Log messages sent to the window.console object">
|
||||
<!ENTITY btnConsoleErrors "Errors">
|
||||
<!ENTITY btnConsoleInfo "Info">
|
||||
<!ENTITY btnConsoleWarnings "Warnings">
|
||||
<!ENTITY btnConsoleLog "Log">
|
||||
|
||||
<!-- LOCALIZATION NOTE (btnPosition.label): The label shown for the menu which
|
||||
- allows the user to toggle between the Web Console positioning types. -->
|
||||
<!ENTITY btnPosition.label "Position">
|
||||
|
||||
<!-- LOCALIZATION NOTE (btnPosition.tooltip): The tooltip shown when the user
|
||||
- hovers the Position button in the Web Console toolbar. -->
|
||||
<!ENTITY btnPosition.tooltip "Position the Web Console above or below the document">
|
||||
|
||||
<!-- LOCALIZATION NOTE (positionMenu.above): When this option is selected the
|
||||
- Web Console interface is displayed above the web page. -->
|
||||
<!ENTITY positionMenu.above "Above">
|
||||
|
||||
<!-- LOCALIZATION NOTE (positionMenu.below): When this option is selected the
|
||||
- Web Console interface is displayed below the web page. -->
|
||||
<!ENTITY positionMenu.below "Below">
|
||||
|
||||
<!-- LOCALIZATION NOTE (positionMenu.window): When this option is selected the
|
||||
- Web Console interface is displayed in a floating panel. -->
|
||||
<!ENTITY positionMenu.window "Window">
|
||||
|
||||
<!ENTITY filterBox.placeholder "Filter">
|
||||
<!ENTITY btnClear.label "Clear">
|
||||
<!ENTITY btnClear.tooltip "Clear the Web Console output">
|
||||
<!ENTITY btnClose.tooltip "Close the Web Console">
|
||||
|
@ -23,42 +23,11 @@ categoryPage=Page:
|
||||
categoryConsole=Console:
|
||||
btnMutation=DOM Mutation
|
||||
tipMutation=Toggle DOM Mutation event logging
|
||||
btnPageNet=Net
|
||||
tipPageNet=Log network access
|
||||
btnPageCSS=CSS
|
||||
tipPageCSS=Log CSS parsing errors
|
||||
btnPageJS=JS
|
||||
tipPageJS=Log JavaScript exceptions
|
||||
# LOCALIZATION NOTE (btnPageLogging):
|
||||
#
|
||||
# This is used as the text of the "Logging" button on the toolbar. It
|
||||
# shows or hides messages that the web developer inserted on the page for
|
||||
# debugging purposes, using calls such console.log() and console.error().
|
||||
btnPageLogging=Logging
|
||||
# LOCALIZATION NOTE (tipPageLogging):
|
||||
#
|
||||
# This is used as the text of the tool tip for the "Logging" button on
|
||||
# the toolbar.
|
||||
tipPageLogging=Log messages sent to the "console" object
|
||||
btnConsoleErrors=Errors
|
||||
tipConsoleErrors=Log calls to console.error()
|
||||
btnConsoleInfo=Info
|
||||
tipConsoleInfo=Log calls to console.info()
|
||||
btnConsoleWarnings=Warnings
|
||||
tipConsoleWarnings=Log calls to console.warn()
|
||||
btnConsoleLog=Log
|
||||
tipConsoleLog=Log calls to console.log()
|
||||
btnGlobal=Global Messages
|
||||
tipGlobal=Toggle Global Message logging
|
||||
localConsole=Local Console
|
||||
clearConsoleCmd.label=Clear Console
|
||||
clearConsoleCmd.accesskey=e
|
||||
# LOCALIZATION NOTE (btnClear):
|
||||
#
|
||||
# This is used as the text of the "Clear" button for the toolbar. It clears the
|
||||
# contents of the console.
|
||||
btnClear=Clear
|
||||
stringFilter=Filter
|
||||
close.button=Close
|
||||
close.accesskey=C
|
||||
update.button=Update
|
||||
@ -85,12 +54,6 @@ jsPropertyTitle=Object Inspector
|
||||
# is set to `Inspect: window.document` because the clicked `document` object was
|
||||
# evaluated based on the `window.document` string.
|
||||
jsPropertyInspectTitle=Inspect: %S
|
||||
saveBodies.label=Log Request and Response Bodies
|
||||
saveBodies.accesskey=L
|
||||
copyCmd.label=Copy
|
||||
copyCmd.accesskey=C
|
||||
selectAllCmd.label=Select All
|
||||
selectAllCmd.accesskey=A
|
||||
# LOCALIZATION NOTE (timestampFormat): %1$02S = hours (24-hour clock),
|
||||
# %2$02S = minutes, %3$02S = seconds, %4$03S = milliseconds.
|
||||
timestampFormat=%02S:%02S:%02S.%03S
|
||||
@ -124,26 +87,6 @@ NetworkPanel.imageSizeDeltaDurationMS=%Sx%Spx, Δ%Sms
|
||||
NetworkPanel.responseBodyUnableToDisplay.content=Unable to display responses of type "%S"
|
||||
ConsoleAPIDisabled=The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.
|
||||
|
||||
# LOCALIZATION NOTE (webConsolePosition): The label shown for the menu which
|
||||
# allows the user to toggle between the Web Console positioning types.
|
||||
webConsolePosition=Position
|
||||
|
||||
# LOCALIZATION NOTE (webConsolePositionTooltip): The tooltip shown when the user
|
||||
# hovers the Position button in the Web Console toolbar.
|
||||
webConsolePositionTooltip=Position the Web Console above or below the document
|
||||
|
||||
# LOCALIZATION NOTE (webConsolePositionAbove): When this option is selected the
|
||||
# Web Console interface is displayed above the web page.
|
||||
webConsolePositionAbove=Above
|
||||
|
||||
# LOCALIZATION NOTE (webConsolePositionBelow): When this option is selected the
|
||||
# Web Console interface is displayed below the web page.
|
||||
webConsolePositionBelow=Below
|
||||
|
||||
# LOCALIZATION NOTE (webConsolePositionWindow): When this option is selected the
|
||||
# Web Console interface is displayed in a floating panel.
|
||||
webConsolePositionWindow=Window
|
||||
|
||||
# LOCALIZATION NOTE (webConsoleWindowTitleAndURL): The Web Console floating
|
||||
# panel title, followed by the web page URL.
|
||||
# For RTL languages you need to set the LRM in the string to give the URL
|
||||
|
@ -2550,6 +2550,26 @@ stack[anonid=browserStack][responsivemode] {
|
||||
background-image: url("chrome://browser/skin/devtools/responsive-se-resizer.png");
|
||||
}
|
||||
|
||||
/* Web Console */
|
||||
|
||||
.web-console-frame {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.web-console-frame[animated] {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.web-console-splitter {
|
||||
box-shadow: 0 -1px 0 0 ThreeDShadow inset, 0 0 0 10px -moz-Dialog inset;
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/* Developer Toolbar */
|
||||
|
||||
.developer-toolbar-button {
|
||||
|
@ -2,19 +2,6 @@
|
||||
* 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/. */
|
||||
|
||||
.hud-box {
|
||||
border-bottom: 1px solid #aaa;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.hud-box.animated {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.hud-splitter {
|
||||
box-shadow: 0 -1px 0 0 ThreeDShadow inset, 0 0 0 10px -moz-Dialog inset;
|
||||
}
|
||||
|
||||
.hud-outer-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -281,14 +268,3 @@
|
||||
.jsterm-output-line {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.web-console-panel > .hud-box {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -3305,6 +3305,27 @@ stack[anonid=browserStack][responsivemode] {
|
||||
background-image: url("chrome://browser/skin/devtools/responsive-se-resizer.png");
|
||||
}
|
||||
|
||||
/* Web Console */
|
||||
|
||||
.web-console-frame {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.web-console-frame[animated] {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.web-console-splitter {
|
||||
border-bottom: solid #a5a5a5 1px;
|
||||
background: url("chrome://global/skin/splitter/dimple.png") no-repeat center,
|
||||
-moz-linear-gradient(top, #fcfcfc, #dfdfdf);
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Developer Toolbar */
|
||||
|
||||
.developer-toolbar-button {
|
||||
|
@ -4,21 +4,6 @@
|
||||
|
||||
%include ../shared.inc
|
||||
|
||||
.hud-box {
|
||||
border-bottom: 1px solid #aaa;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.hud-box.animated {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.hud-splitter {
|
||||
border-bottom: solid #a5a5a5 1px;
|
||||
background: url("chrome://global/skin/splitter/dimple.png") no-repeat center,
|
||||
-moz-linear-gradient(top, #fcfcfc, #dfdfdf);
|
||||
}
|
||||
|
||||
.hud-outer-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -327,6 +312,10 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.jsterm-input-container {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.jsterm-input-node,
|
||||
.jsterm-complete-node {
|
||||
border: none;
|
||||
@ -362,14 +351,3 @@
|
||||
.hud-console-filter-toolbar:-moz-lwtheme {
|
||||
border-top: @scopeBarSeparatorBorder@;
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.web-console-panel > .hud-box {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -3231,6 +3231,25 @@ stack[anonid=browserStack][responsivemode] {
|
||||
background-image: url("chrome://browser/skin/devtools/responsive-se-resizer.png");
|
||||
}
|
||||
|
||||
/* Web Console */
|
||||
|
||||
.web-console-frame {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.web-console-frame[animated] {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.web-console-splitter {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Developer Toolbar */
|
||||
|
||||
.developer-toolbar-button {
|
||||
|
@ -2,19 +2,6 @@
|
||||
* 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/. */
|
||||
|
||||
.hud-box {
|
||||
border-bottom: 1px solid #aaa;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.hud-box.animated {
|
||||
transition: height 100ms;
|
||||
}
|
||||
|
||||
.hud-splitter {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.hud-outer-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -306,14 +293,3 @@
|
||||
background-color: -moz-dialog;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.web-console-panel {
|
||||
-moz-appearance: none;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.web-console-panel > .hud-box {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user