function testProxyCalled(proxyMethodName) {
      const actionButton = dialog.$.actionButton;
      actionButton.disabled = false;

      // Test that the dialog remains open if the user somehow manages to submit
      // an invalid URL.
      browserProxy.setUrlValidity(false);
      MockInteractions.tap(actionButton);
      return browserProxy.whenCalled(proxyMethodName)
          .then(function() {
            assertTrue(dialog.$.dialog.open);

            // Test that dialog is closed if the user submits a valid URL.
            browserProxy.setUrlValidity(true);
            browserProxy.resetResolver(proxyMethodName);
            MockInteractions.tap(actionButton);
            return browserProxy.whenCalled(proxyMethodName);
          })
          .then(function() {
            assertFalse(dialog.$.dialog.open);
          });
    }
/**
     * Tests that the appropriate browser proxy method is called when the action
     * button is tapped.
     * @param {string} proxyMethodName
     */
Tests that the appropriate browser proxy method is called when the action
button is tapped.
Tests that the appropriate browser proxy method is called when the action button is tapped .
function testProxyCalled(proxyMethodName) {
      const actionButton = dialog.$.actionButton;
      actionButton.disabled = false;
      browserProxy.setUrlValidity(false);
      MockInteractions.tap(actionButton);
      return browserProxy.whenCalled(proxyMethodName)
          .then(function() {
            assertTrue(dialog.$.dialog.open);
            browserProxy.setUrlValidity(true);
            browserProxy.resetResolver(proxyMethodName);
            MockInteractions.tap(actionButton);
            return browserProxy.whenCalled(proxyMethodName);
          })
          .then(function() {
            assertFalse(dialog.$.dialog.open);
          });
    }
function testProxyCalled ( proxyMethodName ) { const actionButton = dialog . $ . actionButton ; actionButton . disabled = false ; browserProxy . setUrlValidity ( false ) ; MockInteractions . tap ( actionButton ) ; return browserProxy . whenCalled ( proxyMethodName ) . then ( function ( ) { assertTrue ( dialog . $ . dialog . open ) ; browserProxy . setUrlValidity ( true ) ; browserProxy . resetResolver ( proxyMethodName ) ; MockInteractions . tap ( actionButton ) ; return browserProxy . whenCalled ( proxyMethodName ) ; } ) . then ( function ( ) { assertFalse ( dialog . $ . dialog . open ) ; } ) ; }
Tests that the appropriate browser proxy method is called when the action
 button is tapped.
Tests that the appropriate browser proxy method is called when the action button is tapped .
// Test that the dialog remains open if the user somehow manages to submit // an invalid URL. // Test that dialog is closed if the user submits a valid URL.