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

    if (!category)
      throw new Error(arguments.callee.name + ": Category not specified.");

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    // mozmill.utils.waitFor(function () {
    //   return self.selectedCategory.getNode() == category.getNode();
    // }, timeout, 100, "Category '" + category.getNode().id + "' has been set");
    
    mozmill.utils.waitForEval("subject.self.selectedCategory.getNode() == subject.aCategory.getNode()",
                               timeout, 100, 
                               {self: this, aCategory: category});
  }
function addonsManager_waitForCategory(aSpec) {
    var spec = aSpec || { };
    var category = spec.category;
    var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;

    if (!category)
      throw new Error(arguments.callee.name + ": Category not specified.");

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    // mozmill.utils.waitFor(function () {
    //   return self.selectedCategory.getNode() == category.getNode();
    // }, timeout, 100, "Category '" + category.getNode().id + "' has been set");
    
    mozmill.utils.waitForEval("subject.self.selectedCategory.getNode() == subject.aCategory.getNode()",
                               timeout, 100, 
                               {self: this, aCategory: category});
  }
function addonsManager_waitForCategory ( aSpec ) { var spec = aSpec || { } ; var category = spec . category ; var timeout = ( spec . timeout == undefined ) ? TIMEOUT : spec . timeout ; if ( ! category ) throw new Error ( arguments . callee . name + ": Category not specified." ) ; // TODO: restore after 1.5.1 has landed // var self = this; // mozmill.utils.waitFor(function () { //   return self.selectedCategory.getNode() == category.getNode(); // }, timeout, 100, "Category '" + category.getNode().id + "' has been set"); mozmill . utils . waitForEval ( "subject.self.selectedCategory.getNode() == subject.aCategory.getNode()" , timeout , 100 , { self : this , aCategory : category } ) ; }
Wait until the specified category has been selected

@param {object} aSpec
Object with parameters for customization
Elements: category - Category element to wait for
timeout - Duration to wait for the target state
[optional - default: 5s]
Wait until the specified category has been selected