Bug 702707 - Web console is buggy in window mode; Backed out changeset

efd4925dc649; a=leaks
This commit is contained in:
Rob Campbell 2011-11-17 11:17:52 -08:00
parent 30f1888b97
commit 6cf1bc51f4
3 changed files with 1 additions and 49 deletions

View File

@ -6201,7 +6201,7 @@ HeadsUpDisplayUICommands = {
if (hudRef && hud) {
if (hudRef.consolePanel) {
hudRef.consolePanel.hidePopup();
HUDService.deactivateHUDForContext(gBrowser.selectedTab, false);
}
else {
HUDService.storeHeight(hudId);

View File

@ -150,7 +150,6 @@ _BROWSER_TEST_FILES = \
browser_gcli_require.js \
browser_gcli_web.js \
browser_webconsole_bug_658368_time_methods.js \
browser_webconsole_window_zombie.js \
head.js \
$(NULL)

View File

@ -1,47 +0,0 @@
/* vim:set ts=2 sw=2 sts=2 et: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const TEST_URI = "data:text/html,<p>test for bug 577721";
const POSITION_PREF = "devtools.webconsole.position";
function test() {
addTab(TEST_URI);
browser.addEventListener("DOMContentLoaded", onLoad, false);
registerCleanupFunction(testEnd);
}
function testEnd() {
Services.prefs.clearUserPref(POSITION_PREF);
}
function onLoad() {
browser.removeEventListener("DOMContentLoaded", onLoad, false);
openConsole();
let hudId = HUDService.getHudIdByWindow(content);
let hudRef = HUDService.hudReferences[hudId];
let hudBox = hudRef.HUDBox;
// listen for the panel popupshown event.
document.addEventListener("popupshown", function popupShown() {
document.removeEventListener("popupshown", popupShown, false);
ok(hudRef.consolePanel, "console is in a panel");
document.addEventListener("popuphidden", function popupHidden() {
document.removeEventListener("popuphidden", popupHidden, false);
finishTest();
}, false);
// Close the window console via the menu item
let menu = document.getElementById("webConsole");
menu.click();
}, false);
hudRef.positionConsole("window");
}