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

Unified Diff: components/ntp_snippets/ntp_snippets_status_service_unittest.cc

Issue 2343583002: Change the default value of the fetching_requires_signin parameter (Closed)
Patch Set: Reverting the unittest experiment Created 4 years, 3 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/ntp_snippets/ntp_snippets_status_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_status_service_unittest.cc
diff --git a/components/ntp_snippets/ntp_snippets_status_service_unittest.cc b/components/ntp_snippets/ntp_snippets_status_service_unittest.cc
index f3bf30b1fb0bdfd4f73b2203561fd2cc9ba0f0c6..65bc9db191a1590ed98d7aca411521d3c89ab8c4 100644
--- a/components/ntp_snippets/ntp_snippets_status_service_unittest.cc
+++ b/components/ntp_snippets/ntp_snippets_status_service_unittest.cc
@@ -37,29 +37,21 @@ class NTPSnippetsStatusServiceTest : public ::testing::Test {
test::NTPSnippetsTestUtils utils_;
};
-TEST_F(NTPSnippetsStatusServiceTest, SigninStateCompatibility) {
- auto service = MakeService();
-
- // The default test setup is signed out.
- EXPECT_EQ(DisabledReason::SIGNED_OUT, service->GetDisabledReasonFromDeps());
-
- // Once signed in, we should be in a compatible state.
- utils_.fake_signin_manager()->SignIn("foo@bar.com");
- EXPECT_EQ(DisabledReason::NONE, service->GetDisabledReasonFromDeps());
-}
-
+// TODO(jkrcal): Extend the ways to override variation parameters in unit-test
+// (bug 645447), and recover the SigninStateCompatibility test that sign-in is
+// required when the parameter is overriden.
TEST_F(NTPSnippetsStatusServiceTest, DisabledViaPref) {
auto service = MakeService();
- // The default test setup is signed out.
- ASSERT_EQ(DisabledReason::SIGNED_OUT, service->GetDisabledReasonFromDeps());
+ // The default test setup is signed out. The service is enabled.
+ ASSERT_EQ(DisabledReason::NONE, service->GetDisabledReasonFromDeps());
// Once the enabled pref is set to false, we should be disabled.
utils_.pref_service()->SetBoolean(prefs::kEnableSnippets, false);
EXPECT_EQ(DisabledReason::EXPLICITLY_DISABLED,
service->GetDisabledReasonFromDeps());
- // The other dependencies shouldn't matter anymore.
+ // Signing-in shouldn't matter anymore.
utils_.fake_signin_manager()->SignIn("foo@bar.com");
EXPECT_EQ(DisabledReason::EXPLICITLY_DISABLED,
service->GetDisabledReasonFromDeps());
« no previous file with comments | « components/ntp_snippets/ntp_snippets_status_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698