зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315289 - Use correct API for opening a source in the debugger r=me
This commit is contained in:
Родитель
93e8d4acf8
Коммит
8ad312e3e3
|
@ -62,7 +62,7 @@ exports.viewSourceInDebugger = Task.async(function* (toolbox, sourceURL, sourceL
|
|||
yield toolbox.selectTool("jsdebugger");
|
||||
const source = dbg._selectors().getSourceByURL(dbg._getState(), sourceURL);
|
||||
if (source) {
|
||||
dbg._actions().selectSourceByURL(sourceURL, { line: sourceLine });
|
||||
dbg._actions().selectSourceURL(sourceURL, { line: sourceLine });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
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);
|
||||
// Force the new debugger UI, in case this gets uplifted with the old
|
||||
// debugger still turned on
|
||||
Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", true);
|
||||
registerCleanupFunction(function* () {
|
||||
Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
|
||||
});
|
||||
|
@ -79,10 +80,9 @@ function test() {
|
|||
yield hud.ui.once("source-in-debugger-opened");
|
||||
|
||||
let toolbox = yield gDevTools.getToolbox(hud.target);
|
||||
let {panelWin: { DebuggerView: view }} = toolbox.getPanel("jsdebugger");
|
||||
is(view.Sources.selectedValue,
|
||||
getSourceActor(view.Sources, url),
|
||||
let dbg = toolbox.getPanel("jsdebugger");
|
||||
is(dbg._selectors().getSelectedSource(dbg._getState()).get("url"),
|
||||
url,
|
||||
"expected source url");
|
||||
is(view.editor.getCursor().line, line - 1, "expected source line");
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче