Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: chrome/browser/password_manager/auto_signin_infobar_delegate_unittest.cc

Issue 1670673004: Revert "[Smart Lock, UI] First run expience for Auto sign-in prompt." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/auto_signin_infobar_delegate_unittest.cc
diff --git a/chrome/browser/password_manager/auto_signin_infobar_delegate_unittest.cc b/chrome/browser/password_manager/auto_signin_infobar_delegate_unittest.cc
deleted file mode 100644
index fca6a1a28d826c2a063ecf7717120c545391a819..0000000000000000000000000000000000000000
--- a/chrome/browser/password_manager/auto_signin_infobar_delegate_unittest.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/macros.h"
-#include "chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/test/base/chrome_render_view_host_test_harness.h"
-#include "components/password_manager/core/common/password_manager_pref_names.h"
-#include "components/prefs/pref_service.h"
-#include "content/public/browser/web_contents.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-class TestAutoSigninFirstRunInfoBarDelegate
- : public AutoSigninFirstRunInfoBarDelegate {
- public:
- explicit TestAutoSigninFirstRunInfoBarDelegate(
- content::WebContents* web_contents)
- : AutoSigninFirstRunInfoBarDelegate(
- web_contents,
- true /* is_smartlock_branding_enabled */,
- base::string16()) {}
-
- ~TestAutoSigninFirstRunInfoBarDelegate() override {}
-};
-
-} // namespace
-
-class AutoSigninFirstRunInfoBarDelegateTest
- : public ChromeRenderViewHostTestHarness {
- public:
- AutoSigninFirstRunInfoBarDelegateTest() {}
- ~AutoSigninFirstRunInfoBarDelegateTest() override {}
-
- PrefService* prefs();
-
- protected:
- scoped_ptr<ConfirmInfoBarDelegate> CreateDelegate();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AutoSigninFirstRunInfoBarDelegateTest);
-};
-
-scoped_ptr<ConfirmInfoBarDelegate>
-AutoSigninFirstRunInfoBarDelegateTest::CreateDelegate() {
- scoped_ptr<ConfirmInfoBarDelegate> delegate(
- new TestAutoSigninFirstRunInfoBarDelegate(web_contents()));
- return delegate;
-}
-
-PrefService* AutoSigninFirstRunInfoBarDelegateTest::prefs() {
- Profile* profile =
- Profile::FromBrowserContext(web_contents()->GetBrowserContext());
- return profile->GetPrefs();
-}
-
-TEST_F(AutoSigninFirstRunInfoBarDelegateTest,
- CheckResetOfPrefAfterFirstRunMessageWasShownOnCancel) {
- prefs()->SetBoolean(
- password_manager::prefs::kWasAutoSignInFirstRunExperienceShown, false);
- scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate());
- EXPECT_TRUE(infobar->Cancel());
- infobar.reset();
- EXPECT_TRUE(prefs()->GetBoolean(
- password_manager::prefs::kWasAutoSignInFirstRunExperienceShown));
-}
-
-TEST_F(AutoSigninFirstRunInfoBarDelegateTest,
- CheckResetOfPrefAfterFirstRunMessageWasShownOnAccept) {
- prefs()->SetBoolean(
- password_manager::prefs::kWasAutoSignInFirstRunExperienceShown, false);
- scoped_ptr<ConfirmInfoBarDelegate> infobar(CreateDelegate());
- EXPECT_TRUE(infobar->Accept());
- infobar.reset();
- EXPECT_TRUE(prefs()->GetBoolean(
- password_manager::prefs::kWasAutoSignInFirstRunExperienceShown));
-}

Powered by Google App Engine
This is Rietveld 408576698