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

Side by Side Diff: chrome/browser/google_apis/fake_drive_service_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 "chrome/browser/google_apis/fake_drive_service.h" 5 #include "chrome/browser/google_apis/fake_drive_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 int64 GetLargestChangeByAboutResource() { 80 int64 GetLargestChangeByAboutResource() {
81 GDataErrorCode error; 81 GDataErrorCode error;
82 scoped_ptr<AboutResource> about_resource; 82 scoped_ptr<AboutResource> about_resource;
83 fake_service_.GetAboutResource( 83 fake_service_.GetAboutResource(
84 test_util::CreateCopyResultCallback(&error, &about_resource)); 84 test_util::CreateCopyResultCallback(&error, &about_resource));
85 message_loop_.RunUntilIdle(); 85 message_loop_.RunUntilIdle();
86 return about_resource->largest_change_id(); 86 return about_resource->largest_change_id();
87 } 87 }
88 88
89 MessageLoopForUI message_loop_; 89 base::MessageLoopForUI message_loop_;
90 content::TestBrowserThread ui_thread_; 90 content::TestBrowserThread ui_thread_;
91 FakeDriveService fake_service_; 91 FakeDriveService fake_service_;
92 }; 92 };
93 93
94 void AppendProgressCallbackResult(std::vector<int64>* values, int64 progress) { 94 void AppendProgressCallbackResult(std::vector<int64>* values, int64 progress) {
95 values->push_back(progress); 95 values->push_back(progress);
96 } 96 }
97 97
98 TEST_F(FakeDriveServiceTest, GetAllResourceList) { 98 TEST_F(FakeDriveServiceTest, GetAllResourceList) {
99 ASSERT_TRUE(fake_service_.LoadResourceListForWapi( 99 ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 test_util::CreateCopyResultCallback(&error, &resource_entry)); 2076 test_util::CreateCopyResultCallback(&error, &resource_entry));
2077 message_loop_.RunUntilIdle(); 2077 message_loop_.RunUntilIdle();
2078 2078
2079 EXPECT_EQ(GDATA_NO_CONNECTION, error); 2079 EXPECT_EQ(GDATA_NO_CONNECTION, error);
2080 EXPECT_FALSE(resource_entry); 2080 EXPECT_FALSE(resource_entry);
2081 } 2081 }
2082 2082
2083 } // namespace 2083 } // namespace
2084 2084
2085 } // namespace google_apis 2085 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/fake_drive_service.cc ('k') | chrome/browser/google_apis/gdata_wapi_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698