bug 869278 fix intermittent mozSocial test failure, r=felipe

This commit is contained in:
Shane Caraveo 2013-06-25 13:04:30 -04:00
parent 02f4f0c46c
commit b749138852

View File

@ -29,9 +29,11 @@ var tests = {
function triggerIconPanel() {
waitForCondition(function() {
let button = document.getElementById("social-toolbar-item");
// by default, button has two children. wait for a 3rd to be added
return button.childNodes.length > 2;
let mButton = document.getElementById("social-mark-button");
let pButton = document.getElementById("social-provider-button");
// wait for a new button to be inserted inbetween the provider and mark
// button
return pButton.nextSibling != mButton;
}, function() {
// Click the button to trigger its contentPanel
let statusIcon = document.getElementById("social-provider-button").nextSibling;