function whenSnackbarShows(pendingSnackbar) {
      return new Promise(function(resolve) {
        if (pendingSnackbar.classList.contains('open'))
          resolve();
        else
          pendingSnackbar.addEventListener('showed', resolve);
      });
    }
/**
     * Checks snackbar showing status and returns a Promise that resolves when
     * |pendingSnackbar| is shown. If the snackbar is already showing, the
     * Promise resolves immediately.
     * @param {!snackbar.Snackbar} pendingSnackbar
     * @return {!Promise}
     */
Checks snackbar showing status and returns a Promise that resolves when
|pendingSnackbar| is shown. If the snackbar is already showing, the
Promise resolves immediately.
@param {!snackbar.Snackbar} pendingSnackbar
@return {!Promise}
Checks snackbar showing status and returns a Promise that resolves when |pendingSnackbar| is shown . If the snackbar is already showing the Promise resolves immediately . @param { !snackbar . Snackbar } pendingSnackbar @return { !Promise }
function whenSnackbarShows(pendingSnackbar) {
      return new Promise(function(resolve) {
        if (pendingSnackbar.classList.contains('open'))
          resolve();
        else
          pendingSnackbar.addEventListener('showed', resolve);
      });
    }
function whenSnackbarShows ( pendingSnackbar ) { return new Promise ( function ( resolve ) { if ( pendingSnackbar . classList . contains ( 'open' ) ) resolve ( ) ; else pendingSnackbar . addEventListener ( 'showed' , resolve ) ; } ) ; }
Checks snackbar showing status and returns a Promise that resolves when
 |pendingSnackbar| is shown.
Checks snackbar showing status and returns a Promise that resolves when |pendingSnackbar| is shown .