third_party/js/mozmill/shared-modules/addons.js
function addonsManager_waitforOpened(aSpec) {
    var spec = aSpec || { };
    var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    //
    // mozmill.utils.waitFor(function() {
    //   return self.isOpen;
    // }, timeout, 100, "Add-ons Manager has been opened");
    
    mozmill.utils.waitForEval("subject.isOpen", timeout, 100, this);

    // The first tab found will be the selected one
    var tab = this.getTabs()[0];
    tab.controller.waitForPageLoad();

    return tab;
  }
function addonsManager_waitforOpened(aSpec) {
    var spec = aSpec || { };
    var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    //
    // mozmill.utils.waitFor(function() {
    //   return self.isOpen;
    // }, timeout, 100, "Add-ons Manager has been opened");
    
    mozmill.utils.waitForEval("subject.isOpen", timeout, 100, this);

    // The first tab found will be the selected one
    var tab = this.getTabs()[0];
    tab.controller.waitForPageLoad();

    return tab;
  }
function addonsManager_waitforOpened ( aSpec ) { var spec = aSpec || { } ; var timeout = ( spec . timeout == undefined ) ? TIMEOUT : spec . timeout ; // TODO: restore after 1.5.1 has landed // var self = this; // // mozmill.utils.waitFor(function() { //   return self.isOpen; // }, timeout, 100, "Add-ons Manager has been opened"); mozmill . utils . waitForEval ( "subject.isOpen" , timeout , 100 , this ) ; // The first tab found will be the selected one var tab = this . getTabs ( ) [ 0 ] ; tab . controller . waitForPageLoad ( ) ; return tab ; }
Waits until the Addons Manager has been opened and returns its controller

@param {object} aSpec
Object with parameters for customization
Elements: timeout - Duration to wait for the target state
[optional - default: 5s]

@returns Currently selected tab
Waits until the Addons Manager has been opened and returns its controller