Bug 1090929 - Enable the pretty-print tests;r=mratcliffe

This commit is contained in:
Eddy Bruël 2014-11-06 10:27:45 +01:00
parent 92008ff307
commit c8a0c2acf8
16 changed files with 54 additions and 79 deletions

View File

@ -308,33 +308,33 @@ skip-if = e10s
[browser_dbg_paused-keybindings.js]
skip-if = e10s
[browser_dbg_pretty-print-01.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-02.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-03.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-04.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-05.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-06.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-07.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-08.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-09.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-10.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-11.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-12.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-13.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_pretty-print-on-paused.js]
skip-if = e10s
skip-if = e10s && debug
[browser_dbg_progress-listener-bug.js]
skip-if = e10s
[browser_dbg_reload-preferred-script-01.js]

View File

@ -7,13 +7,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
function test() {
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;
@ -76,7 +75,6 @@ function testSourceIsStillPretty() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -8,13 +8,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gContextMenu;
function test() {
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;
@ -49,7 +48,6 @@ function testSourceIsPretty() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -7,12 +7,11 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.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;
@ -35,8 +34,7 @@ function test() {
function runCodeAndPause() {
const deferred = promise.defer();
once(gDebugger.gThreadClient, "paused").then(deferred.resolve);
// Have to executeSoon so that we don't pause before this function returns.
executeSoon(gDebuggee.foo);
callInTab(gTab, "foo");
return deferred.promise;
}
@ -46,7 +44,6 @@ function clickPrettyPrintButton() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
});

View File

@ -7,13 +7,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gSearchBox;
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
@ -65,7 +64,6 @@ function testPrettyPrintedSearch() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gSearchBox = null;

View File

@ -7,13 +7,12 @@
const TAB_URL = EXAMPLE_URL + "doc_included-script.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources, gControllerSources;
function test() {
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;
@ -68,7 +67,6 @@ function prepareDebugger(aPanel) {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -8,13 +8,12 @@
const TAB_URL = EXAMPLE_URL + "doc_included-script.html";
const JS_URL = EXAMPLE_URL + "code_location-changes.js";
let gTab, gDebuggee, gPanel, gDebugger, gClient;
let gTab, gPanel, gDebugger, gClient;
let gEditor, gSources, gControllerSources, gPrettyPrinted;
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gClient = gDebugger.gClient;
@ -83,7 +82,6 @@ function clickPrettyPrintButton() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gClient = null;

View File

@ -5,14 +5,13 @@
// Test basic pretty printing functionality. Would be an xpcshell test, except
// for bug 921252.
let gTab, gDebuggee, gPanel, gClient, gThreadClient, gSource;
let gTab, gPanel, gClient, gThreadClient, gSource;
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gClient = gPanel.panelWin.gClient;
gThreadClient = gPanel.panelWin.DebuggerController.activeThread;
@ -52,5 +51,5 @@ function testUgly({ error, source }) {
}
registerCleanupFunction(function() {
gTab = gDebuggee = gPanel = gClient = gThreadClient = gSource = null;
gTab = gPanel = gClient = gThreadClient = gSource = null;
});

View File

@ -4,19 +4,17 @@
// Test stepping through pretty printed sources.
let gTab, gDebuggee, gPanel, gClient, gThreadClient, gSource;
let gTab, gPanel, gClient, gThreadClient, gSource;
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gClient = gPanel.panelWin.gClient;
gThreadClient = gPanel.panelWin.DebuggerController.activeThread;
gDebuggee.noop = x => x;
findSource();
});
}
@ -47,7 +45,7 @@ function prettyPrintSource(source) {
function runCode({ error }) {
ok(!error);
gClient.addOneTimeListener("paused", testDbgStatement);
gDebuggee.main3();
callInTab(gTab, "main3");
}
function testDbgStatement(event, { why, frame }) {
@ -90,5 +88,5 @@ function testHitBreakpoint() {
}
registerCleanupFunction(function() {
gTab = gDebuggee = gPanel = gClient = gThreadClient = gSource = null;
gTab = gPanel = gClient = gThreadClient = gSource = null;
});

View File

@ -4,19 +4,17 @@
// Test pretty printing source mapped sources.
var gDebuggee;
var gClient;
var gThreadClient;
var gSource;
let gTab, gDebuggee, gPanel, gClient, gThreadClient, gSource;
let gTab, gPanel, gClient, gThreadClient, gSource;
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gClient = gPanel.panelWin.gClient;
gThreadClient = gPanel.panelWin.DebuggerController.activeThread;
@ -50,7 +48,7 @@ function prettyPrint() {
function runCode({ error }) {
ok(!error);
gClient.addOneTimeListener("paused", testDbgStatement);
gDebuggee.a();
callInTab(gTab, "a");
}
function testDbgStatement(event, { frame, why }) {
@ -85,5 +83,5 @@ function testFrame({ frames: [frame] }) {
}
registerCleanupFunction(function() {
gTab = gDebuggee = gPanel = gClient = gThreadClient = null;
gTab = gPanel = gClient = gThreadClient = null;
});

View File

@ -8,13 +8,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
function test() {
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;
@ -55,7 +54,6 @@ function testSourceIsStillUgly() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -7,13 +7,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
function test() {
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;
@ -52,7 +51,6 @@ function testSourceIsPretty() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -8,13 +8,12 @@
const TAB_URL = EXAMPLE_URL + "doc_blackboxing.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
function test() {
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;
@ -46,7 +45,6 @@ function testButtonIsntChecked() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -9,13 +9,12 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-3.html";
let gTab, gDebuggee, gPanel, gDebugger;
let gTab, gPanel, gDebugger;
let gEditor, gSources;
function test() {
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;
@ -79,7 +78,6 @@ function testSourceIsStillPretty() {
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gEditor = null;

View File

@ -8,14 +8,13 @@
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-on-paused.html";
let gTab, gDebuggee, gPanel, gDebugger, gThreadClient, gSources;
let gTab, gPanel, gDebugger, gThreadClient, gSources;
const SECOND_SOURCE_VALUE = EXAMPLE_URL + "code_ugly-2.js";
function test(){
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
gTab = aTab;
gDebuggee = aDebuggee;
gPanel = aPanel;
gDebugger = gPanel.panelWin;
gThreadClient = gDebugger.gThreadClient;
@ -33,9 +32,7 @@ function test(){
yield doResume(gPanel);
const bpHit = waitForCaretAndScopes(gPanel, 6);
// Get the debuggee call off this tick so that we aren't accidentally
// blocking the yielding of bpHit which causes a deadlock.
executeSoon(() => gDebuggee.secondCall());
callInTab(gTab, "secondCall");
yield bpHit;
info("Switch to the second source.");
@ -59,7 +56,6 @@ function test(){
registerCleanupFunction(function() {
gTab = null;
gDebuggee = null;
gPanel = null;
gDebugger = null;
gThreadClient = null;

View File

@ -8,3 +8,8 @@
<script src="code_ugly-2.js"></script>
<script src="code_ugly-3.js"></script>
<script src="code_ugly-4.js"></script>
<script>
function noop(x) {
return x;
}
</script>