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

Side by Side Diff: chrome/browser/chromeos/drive/job_scheduler_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 "chrome/browser/chromeos/drive/job_scheduler.h" 5 #include "chrome/browser/chromeos/drive/job_scheduler.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Sets up FakeNetworkChangeNotifier as if it's connected to wimax network. 154 // Sets up FakeNetworkChangeNotifier as if it's connected to wimax network.
155 void ConnectToWimax() { 155 void ConnectToWimax() {
156 ChangeConnectionType(net::NetworkChangeNotifier::CONNECTION_4G); 156 ChangeConnectionType(net::NetworkChangeNotifier::CONNECTION_4G);
157 } 157 }
158 158
159 // Sets up FakeNetworkChangeNotifier as if it's disconnected. 159 // Sets up FakeNetworkChangeNotifier as if it's disconnected.
160 void ConnectToNone() { 160 void ConnectToNone() {
161 ChangeConnectionType(net::NetworkChangeNotifier::CONNECTION_NONE); 161 ChangeConnectionType(net::NetworkChangeNotifier::CONNECTION_NONE);
162 } 162 }
163 163
164 MessageLoopForUI message_loop_; 164 base::MessageLoopForUI message_loop_;
165 content::TestBrowserThread ui_thread_; 165 content::TestBrowserThread ui_thread_;
166 scoped_ptr<TestingProfile> profile_; 166 scoped_ptr<TestingProfile> profile_;
167 scoped_ptr<JobScheduler> scheduler_; 167 scoped_ptr<JobScheduler> scheduler_;
168 scoped_ptr<FakeNetworkChangeNotifier> fake_network_change_notifier_; 168 scoped_ptr<FakeNetworkChangeNotifier> fake_network_change_notifier_;
169 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; 169 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_;
170 }; 170 };
171 171
172 TEST_F(JobSchedulerTest, GetAboutResource) { 172 TEST_F(JobSchedulerTest, GetAboutResource) {
173 ConnectToWifi(); 173 ConnectToWifi();
174 174
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 std::vector<int64> upload_progress; 863 std::vector<int64> upload_progress;
864 logger.GetProgressInfo(TYPE_UPLOAD_NEW_FILE, &upload_progress); 864 logger.GetProgressInfo(TYPE_UPLOAD_NEW_FILE, &upload_progress);
865 ASSERT_TRUE(!upload_progress.empty()); 865 ASSERT_TRUE(!upload_progress.empty());
866 EXPECT_TRUE(base::STLIsSorted(upload_progress)); 866 EXPECT_TRUE(base::STLIsSorted(upload_progress));
867 EXPECT_GE(upload_progress.front(), 0); 867 EXPECT_GE(upload_progress.front(), 0);
868 EXPECT_LE(upload_progress.back(), 5); 868 EXPECT_LE(upload_progress.back(), 5);
869 } 869 }
870 870
871 } // namespace drive 871 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698