Bug 1460841 - Console clean up: rename internal modules; r=nchevobbe
authorJan Odvarko <odvarko@gmail.com>
Thu, 24 May 2018 18:11:14 +0200
changeset 419803 b902cff89d269b1c7aacb2b8d68114351e4a4bd0
parent 419802 df956fa60b5411b34b715d0fac0cf39d17685424
child 419804 12301019225960647c08823cfc450a396e47a0ae
push id64433
push userjodvarko@mozilla.com
push dateFri, 25 May 2018 09:02:37 +0000
treeherderautoland@b902cff89d26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1460841
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1460841 - Console clean up: rename internal modules; r=nchevobbe MozReview-Commit-ID: 7rDoXy8ROAe
devtools/client/framework/toolbox.js
devtools/client/shared/webpack/shims/jsterm-stub.js
devtools/client/webconsole/README.md
devtools/client/webconsole/components/JSTerm.js
devtools/client/webconsole/hudservice.js
devtools/client/webconsole/local-dev/index.js
devtools/client/webconsole/main.js
devtools/client/webconsole/moz.build
devtools/client/webconsole/new-console-output-wrapper.js
devtools/client/webconsole/new-webconsole.js
devtools/client/webconsole/panel.js
devtools/client/webconsole/store.js
devtools/client/webconsole/test/chrome/test_render_perf.html
devtools/client/webconsole/test/components/new-console-output-wrapper.test.js
devtools/client/webconsole/test/fixtures/stub-generators/head.js
devtools/client/webconsole/test/mochitest/browser_webconsole_console_group.js
devtools/client/webconsole/test/mochitest/browser_webconsole_init.js
devtools/client/webconsole/test/mochitest/browser_webconsole_logErrorInPage.js
devtools/client/webconsole/test/mochitest/browser_webconsole_logWarningInPage.js
devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_expand.js
devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_status_code.js
devtools/client/webconsole/test/mochitest/browser_webconsole_sourcemap_nosource.js
devtools/client/webconsole/test/mochitest/browser_webconsole_visibility_messages.js
devtools/client/webconsole/test/mochitest/head.js
devtools/client/webconsole/webconsole-connection-proxy.js
devtools/client/webconsole/webconsole-frame.js
devtools/client/webconsole/webconsole-output-wrapper.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -1899,17 +1899,17 @@ Toolbox.prototype = {
       });
     }
 
     const pending = ["host", "width", "start_state", "panel_name", "cold"];
     if (id === "webconsole") {
       pending.push("message_count");
 
       // Cold webconsole event message_count is handled in
-      // devtools/client/webconsole/new-console-output-wrapper.js
+      // devtools/client/webconsole/webconsole-output-wrapper.js
       if (!cold) {
         this.telemetry.addEventProperty(
           "devtools.main", "enter", "webconsole", null, "message_count", 0);
       }
     }
     this.telemetry.preparePendingEvent(
       "devtools.main", "enter", panelName, null, pending);
     this.telemetry.toolOpened(id);
--- a/devtools/client/shared/webpack/shims/jsterm-stub.js
+++ b/devtools/client/shared/webpack/shims/jsterm-stub.js
@@ -82,17 +82,17 @@ JSTerm.prototype = {
       }
 
       let onResult = (response) => {
         if (response.error) {
           console.error("Evaluation error " + response.error + ": " +
                         response.message);
           return;
         }
-        this.hud.newConsoleOutput.dispatchMessageAdd(response, true).then(resolve);
+        this.hud.consoleOutput.dispatchMessageAdd(response, true).then(resolve);
       };
 
       let options = {
         frame: this.SELECTED_FRAME,
         selectedNodeActor: selectedNodeActor,
       };
 
       this.requestEvaluation(executeString, options).then(onResult, onResult);
--- a/devtools/client/webconsole/README.md
+++ b/devtools/client/webconsole/README.md
@@ -108,17 +108,17 @@ Check `package.json` to see all dependen
 and check [devtools-core](https://github.com/devtools-html/devtools-core) packages to dive
 into actual modules used by the WebConsole and other Devtools.
 
 ### UI
 
 The WebConsole UI is built using [React](http://docs.firefox-dev.tools/frontend/react.html)
 components (in `components/`).
 
-The React application is rendered from `new-console-output-wrapper.js`.
+The React application is rendered from `webconsole-output-wrapper.js`.
 It contains 3 top components:
 * **ConsoleOutput** (in `ConsoleOutput.js`) is the component where messages are rendered.
 * **FilterBar** (in `FilterBar.js`) is the component for the filter bars (filter input and toggle buttons).
 * **SideBar** (in `SideBar.js`) is the component that render the sidebar where objects can be placed in.
 
 We prefer stateless component (defined by function) instead of stateful component
 (defined by class) unless the component has to maintain its internal state.
 
--- a/devtools/client/webconsole/components/JSTerm.js
+++ b/devtools/client/webconsole/components/JSTerm.js
@@ -319,29 +319,29 @@ class JSTerm extends Component {
     // Hide undefined results coming from JSTerm helper functions.
     if (!errorMessage && result && typeof result == "object" &&
       result.type == "undefined" &&
       helperResult && !helperHasRawOutput) {
       callback && callback();
       return;
     }
 
-    if (this.hud.newConsoleOutput) {
-      this.hud.newConsoleOutput.dispatchMessageAdd(response, true).then(callback);
+    if (this.hud.consoleOutput) {
+      this.hud.consoleOutput.dispatchMessageAdd(response, true).then(callback);
     }
   }
 
   inspectObjectActor(objectActor) {
-    this.hud.newConsoleOutput.dispatchMessageAdd({
+    this.hud.consoleOutput.dispatchMessageAdd({
       helperResult: {
         type: "inspectObject",
         object: objectActor
       }
     }, true);
-    return this.hud.newConsoleOutput;
+    return this.hud.consoleOutput;
   }
 
   /**
    * Execute a string. Execution happens asynchronously in the content process.
    *
    * @param string [executeString]
    *        The string you want to execute. If this is not provided, the current
    *        user input is used - taken from |this.getInputValue()|.
@@ -496,36 +496,36 @@ class JSTerm extends Component {
    *
    * This method emits the "messages-cleared" notification.
    *
    * @param boolean clearStorage
    *        True if you want to clear the console messages storage associated to
    *        this Web Console.
    */
   clearOutput(clearStorage) {
-    if (this.hud && this.hud.newConsoleOutput) {
-      this.hud.newConsoleOutput.dispatchMessagesClear();
+    if (this.hud && this.hud.consoleOutput) {
+      this.hud.consoleOutput.dispatchMessagesClear();
     }
 
     this.webConsoleClient.clearNetworkRequests();
     if (clearStorage) {
       this.webConsoleClient.clearMessagesCache();
     }
     this.focus();
     this.emit("messages-cleared");
   }
 
   /**
    * Remove all of the private messages from the Web Console output.
    *
    * This method emits the "private-messages-cleared" notification.
    */
   clearPrivateMessages() {
-    if (this.hud && this.hud.newConsoleOutput) {
-      this.hud.newConsoleOutput.dispatchPrivateMessagesClear();
+    if (this.hud && this.hud.consoleOutput) {
+      this.hud.consoleOutput.dispatchPrivateMessagesClear();
       this.emit("private-messages-cleared");
     }
   }
 
   /**
    * Updates the size of the input field (command line) to fit its contents.
    *
    * @returns void
--- a/devtools/client/webconsole/hudservice.js
+++ b/devtools/client/webconsole/hudservice.js
@@ -5,17 +5,17 @@
 "use strict";
 
 var Services = require("Services");
 loader.lazyRequireGetter(this, "Utils", "devtools/client/webconsole/utils", true);
 loader.lazyRequireGetter(this, "extend", "devtools/shared/extend", true);
 loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true);
 loader.lazyRequireGetter(this, "Tools", "devtools/client/definitions", true);
 loader.lazyRequireGetter(this, "Telemetry", "devtools/client/shared/telemetry");
-loader.lazyRequireGetter(this, "NewWebConsoleFrame", "devtools/client/webconsole/new-webconsole", true);
+loader.lazyRequireGetter(this, "WebConsoleFrame", "devtools/client/webconsole/webconsole-frame", true);
 loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
 loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
 loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/debugger-client", true);
 loader.lazyRequireGetter(this, "viewSource", "devtools/client/shared/view-source");
 loader.lazyRequireGetter(this, "l10n", "devtools/client/webconsole/webconsole-l10n");
 const BC_WINDOW_FEATURES = "chrome,titlebar,toolbar,centerscreen,resizable,dialog=no";
 
 // The preference prefix for all of the Browser Console filters.
@@ -267,17 +267,17 @@ function WebConsole(target, iframeWindow
   this.chromeWindow = chromeWindow;
   this.hudId = "hud_" + ++gHudId;
   this.target = target;
   this.browserWindow = this.chromeWindow.top;
   let element = this.browserWindow.document.documentElement;
   if (element.getAttribute("windowtype") != gDevTools.chromeWindowType) {
     this.browserWindow = HUDService.currentContext();
   }
-  this.ui = new NewWebConsoleFrame(this);
+  this.ui = new WebConsoleFrame(this);
 }
 WebConsole.prototype = {
   iframeWindow: null,
   chromeWindow: null,
   browserWindow: null,
   hudId: null,
   target: null,
   ui: null,
--- a/devtools/client/webconsole/local-dev/index.js
+++ b/devtools/client/webconsole/local-dev/index.js
@@ -35,18 +35,18 @@ pref("devtools.webconsole.filter.net", f
 pref("devtools.webconsole.filter.netxhr", false);
 pref("devtools.webconsole.ui.filterbar", false);
 pref("devtools.webconsole.inputHistoryCount", 50);
 pref("devtools.webconsole.persistlog", false);
 pref("devtools.webconsole.timestampMessages", false);
 pref("devtools.webconsole.autoMultiline", true);
 pref("devtools.webconsole.sidebarToggle", true);
 
-const NewConsoleOutputWrapper = require("../new-console-output-wrapper");
-const NewWebConsoleFrame = require("../new-webconsole").NewWebConsoleFrame;
+const WebConsoleOutputWrapper = require("../webconsole-output-wrapper");
+const WebConsoleFrame = require("../webconsole-frame").WebConsoleFrame;
 
 // Copied from netmonitor/index.js:
 window.addEventListener("DOMContentLoaded", () => {
   for (let link of document.head.querySelectorAll("link")) {
     link.href = link.href.replace(/(resource|chrome)\:\/\//, "/");
   }
 
   if (appinfo.OS === "Darwin") {
@@ -76,25 +76,25 @@ function onConnect(connection) {
   const owner = {
     iframeWindow: window,
     chromeWindow: window,
     hudId: "hud_0",
     getDebuggerFrames: () => { },
     getInspectorSelection: () => { },
     target: connection.tabConnection.tabTarget,
     _browserConsole: false,
-    NewConsoleOutputWrapper,
+    WebConsoleOutputWrapper,
   };
-  consoleFrame = new NewWebConsoleFrame(owner);
+  consoleFrame = new WebConsoleFrame(owner);
   consoleFrame.init().then(function() {
-    console.log("NewWebConsoleFrame initialized");
+    console.log("WebConsoleFrame initialized");
   });
 }
 
 // This is just a hack until the local dev environment includes jsterm
 window.evaluateJS = function(input) {
   consoleFrame.webConsoleClient.evaluateJSAsync(`${input}`, function(r) {
-    consoleFrame.newConsoleOutput.dispatchMessageAdd(r);
+    consoleFrame.consoleOutput.dispatchMessageAdd(r);
   }, {});
 };
 
 document.documentElement.classList.add("theme-light");
 bootstrap(React, ReactDOM).then(onConnect);
--- a/devtools/client/webconsole/main.js
+++ b/devtools/client/webconsole/main.js
@@ -3,20 +3,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
  /* global BrowserLoader */
 
 "use strict";
 
 const { BrowserLoader } = ChromeUtils.import("resource://devtools/client/shared/browser-loader.js", {});
 
-this.NewConsoleOutput = function(parentNode, jsterm, toolbox, owner, serviceContainer) {
+this.WebConsoleOutput = function(parentNode, jsterm, toolbox, owner, serviceContainer) {
   // Initialize module loader and load all modules of the new inline
   // preview feature. The entire code-base doesn't need any extra
   // privileges and runs entirely in content scope.
-  let NewConsoleOutputWrapper = BrowserLoader({
+  let WebConsoleOutputWrapper = BrowserLoader({
     baseURI: "resource://devtools/client/webconsole/",
     window
-  }).require("./new-console-output-wrapper");
+  }).require("./webconsole-output-wrapper");
 
-  return new NewConsoleOutputWrapper(
+  return new WebConsoleOutputWrapper(
     parentNode, jsterm, toolbox, owner, serviceContainer);
 };
--- a/devtools/client/webconsole/moz.build
+++ b/devtools/client/webconsole/moz.build
@@ -12,19 +12,19 @@ DIRS += [
     'test',
     'utils',
 ]
 DevToolsModules(
     'console-commands.js',
     'constants.js',
     'hudservice.js',
     'main.js',
-    'new-console-output-wrapper.js',
-    'new-webconsole.js',
     'panel.js',
     'store.js',
     'types.js',
     'utils.js',
     'webconsole-connection-proxy.js',
+    'webconsole-frame.js',
     'webconsole-l10n.js',
+    'webconsole-output-wrapper.js',
 )
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Developer Tools: Console')
--- a/devtools/client/webconsole/panel.js
+++ b/devtools/client/webconsole/panel.js
@@ -76,17 +76,17 @@ WebConsolePanel.prototype = {
 
         let webConsoleUIWindow = iframe.contentWindow.wrappedJSObject;
         let chromeWindow = iframe.ownerDocument.defaultView;
         return HUDService.openWebConsole(this.target, webConsoleUIWindow,
                                          chromeWindow);
       })
       .then((webConsole) => {
         this.hud = webConsole;
-        // Pipe 'reloaded' event from NewWebConsoleFrame to WebConsolePanel.
+        // Pipe 'reloaded' event from WebConsoleFrame to WebConsolePanel.
         // These events are listened by the Toolbox.
         this.hud.ui.on("reloaded", () => {
           this.emit("reloaded");
         });
         this._isReady = true;
         this.emit("ready");
         return this;
       }, (reason) => {
--- a/devtools/client/webconsole/store.js
+++ b/devtools/client/webconsole/store.js
@@ -225,17 +225,17 @@ function enableNetProvider(hud) {
       if (!dataProvider) {
         dataProvider = new DataProvider({
           actions,
           webConsoleClient: proxy.webConsoleClient
         });
 
         // /!\ This is terrible, but it allows ResponsePanel to be able to call
         // `dataProvider.requestData` to fetch response content lazily.
-        // `proxy.networkDataProvider` is put by NewConsoleOutputWrapper on
+        // `proxy.networkDataProvider` is put by WebConsoleOutputWrapper on
         // `serviceContainer` which allow NetworkEventMessage to expose requestData on
         // the fake `connector` object it hands over to ResponsePanel.
         proxy.networkDataProvider = dataProvider;
       }
 
       let type = action.type;
       let newState = reducer(state, action);
 
@@ -255,17 +255,17 @@ function enableNetProvider(hud) {
               networkInfo: message,
             });
           });
         }
       }
 
       // Process all incoming HTTP details packets. Note that
       // Network event update packets are sent in batches from:
-      // `NewConsoleOutputWrapper.dispatchMessageUpdate` using
+      // `WebConsoleOutputWrapper.dispatchMessageUpdate` using
       // NETWORK_MESSAGE_UPDATE action.
       // Make sure to call `dataProvider.onNetworkEventUpdate`
       // to fetch data from the backend.
       if (type == NETWORK_MESSAGE_UPDATE) {
         let actor = action.response.networkInfo.actor;
         let open = getAllMessagesUiById(state).includes(actor);
         if (open) {
           let message = getMessage(state, actor);
--- a/devtools/client/webconsole/test/chrome/test_render_perf.html
+++ b/devtools/client/webconsole/test/chrome/test_render_perf.html
@@ -19,18 +19,18 @@
 // > ./mach mochitest test_render_perf.html
 // Then open https://perf-html.io and drag the json file printed at the end of this test
 
 const NUM_MESSAGES = 4000;
 const NUM_STREAMING = 100;
 ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 const Services = browserRequire("Services");
 Services.prefs.setIntPref("devtools.hud.loglimit", NUM_MESSAGES);
-const NewConsoleOutputWrapper = browserRequire(
-  "devtools/client/webconsole/new-console-output-wrapper");
+const WebConsoleOutputWrapper = browserRequire(
+  "devtools/client/webconsole/webconsole-output-wrapper");
 const actions =
   browserRequire("devtools/client/webconsole/actions/index");
 const EventEmitter = browserRequire("devtools/shared/event-emitter");
 const testPackets = Array.from({length: NUM_MESSAGES}).map((el, id) => ({
   "from": "server1.conn4.child1/consoleActor2",
   "type": "consoleAPICall",
   "message": {
     "arguments": [
@@ -165,17 +165,17 @@ async function testStreamLogging(wrapper
   streamMeasure.stop();
 }
 
 window.onload = async function() {
   // This test does costly work multiple times to have better performance data.
   // It doesn't run in automation
   SimpleTest.requestLongerTimeout(3);
 
-  const wrapper = new NewConsoleOutputWrapper(
+  const wrapper = new WebConsoleOutputWrapper(
     document.getElementById("output"),
     {hud: EventEmitter.decorate({proxy: {}}), focus: () => {}},
     {},
     null,
     document,
   );
   wrapper.init();
 
--- a/devtools/client/webconsole/test/components/new-console-output-wrapper.test.js
+++ b/devtools/client/webconsole/test/components/new-console-output-wrapper.test.js
@@ -10,67 +10,67 @@ const { stubPackets } =
   require("devtools/client/webconsole/test/fixtures/stubs/index");
 const {
   getFirstMessage,
   getLastMessage,
   getMessageAt,
   getPrivatePacket,
 } = require("devtools/client/webconsole/test/helpers");
 
-const NewConsoleOutputWrapper =
-  require("devtools/client/webconsole/new-console-output-wrapper");
+const WebConsoleOutputWrapper =
+  require("devtools/client/webconsole/webconsole-output-wrapper");
 const { messagesAdd } =
   require("devtools/client/webconsole/actions/messages");
 
-function getNewConsoleOutputWrapper() {
+function getWebConsoleOutputWrapper() {
   const hud = {
     proxy: {
       releaseActor: () => {},
       target: {
         activeTab: {
           ensureCSSErrorReportingEnabled: () => {}
         }
       },
     },
   };
-  return new NewConsoleOutputWrapper(null, hud);
+  return new WebConsoleOutputWrapper(null, hud);
 }
 
-describe("NewConsoleOutputWrapper", () => {
+describe("WebConsoleOutputWrapper", () => {
   it("clears queues when dispatchMessagesClear is called", () => {
-    const ncow = getNewConsoleOutputWrapper();
+    const ncow = getWebConsoleOutputWrapper();
     ncow.queuedMessageAdds.push({fakePacket: "message"});
     ncow.queuedMessageUpdates.push({fakePacket: "message-update"});
     ncow.queuedRequestUpdates.push({fakePacket: "request-update"});
 
     ncow.dispatchMessagesClear();
 
     expect(ncow.queuedMessageAdds.length).toBe(0);
     expect(ncow.queuedMessageUpdates.length).toBe(0);
     expect(ncow.queuedRequestUpdates.length).toBe(0);
   });
 
   it("removes private packets from message queue on dispatchPrivateMessagesClear", () => {
-    const ncow = getNewConsoleOutputWrapper();
+    const ncow = getWebConsoleOutputWrapper();
 
     const publicLog = stubPackets.get("console.log('mymap')");
     ncow.queuedMessageAdds.push(
       getPrivatePacket("console.trace()"),
       publicLog,
       getPrivatePacket("XHR POST request"),
     );
 
     ncow.dispatchPrivateMessagesClear();
 
     expect(ncow.queuedMessageAdds).toEqual([publicLog]);
   });
 
   it("removes private packets from network update queue on dispatchPrivateMessagesClear",
     () => {
-      const ncow = getNewConsoleOutputWrapper();
+      const ncow = getWebConsoleOutputWrapper();
 
       const postId = Symbol();
       const getId = Symbol();
 
       // Add messages in the store to make sure that update to private requests are
       // removed from the queue.
       ncow.getStore().dispatch(messagesAdd([
         stubPackets.get("GET request"),
@@ -93,17 +93,17 @@ describe("NewConsoleOutputWrapper", () =
       ncow.dispatchPrivateMessagesClear();
 
       expect(ncow.queuedMessageUpdates.length).toBe(1);
       expect(ncow.queuedMessageUpdates).toEqual([publicNetworkUpdate]);
     });
 
   it("removes private packets from network request queue on dispatchPrivateMessagesClear",
     () => {
-      const ncow = getNewConsoleOutputWrapper();
+      const ncow = getWebConsoleOutputWrapper();
 
       ncow.getStore().dispatch(messagesAdd([
         stubPackets.get("GET request"),
         getPrivatePacket("XHR GET request"),
         getPrivatePacket("XHR POST request"),
       ]));
 
       const state = ncow.getStore().getState();
--- a/devtools/client/webconsole/test/fixtures/stub-generators/head.js
+++ b/devtools/client/webconsole/test/fixtures/stub-generators/head.js
@@ -299,17 +299,17 @@ async function generateConsoleApiStubs()
     preparedMessages: [],
     packets: [],
   };
 
   let toolbox = await openNewTabAndToolbox(TEST_URI, "webconsole");
   const hud = toolbox.getCurrentPanel().hud;
   let {ui} = hud;
   ok(ui.jsterm, "jsterm exists");
-  ok(ui.newConsoleOutput, "newConsoleOutput exists");
+  ok(ui.consoleOutput, "consoleOutput exists");
 
   for (let [key, {keys, code}] of consoleApi) {
     let received = new Promise(resolve => {
       let i = 0;
       let listener = async (type, res) => {
         const callKey = keys[i];
         stubs.packets.push(formatPacket(callKey, res));
         stubs.preparedMessages.push(formatStub(callKey, res));
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_console_group.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_console_group.js
@@ -10,17 +10,17 @@
 
 const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
                  "test/mochitest/test-console-group.html";
 const { INDENT_WIDTH } =
   require("devtools/client/webconsole/components/MessageIndent");
 
 add_task(async function() {
   const hud = await openNewTabAndConsole(TEST_URI);
-  const store = hud.ui.newConsoleOutput.getStore();
+  const store = hud.ui.consoleOutput.getStore();
   logAllStoreChanges(hud);
 
   const onMessagesLogged = waitForMessage(hud, "log-6");
   ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
     content.wrappedJSObject.doLog();
   });
   await onMessagesLogged;
 
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_init.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_init.js
@@ -9,17 +9,17 @@ const TEST_URI = "http://example.com/bro
                  "test/mochitest/test-console.html";
 
 add_task(async function() {
   let toolbox = await openNewTabAndToolbox(TEST_URI, "webconsole");
   let hud = toolbox.getCurrentPanel().hud;
   let {ui} = hud;
 
   ok(ui.jsterm, "jsterm exists");
-  ok(ui.newConsoleOutput, "newConsoleOutput exists");
+  ok(ui.consoleOutput, "consoleOutput exists");
 
   let receievedMessages = waitForMessages({
     hud,
     messages: [
       { text: "19" },
     ]
   });
 
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_logErrorInPage.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_logErrorInPage.js
@@ -6,16 +6,16 @@
 "use strict";
 
 // Test that we can log a message to the web console from the toolbox.
 
 const TEST_URI = "data:text/html;charset=utf-8,<p>test logErrorInPage";
 
 add_task(async function() {
   const hud = await openNewTabAndConsole(TEST_URI);
-  const toolbox = hud.ui.newConsoleOutput.toolbox;
+  const toolbox = hud.ui.consoleOutput.toolbox;
 
   toolbox.target.logErrorInPage("beware the octopus", "content javascript");
 
   const node = await waitFor(() => findMessage(hud, "octopus"));
   ok(node, "text is displayed in web console");
   ok(node.classList.contains("error"), "the log represents an error");
 });
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_logWarningInPage.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_logWarningInPage.js
@@ -6,16 +6,16 @@
 "use strict";
 
 // Test that we can log warning message to the web console from the toolbox.
 
 const TEST_URI = "data:text/html;charset=utf-8,<p>test logErrorInPage";
 
 add_task(async function() {
   const hud = await openNewTabAndConsole(TEST_URI);
-  const toolbox = hud.ui.newConsoleOutput.toolbox;
+  const toolbox = hud.ui.consoleOutput.toolbox;
 
   toolbox.target.logWarningInPage("beware the octopus", "content javascript");
 
   const node = await waitFor(() => findMessage(hud, "octopus"));
   ok(node, "text is displayed in web console");
   ok(node.classList.contains("warn"), "the log represents a warning");
 });
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_expand.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_expand.js
@@ -117,17 +117,17 @@ async function openRequestBeforeUpdates(
   let { node: messageNode } = await message;
 
   info("Network message found.");
 
   let updates = waitForRequestUpdates(toolbox);
   let payload = waitForPayloadReady(toolbox);
 
   // Set the default panel.
-  const state = hud.ui.newConsoleOutput.getStore().getState();
+  const state = hud.ui.consoleOutput.getStore().getState();
   state.ui.networkMessageActiveTabId = tab.id;
 
   // Expand network log
   let urlNode = messageNode.querySelector(".url");
   urlNode.click();
 
   // Make sure the current tab is the expected one.
   let currentTab = messageNode.querySelector(`#${tab.id}-tab`);
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_status_code.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_status_code.js
@@ -54,17 +54,17 @@ add_task(async function task() {
     { clickEvent: rightClickCtrlOrCmdKeyMouseEvent, link: null, where: null }
   ];
 
   for (let testCase of testCases) {
     const { clickEvent } = testCase;
     let onConsoleMenuOpened = [
       rightClickMouseEvent,
       rightClickCtrlOrCmdKeyMouseEvent
-    ].includes(clickEvent) ? hud.ui.newConsoleOutput.once("menu-open") : null;
+    ].includes(clickEvent) ? hud.ui.consoleOutput.once("menu-open") : null;
 
     let { link, where } = await simulateLinkClick(statusCodeNode, testCase.clickEvent);
     is(link, testCase.link, `Clicking the provided link opens ${link}`);
     is(where, testCase.where, `Link opened in correct tab`);
 
     if (onConsoleMenuOpened) {
       info("Check if context menu is opened on right clicking the status-code");
       await onConsoleMenuOpened;
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_sourcemap_nosource.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_sourcemap_nosource.js
@@ -26,17 +26,17 @@ const PAGE_URL = `data:text/html,
 
 add_task(async function() {
   // Force the new debugger UI, in case this gets uplifted with the old
   // debugger still turned on
   await pushPref("devtools.debugger.new-debugger-frontend", true);
   await pushPref("devtools.source-map.client-service.enabled", true);
 
   const hud = await openNewTabAndConsole(PAGE_URL);
-  const toolbox = hud.ui.newConsoleOutput.toolbox;
+  const toolbox = hud.ui.consoleOutput.toolbox;
 
   info("Finding \"here\" message and waiting for source map to be applied");
   await waitFor(() => {
     let node = findMessage(hud, "here");
     if (!node) {
       return false;
     }
     let frameLinkNode = node.querySelector(".message-location .frame-link");
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_visibility_messages.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_visibility_messages.js
@@ -36,17 +36,17 @@ add_task(async function() {
   info("select the inspector");
   await toolbox.selectTool("inspector");
 
   info("Wait for console to be hidden");
   const { document } = hud.iframeWindow;
   await waitFor(() => (document.visibilityState == "hidden"));
 
   const onAllMessagesInStore = new Promise(done => {
-    const store = hud.ui.newConsoleOutput.getStore();
+    const store = hud.ui.consoleOutput.getStore();
     store.subscribe(() => {
       const messages = store.getState().messages.messagesById.size;
       // Also consider the "in-console log" message
       if (messages == MESSAGES_COUNT + 1) {
         done();
       }
     });
   });
--- a/devtools/client/webconsole/test/mochitest/head.js
+++ b/devtools/client/webconsole/test/mochitest/head.js
@@ -79,17 +79,17 @@ async function openNewTabAndConsole(url,
 /**
  * Subscribe to the store and log out stringinfied versions of messages.
  * This is a helper function for debugging, to make is easier to see what
  * happened during the test in the log.
  *
  * @param object hud
  */
 function logAllStoreChanges(hud) {
-  const store = hud.ui.newConsoleOutput.getStore();
+  const store = hud.ui.consoleOutput.getStore();
   // Adding logging each time the store is modified in order to check
   // the store state in case of failure.
   store.subscribe(() => {
     const messages = [...store.getState().messages.messagesById.values()];
     const debugMessages = messages.map(({id, type, parameters, messageText}) => {
       return {id, type, parameters, messageText};
     });
     info("messages : " + JSON.stringify(debugMessages));
@@ -235,33 +235,33 @@ function findMessages(hud, text, selecto
  *
  * @param object hud
  *        The web console.
  * @param element element
  *        The dom element on which the context menu event should be synthesized.
  * @return promise
  */
 async function openContextMenu(hud, element) {
-  let onConsoleMenuOpened = hud.ui.newConsoleOutput.once("menu-open");
+  let onConsoleMenuOpened = hud.ui.consoleOutput.once("menu-open");
   synthesizeContextMenuEvent(element);
   await onConsoleMenuOpened;
-  const doc = hud.ui.newConsoleOutput.owner.chromeWindow.document;
+  const doc = hud.ui.consoleOutput.owner.chromeWindow.document;
   return doc.getElementById("webconsole-menu");
 }
 
 /**
  * Hide the webconsole context menu popup. Returns a promise that will resolve when the
  * context menu popup is hidden or immediately if the popup can't be found.
  *
  * @param object hud
  *        The web console.
  * @return promise
  */
 function hideContextMenu(hud) {
-  const doc = hud.ui.newConsoleOutput.owner.chromeWindow.document;
+  const doc = hud.ui.consoleOutput.owner.chromeWindow.document;
   let popup = doc.getElementById("webconsole-menu");
   if (!popup) {
     return Promise.resolve();
   }
 
   let onPopupHidden = once(popup, "popuphidden");
   popup.hidePopup();
   return onPopupHidden;
@@ -742,11 +742,11 @@ async function setFilterBarVisible(hud, 
  *
  * The css, netxhr and net filters are disabled by default.
  *
  * @param {Object} hud
  */
 async function resetFilters(hud) {
   info("Resetting filters to their default state");
 
-  const store = hud.ui.newConsoleOutput.getStore();
+  const store = hud.ui.consoleOutput.getStore();
   store.dispatch(wcActions.filtersClear());
 }
--- a/devtools/client/webconsole/webconsole-connection-proxy.js
+++ b/devtools/client/webconsole/webconsole-connection-proxy.js
@@ -223,35 +223,35 @@ WebConsoleConnectionProxy.prototype = {
 
     this.webConsoleFrame._onUpdateListeners();
   },
 
   /**
    * Dispatch a message add on the new frontend and emit an event for tests.
    */
   dispatchMessageAdd: function(packet) {
-    this.webConsoleFrame.newConsoleOutput.dispatchMessageAdd(packet);
+    this.webConsoleFrame.consoleOutput.dispatchMessageAdd(packet);
   },
 
   /**
    * Batched dispatch of messages.
    */
   dispatchMessagesAdd: function(packets) {
-    this.webConsoleFrame.newConsoleOutput.dispatchMessagesAdd(packets);
+    this.webConsoleFrame.consoleOutput.dispatchMessagesAdd(packets);
   },
 
   /**
    * Dispatch a message event on the new frontend and emit an event for tests.
    */
   dispatchMessageUpdate: function(networkInfo, response) {
-    this.webConsoleFrame.newConsoleOutput.dispatchMessageUpdate(networkInfo, response);
+    this.webConsoleFrame.consoleOutput.dispatchMessageUpdate(networkInfo, response);
   },
 
   dispatchRequestUpdate: function(id, data) {
-    this.webConsoleFrame.newConsoleOutput.dispatchRequestUpdate(id, data);
+    this.webConsoleFrame.consoleOutput.dispatchRequestUpdate(id, data);
   },
 
   /**
    * The "cachedMessages" response handler.
    *
    * @private
    * @param object response
    *        The JSON response object received from the server.
rename from devtools/client/webconsole/new-webconsole.js
rename to devtools/client/webconsole/webconsole-frame.js
--- a/devtools/client/webconsole/new-webconsole.js
+++ b/devtools/client/webconsole/webconsole-frame.js
@@ -35,29 +35,29 @@ const PREF_SIDEBAR_ENABLED = "devtools.w
  *
  * The WebConsoleFrame is responsible for the actual Web Console UI
  * implementation.
  *
  * @constructor
  * @param object webConsoleOwner
  *        The WebConsole owner object.
  */
-function NewWebConsoleFrame(webConsoleOwner) {
+function WebConsoleFrame(webConsoleOwner) {
   this.owner = webConsoleOwner;
   this.hudId = this.owner.hudId;
   this.isBrowserConsole = this.owner._browserConsole;
   this.window = this.owner.iframeWindow;
 
   this._onToolboxPrefChanged = this._onToolboxPrefChanged.bind(this);
   this._onPanelSelected = this._onPanelSelected.bind(this);
   this._onChangeSplitConsoleState = this._onChangeSplitConsoleState.bind(this);
 
   EventEmitter.decorate(this);
 }
-NewWebConsoleFrame.prototype = {
+WebConsoleFrame.prototype = {
   /**
    * Getter for the debugger WebConsoleClient.
    * @type object
    */
   get webConsoleClient() {
     return this.proxy ? this.proxy.webConsoleClient : null;
   },
 
@@ -77,17 +77,17 @@ NewWebConsoleFrame.prototype = {
   /**
    * Initialize the WebConsoleFrame instance.
    * @return object
    *         A promise object that resolves once the frame is ready to use.
    */
   async init() {
     this._initUI();
     await this._initConnection();
-    await this.newConsoleOutput.init();
+    await this.consoleOutput.init();
 
     let id = WebConsoleUtils.supportsString(this.hudId);
     if (Services.obs) {
       Services.obs.notifyObservers(id, "web-console-created");
     }
   },
   destroy() {
     if (this._destroyer) {
@@ -103,17 +103,17 @@ NewWebConsoleFrame.prototype = {
 
     let toolbox = gDevTools.getToolbox(this.owner.target);
     if (toolbox) {
       toolbox.off("webconsole-selected", this._onPanelSelected);
       toolbox.off("split-console", this._onChangeSplitConsoleState);
       toolbox.off("select", this._onChangeSplitConsoleState);
     }
 
-    this.window = this.owner = this.newConsoleOutput = null;
+    this.window = this.owner = this.consoleOutput = null;
 
     let onDestroy = () => {
       this._destroyer.resolve(null);
     };
     if (this.proxy) {
       this.proxy.disconnect().then(onDestroy);
       this.proxy = null;
     } else {
@@ -199,18 +199,18 @@ NewWebConsoleFrame.prototype = {
     this.document = this.window.document;
     this.rootElement = this.document.documentElement;
 
     this.outputNode = this.document.getElementById("output-container");
 
     let toolbox = gDevTools.getToolbox(this.owner.target);
 
     // Handle both launchpad and toolbox loading
-    let Wrapper = this.owner.NewConsoleOutputWrapper || this.window.NewConsoleOutput;
-    this.newConsoleOutput =
+    let Wrapper = this.owner.WebConsoleOutputWrapper || this.window.WebConsoleOutput;
+    this.consoleOutput =
       new Wrapper(this.outputNode, this, toolbox, this.owner, this.document);
     // Toggle the timestamp on preference change
     Services.prefs.addObserver(PREF_MESSAGE_TIMESTAMP, this._onToolboxPrefChanged);
     this._onToolboxPrefChanged();
 
     this._initShortcuts();
 
     if (toolbox) {
@@ -248,17 +248,17 @@ NewWebConsoleFrame.prototype = {
       shortcuts.on(l10n.getStr("webconsole.close.key"),
                    this.window.top.close.bind(this.window.top));
 
       ZoomKeys.register(this.window);
       shortcuts.on("CmdOrCtrl+Alt+R", quickRestart);
     } else if (Services.prefs.getBoolPref(PREF_SIDEBAR_ENABLED)) {
       shortcuts.on("Esc", event => {
         if (!this.jsterm.autocompletePopup || !this.jsterm.autocompletePopup.isOpen) {
-          this.newConsoleOutput.dispatchSidebarClose();
+          this.consoleOutput.dispatchSidebarClose();
           this.jsterm.focus();
         }
       });
     }
   },
 
   /**
    * Handler for page location changes.
@@ -288,30 +288,30 @@ NewWebConsoleFrame.prototype = {
     }
   },
 
   /**
    * Called when the message timestamp pref changes.
    */
   _onToolboxPrefChanged: function() {
     let newValue = Services.prefs.getBoolPref(PREF_MESSAGE_TIMESTAMP);
-    this.newConsoleOutput.dispatchTimestampsToggle(newValue);
+    this.consoleOutput.dispatchTimestampsToggle(newValue);
   },
 
   /**
    * Sets the focus to JavaScript input field when the web console tab is
    * selected or when there is a split console present.
    * @private
    */
   _onPanelSelected: function() {
     this.jsterm.focus();
   },
 
   _onChangeSplitConsoleState: function() {
-    this.newConsoleOutput.dispatchSplitConsoleCloseButtonToggle();
+    this.consoleOutput.dispatchSplitConsoleCloseButtonToggle();
   },
 
   /**
    * Handler for the tabNavigated notification.
    *
    * @param string event
    *        Event name.
    * @param object packet
@@ -323,25 +323,25 @@ NewWebConsoleFrame.prototype = {
     }
 
     if (!packet.nativeConsoleAPI) {
       this.logWarningAboutReplacedAPI();
     }
 
     // Wait for completion of any async dispatch before notifying that the console
     // is fully updated after a page reload
-    await this.newConsoleOutput.waitAsyncDispatches();
+    await this.consoleOutput.waitAsyncDispatches();
     this.emit("reloaded");
   },
 
   handleTabWillNavigate: function(packet) {
     if (this.persistLog) {
       // Add a _type to hit convertCachedPacket.
       packet._type = true;
-      this.newConsoleOutput.dispatchMessageAdd(packet);
+      this.consoleOutput.dispatchMessageAdd(packet);
     } else {
       this.jsterm.clearOutput(false);
     }
 
     if (packet.url) {
       this.onLocationChange(packet.url, packet.title);
     }
   }
@@ -355,9 +355,9 @@ function quickRestart() {
   const { Cc, Ci } = require("chrome");
   Services.obs.notifyObservers(null, "startupcache-invalidate");
   let env = Cc["@mozilla.org/process/environment;1"]
             .getService(Ci.nsIEnvironment);
   env.set("MOZ_DISABLE_SAFE_MODE_KEY", "1");
   Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
 }
 
-exports.NewWebConsoleFrame = NewWebConsoleFrame;
+exports.WebConsoleFrame = WebConsoleFrame;
rename from devtools/client/webconsole/new-console-output-wrapper.js
rename to devtools/client/webconsole/webconsole-output-wrapper.js
--- a/devtools/client/webconsole/new-console-output-wrapper.js
+++ b/devtools/client/webconsole/webconsole-output-wrapper.js
@@ -14,17 +14,17 @@ const { isPacketPrivate } = require("dev
 const { getAllMessagesById, getMessage } = require("devtools/client/webconsole/selectors/messages");
 const Telemetry = require("devtools/client/shared/telemetry");
 
 const EventEmitter = require("devtools/shared/event-emitter");
 const App = createFactory(require("devtools/client/webconsole/components/App"));
 
 let store = null;
 
-function NewConsoleOutputWrapper(parentNode, hud, toolbox, owner, document) {
+function WebConsoleOutputWrapper(parentNode, hud, toolbox, owner, document) {
   EventEmitter.decorate(this);
 
   this.parentNode = parentNode;
   this.hud = hud;
   this.toolbox = toolbox;
   this.owner = owner;
   this.document = document;
 
@@ -35,17 +35,17 @@ function NewConsoleOutputWrapper(parentN
   this.queuedRequestUpdates = [];
   this.throttledDispatchPromise = null;
 
   this._telemetry = new Telemetry();
 
   store = configureStore(this.hud);
 }
 
-NewConsoleOutputWrapper.prototype = {
+WebConsoleOutputWrapper.prototype = {
   init: function() {
     return new Promise((resolve) => {
       const attachRefToHud = (id, node) => {
         this.hud[id] = node;
       };
       // Focus the input line whenever the output area is clicked.
       this.parentNode.addEventListener("click", (event) => {
         // Do not focus on middle/right-click or 2+ clicks.
@@ -427,9 +427,9 @@ NewConsoleOutputWrapper.prototype = {
 
   // Called by pushing close button.
   closeSplitConsole() {
     this.toolbox.closeSplitConsole();
   }
 };
 
 // Exports from this module
-module.exports = NewConsoleOutputWrapper;
+module.exports = WebConsoleOutputWrapper;