Bug 1090929 - Enable the breakpoints tests;r=mratcliffe

This commit is contained in:
Eddy Bruël 2014-11-13 19:36:37 +01:00
parent 6c9f2fbf65
commit a56c8615c7
15 changed files with 53 additions and 71 deletions

View File

@ -152,33 +152,33 @@ skip-if = e10s || os == "mac" || e10s # Bug 895426
[browser_dbg_break-on-dom-event-02.js]
skip-if = e10s
[browser_dbg_breakpoints-actual-location.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-actual-location2.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-break-on-last-line-of-script-on-reload.js]
skip-if = e10s
skip-if = e10s # Bug 1093535
[browser_dbg_breakpoints-button-01.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-button-02.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-contextmenu-add.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-contextmenu.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-disabled-reload.js]
skip-if = e10s
skip-if = e10s # Bug 1093535
[browser_dbg_breakpoints-editor.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-highlight.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-new-script.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-other-tabs.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-pane.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_breakpoints-reload.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_chrome-create.js]
skip-if = e10s
[browser_dbg_chrome-debugging.js]

View File

@ -9,12 +9,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gBreakpoints, gBreakpointsAdded, gBreakpointsRemoving;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;
@ -24,7 +23,7 @@ function test() {
gBreakpointsRemoving = gBreakpoints._removing;
waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest);
gDebuggee.firstCall();
callInTab(gTab, "firstCall");
});
function performTest() {

View File

@ -10,12 +10,11 @@
const TAB_URL = EXAMPLE_URL + "doc_breakpoint-move.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gBreakpoints, gBreakpointsAdded, gBreakpointsRemoving;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;
@ -25,7 +24,7 @@ function test() {
gBreakpointsRemoving = gBreakpoints._removing;
waitForSourceAndCaretAndScopes(gPanel, ".html", 1).then(performTest);
gDebuggee.ermahgerd();
callInTab(gTab, "ermahgerd");
});
function performTest() {
@ -62,7 +61,7 @@ function test() {
yield resumeAndTestBreakpoint(20);
yield doResume(gPanel);
executeSoon(() => gDebuggee.ermahgerd());
callInTab(gTab, "ermahgerd");
yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES);
yield resumeAndTestBreakpoint(20);

View File

@ -15,7 +15,7 @@ function test() {
let gPanel, gDebugger, gThreadClient, gEvents;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gThreadClient = gDebugger.gThreadClient;

View File

@ -8,12 +8,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gSources, gBreakpoints;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gSources = gDebugger.DebuggerView.Sources;

View File

@ -9,12 +9,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gSources, gBreakpoints;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gSources = gDebugger.DebuggerView.Sources;

View File

@ -8,12 +8,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gContextMenu, gBreakpoints, gBreakpointsAdded;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;
@ -29,7 +28,7 @@ function test() {
ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
});
gDebuggee.firstCall();
callInTab(gTab, "firstCall");
});
function performTest() {

View File

@ -11,12 +11,11 @@ function test() {
// Debug test slaves are a bit slow at this test.
requestLongerTimeout(2);
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gSources, gBreakpoints;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gSources = gDebugger.DebuggerView.Sources;
@ -95,13 +94,7 @@ function test() {
ok(isCaretPos(gPanel, 9),
"The editor location is correct before pausing.");
// Spin the event loop before causing the debuggee to pause, to allow
// this function to return first.
executeSoon(() => {
EventUtils.sendMouseEvent({ type: "click" },
gDebuggee.document.querySelector("button"),
gDebuggee);
});
sendMouseClickToTab(gTab, content.document.querySelector("button"));
return finished;
}

View File

@ -8,7 +8,8 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
let gTab = aTab;
let gDebugger = aPanel.panelWin;
let gEvents = gDebugger.EVENTS;
let gEditor = gDebugger.DebuggerView.editor;
@ -66,7 +67,7 @@ function test() {
yield ensureSourceIs(aPanel, "-01.js");
yield verifyView({ disabled: false, visible: true });
executeSoon(() => aDebuggee.firstCall());
callInTab(gTab, "firstCall");
yield waitForDebuggerEvents(aPanel, gEvents.FETCHED_SCOPES);
yield ensureSourceIs(aPanel, "-01.js");
yield ensureCaretAt(aPanel, 5);
@ -83,7 +84,7 @@ function test() {
yield ensureSourceIs(aPanel, "-02.js", true);
yield verifyView({ disabled: false, visible: false });
executeSoon(() => aDebuggee.firstCall());
callInTab(gTab, "firstCall");
yield waitForSourceAndCaretAndScopes(aPanel, "-01.js", 1);
yield verifyView({ disabled: false, visible: true });
@ -98,7 +99,7 @@ function test() {
yield ensureSourceIs(aPanel, "-02.js", true);
yield verifyView({ disabled: true, visible: false });
executeSoon(() => aDebuggee.firstCall());
callInTab(gTab, "firstCall");
yield waitForDebuggerEvents(aPanel, gEvents.FETCHED_SCOPES);
yield ensureSourceIs(aPanel, "-02.js");
yield ensureCaretAt(aPanel, 1);

View File

@ -9,12 +9,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gBreakpoints, gBreakpointsAdded, gBreakpointsRemoving;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;
@ -24,7 +23,7 @@ function test() {
gBreakpointsRemoving = gBreakpoints._removing;
waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest);
gDebuggee.firstCall();
callInTab(gTab, "firstCall");
});
function performTest() {

View File

@ -8,12 +8,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;

View File

@ -8,12 +8,11 @@
const TAB_URL = EXAMPLE_URL + "doc_inline-script.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
@ -33,7 +32,7 @@ function addBreakpoint() {
});
});
gDebuggee.runDebuggerStatement();
callInTab(gTab, "runDebuggerStatement");
}
function testResume() {
@ -54,9 +53,7 @@ function testResume() {
});
});
EventUtils.sendMouseEvent({ type: "click" },
gDebuggee.document.querySelector("button"),
gDebuggee);
sendMouseClickToTab(gTab, content.document.querySelector("button"));
});
}
@ -84,7 +81,6 @@ function testBreakpointHit() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
});

View File

@ -9,8 +9,8 @@
const TAB_URL = EXAMPLE_URL + "doc_breakpoints-other-tabs.html";
let test = Task.async(function* () {
const [tab1, debuggee1, panel1] = yield initDebugger(TAB_URL);
const [tab2, debuggee2, panel2] = yield initDebugger(TAB_URL);
const [tab1,, panel1] = yield initDebugger(TAB_URL);
const [tab2,, panel2] = yield initDebugger(TAB_URL);
yield ensureSourceIs(panel1, "code_breakpoints-other-tabs.js", true);
@ -22,7 +22,7 @@ let test = Task.async(function* () {
});
const paused = waitForThreadEvents(panel2, "paused");
executeSoon(() => debuggee2.testCase());
callInTab(tab2, "testCase");
const packet = yield paused;
is(packet.why.type, "debuggerStatement",

View File

@ -9,12 +9,11 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gBreakpoints, gBreakpointsAdded, gBreakpointsRemoving;
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gEditor = gDebugger.DebuggerView.editor;
@ -24,7 +23,7 @@ function test() {
gBreakpointsRemoving = gBreakpoints._removing;
waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest);
gDebuggee.firstCall();
callInTab(gTab, "firstCall");
});
let breakpointsAdded = 0;

View File

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_breakpoints-reload.html";
let test = Task.async(function* () {
requestLongerTimeout(4);
const [tab, debuggee, panel] = yield initDebugger(TAB_URL);
const [tab,, panel] = yield initDebugger(TAB_URL);
yield ensureSourceIs(panel, "doc_breakpoints-reload.html", true);