Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ support-files =
[browser_dbg-expressions.js]
[browser_dbg-scopes.js]
[browser_dbg-chrome-create.js]
skip-if = true
[browser_dbg-chrome-debugging.js]
skip-if = true
[browser_dbg-console.js]
Expand Down
49 changes: 31 additions & 18 deletions src/test/mochitest/browser_dbg-chrome-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
* Tests that a chrome debugger can be created in a new process.
*/

const { BrowserToolboxProcess } = Cu.import("resource://devtools/client/framework/ToolboxProcess.jsm", {});
const { BrowserToolboxProcess } = Cu.import(
"resource://devtools/client/framework/ToolboxProcess.jsm",
{}
);
let gProcess = undefined;

function initChromeDebugger() {
Expand All @@ -21,12 +24,13 @@ function initChromeDebugger() {
}

function onClose() {
ok(!gProcess._dbgProcess.isRunning,
"The remote debugger process isn't closed as it should be!");
is(gProcess._dbgProcess.exitValue, (Services.appinfo.OS == "WINNT" ? 0 : 256),
"The remote debugger process didn't die cleanly.");
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("process exit value: " + gProcess._dbgProcess.exitCode);

info("profile path: " + gProcess._dbgProfilePath);

Expand All @@ -38,35 +42,44 @@ registerCleanupFunction(function() {
gProcess = null;
});

add_task(function* () {
add_task(function*() {
// Windows XP and 8.1 test slaves are terribly slow at this test.
requestLongerTimeout(5);
Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);

gProcess = yield initChromeDebugger();

ok(gProcess._dbgProcess,
"The remote debugger process wasn't created properly!");
ok(gProcess._dbgProcess.isRunning,
"The remote debugger process isn't running!");
is(typeof gProcess._dbgProcess.pid, "number",
"The remote debugger process doesn't have a pid (?!)");
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!");
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!"
);
"The remote debugger profile isn't where we expect it!"
);

info("profile path: " + gProcess._dbgProfilePath);

gProcess.close();
yield gProcess.close();
});
1 change: 0 additions & 1 deletion src/test/mochitest/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ function assertPausedLocation(dbg, source, line) {
is(location.line, line);

// Check the debug line
// debugger
ok(
getCM(dbg).lineInfo(line - 1).wrapClass.includes("debug-line"),
"Line is highlighted as paused"
Expand Down