Permalink
Browse files

Fix FBTest: again the inline editor can be async on Mac

  • Loading branch information...
1 parent d9dd733 commit 2fde4be4450e3e4ceb8a10938b8ae472773e1845 @janodvarko janodvarko committed Oct 4, 2012
Showing with 12 additions and 6 deletions.
  1. +12 −6 tests/content/html/5755/issue5755.js
@@ -11,18 +11,24 @@ function runTest()
FBTest.setPref("displayedAttributeValueLimit", 10);
var longOnclickValue = win.document.getElementById("long-onclick").
getAttribute("onclick");
+
FBTest.selectElementInHtmlPanel("long-onclick", function (nodes)
{
// getting onclick attribute's value
var onclickValue = nodes.getElementsByClassName("nodeValue").item(1);
FBTest.synthesizeMouse(onclickValue);
- var texteditor = panel.panelNode.getElementsByClassName("textEditorInner").item(0);
- if (FBTest.ok(texteditor, "Editor must be loaded now."))
+
+ // Wait till the inline editor is available.
+ var config = {tagName: "input", classes: "textEditorInner"};
+ FBTest.waitForDisplayedElement("html", config, function(texteditor)
{
- FBTest.compare(longOnclickValue, texteditor.value,
- "Inline editor must contain whole string of onclick value.");
- }
- FBTest.testDone("issue5755.DONE");
+ if (FBTest.ok(texteditor, "Editor must be loaded now."))
+ {
+ FBTest.compare(longOnclickValue, texteditor.value,
+ "Inline editor must contain whole string of onclick value.");
+ }
+ FBTest.testDone("issue5755.DONE");
+ });
});
}
else

0 comments on commit 2fde4be

Please sign in to comment.