Bug 1446222 - Move websocket-server.js to socket dir. r=jdescottes
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 19 Mar 2018 18:06:44 -0500
changeset 409066 d0ae3543e9e5c675633c11c41a8a3555214f1057
parent 409065 f5836adc9542e3f04e5c695e20ff1cd8599c6c23
child 409067 8e69d0a1591abb3e7dbecd3054bf685b7c5ade5e
push id61416
push userjryans@gmail.com
push dateTue, 20 Mar 2018 21:02:29 +0000
treeherderautoland@36b4eaecc56d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1446222
milestone61.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 1446222 - Move websocket-server.js to socket dir. r=jdescottes MozReview-Commit-ID: 9LZZXTKGCOb
devtools/server/moz.build
devtools/server/socket/moz.build
devtools/server/socket/tests/.eslintrc.js
devtools/server/socket/tests/chrome.ini
devtools/server/socket/tests/test_websocket-server.html
devtools/server/socket/websocket-server.js
devtools/server/tests/mochitest/chrome.ini
devtools/server/tests/mochitest/test_websocket-server.html
devtools/server/websocket-server.js
devtools/shared/security/socket.js
--- a/devtools/server/moz.build
+++ b/devtools/server/moz.build
@@ -4,26 +4,26 @@
 # 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/.
 
 include('../templates.mozbuild')
 
 DIRS += [
     'actors',
     'performance',
+    'socket',
 ]
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 DevToolsModules(
     'child.js',
     'content-process-debugger-server.js',
     'content-server.jsm',
     'main.js',
     'service-worker-child.js',
-    'websocket-server.js',
     'worker.js'
 )
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Developer Tools')
new file mode 100644
--- /dev/null
+++ b/devtools/server/socket/moz.build
@@ -0,0 +1,11 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
+
+DevToolsModules(
+    'websocket-server.js',
+)
new file mode 100644
--- /dev/null
+++ b/devtools/server/socket/tests/.eslintrc.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = {
+  // Extend from the common devtools mochitest eslintrc config.
+  "extends": "../../../.eslintrc.xpcshell.js"
+};
new file mode 100644
--- /dev/null
+++ b/devtools/server/socket/tests/chrome.ini
@@ -0,0 +1,3 @@
+[DEFAULT]
+tags = devtools
+[test_websocket-server.html]
rename from devtools/server/tests/mochitest/test_websocket-server.html
rename to devtools/server/socket/tests/test_websocket-server.html
--- a/devtools/server/tests/mochitest/test_websocket-server.html
+++ b/devtools/server/socket/tests/test_websocket-server.html
@@ -9,17 +9,17 @@
 </head>
 <body>
 <script>
 "use strict";
 
 window.onload = function() {
   const CC = Components.Constructor;
   const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
-  const WebSocketServer = require("devtools/server/websocket-server");
+  const WebSocketServer = require("devtools/server/socket/websocket-server");
 
   const ServerSocket = CC("@mozilla.org/network/server-socket;1",
     "nsIServerSocket", "init");
 
   add_task(async function() {
     // Create a TCP server on auto-assigned port
     let server = new ServerSocket(-1, true, -1);
     ok(server, `Launched WebSocket server on port ${server.port}`);
rename from devtools/server/websocket-server.js
rename to devtools/server/socket/websocket-server.js
--- a/devtools/server/tests/mochitest/chrome.ini
+++ b/devtools/server/tests/mochitest/chrome.ini
@@ -103,9 +103,8 @@ support-files =
 [test_styles-modify.html]
 [test_styles-svg.html]
 [test_unsafeDereference.html]
 [test_webconsole-node-grip.html]
 [test_webextension-addon-debugging-connect.html]
 skip-if = !e10s # test is designed to work on e10s only
 [test_webextension-addon-debugging-reload.html]
 skip-if = !e10s # test is designed to work on e10s only
-[test_websocket-server.html]
--- a/devtools/shared/security/socket.js
+++ b/devtools/shared/security/socket.js
@@ -12,17 +12,17 @@ var { Ci, Cc, CC, Cr } = require("chrome
 Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
 
 var Services = require("Services");
 var promise = require("promise");
 var defer = require("devtools/shared/defer");
 var DevToolsUtils = require("devtools/shared/DevToolsUtils");
 var { dumpn, dumpv } = DevToolsUtils;
 loader.lazyRequireGetter(this, "WebSocketServer",
-  "devtools/server/websocket-server");
+  "devtools/server/socket/websocket-server");
 loader.lazyRequireGetter(this, "DebuggerTransport",
   "devtools/shared/transport/transport", true);
 loader.lazyRequireGetter(this, "WebSocketDebuggerTransport",
   "devtools/shared/transport/websocket-transport");
 loader.lazyRequireGetter(this, "DebuggerServer",
   "devtools/server/main", true);
 loader.lazyRequireGetter(this, "discovery",
   "devtools/shared/discovery/discovery");