Backed out changeset ef722ca61b23 (bug 1276073) for frequent timeouts like in browser_dbg_search-symbols.js

This commit is contained in:
Carsten "Tomcat" Book 2016-06-01 15:06:05 +02:00
Родитель 037ad62636
Коммит 80f07395be
75 изменённых файлов: 112 добавлений и 123 удалений

Просмотреть файл

@ -17,7 +17,7 @@ function test() {
requestLongerTimeout(2);
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -10,14 +10,14 @@ const TAB_URL = EXAMPLE_URL + "doc_auto-pretty-print-01.html";
var gTab, gPanel, gDebugger;
var gEditor, gSources, gPrefs, gOptions, gView;
var gFirstSource = EXAMPLE_URL + "code_ugly-5.js";
var gSecondSource = EXAMPLE_URL + "code_ugly-6.js";
var gFirstSourceLabel = "code_ugly-5.js";
var gSecondSourceLabel = "code_ugly-6.js";
var gOriginalPref = Services.prefs.getBoolPref("devtools.debugger.auto-pretty-print");
function test() {
let options = {
source: gFirstSource,
source: gFirstSourceLabel,
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
@ -37,9 +37,9 @@ function test() {
testAutoPrettyPrintOn();
reload(gPanel);
yield waitForSourceShown(gPanel, gFirstSource);
yield waitForSourceShown(gPanel, gFirstSourceLabel);
testSourceIsUgly();
yield waitForSourceShown(gPanel, gFirstSource);
yield waitForSourceShown(gPanel, gFirstSourceLabel);
testSourceIsPretty();
disableAutoPrettyPrint();
testAutoPrettyPrintOff();
@ -64,7 +64,7 @@ function testSourceIsUgly() {
function testSecondSourceLabel() {
let source = gSources.selectedItem.attachment.source;
ok(source.url === gSecondSource,
ok(source.url === EXAMPLE_URL + gSecondSourceLabel,
"Second source url is correct.");
}

Просмотреть файл

@ -14,15 +14,15 @@ const TAB_URL = EXAMPLE_URL + "doc_auto-pretty-print-02.html";
var gTab, gDebuggee, gPanel, gDebugger;
var gEditor, gSources, gPrefs, gOptions, gView;
var gFirstSource = EXAMPLE_URL + "code_ugly-6.js";
var gSecondSource = EXAMPLE_URL + "code_ugly-7.js";
var gFirstSourceLabel = "code_ugly-6.js";
var gSecondSourceLabel = "code_ugly-7.js";
var gOriginalPref = Services.prefs.getBoolPref("devtools.debugger.auto-pretty-print");
Services.prefs.setBoolPref("devtools.debugger.auto-pretty-print", true);
function test() {
let options = {
source: gFirstSource,
source: gFirstSourceLabel,
line: 1
};
initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {
@ -43,7 +43,7 @@ function test() {
testSourceIsUgly();
yield waitForSourceShown(gPanel, gFirstSource);
yield waitForSourceShown(gPanel, gFirstSourceLabel);
testSourceIsPretty();
testPrettyPrintButtonOn();
@ -84,13 +84,13 @@ function test() {
function testFirstSourceLabel() {
let source = gSources.selectedItem.attachment.source;
ok(source.url === gFirstSource,
ok(source.url === EXAMPLE_URL + gFirstSourceLabel,
"First source url is correct.");
}
function testSecondSourceLabel() {
let source = gSources.selectedItem.attachment.source;
ok(source.url === gSecondSource,
ok(source.url === EXAMPLE_URL + gSecondSourceLabel,
"Second source url is correct.");
}

Просмотреть файл

@ -11,8 +11,8 @@
const TAB_URL = EXAMPLE_URL + "doc_auto-pretty-print-02.html";
var FIRST_SOURCE = EXAMPLE_URL + "code_ugly-6.js";
var SECOND_SOURCE = EXAMPLE_URL + "code_ugly-7.js";
var FIRST_SOURCE = "code_ugly-6.js";
var SECOND_SOURCE = "code_ugly-7.js";
function test() {
let options = {
@ -31,7 +31,7 @@ function test() {
const actions = bindActionCreators(gPanel);
Task.spawn(function* () {
const secondSource = queries.getSourceByURL(gController.getState(), SECOND_SOURCE);
const secondSource = queries.getSourceByURL(gController.getState(), EXAMPLE_URL + SECOND_SOURCE);
actions.selectSource(secondSource);
// It should be showing the loading text

Просмотреть файл

@ -18,7 +18,7 @@ const test = Task.async(function* () {
info("Starting browser_dbg_bfcache.js's `test`.");
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
([gTab, gDebuggee, gPanel]) = yield initDebugger(TAB_URL_1, options);

Просмотреть файл

@ -13,7 +13,7 @@ var gTab, gPanel, gDebugger;
function test() {
let options = {
source: EXAMPLE_URL + "code_binary_search.coffee",
source: ".coffee",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gDeck;
function test() {
let options = {
source: EXAMPLE_URL + "code_binary_search.coffee",
source: ".coffee",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gSources;
function test() {
let options = {
source: EXAMPLE_URL + "code_blackboxing_blackboxme.js",
source: "code_blackboxing_blackboxme.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ var gTab, gPanel, gDebugger;
function test() {
let options = {
source: EXAMPLE_URL + "code_blackboxing_unblackbox.min.js",
source: ".min.js"
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
gTab = aTab;

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
let gSources, gFrames;
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
function test() {
const options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
let gSources, gBreakpoints, gTarget, gResumeButton, gResumeKey, gThreadClient;
let options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
let gSources, gBreakpoints, gTarget, gResumeButton, gResumeKey, gThreadClient;
const options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
Task.spawn(function* () {
const options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
const [gTab,, gPanel ] = yield initDebugger(TAB_URL, options);

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_breakpoints-other-tabs.html";
var test = Task.async(function* () {
const options = {
source: EXAMPLE_URL + "code_breakpoints-other-tabs.js",
source: "code_breakpoints-other-tabs.js",
line: 1
};
const [tab1,, panel1] = yield initDebugger(TAB_URL, options);

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -8,7 +8,7 @@
*/
const TAB_URL = EXAMPLE_URL + "doc_bug-896139.html";
const SCRIPT_URL = EXAMPLE_URL + "code_bug-896139.js";
const SCRIPT_URL = "code_bug-896139.js";
function test() {
Task.spawn(function* () {
@ -18,17 +18,36 @@ function test() {
return promise.then(() => doResume(panel));
}
let options = {
source: SCRIPT_URL,
line: 1
};
let [tab,, panel] = yield initDebugger(TAB_URL, options);
let [tab,, panel] = yield initDebugger();
let win = panel.panelWin;
let Sources = win.DebuggerView.Sources;
// Load the debugger against a blank document and load the test url only
// here and not via initDebugger. That, because this test load SCRIPT_URL
// dynamically, on load, and the debugger may be on TAB_URL or SCRIPT_URL
// depending on cpu speed. initDebugger expect to assert one precise
// source.
yield navigateActiveTabTo(panel,
TAB_URL,
win.EVENTS.SOURCE_SHOWN);
if (Sources.selectedItem.attachment.source.url.indexOf(SCRIPT_URL) === -1) {
// If there is only the html file, wait for the js file to be listed.
if (Sources.itemCount == 1) {
yield waitForDebuggerEvents(panel, win.EVENTS.NEW_SOURCE);
// Wait for it to be added to the UI
yield waitForTick();
}
// Select the js file.
let onSource = waitForSourceAndCaret(panel, SCRIPT_URL, 1);
Sources.selectedValue = getSourceActor(win.DebuggerView.Sources,
EXAMPLE_URL + SCRIPT_URL);
yield onSource;
}
yield panel.addBreakpoint({
actor: getSourceActor(win.DebuggerView.Sources, SCRIPT_URL),
actor: getSourceActor(win.DebuggerView.Sources, EXAMPLE_URL + SCRIPT_URL),
line: 6
});

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
Task.spawn(function* () {
const options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
const [tab,, panel] = yield initDebugger(TAB_URL, options);

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
Task.spawn(function* () {
const options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
const [tab,, panel] = yield initDebugger(TAB_URL, options);

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
let gEditor, gSources, gContextMenu;
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
source: "code_script-switching-01.js?a=b",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -17,7 +17,7 @@ function test() {
RootActor.prototype.traits.noPrettyPrinting = true;
let options = {
source: EXAMPLE_URL + "code_ugly-5.js",
source: "code_ugly-5.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
let gIframe, gEditor, gSources, gFrames;
let options = {
source: EXAMPLE_URL + "doc_inline-debugger-statement.html",
source: "inline-debugger-statement.html",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
let gSources, gBreakpoints, gTarget, gResumeButton, gResumeKey, gThreadClient;
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
let gTab, gPanel, gDebugger, gSources;
let options = {
source: EXAMPLE_URL + "code_function-jump-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -13,7 +13,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_ugly-2.js",
source: "code_ugly-2.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_ugly-2.js",
source: "code_ugly-2.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_ugly-2.js",
source: "code_ugly-2.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -13,7 +13,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources;
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly.js",
source: "code_ugly.js",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ const TAB_URL = EXAMPLE_URL + "doc_pretty-print-3.html";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_ugly-8",
source: "code_ugly-8",
line: 2
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -17,7 +17,7 @@ const SECOND_SOURCE_VALUE = EXAMPLE_URL + "code_ugly-2.js";
function test() {
// Wait for debugger panel to be fully set and break on debugger statement
let options = {
source: EXAMPLE_URL + "code_script-switching-02.js",
source: "code_script-switching-02.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -16,7 +16,7 @@ var gSources;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gParams = "?foo=bar,baz|lol";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -11,7 +11,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -13,7 +13,7 @@ function test() {
const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
let options = {
source: EXAMPLE_URL + "code_function-search-01.js",
source: "code_function-search-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ var gSources, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1,
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -13,7 +13,7 @@ var gSources, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1,
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1,
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -16,7 +16,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gSearchView, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ var gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
requestLongerTimeout(3);
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -17,7 +17,7 @@ function test() {
requestLongerTimeout(3);
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ var gSources, gSearchBox;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ var gEditor, gSources, gSearchBox, gFilteredFunctions;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gSearchBox, gSearchBoxPanel;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSearchBox, gSearchBoxPanel;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gSources, gFrames, gPrefs, gOptions;
function test() {
let options = {
source: EXAMPLE_URL + "code_binary_search.coffee",
source: ".coffee",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -12,7 +12,7 @@ const TOTAL_SOURCES = 4;
function test() {
let options = {
source: EXAMPLE_URL + "code_function-search-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {

Просмотреть файл

@ -14,7 +14,7 @@ function test() {
let gSources, gBreakpoints;
let options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
let gSources, gBreakpoints, gEditor;
let options = {
source: EXAMPLE_URL + "code_script-eval.js",
source: "-eval.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -13,7 +13,7 @@ const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_function-search-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {

Просмотреть файл

@ -9,8 +9,6 @@
const TAB_URL = EXAMPLE_URL + "doc_script_webext_contentscript.html";
let {getExtensionUUID} = Cu.import("resource://gre/modules/Extension.jsm", {});
function test() {
let gPanel, gDebugger;
let gSources, gAddon;
@ -31,10 +29,9 @@ function test() {
return Task.spawn(function* () {
gAddon = yield addAddon(EXAMPLE_URL + "/addon-webext-contentscript.xpi");
let uuid = getExtensionUUID(gAddon.id);
let options = {
source: `moz-extension://${uuid}/webext-content-script.js`,
source: "webext-content-script.js",
line: 1
};
[,, gPanel] = yield initDebugger(TAB_URL, options);

Просмотреть файл

@ -12,7 +12,7 @@ const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -15,7 +15,7 @@ var gEditor, gSources, gFrames, gClassicFrames;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -16,7 +16,7 @@ var gEditor, gSources, gFrames, gClassicFrames, gToolbar;
function test() {
let options = {
source: EXAMPLE_URL + "code_script-switching-01.js",
source: "-01.js",
line: 1
};
initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {

Просмотреть файл

@ -238,24 +238,6 @@ function waitForTime(aDelay) {
return deferred.promise;
}
function waitForSourceLoaded(aPanel, aUrl) {
let { Sources } = aPanel.panelWin.DebuggerView;
let isLoaded = Sources.items.some(item =>
item.attachment.source.url === aUrl);
if (isLoaded) {
info("The correct source has been loaded.");
return promise.resolve(null);
} else {
return waitForDebuggerEvents(aPanel, aPanel.panelWin.EVENTS.NEW_SOURCE).then(() => {
// Wait for it to be loaded in the UI and appear into Sources.items.
return waitForTick();
}).then(() => {
return waitForSourceLoaded(aPanel, aUrl);
});
}
}
function waitForSourceShown(aPanel, aUrl) {
return waitForDebuggerEvents(aPanel, aPanel.panelWin.EVENTS.SOURCE_SHOWN).then(aSource => {
let sourceUrl = aSource.url || aSource.introductionUrl;
@ -577,7 +559,6 @@ let initDebugger = Task.async(function*(urlOrTab, options) {
let debuggerPanel = toolbox.getCurrentPanel();
let panelWin = debuggerPanel.panelWin;
let { Sources } = panelWin.DebuggerView;
prepareDebugger(debuggerPanel);
@ -596,15 +577,7 @@ let initDebugger = Task.async(function*(urlOrTab, options) {
panelWin.EVENTS.SOURCE_SHOWN);
}
if (source) {
let isSelected = Sources.selectedItem.attachment.source.url === source;
if (!isSelected) {
// Ensure that the source is loaded first before trying to select it
yield waitForSourceLoaded(debuggerPanel, source);
// Select the js file.
let onSource = waitForSourceAndCaret(debuggerPanel, source, line ? line : 1);
Sources.selectedValue = getSourceActor(Sources, source);
yield onSource;
}
ensureSourceIs(debuggerPanel, source);
}
yield onCaretUpdated;
}