Bug 1300861 - enable new debugger in nightly r=bgrins

This commit is contained in:
James Long 2016-09-12 23:45:16 -04:00
parent b4b74f3e7d
commit 6d3885f455
21 changed files with 124 additions and 7 deletions

View File

@ -5,6 +5,12 @@
* Tests if the a function call's stack is properly displayed in the UI.
*/
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function* ifTestingSupported() {
let { target, panel } = yield initCanvasDebuggerFrontend(SIMPLE_CANVAS_DEEP_STACK_URL);
let { window, $, $all, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;

View File

@ -6,6 +6,12 @@
* and jumping to source in the debugger for the topmost call item works.
*/
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function* ifTestingSupported() {
let { target, panel } = yield initCanvasDebuggerFrontend(SIMPLE_CANVAS_DEEP_STACK_URL);
let { window, $, $all, EVENTS, SnapshotsListView, CallsListView } = panel.panelWin;

View File

@ -22,6 +22,7 @@ DebuggerPanel.prototype = {
threadClient: this.toolbox.threadClient,
tabTarget: this.toolbox.target
});
this.isReady = true;
return this;
});
},

View File

@ -31,7 +31,11 @@ const FRAME_SCRIPT_URL = getRootDirectory(gTestPath) + "code_frame-script.js";
const CHROME_URL = "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/";
const CHROME_URI = Services.io.newURI(CHROME_URL, null, null);
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
info("finish() was called, cleaning up...");
Services.prefs.setBoolPref("devtools.debugger.log", gEnableLogging);

View File

@ -13,6 +13,12 @@ thisTestLeaksUncaughtRejectionsAndShouldBeFixed(
* when tagging an already source mapped location initially.
*/
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
const DEBUGGER_ROOT = "http://example.com/browser/devtools/client/debugger/test/mochitest/";
// Empty page
const PAGE_URL = `${DEBUGGER_ROOT}doc_empty-tab-01.html`;

View File

@ -7,6 +7,12 @@
* and un pretty printing.
*/
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
const DEBUGGER_ROOT = "http://example.com/browser/devtools/client/debugger/test/mochitest/";
// Empty page
const PAGE_URL = `${DEBUGGER_ROOT}doc_empty-tab-01.html`;

View File

@ -13,6 +13,12 @@ let panelWin = null;
const URL = "data:text/html;charset=utf8,test split console key delegation";
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
let tab = yield addTab(URL);
let target = TargetFactory.forTab(tab);

View File

@ -11,6 +11,12 @@
var URL = `${URL_ROOT}doc_viewsource.html`;
var JS_URL = `${URL_ROOT}code_math.js`;
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function* viewSource() {
let toolbox = yield openNewTabAndToolbox(URL);

View File

@ -10,6 +10,12 @@
var URL = `${URL_ROOT}doc_viewsource.html`;
var JS_URL = `${URL_ROOT}code_math.js`;
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function* viewSource() {
let toolbox = yield openNewTabAndToolbox(URL);
let { panelWin: debuggerWin } = yield toolbox.selectTool("jsdebugger");

View File

@ -92,7 +92,12 @@ pref("devtools.debugger.auto-pretty-print", false);
pref("devtools.debugger.auto-black-box", true);
pref("devtools.debugger.workers", false);
pref("devtools.debugger.promise", false);
#if defined(NIGHTLY_BUILD)
pref("devtools.debugger.new-debugger-frontend", true);
#else
pref("devtools.debugger.new-debugger-frontend", false);
#endif
// The default Debugger UI settings
pref("devtools.debugger.ui.panes-workers-and-sources-width", 200);

View File

@ -8,6 +8,12 @@
"use strict";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function test() {
Task.spawn(function* () {
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +

View File

@ -12,18 +12,26 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-eval-in-stackframe.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
yield loadTab(TEST_URI);
let hud = yield openConsole();
let dbgPanel = yield openDebugger();
yield waitForFrameAdded(dbgPanel);
yield waitForFrameAdded();
yield openConsole();
yield testVariablesView(hud);
});
function* waitForFrameAdded(dbgPanel) {
let thread = dbgPanel.panelWin.DebuggerController.activeThread;
function* waitForFrameAdded() {
let target = TargetFactory.forTab(gBrowser.selectedTab);
let toolbox = gDevTools.getToolbox(target);
let thread = toolbox.threadClient;
info("Waiting for framesadded");
yield new Promise(resolve => {

View File

@ -11,20 +11,28 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-eval-in-stackframe.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
yield loadTab(TEST_URI);
let hud = yield openConsole();
let dbgPanel = yield openDebugger();
yield openInspector();
yield waitForFrameAdded(dbgPanel);
yield waitForFrameAdded();
yield openConsole();
yield testVariablesView(hud);
});
function* waitForFrameAdded(dbgPanel) {
let thread = dbgPanel.panelWin.DebuggerController.activeThread;
function* waitForFrameAdded() {
let target = TargetFactory.forTab(gBrowser.selectedTab);
let toolbox = gDevTools.getToolbox(target);
let thread = toolbox.threadClient;
info("Waiting for framesadded");
yield new Promise(resolve => {

View File

@ -14,6 +14,12 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
var gWebConsole, gJSTerm, gDebuggerWin, gThread, gDebuggerController;
var gStackframes;
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function test() {
loadTab(TEST_URI).then(() => {
openConsole().then(consoleOpened);

View File

@ -11,6 +11,13 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-eval-in-stackframe.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
yield loadTab(TEST_URI);

View File

@ -11,6 +11,12 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-autocomplete-in-stackframe.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
var gStackframes;
registerCleanupFunction(function () {
gStackframes = null;

View File

@ -10,6 +10,12 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
"test/test-bug_1050691_click_function_to_source.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
yield loadTab(TEST_URI);
let hud = yield openConsole();

View File

@ -11,6 +11,12 @@
const TEST_URI = "http://example.com/browser/devtools/client/webconsole/test" +
"/test-bug-766001-js-console-links.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function test() {
let hud;

View File

@ -13,6 +13,12 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
var gWebConsole, gJSTerm, gVariablesView;
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
function test() {
registerCleanupFunction(() => {
gWebConsole = gJSTerm = gVariablesView = null;

View File

@ -26,7 +26,7 @@ add_task(function* () {
is(hud.jsterm.inputNode.hasAttribute("focused"), false,
"inputNode shouldn't be focused");
yield openDebugger();
yield openInspector();
hud = yield openConsole();
is(hud.jsterm.inputNode.hasAttribute("focused"), true,

View File

@ -13,6 +13,12 @@
const TEST_URI = "https://example.com/browser/devtools/client/webconsole/" +
"test/test-mixedcontent-securityerrors.html";
// Force the old debugger UI since it's directly used (see Bug 1301705)
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
registerCleanupFunction(function* () {
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
});
add_task(function* () {
yield loadTab(TEST_URI);
let hud = yield openConsole(null);