Bug 726609 - Intermittent browser_dbg_select-line.js | The correct line is selected. - Got 0, expected 5; r=msucan

This commit is contained in:
Panos Astithas 2012-02-15 16:12:27 +02:00
parent 1e2e0ffd61
commit 4c580efa44

View File

@ -43,6 +43,9 @@ function testSelectLine() {
ok(gDebugger.editor.getText().search(/debugger/) != -1,
"The correct script was loaded initially.");
// 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.");
@ -74,6 +77,7 @@ function testSelectLine() {
// Click the oldest stack frame.
let element = gDebugger.document.getElementById("stackframe-3");
EventUtils.synthesizeMouseAtCenter(element, {}, gDebugger);
});
}}, 0);
});