mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 950565 - Fix for intermittent browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js | Test timed out; r=me
This commit is contained in:
parent
7c9bd47907
commit
9b22c41e51
@ -107,24 +107,15 @@ function onStyleEditorReady(aPanel)
|
||||
function checkStyleEditorForSheetAndLine(aHref, aLine, aCallback)
|
||||
{
|
||||
let foundEditor = null;
|
||||
waitForSuccess({
|
||||
name: "style editor for stylesheet",
|
||||
validatorFn: function()
|
||||
{
|
||||
for (let editor of StyleEditorUI.editors) {
|
||||
if (editor.styleSheet.href == aHref) {
|
||||
foundEditor = editor;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
successFn: function()
|
||||
{
|
||||
performLineCheck(foundEditor, aLine, aCallback);
|
||||
},
|
||||
failureFn: finishTest,
|
||||
});
|
||||
for (let editor of StyleEditorUI.editors) {
|
||||
if (editor.styleSheet.href == aHref) {
|
||||
foundEditor = editor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ok(foundEditor, "found style editor for " + aHref);
|
||||
performLineCheck(foundEditor, aLine, aCallback);
|
||||
}
|
||||
|
||||
function performLineCheck(aEditor, aLine, aCallback)
|
||||
@ -139,17 +130,13 @@ function performLineCheck(aEditor, aLine, aCallback)
|
||||
aCallback && executeSoon(aCallback);
|
||||
}
|
||||
|
||||
waitForSuccess({
|
||||
name: "source editor load",
|
||||
validatorFn: function()
|
||||
{
|
||||
return aEditor.sourceEditor;
|
||||
},
|
||||
successFn: checkForCorrectState,
|
||||
failureFn: function() {
|
||||
info("selectedStyleSheetIndex " + StyleEditorUI.selectedStyleSheetIndex
|
||||
+ " expected " + aEditor.styleSheet.styleSheetIndex);
|
||||
finishTest();
|
||||
},
|
||||
info("wait for source editor to load");
|
||||
|
||||
// Get out of the styleeditor-selected event loop.
|
||||
executeSoon(() => {
|
||||
aEditor.getSourceEditor().then(() => {
|
||||
// Get out of the editor's source-editor-load event loop.
|
||||
executeSoon(checkForCorrectState);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user