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

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

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    // 
    // mozmill.utils.waitFor(function () {
    //   return self.selectedSearchFilter.getNode() == filter.getNode();
    // }, timeout, 100, "Search filter '" + filter.getNode().value + "' has been set");
    
    mozmill.utils.waitForEval("subject.self.selectedSearchFilter.getNode() == subject.aFilter.getNode()",
                              timeout, 100,
                              {self: this, aFilter: filter});
  }
function addonsManager_waitForSearchFilter(aSpec) {
    var spec = aSpec || { };
    var filter = spec.filter;
    var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;

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

    // TODO: restore after 1.5.1 has landed
    // var self = this;
    // 
    // mozmill.utils.waitFor(function () {
    //   return self.selectedSearchFilter.getNode() == filter.getNode();
    // }, timeout, 100, "Search filter '" + filter.getNode().value + "' has been set");
    
    mozmill.utils.waitForEval("subject.self.selectedSearchFilter.getNode() == subject.aFilter.getNode()",
                              timeout, 100,
                              {self: this, aFilter: filter});
  }
function addonsManager_waitForSearchFilter ( aSpec ) { var spec = aSpec || { } ; var filter = spec . filter ; var timeout = ( spec . timeout == undefined ) ? TIMEOUT : spec . timeout ; if ( ! filter ) throw new Error ( arguments . callee . name + ": Search filter not specified." ) ; // TODO: restore after 1.5.1 has landed // var self = this; //  // mozmill.utils.waitFor(function () { //   return self.selectedSearchFilter.getNode() == filter.getNode(); // }, timeout, 100, "Search filter '" + filter.getNode().value + "' has been set"); mozmill . utils . waitForEval ( "subject.self.selectedSearchFilter.getNode() == subject.aFilter.getNode()" , timeout , 100 , { self : this , aFilter : filter } ) ; }
Waits until the specified search filter has been selected

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