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

Side by Side Diff: chrome/browser/sync/credential_cache_service_win_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 19 matching lines...) Expand all
30 // testing::Test implementation. 30 // testing::Test implementation.
31 virtual void SetUp() OVERRIDE { 31 virtual void SetUp() OVERRIDE {
32 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 32 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
33 set_local_store(new JsonPrefStore( 33 set_local_store(new JsonPrefStore(
34 temp_dir_.path().Append(chrome::kSyncCredentialsFilename), 34 temp_dir_.path().Append(chrome::kSyncCredentialsFilename),
35 file_message_loop_.message_loop_proxy())); 35 file_message_loop_.message_loop_proxy()));
36 } 36 }
37 37
38 // testing::Test implementation. 38 // testing::Test implementation.
39 virtual void TearDown() OVERRIDE { 39 virtual void TearDown() OVERRIDE {
40 file_message_loop_.RunAllPending(); 40 file_message_loop_.RunUntilIdle();
41 } 41 }
42 42
43 private: 43 private:
44 base::ScopedTempDir temp_dir_; 44 base::ScopedTempDir temp_dir_;
45 MessageLoop file_message_loop_; 45 MessageLoop file_message_loop_;
46 DISALLOW_COPY_AND_ASSIGN(CredentialCacheServiceTest); 46 DISALLOW_COPY_AND_ASSIGN(CredentialCacheServiceTest);
47 }; 47 };
48 48
49 TEST_F(CredentialCacheServiceTest, TestPackAndUnpack) { 49 TEST_F(CredentialCacheServiceTest, TestPackAndUnpack) {
50 // Pack a sample credential string. 50 // Pack a sample credential string.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 TEST_F(CredentialCacheServiceTest, TestWriteAndReadTimestamps) { 134 TEST_F(CredentialCacheServiceTest, TestWriteAndReadTimestamps) {
135 // Write a timestamp. 135 // Write a timestamp.
136 WriteLastCacheUpdateTime(); 136 WriteLastCacheUpdateTime();
137 137
138 // Make sure that the correct field was written, and it is not in the future. 138 // Make sure that the correct field was written, and it is not in the future.
139 base::Time time(GetLastCacheUpdateTime(local_store())); 139 base::Time time(GetLastCacheUpdateTime(local_store()));
140 ASSERT_LE(time, base::Time::Now()); 140 ASSERT_LE(time, base::Time::Now());
141 } 141 }
142 142
143 } // namespace syncer 143 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698