function setupProviderSignInPage(
    flow, ignoreConfig = false, enableOneTap = false,
    disableAdditionalScopes = false, email = undefined) {
  // Test provider sign-in handler.
  signInOptions = [{
    'provider': 'google.com',
    'scopes': !!disableAdditionalScopes ? [] : ['googl1', 'googl2'],
    'customParameters': {'prompt': 'select_account'},
    'authMethod': 'https://accounts.google.com',
    'clientId': '1234567890.apps.googleusercontent.com'
  }, 'facebook.com', 'password', 'phone', 'anonymous', {
    'provider': 'oidc.provider',
    'providerName': 'OIDC Provider',
    'buttonColor': '#2F2F2F',
    'iconUrl': '<icon-url>',
    'scopes': ['scope1', 'scope2'],
    'customParameters': {'param': 'value'},
  }];
  if (!ignoreConfig) {
    app.setConfig({
      'signInOptions': signInOptions,
      'signInFlow': flow,
      'credentialHelper': !!enableOneTap ?
          firebaseui.auth.widget.Config.CredentialHelper.GOOGLE_YOLO :
          firebaseui.auth.widget.Config.CredentialHelper.NONE
    });
  }
  // Set sign-in options.
  app.updateConfig('signInOptions', signInOptions);
  firebaseui.auth.widget.handler.handleProviderSignIn(
      app, container, undefined, email);
  assertProviderSignInPage();
  buttons = getIdpButtons();
  assertEquals(signInOptions.length, buttons.length);
  assertEquals('google.com', goog.dom.dataset.get(buttons[0], 'providerId'));
  assertEquals('facebook.com', goog.dom.dataset.get(buttons[1], 'providerId'));
  assertEquals('password', goog.dom.dataset.get(buttons[2], 'providerId'));
  assertEquals('phone', goog.dom.dataset.get(buttons[3], 'providerId'));
  assertTosPpFullMessage(tosCallback, 'http://localhost/privacy_policy');
}
Sets up the provider sign-in page and verifies it was rendered correctly.
@param {!firebaseui.auth.widget.Config.SignInFlow} flow The sign-in flow.
@param {boolean=} ignoreConfig Whether to ignore config setting assuming
    it was set externally.
@param {boolean=} enableOneTap Whether One-Tap sign-in is enabled.
@param {boolean=} disableAdditionalScopes Whether to disable additional
    scopes.
@param {string=} email The optional email to prefill.