mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 841954 - Make sure onOpen callback fires in all cases, r=past
This commit is contained in:
parent
6b503d8a6e
commit
3234f9a902
@ -470,8 +470,10 @@ ProfilerPanel.prototype = {
|
||||
panelWin = dbg.panelWin;
|
||||
|
||||
let view = dbg.panelWin.DebuggerView;
|
||||
if (view.Source && view.Sources.selectedValue === data.uri) {
|
||||
return void view.editor.setCaretPosition(data.line - 1);
|
||||
if (view.Sources.selectedValue === data.uri) {
|
||||
view.editor.setCaretPosition(data.line - 1);
|
||||
onOpen();
|
||||
return;
|
||||
}
|
||||
|
||||
panelWin.addEventListener("Debugger:SourceShown", onSourceShown, false);
|
||||
|
@ -18,9 +18,18 @@ function test() {
|
||||
let view = dbg.panelWin.DebuggerView;
|
||||
|
||||
is(view.Sources.selectedValue, data.uri, "URI is different");
|
||||
is(view.editor.getCaretPosition().line, data.line - 1, "Line is different");
|
||||
is(view.editor.getCaretPosition().line, data.line - 1,
|
||||
"Line is different");
|
||||
|
||||
tearDown(tab);
|
||||
// Test the case where script is already loaded.
|
||||
view.editor.setCaretPosition(1);
|
||||
gDevTools.showToolbox(target, "jsprofiler").then(function () {
|
||||
panel.displaySource(data, function onOpenAgain() {
|
||||
is(view.editor.getCaretPosition().line, data.line - 1,
|
||||
"Line is different");
|
||||
tearDown(tab);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user