third_party/js/mozmill/shared-modules/search.js
function searchBar_search(data)
  {
    var searchBar = this.getElement({type: "searchBar"});
    this.type(data.text);

    switch (data.action) {
      case "returnKey":
        this._controller.keypress(searchBar, 'VK_RETURN', {});
        break;
      case "goButton":
      default:
        this._controller.click(this.getElement({type: "searchBar_goButton"}));
        break;
    }

    this._controller.waitForPageLoad();
    this.checkSearchResultPage(data.text);
  }
function searchBar_search(data)
  {
    var searchBar = this.getElement({type: "searchBar"});
    this.type(data.text);

    switch (data.action) {
      case "returnKey":
        this._controller.keypress(searchBar, 'VK_RETURN', {});
        break;
      case "goButton":
      default:
        this._controller.click(this.getElement({type: "searchBar_goButton"}));
        break;
    }

    this._controller.waitForPageLoad();
    this.checkSearchResultPage(data.text);
  }
function searchBar_search ( data ) { var searchBar = this . getElement ( { type : "searchBar" } ) ; this . type ( data . text ) ; switch ( data . action ) { case "returnKey" : this . _controller . keypress ( searchBar , 'VK_RETURN' , { } ) ; break ; case "goButton" : default : this . _controller . click ( this . getElement ( { type : "searchBar_goButton" } ) ) ; break ; } this . _controller . waitForPageLoad ( ) ; this . checkSearchResultPage ( data . text ) ; }
Start a search with the given search term and check if the resulting URL
contains the search term.

@param {object} data
Object which contains the search term and the action type
Start a search with the given search term and check if the resulting URL contains the search term .