зеркало из https://github.com/mozilla/gecko-dev.git
Bug 862916 - console.dir() shows blank box if Logging filter is off; r=past
This commit is contained in:
Родитель
507ac91c03
Коммит
bee83ea8e3
|
@ -127,6 +127,7 @@ MOCHITEST_BROWSER_FILES = \
|
|||
browser_bug_865288_repeat_different_objects.js \
|
||||
browser_jsterm_inspect.js \
|
||||
browser_bug_869003_inspect_cross_domain_object.js \
|
||||
browser_bug_862916_console_dir_and_filter_off.js \
|
||||
head.js \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
// Check that the output for console.dir() works even if Logging filter is off.
|
||||
|
||||
const TEST_URI = "data:text/html;charset=utf8,<p>test for bug 862916";
|
||||
|
||||
function test()
|
||||
{
|
||||
addTab(TEST_URI);
|
||||
browser.addEventListener("load", function onLoad() {
|
||||
browser.removeEventListener("load", onLoad, true);
|
||||
openConsole(null, consoleOpened);
|
||||
}, true);
|
||||
}
|
||||
|
||||
function consoleOpened(hud)
|
||||
{
|
||||
ok(hud, "web console opened");
|
||||
|
||||
hud.setFilterState("log", false);
|
||||
registerCleanupFunction(() => hud.setFilterState("log", true));
|
||||
|
||||
content.wrappedJSObject.fooBarz = "bug862916";
|
||||
hud.jsterm.execute("console.dir(window)");
|
||||
hud.jsterm.once("variablesview-fetched", (aEvent, aVar) => {
|
||||
ok(aVar, "variables view object");
|
||||
findVariableViewProperties(aVar, [
|
||||
{ name: "fooBarz", value: "bug862916" },
|
||||
], { webconsole: hud }).then(finishTest);
|
||||
});
|
||||
}
|
|
@ -857,6 +857,10 @@ WebConsoleFrame.prototype = {
|
|||
isFiltered = true;
|
||||
}
|
||||
|
||||
if (isFiltered && aNode.classList.contains("webconsole-msg-inspector")) {
|
||||
aNode.classList.add("hidden-message");
|
||||
}
|
||||
|
||||
return isFiltered;
|
||||
},
|
||||
|
||||
|
@ -2174,8 +2178,12 @@ WebConsoleFrame.prototype = {
|
|||
targetElement: viewContainer,
|
||||
hideFilterInput: true,
|
||||
};
|
||||
this.jsterm.openVariablesView(options)
|
||||
.then((aView) => node._variablesView = aView);
|
||||
this.jsterm.openVariablesView(options).then((aView) => {
|
||||
node._variablesView = aView;
|
||||
if (node.classList.contains("hidden-message")) {
|
||||
node.classList.remove("hidden-message");
|
||||
}
|
||||
});
|
||||
|
||||
let bodyContainer = this.document.createElement("vbox");
|
||||
bodyContainer.flex = 1;
|
||||
|
@ -3039,8 +3047,9 @@ JSTerm.prototype = {
|
|||
aOptions.view = view;
|
||||
this._updateVariablesView(aOptions);
|
||||
|
||||
this.sidebar.show();
|
||||
aOptions.autofocus && aWindow.focus();
|
||||
if (!aOptions.targetElement && aOptions.autofocus) {
|
||||
aWindow.focus();
|
||||
}
|
||||
|
||||
this.emit("variablesview-open", view, aOptions);
|
||||
return view;
|
||||
|
|
|
@ -102,6 +102,13 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.hidden-message {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* WebConsole colored drops */
|
||||
|
||||
.webconsole-filter-button[checked] {
|
||||
|
|
|
@ -94,6 +94,13 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.hidden-message {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* WebConsole colored drops */
|
||||
|
||||
.webconsole-filter-button[checked] {
|
||||
|
|
|
@ -92,6 +92,13 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.hidden-message {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* WebConsole colored drops */
|
||||
|
||||
.webconsole-filter-button[checked] {
|
||||
|
|
Загрузка…
Ссылка в новой задаче