Пример #1
0
    def testOneClickInfobarShownWhenWinLoseFocus(self):
        """Verify one-click infobar still shows when window loses focus.

    This test verifies the following bug: crbug.com/121739
    """
        self._LogIntoGoogleAccount()
        test_utils.WaitForInfobarTypeAndGetIndex(self, self.OC_INFOBAR_TYPE)
        # Open new window to shift focus away.
        self.OpenNewBrowserWindow(True)
        test_utils.GetInfobarIndexByType(self, self.OC_INFOBAR_TYPE)
Пример #2
0
    def _DisplayOneClickInfobar(self, tab_index=0, windex=0):
        """One-click sign in infobar appears after logging into google account.

    Args:
      tab_index: The tab index, default is 0.
      windex: The window index, default is 0.
    """
        self._LogIntoGoogleAccount(tab_index=tab_index, windex=windex)
        self.assertTrue(
            self.WaitUntil(lambda: test_utils.GetInfobarIndexByType(
                self, self.OC_INFOBAR_TYPE, tab_index=tab_index, windex=windex)
                           is not None),
            msg='The one-click login infobar did not appear.')
Пример #3
0
    def testNoSameIDSigninForTwoProfiles(self):
        """Verify two profiles cannot be signed in with same ID.

    Make sure that the one-click sign in infobar does not appear for two
    profiles trying to sign in with the same ID. This test creates a profile
    and connects it to a Google account. Another new profile is created and
    tries to login with the connected account from the first profile.

    This test verifies the following bug: crbug.com/122975
    """
        test_utils.SignInToSyncAndVerifyState(self, 'test_google_account')
        self._OpenSecondProfile()
        self._LogIntoGoogleAccount(tab_index=0, windex=1)
        self.assertTrue(lambda: test_utils.GetInfobarIndexByType(
            self, self.OC_INFOBAR_TYPE, tab_index=0, windex=1) is None)