1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/password_manager/core/browser/password_bubble_experiment.h"
7 #include "base/files/scoped_temp_dir.h"
8 #include "base/metrics/field_trial.h"
9 #include "chrome/test/base/testing_profile.h"
10 #include "components/variations/entropy_provider.h"
11 #include "components/variations/variations_associated_data.h"
12 #include "content/public/test/test_browser_thread_bundle.h"
13 #include "testing/gtest/include/gtest/gtest.h"
15 class PasswordBubbleExperimentTest
: public testing::Test
{
17 void SetUp() override
{
18 ASSERT_TRUE(temp_dir_
.CreateUniqueTempDir());
19 profile_
.reset(new TestingProfile(temp_dir_
.path()));
21 field_trial_list_
.reset(new base::FieldTrialList(
22 new metrics::SHA1EntropyProvider("foo")));
25 void TearDown() override
{
26 variations::testing::ClearAllVariationParams();
29 PrefService
* prefs() { return profile_
->GetPrefs(); }
32 content::TestBrowserThreadBundle thread_bundle_
;
33 base::ScopedTempDir temp_dir_
;
34 scoped_ptr
<TestingProfile
> profile_
;
35 scoped_ptr
<base::FieldTrialList
> field_trial_list_
;
38 // TODO(vasilii): add tests once there is a smart bubble.