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
9 changes: 1 addition & 8 deletions src/test/mochitest/browser_dbg-async-stepping.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// Tests async stepping will step over await statements
add_task(async function test() {
Services.prefs.setBoolPref("devtools.debugger.features.async-stepping", true);
await pushPref("devtools.debugger.features.async-stepping", true);
const dbg = await initDebugger("doc-async.html", "async");

await selectSource(dbg, "async");
Expand All @@ -18,10 +18,3 @@ add_task(async function test() {
assertPausedLocation(dbg);
assertDebugLine(dbg, 9);
});

registerCleanupFunction(() => {
Services.prefs.clearUserPref(
"devtools.debugger.features.async-stepping",
false
);
});
3 changes: 1 addition & 2 deletions src/test/mochitest/browser_dbg-chrome-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ function onClose() {
}

registerCleanupFunction(function() {
Services.prefs.clearUserPref("devtools.debugger.remote-enabled");
gProcess = null;
});

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

gProcess = await initChromeDebugger();

Expand Down
2 changes: 1 addition & 1 deletion src/test/mochitest/browser_dbg-minified.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getScopeNodeValue(dbg, index) {
}

add_task(async function() {
Services.prefs.setBoolPref("devtools.debugger.features.map-scopes", true);
await pushPref("devtools.debugger.features.map-scopes", true);

const dbg = await initDebugger("doc-minified2.html");

Expand Down
12 changes: 1 addition & 11 deletions src/test/mochitest/browser_dbg-search-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ function getResultsCount(dbg) {

// Testing project search
add_task(async function() {
Services.prefs.setBoolPref(
"devtools.debugger.project-text-search-enabled",
true
);
await pushPref("devtools.debugger.project-text-search-enabled", true);

const dbg = await initDebugger("doc-script-switching.html", "switching-01");

Expand All @@ -61,10 +58,3 @@ add_task(async function() {
const selectedSource = dbg.selectors.getSelectedSource(dbg.getState());
ok(selectedSource.get("url").includes("switching-01"));
});

registerCleanupFunction(() => {
Services.prefs.clearUserPref(
"devtools.debugger.project-text-search-enabled",
false
);
});
2 changes: 1 addition & 1 deletion src/test/mochitest/browser_dbg-sourcemaps3.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function waitForScopeNode(dbg, index) {
add_task(async function() {
// NOTE: the CORS call makes the test run times inconsistent
requestLongerTimeout(2);
Services.prefs.setBoolPref("devtools.debugger.features.map-scopes", true);
await pushPref("devtools.debugger.features.map-scopes", true);

const dbg = await initDebugger("doc-sourcemaps3.html");
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
Expand Down