function requestMountInternal(multipleMounts, manifest) {
  StepsRunner.runGroups([
    getSetupSteps(manifest),
    getClickMenuSteps(),
    [
      function(result) {
        chrome.test.assertTrue(result);
        remoteCall.waitForElement(
            appId,
            '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' +
                'span')
            .then(this.next);
      },
      function(result) {
        chrome.test.assertEq('Testing Provider', result.text);
        remoteCall.callRemoteTestUtil(
            'fakeMouseClick',
            appId,
            ['#add-new-services-menu cr-menu-item:first-child span'],
            this.next);
      },
    ],
    getConfirmVolumeSteps(false /* ejectExpected */),
    getClickMenuSteps(),
    [
      function() {
        // When multiple mounts are supported, then the first element of the
        // menu should stay the same. Otherwise it should disappear from the
        // list.
        var selector = multipleMounts ?
            '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' +
                'span' :
            '#add-new-services-menu:not([hidden]) hr:first-child';
        remoteCall.waitForElement(
            appId,
            selector)
            .then(this.next);
      },
      function(result) {
        if (multipleMounts)
          chrome.test.assertEq('Testing Provider', result.text);
        checkIfNoErrorsOccured(this.next);
      }
    ]
  ]);
}
/**
 * Tests that a provided extension with |manifest| is mountable via the menu
 * button.
 *
 * @param {boolean} multipleMounts Whether multiple mounts are supported by the
 *     providing extension.
 * @param {string} manifest Name of the manifest file for the providing
 *     extension.
 */
Tests that a provided extension with |manifest| is mountable via the menu
button.

@param {boolean} multipleMounts Whether multiple mounts are supported by the
providing extension.
@param {string} manifest Name of the manifest file for the providing
extension.
Tests that a provided extension with |manifest| is mountable via the menu button . @param { boolean } multipleMounts Whether multiple mounts are supported by the providing extension . @param { string } manifest Name of the manifest file for the providing extension .
function requestMountInternal(multipleMounts, manifest) {
  StepsRunner.runGroups([
    getSetupSteps(manifest),
    getClickMenuSteps(),
    [
      function(result) {
        chrome.test.assertTrue(result);
        remoteCall.waitForElement(
            appId,
            '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' +
                'span')
            .then(this.next);
      },
      function(result) {
        chrome.test.assertEq('Testing Provider', result.text);
        remoteCall.callRemoteTestUtil(
            'fakeMouseClick',
            appId,
            ['#add-new-services-menu cr-menu-item:first-child span'],
            this.next);
      },
    ],
    getConfirmVolumeSteps(false ),
    getClickMenuSteps(),
    [
      function() {
        var selector = multipleMounts ?
            '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' +
                'span' :
            '#add-new-services-menu:not([hidden]) hr:first-child';
        remoteCall.waitForElement(
            appId,
            selector)
            .then(this.next);
      },
      function(result) {
        if (multipleMounts)
          chrome.test.assertEq('Testing Provider', result.text);
        checkIfNoErrorsOccured(this.next);
      }
    ]
  ]);
}
function requestMountInternal ( multipleMounts , manifest ) { StepsRunner . runGroups ( [ getSetupSteps ( manifest ) , getClickMenuSteps ( ) , [ function ( result ) { chrome . test . assertTrue ( result ) ; remoteCall . waitForElement ( appId , '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' + 'span' ) . then ( this . next ) ; } , function ( result ) { chrome . test . assertEq ( 'Testing Provider' , result . text ) ; remoteCall . callRemoteTestUtil ( 'fakeMouseClick' , appId , [ '#add-new-services-menu cr-menu-item:first-child span' ] , this . next ) ; } , ] , getConfirmVolumeSteps ( false ) , getClickMenuSteps ( ) , [ function ( ) { var selector = multipleMounts ? '#add-new-services-menu:not([hidden]) cr-menu-item:first-child ' + 'span' : '#add-new-services-menu:not([hidden]) hr:first-child' ; remoteCall . waitForElement ( appId , selector ) . then ( this . next ) ; } , function ( result ) { if ( multipleMounts ) chrome . test . assertEq ( 'Testing Provider' , result . text ) ; checkIfNoErrorsOccured ( this . next ) ; } ] ] ) ; }
Tests that a provided extension with |manifest| is mountable via the menu
 button.
Tests that a provided extension with |manifest| is mountable via the menu button .
/* ejectExpected */ // When multiple mounts are supported, then the first element of the // menu should stay the same. Otherwise it should disappear from the // list.