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;