From be45ed04d940ecff30ba1c9b99087c43f3892079 Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Tue, 25 Jun 2013 13:04:30 -0400 Subject: [PATCH] bug 869278 fix intermittent mozSocial test failure, r=felipe --- .../content/test/social/browser_social_mozSocial_API.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/browser/base/content/test/social/browser_social_mozSocial_API.js b/browser/base/content/test/social/browser_social_mozSocial_API.js index f48c17388a9..5a1e08b312d 100644 --- a/browser/base/content/test/social/browser_social_mozSocial_API.js +++ b/browser/base/content/test/social/browser_social_mozSocial_API.js @@ -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;