Bug 800231 - More logging to check where test times out, r=past

This commit is contained in:
Girish Sharma 2012-10-12 13:08:09 +05:30
parent 1903e3ee33
commit cab2361f80

View File

@ -54,7 +54,12 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
// Editor is already loaded, check the current line of caret.
if (aEditor.sourceEditor) {
ok(true, "Editor is already loaded, check the current line of caret");
executeSoon(function() {
ok(true, "Execute soon occured");
ok(aEditor.sourceEditor != null, "sourceeditor not null");
ok(aEditor.sourceEditor.getCaretPosition() != null, "position not null");
ok(aEditor.sourceEditor.getCaretPosition().line != null, "line not null");
is(aEditor.sourceEditor.getCaretPosition().line, aLine,
"Correct line is selected");
if (aCallback) {
@ -64,12 +69,19 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
return;
}
ok(true, "Editor is not loaded, waiting for it.");
ok(aEditor, "aEditor is defined.");
// Wait for source editor to be loaded.
aEditor.addActionListener({
onAttach: function onAttach() {
ok(true, "on attach happened");
aEditor.removeActionListener(this);
ok(true, "this removed");
executeSoon(function() {
ok(true, "execute soon");
ok(aEditor.sourceEditor != null, "sourceeditor not null");
ok(aEditor.sourceEditor.getCaretPosition() != null, "position not null");
ok(aEditor.sourceEditor.getCaretPosition().line != null, "line not null");
is(aEditor.sourceEditor.getCaretPosition().line, aLine,
"Correct line is selected");
if (aCallback) {