зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 59598af5e407 on suspicion of causing mochitest-1 and 3 permaorange
This commit is contained in:
Родитель
e1b01045ad
Коммит
ec6b45a1b3
|
@ -44,7 +44,9 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
|
|||
function doCheck(aEditor) {
|
||||
function checkLineAndCallback() {
|
||||
info("In checkLineAndCallback()");
|
||||
ok(aEditor.sourceEditor, "sourceeditor not null");
|
||||
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) {
|
||||
|
@ -53,7 +55,6 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
|
|||
}
|
||||
|
||||
ok(aEditor, "aEditor is defined.");
|
||||
aEditor.focus();
|
||||
|
||||
// Source-editor is already loaded, check the current line of caret.
|
||||
if (aEditor.sourceEditor) {
|
||||
|
@ -77,7 +78,7 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
|
|||
onAttach: function onAttach() {
|
||||
info("on attach happened");
|
||||
aEditor.removeActionListener(this);
|
||||
info("action listener removed");
|
||||
info("this removed");
|
||||
executeSoon(function() {
|
||||
if (aEditor.styleSheetIndex != SEC.selectedStyleSheetIndex) {
|
||||
ok(false, "Correct Style Sheet was not selected.");
|
||||
|
@ -115,7 +116,7 @@ function checkStyleEditorForSheetAndLine(aStyleSheetIndex, aLine, aCallback) {
|
|||
"checking later if it is correct");
|
||||
for (let aEditor of SEC.editors) {
|
||||
if (aEditor.styleSheetIndex == aStyleSheetIndex) {
|
||||
executeSoon(doCheck.bind(null, aEditor));
|
||||
doCheck(aEditor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -137,14 +138,18 @@ let observer = {
|
|||
.getEditorForWindow(content.window);
|
||||
ok(styleEditorWin, "Style Editor Window is defined");
|
||||
waitForFocus(function() {
|
||||
checkStyleEditorForSheetAndLine(0, 7, function() {
|
||||
checkStyleEditorForSheetAndLine(1, 6, function() {
|
||||
window.StyleEditor.toggle();
|
||||
nodes = styleEditorWin = null;
|
||||
finishTest();
|
||||
//styleEditorWin.addEventListener("load", function onStyleEditorWinLoad() {
|
||||
//styleEditorWin.removeEventListener("load", onStyleEditorWinLoad);
|
||||
|
||||
checkStyleEditorForSheetAndLine(0, 7, function() {
|
||||
checkStyleEditorForSheetAndLine(1, 6, function() {
|
||||
window.StyleEditor.toggle();
|
||||
styleEditorWin = null;
|
||||
finishTest();
|
||||
});
|
||||
EventUtils.sendMouseEvent({ type: "click" }, nodes[1]);
|
||||
});
|
||||
EventUtils.sendMouseEvent({ type: "click" }, nodes[1]);
|
||||
});
|
||||
//});
|
||||
}, styleEditorWin);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -79,13 +79,7 @@ function testEnd()
|
|||
{
|
||||
if (gTmpFile) {
|
||||
SimpleTest.executeSoon(function() {
|
||||
try {
|
||||
gTmpFile.remove(false);
|
||||
}
|
||||
catch (ex if (ex.name == "NS_ERROR_FILE_IS_LOCKED")) {
|
||||
// Sometimes remove() throws because the file is not unlocked soon
|
||||
// enough.
|
||||
}
|
||||
gTmpFile.remove(false);
|
||||
gTmpFile = null;
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче