Bug 1314057 - Remove duplicated test between old and new debugger. r=loganfsmyth
☠☠ backed out by f5681e1f56e6 ☠ ☠
authorDavid Walsh <dwalsh@mozilla.com>
Mon, 08 Oct 2018 13:04:50 -0500
changeset 496113 90480b4b4c43db2437ec4ad7185cd6fafbf821e7
parent 496112 fa0d46e77437a4cb89fe0d6178d8ec7b7d933b23
child 496114 f464268350266bad55c84d23f3b352b752679cad
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1314057
milestone64.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 1314057 - Remove duplicated test between old and new debugger. r=loganfsmyth
devtools/client/debugger/test/mochitest/browser.ini
devtools/client/debugger/test/mochitest/browser_dbg_chrome-create.js
devtools/client/debugger/test/mochitest/browser_dbg_chrome-debugging.js
--- a/devtools/client/debugger/test/mochitest/browser.ini
+++ b/devtools/client/debugger/test/mochitest/browser.ini
@@ -139,20 +139,16 @@ skip-if = e10s && debug
 [browser_dbg_breakpoints-eval.js]
 skip-if = e10s && debug
 [browser_dbg_breakpoints-new-script.js]
 skip-if = e10s && debug
 [browser_dbg_breakpoints-other-tabs.js]
 skip-if = e10s && debug
 [browser_dbg_bug-896139.js]
 skip-if = e10s && debug
-[browser_dbg_chrome-create.js]
-skip-if = (e10s && debug) || (verify && os == "linux") # Exit code mismatch with verify
-[browser_dbg_chrome-debugging.js]
-skip-if = e10s && debug
 [browser_dbg_clean-exit.js]
 skip-if = true # Bug 1044985 (racy test)
 [browser_dbg_closure-inspection.js]
 skip-if = e10s && debug
 [browser_dbg_conditional-breakpoints-01.js]
 skip-if = e10s && debug
 [browser_dbg_conditional-breakpoints-02.js]
 skip-if = e10s && debug
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_chrome-create.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that a chrome debugger can be created in a new process.
- */
-
-// There are shutdown issues for which multiple rejections are left uncaught.
-// See bug 1018184 for resolving these issues.
-const { PromiseTestUtils } = scopedCuImport("resource://testing-common/PromiseTestUtils.jsm");
-PromiseTestUtils.whitelistRejectionsGlobally(/File closed/);
-PromiseTestUtils.whitelistRejectionsGlobally(/NS_ERROR_FAILURE/);
-
-var gProcess;
-
-function test() {
-  // Windows XP and 8.1 test slaves are terribly slow at this test.
-  requestLongerTimeout(5);
-  Services.prefs.setBoolPref("devtools.chrome.enabled", true);
-  Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);
-
-  initChromeDebugger(aOnClose).then(aProcess => {
-    gProcess = aProcess;
-
-    info("Starting test...");
-    performTest();
-  });
-}
-
-function performTest() {
-  ok(gProcess._dbgProcess,
-    "The remote debugger process wasn't created properly!");
-  ok(gProcess._dbgProcess.exitCode == null,
-    "The remote debugger process isn't running!");
-  is(typeof gProcess._dbgProcess.pid, "number",
-    "The remote debugger process doesn't have a pid (?!)");
-
-  info("process location: " + gProcess._dbgProcess.location);
-  info("process pid: " + gProcess._dbgProcess.pid);
-  info("process name: " + gProcess._dbgProcess.processName);
-  info("process sig: " + gProcess._dbgProcess.processSignature);
-
-  ok(gProcess._dbgProfilePath,
-    "The remote debugger profile wasn't created properly!");
-  is(gProcess._dbgProfilePath, OS.Path.join(OS.Constants.Path.profileDir, "chrome_debugger_profile"),
-     "The remote debugger profile isn't where we expect it!");
-
-  info("profile path: " + gProcess._dbgProfilePath);
-
-  gProcess.close();
-}
-
-function aOnClose() {
-  is(gProcess._dbgProcess.exitCode, (Services.appinfo.OS == "WINNT" ? -9 : -15),
-    "The remote debugger process didn't die cleanly.");
-
-  info("process exit value: " + gProcess._dbgProcess.exitValue);
-
-  info("profile path: " + gProcess._dbgProfilePath);
-
-  finish();
-}
-
-registerCleanupFunction(function () {
-  Services.prefs.clearUserPref("devtools.chrome.enabled");
-  Services.prefs.clearUserPref("devtools.debugger.remote-enabled");
-  gProcess = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_chrome-debugging.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that chrome debugging works.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_inline-debugger-statement.html";
-
-var gClient, gThreadClient;
-var gAttached = promise.defer();
-var gNewChromeSource = promise.defer();
-
-var { DevToolsLoader } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
-var customLoader = new DevToolsLoader();
-customLoader.invisibleToDebugger = true;
-var { DebuggerServer } = customLoader.require("devtools/server/main");
-
-function test() {
-  DebuggerServer.init();
-  DebuggerServer.registerAllActors();
-  DebuggerServer.allowChromeProcess = true;
-
-  let transport = DebuggerServer.connectPipe();
-  gClient = new DebuggerClient(transport);
-  gClient.connect().then(([aType, aTraits]) => {
-    is(aType, "browser",
-      "Root actor should identify itself as a browser.");
-
-    promise.all([gAttached.promise, gNewChromeSource.promise])
-      .then(resumeAndCloseConnection)
-      .then(finish)
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    testParentProcessTargetActor();
-  });
-}
-
-function testParentProcessTargetActor() {
-  gClient.getProcess().then(aResponse => {
-    let actor = aResponse.form.actor;
-    gClient.attachTarget(actor).then(([response, tabClient]) => {
-      tabClient.attachThread(null).then(([aResponse, aThreadClient]) => {
-        gThreadClient = aThreadClient;
-        gThreadClient.addListener("newSource", onNewSource);
-
-        if (aResponse.error) {
-          ok(false, "Couldn't attach to the chrome debugger.");
-          gAttached.reject();
-        } else {
-          ok(true, "Attached to the chrome debugger.");
-          gAttached.resolve();
-
-          // Ensure that a new chrome global will be created.
-          gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:mozilla");
-        }
-      });
-    });
-  });
-}
-
-function onNewSource(aEvent, aPacket) {
-  if (aPacket.source.url.startsWith("chrome:")) {
-    ok(true, "Received a new chrome source: " + aPacket.source.url);
-
-    gThreadClient.removeListener("newSource", onNewSource);
-    gNewChromeSource.resolve();
-  }
-}
-
-function resumeAndCloseConnection() {
-  let deferred = promise.defer();
-  gThreadClient.resume(() => deferred.resolve(gClient.close()));
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gClient = null;
-  gThreadClient = null;
-  gAttached = null;
-  gNewChromeSource = null;
-
-  customLoader = null;
-  DebuggerServer = null;
-});