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

Side by Side Diff: chrome/browser/sync/glue/synced_device_tracker_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/sync/glue/device_info.h" 10 #include "chrome/browser/sync/glue/device_info.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 scoped_ptr<SyncedDeviceTracker> synced_device_tracker_; 63 scoped_ptr<SyncedDeviceTracker> synced_device_tracker_;
64 64
65 private: 65 private:
66 // Count of how many closed WriteTransactions notified of meaningful changes. 66 // Count of how many closed WriteTransactions notified of meaningful changes.
67 int GetTotalTransactionsCount() { 67 int GetTotalTransactionsCount() {
68 base::RunLoop run_loop; 68 base::RunLoop run_loop;
69 run_loop.RunUntilIdle(); 69 run_loop.RunUntilIdle();
70 return test_user_share_.transaction_observer()->transactions_observed(); 70 return test_user_share_.transaction_observer()->transactions_observed();
71 } 71 }
72 72
73 MessageLoop message_loop_; 73 base::MessageLoop message_loop_;
74 syncer::TestUserShare test_user_share_; 74 syncer::TestUserShare test_user_share_;
75 int transaction_count_baseline_; 75 int transaction_count_baseline_;
76 }; 76 };
77 77
78 namespace { 78 namespace {
79 79
80 // New client scenario: set device info when no previous info existed. 80 // New client scenario: set device info when no previous info existed.
81 TEST_F(SyncedDeviceTrackerTest, CreateNewDeviceInfo) { 81 TEST_F(SyncedDeviceTrackerTest, CreateNewDeviceInfo) {
82 ASSERT_FALSE(synced_device_tracker_->ReadLocalDeviceInfo()); 82 ASSERT_FALSE(synced_device_tracker_->ReadLocalDeviceInfo());
83 83
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 EXPECT_TRUE(result_device_info->Equals(device_info_v2)); 152 EXPECT_TRUE(result_device_info->Equals(device_info_v2));
153 153
154 // The update write should have sent a nudge. 154 // The update write should have sent a nudge.
155 EXPECT_EQ(1, GetObservedChangesCounter()); 155 EXPECT_EQ(1, GetObservedChangesCounter());
156 } 156 }
157 157
158 } // namespace 158 } // namespace
159 159
160 } // namespace browser_sync 160 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar_unittest.cc ('k') | chrome/browser/sync/glue/typed_url_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698