Bug 601890: Move HUDService to tier_app, and from toolkit.jar to browser.jar. r=Mitch a=blocking-beta7 GECKO20b7pre_20101006_RELBRANCH SEAMONKEY_2_1b1_BUILD1
authorKyle Huey <khuey@kylehuey.com>
Thu, 07 Oct 2010 12:08:12 -0400
branchGECKO20b7pre_20101006_RELBRANCH
changeset 55111 329afdc371fbdeb4135608aa208523cc7dde4578
parent 55058 bab601c0c0845e38f3d41541e0915e13ca2ccfb1
child 55155 7e7780ea55d729278914d2979b9b0aab52676f70
push idunknown
push userunknown
push dateunknown
reviewersMitch, blocking-beta7
bugs601890
milestone2.0b7pre
Bug 601890: Move HUDService to tier_app, and from toolkit.jar to browser.jar. r=Mitch a=blocking-beta7
browser/base/content/browser.js
browser/base/jar.mn
browser/build.mk
toolkit/components/console/Makefile.in
toolkit/components/console/hudservice/HUDService.jsm
toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
toolkit/components/console/hudservice/tests/browser/browser_warn_user_about_replaced_api.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580454_timestamp_l10n.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_581231_close_button.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585237_line_limit.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586142_insert_newlines.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586388_select_all.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_587617_output_copy.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588342_document_focus.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_593003_iframe_wrong_hud.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_consoleonpage.js
toolkit/components/console/hudservice/tests/browser/browser_webconsole_netlogging.js
toolkit/components/console/jar.mn
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7932,17 +7932,17 @@ var TabContextMenu = {
     // hide it when the user rightclicked on a pinned tab.
     let unpinnedTabs = gBrowser.visibleTabs.length - gBrowser._numPinnedTabs;
     document.getElementById("context_closeOtherTabs").disabled = unpinnedTabs <= 1;
     document.getElementById("context_closeOtherTabs").hidden = this.contextTab.pinned;
   }
 };
 
 XPCOMUtils.defineLazyGetter(this, "HUDConsoleUI", function () {
-  Cu.import("resource://gre/modules/HUDService.jsm");
+  Cu.import("resource:///modules/HUDService.jsm");
   try {
     return HUDService.consoleUI;
   }
   catch (ex) {
     Components.utils.reportError(ex);
   }
 });
 
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -82,8 +82,10 @@ browser.jar:
 #endif
 *       content/browser/viewSourceOverlay.xul         (content/viewSourceOverlay.xul)
 #ifdef XP_WIN
 *       content/browser/win6BrowserOverlay.xul        (content/win6BrowserOverlay.xul)
 #endif
 # the following files are browser-specific overrides
 *       content/browser/license.html                  (/toolkit/content/license.html)
 % override chrome://global/content/license.html chrome://browser/content/license.html
+# XXXkhuey This really should live in browser/, but it's too late in the release cycle to move
++       content/browser/NetworkPanel.xhtml            (/toolkit/components/console/hudservice/NetworkPanel.xhtml)
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -42,16 +42,18 @@ endif
 TIERS += app
 
 ifdef MOZ_EXTENSIONS
 tier_app_dirs += extensions
 endif
 
 tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
 
+tier_app_dirs += toolkit/components/console/hudservice
+
 tier_app_dirs += browser
 
 installer:
 	@$(MAKE) -C browser/installer installer
 
 package:
 	@$(MAKE) -C browser/installer
 
--- a/toolkit/components/console/Makefile.in
+++ b/toolkit/components/console/Makefile.in
@@ -40,15 +40,10 @@ DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXTRA_PP_COMPONENTS = jsconsole-clhandler.js jsconsole-clhandler.manifest
 
-ifeq (browser,$(MOZ_BUILD_APP))
-PARALLEL_DIRS = hudservice \
-	$(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -609,17 +609,17 @@ function NetworkPanel(aParent, aHttpActi
     titlebar: "normal",
     noautofocus: "true",
     noautohide: "true",
     close: "true"
   });
 
   // Create the browser that displays the NetworkPanel XHTML.
   this.browser = createAndAppendElement(this.panel, "browser", {
-    src: "chrome://global/content/NetworkPanel.xhtml",
+    src: "chrome://browser/content/NetworkPanel.xhtml",
     disablehistory: "true",
     flex: "1"
   });
 
   // Destroy the panel when it's closed.
   this.panel.addEventListener("popuphidden", function onPopupHide() {
     self.panel.removeEventListener("popuphidden", onPopupHide, false);
     self.panel.parentNode.removeChild(self.panel);
--- a/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_HUDServiceTestsAll.js
@@ -41,27 +41,27 @@
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "HUDService", function () {
   try {
-    Cu.import("resource://gre/modules/HUDService.jsm");
+    Cu.import("resource:///modules/HUDService.jsm");
   }
   catch (ex) {
     dump(ex + "\n");
   }
   return HUDService;
 });
 
 XPCOMUtils.defineLazyGetter(this, "ConsoleUtils", function () {
   try {
-    Cu.import("resource://gre/modules/HUDService.jsm");
+    Cu.import("resource:///modules/HUDService.jsm");
   }
   catch (ex) {
     dump(ex + "\n");
   }
   return ConsoleUtils;
 });
 
 let log = function _log(msg) {
--- a/toolkit/components/console/hudservice/tests/browser/browser_warn_user_about_replaced_api.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_warn_user_about_replaced_api.js
@@ -36,17 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_REPLACED_API_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console-replaced-api.html";
 
 function log(aMsg)
 {
   dump("*** WebConsoleTest: " + aMsg + "\n");
 }
 
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580454_timestamp_l10n.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_580454_timestamp_l10n.js
@@ -6,17 +6,17 @@
  * Contributor(s):
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that appropriately-localized timestamps are printed.
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 function test() {
   const TEST_TIMESTAMP = 12345678;
   let date = new Date(TEST_TIMESTAMP);
   let localizedString = ConsoleUtils.timestampString(TEST_TIMESTAMP);
   isnot(localizedString.indexOf(date.getHours()), -1, "the localized " +
     "timestamp contains the hours");
   isnot(localizedString.indexOf(date.getMinutes()), -1, "the localized " +
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_581231_close_button.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_581231_close_button.js
@@ -6,17 +6,17 @@
  * Contributor(s):
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console close button functions.
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 function test() {
   waitForExplicitFinish();
   content.location.href = TEST_URI;
   waitForFocus(onFocus);
 }
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585237_line_limit.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_585237_line_limit.js
@@ -8,17 +8,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console limits the number of lines displayed according to
 // the user's preferences.
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 function test() {
   waitForExplicitFinish();
   content.location.href = TEST_URI;
   waitForFocus(onFocus);
 }
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586142_insert_newlines.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586142_insert_newlines.js
@@ -15,17 +15,17 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const TEST_URI = "http://example.com/";
 
 XPCOMUtils.defineLazyGetter(this, "HUDService", function () {
-  Cu.import("resource://gre/modules/HUDService.jsm");
+  Cu.import("resource:///modules/HUDService.jsm");
   return HUDService;
 });
 
 function test()
 {
   waitForExplicitFinish();
   gBrowser.selectedTab = gBrowser.addTab(TEST_URI);
   gBrowser.selectedBrowser.addEventListener("DOMContentLoaded", onLoad, false);
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586388_select_all.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_586388_select_all.js
@@ -5,17 +5,17 @@
  *
  * Contributor(s):
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/";
 
 function test() {
   waitForExplicitFinish();
   gBrowser.selectedTab = gBrowser.addTab(TEST_URI);
   gBrowser.selectedBrowser.addEventListener("DOMContentLoaded", onLoad, false);
 }
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_587617_output_copy.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_587617_output_copy.js
@@ -4,17 +4,17 @@
  *
  * Contributor(s):
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 function tabLoaded() {
   gBrowser.selectedBrowser.removeEventListener("load", tabLoaded, true);
 
   waitForFocus(function () {
     HUDService.activateHUDForContext(gBrowser.selectedTab);
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588342_document_focus.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588342_document_focus.js
@@ -7,17 +7,17 @@
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
 let notificationBox;
 let input;
 
 function tabLoad(aEvent) {
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 function test() {
   waitForExplicitFinish();
   content.location.href = TEST_URI;
   waitForFocus(onFocus);
 }
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_593003_iframe_wrong_hud.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_593003_iframe_wrong_hud.js
@@ -34,17 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud.html";
 
 const TEST_IFRAME_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud-iframe.html";
 
 const TEST_DUMMY_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
 
 let tab1, tab2;
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595350_multiple_windows_and_tabs.js
@@ -7,17 +7,17 @@
  *  Patrick Walton <pcwalton@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 // Tests that the Web Console doesn't leak when multiple tabs and windows are
 // opened and then closed.
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_URI = "http://example.com/";
 
 let mainWindowTabs = [], newWindowTabs = [];
 let loadedTabCount = 0;
 let newWindow;
 
 function test() {
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_consoleonpage.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_consoleonpage.js
@@ -7,17 +7,17 @@
  *  Julian Viereck <jviereck@mozilla.com>
  *  Mihai Șucan <mihai.sucan@gmail.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 let hud;
 let hudId;
 
 function testOpenWebConsole()
 {
   HUDService.activateHUDForContext(gBrowser.selectedTab);
   is(HUDService.displaysIndex().length, 1, "WebConsole was opened");
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_netlogging.js
+++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_netlogging.js
@@ -8,17 +8,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/HUDService.jsm");
+Cu.import("resource:///modules/HUDService.jsm");
 
 const TEST_NETWORK_REQUEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network-request.html";
 
 const TEST_IMG = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-image.png";
 
 const TEST_DATA_JSON_CONTENT =
   '{ id: "test JSON data", myArray: [ "foo", "bar", "baz", "biff" ] }';
 
--- a/toolkit/components/console/jar.mn
+++ b/toolkit/components/console/jar.mn
@@ -1,6 +1,5 @@
 toolkit.jar:
 *+ content/global/console.js                            (content/console.js)
 *+ content/global/console.xul                           (content/console.xul)
-+  content/global/NetworkPanel.xhtml                    (hudservice/NetworkPanel.xhtml)
 +  content/global/console.css                           (content/console.css)
 +  content/global/consoleBindings.xml                   (content/consoleBindings.xml)