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

Unified Diff: components/password_manager/core/browser/password_bubble_experiment_unittest.cc

Issue 2653733006: Remove the Finch experiment for the sign-in promo in the password bubble. (Closed)
Patch Set: fix mac/2 Created 3 years, 11 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
« no previous file with comments | « components/password_manager/core/browser/password_bubble_experiment.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_bubble_experiment_unittest.cc
diff --git a/components/password_manager/core/browser/password_bubble_experiment_unittest.cc b/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
index b9ba0531ceed07d93e0b1824343016931e9ae907..80dba82ab7a66844c02596b03723223880ec68c2 100644
--- a/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
+++ b/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
@@ -6,7 +6,6 @@
#include <ostream>
-#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
@@ -14,7 +13,6 @@
#include "components/prefs/testing_pref_service.h"
#include "components/sync/base/model_type.h"
#include "components/sync/driver/fake_sync_service.h"
-#include "components/variations/variations_associated_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -76,15 +74,10 @@ class TestSyncService : public syncer::FakeSyncService {
class PasswordManagerPasswordBubbleExperimentTest : public testing::Test {
public:
- PasswordManagerPasswordBubbleExperimentTest() : field_trial_list_(nullptr) {
+ PasswordManagerPasswordBubbleExperimentTest() {
RegisterPrefs(pref_service_.registry());
}
- ~PasswordManagerPasswordBubbleExperimentTest() override {
- variations::testing::ClearAllVariationIDs();
- variations::testing::ClearAllVariationParams();
- }
-
PrefService* prefs() { return &pref_service_; }
TestSyncService* sync_service() { return &fake_sync_service_; }
@@ -102,7 +95,6 @@ class PasswordManagerPasswordBubbleExperimentTest : public testing::Test {
private:
TestSyncService fake_sync_service_;
- base::FieldTrialList field_trial_list_;
TestingPrefServiceSimple pref_service_;
};
@@ -115,16 +107,12 @@ TEST_F(PasswordManagerPasswordBubbleExperimentTest,
bool is_sync_allowed;
bool is_first_setup_complete;
int current_shown_count;
- int experiment_threshold;
bool result;
} kTestData[] = {
- {false, true, false, 0, 5, true}, {false, true, false, 5, 5, false},
- {true, true, false, 0, 5, false}, {true, true, false, 10, 5, false},
- {false, false, false, 0, 5, false}, {false, true, true, 0, 5, false},
+ {false, true, false, 0, true}, {false, true, false, 5, false},
+ {true, true, false, 0, false}, {true, true, false, 10, false},
+ {false, false, false, 0, false}, {false, true, true, 0, false},
};
- const char kFakeGroup[] = "FakeGroup";
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- kChromeSignInPasswordPromoExperimentName, kFakeGroup));
for (const auto& test_case : kTestData) {
SCOPED_TRACE(testing::Message("#test_case = ") << (&test_case - kTestData));
prefs()->SetBoolean(password_manager::prefs::kWasSignInPasswordPromoClicked,
@@ -134,10 +122,6 @@ TEST_F(PasswordManagerPasswordBubbleExperimentTest,
test_case.current_shown_count);
sync_service()->set_sync_allowed(test_case.is_sync_allowed);
sync_service()->set_first_setup_complete(test_case.is_first_setup_complete);
- variations::AssociateVariationParams(
- kChromeSignInPasswordPromoExperimentName, kFakeGroup,
- {{kChromeSignInPasswordPromoThresholdParam,
- base::IntToString(test_case.experiment_threshold)}});
EXPECT_EQ(test_case.result,
ShouldShowChromeSignInPasswordPromo(prefs(), sync_service()));
« no previous file with comments | « components/password_manager/core/browser/password_bubble_experiment.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698