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

Unified Diff: chrome/browser/metrics/variations_service_unittest.cc

Issue 10375043: Variations Service now creates field trials from variations seed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Alexei's comments Created 8 years, 7 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/metrics/variations_service_unittest.cc
diff --git a/chrome/browser/metrics/variations_service_unittest.cc b/chrome/browser/metrics/variations_service_unittest.cc
index 084d2ab82b2a6957ccf5b35a2af1bce16be20539..d3fe4cfaba3a67dbf441758597e00f896cd7590f 100644
--- a/chrome/browser/metrics/variations_service_unittest.cc
+++ b/chrome/browser/metrics/variations_service_unittest.cc
@@ -11,7 +11,7 @@ namespace {
// Converts |time| to chrome_variations::Study proto format.
int64 TimeToProtoTime(const base::Time& time) {
- return (time - base::Time::UnixEpoch()).InMilliseconds();
+ return (time - base::Time::UnixEpoch()).InSeconds();
}
} // namespace
@@ -39,7 +39,7 @@ TEST(VariationsServiceTest, CheckStudyChannel) {
// instead of < so that the result of adding the last channel gets checked.
for (size_t i = 0; i <= arraysize(study_channels); ++i) {
for (size_t j = 0; j < arraysize(channels); ++j) {
- const bool expected = channel_added[j];
+ const bool expected = channel_added[j] || study.channel_size()==0;
Alexei Svitkine (slow) 2012/05/08 03:40:13 Spaces around ==.
jwd 2012/05/08 03:47:24 Done.
const bool result = VariationsService::CheckStudyChannel(study,
channels[j]);
EXPECT_EQ(expected, result) << "Case " << i << "," << j << " failed!";
@@ -57,7 +57,7 @@ TEST(VariationsServiceTest, CheckStudyChannel) {
memset(&channel_added, 0, sizeof(channel_added));
for (size_t i = 0; i <= arraysize(study_channels); ++i) {
for (size_t j = 0; j < arraysize(channels); ++j) {
- const bool expected = channel_added[j];
+ const bool expected = channel_added[j] || study.channel_size()==0;
Alexei Svitkine (slow) 2012/05/08 03:40:13 Spaces around ==.
jwd 2012/05/08 03:47:24 Done.
const bool result = VariationsService::CheckStudyChannel(study,
channels[j]);
EXPECT_EQ(expected, result) << "Case " << i << "," << j << " failed!";
« chrome/browser/metrics/variations_service.cc ('K') | « chrome/browser/metrics/variations_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698