mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 726609 - Intermittent browser_dbg_select-line.js | The correct line is selected. - Got 0, expected 5; r=msucan
This commit is contained in:
parent
1e2e0ffd61
commit
4c580efa44
@ -43,37 +43,41 @@ function testSelectLine() {
|
||||
ok(gDebugger.editor.getText().search(/debugger/) != -1,
|
||||
"The correct script was loaded initially.");
|
||||
|
||||
// getCaretPosition is 0-based.
|
||||
is(gDebugger.editor.getCaretPosition().line, 5,
|
||||
"The correct line is selected.");
|
||||
// Yield control back to the event loop so that the debugger has a
|
||||
// chance to highlight the proper line.
|
||||
executeSoon(function(){
|
||||
// getCaretPosition is 0-based.
|
||||
is(gDebugger.editor.getCaretPosition().line, 5,
|
||||
"The correct line is selected.");
|
||||
|
||||
gDebugger.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
|
||||
function onChange() {
|
||||
gDebugger.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
|
||||
onChange);
|
||||
ok(gDebugger.editor.getText().search(/debugger/) == -1,
|
||||
"The second script is no longer displayed.");
|
||||
gDebugger.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
|
||||
function onChange() {
|
||||
gDebugger.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED,
|
||||
onChange);
|
||||
ok(gDebugger.editor.getText().search(/debugger/) == -1,
|
||||
"The second script is no longer displayed.");
|
||||
|
||||
ok(gDebugger.editor.getText().search(/firstCall/) != -1,
|
||||
"The first script is displayed.");
|
||||
ok(gDebugger.editor.getText().search(/firstCall/) != -1,
|
||||
"The first script is displayed.");
|
||||
|
||||
// Yield control back to the event loop so that the debugger has a
|
||||
// chance to highlight the proper line.
|
||||
executeSoon(function(){
|
||||
// getCaretPosition is 0-based.
|
||||
is(gDebugger.editor.getCaretPosition().line, 4,
|
||||
"The correct line is selected.");
|
||||
// Yield control back to the event loop so that the debugger has a
|
||||
// chance to highlight the proper line.
|
||||
executeSoon(function(){
|
||||
// getCaretPosition is 0-based.
|
||||
is(gDebugger.editor.getCaretPosition().line, 4,
|
||||
"The correct line is selected.");
|
||||
|
||||
gDebugger.StackFrames.activeThread.resume(function() {
|
||||
removeTab(gTab);
|
||||
finish();
|
||||
gDebugger.StackFrames.activeThread.resume(function() {
|
||||
removeTab(gTab);
|
||||
finish();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Click the oldest stack frame.
|
||||
let element = gDebugger.document.getElementById("stackframe-3");
|
||||
EventUtils.synthesizeMouseAtCenter(element, {}, gDebugger);
|
||||
// Click the oldest stack frame.
|
||||
let element = gDebugger.document.getElementById("stackframe-3");
|
||||
EventUtils.synthesizeMouseAtCenter(element, {}, gDebugger);
|
||||
});
|
||||
}}, 0);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user