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

Unified Diff: google_apis/gcm/engine/gcm_store_impl_unittest.cc

Issue 177243007: Fixing the GCMStoreImplTest.GetNextPersistentId on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gcm_store_impl_unittest.cc
diff --git a/google_apis/gcm/engine/gcm_store_impl_unittest.cc b/google_apis/gcm/engine/gcm_store_impl_unittest.cc
index 4beb0ae2501ccce6c5208af63a1ce840516daa12..a7c3d388434eee874846b38b3f3abdcc9ef7c3ac 100644
--- a/google_apis/gcm/engine/gcm_store_impl_unittest.cc
+++ b/google_apis/gcm/engine/gcm_store_impl_unittest.cc
@@ -57,11 +57,13 @@ class GCMStoreImplTest : public testing::Test {
base::MessageLoop message_loop_;
base::ScopedTempDir temp_directory_;
bool expected_success_;
+ uint64 next_persistent_id_;
scoped_ptr<base::RunLoop> run_loop_;
};
GCMStoreImplTest::GCMStoreImplTest()
- : expected_success_(true) {
+ : expected_success_(true),
+ next_persistent_id_(base::Time::Now().ToInternalValue()) {
EXPECT_TRUE(temp_directory_.CreateUniqueTempDir());
run_loop_.reset(new base::RunLoop());
}
@@ -76,7 +78,7 @@ scoped_ptr<GCMStore> GCMStoreImplTest::BuildGCMStore() {
}
std::string GCMStoreImplTest::GetNextPersistentId() {
- return base::Uint64ToString(base::Time::Now().ToInternalValue());
+ return base::Uint64ToString(next_persistent_id_++);
}
void GCMStoreImplTest::PumpLoop() { message_loop_.RunUntilIdle(); }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698