mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841954 - Make sure onOpen callback fires in all cases, r=past
This commit is contained in:
parent
8bbae0dd49
commit
38a9ca5ec3
@ -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