B2G/gecko/testing/peptest/peptest/extension/resource/mozmill/driver/controller.js
/**
   * Open and populate the menu
   *
   * @param {ElemBase} contextElement
   *        Element whose context menu has to be opened
   * @returns {Menu} The Menu instance
   */
Open and populate the menu
@param {ElemBase} contextElement
Element whose context menu has to be opened
@returns {Menu} The Menu instance
Open and populate the menu @param { ElemBase } contextElement Element whose context menu has to be opened @returns { Menu } The Menu instance
function Menu_open(contextElement) {
    var menu = this._menu.getNode();
    if ((menu.localName == "popup" || menu.localName == "menupopup") &&
        contextElement && contextElement.exists()) {
      this._controller.rightClick(contextElement);
      this._controller.waitFor(function () {
        return menu.state == "open";
      }, "Context menu has been opened.");
    }
    this._buildMenu(menu);
    return this;
  }
function Menu_open ( contextElement ) { var menu = this . _menu . getNode ( ) ; if ( ( menu . localName == "popup" || menu . localName == "menupopup" ) && contextElement && contextElement . exists ( ) ) { this . _controller . rightClick ( contextElement ) ; this . _controller . waitFor ( function ( ) { return menu . state == "open" ; } , "Context menu has been opened." ) ; } this . _buildMenu ( menu ) ; return this ; }
Open and populate the menu
 @param {ElemBase} contextElement
        Element whose context menu has to be opened
 @returns {Menu} The Menu instance
Open and populate the menu @param { ElemBase } contextElement Element whose context menu has to be opened @returns { Menu } The Menu instance
// We have to open the context menu // Run through the entire menu and populate with dynamic entries