OLD | NEW |
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/sync_file_system/drive_file_sync_client.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_client.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "chrome/browser/google_apis/drive_uploader.h" | 10 #include "chrome/browser/google_apis/drive_uploader.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 virtual void SetUp() OVERRIDE { | 134 virtual void SetUp() OVERRIDE { |
135 mock_drive_service_ = new StrictMock<MockDriveService>; | 135 mock_drive_service_ = new StrictMock<MockDriveService>; |
136 fake_drive_uploader_ = new FakeDriveUploader; | 136 fake_drive_uploader_ = new FakeDriveUploader; |
137 | 137 |
138 EXPECT_CALL(*mock_drive_service_, Initialize(&profile_)).Times(1); | 138 EXPECT_CALL(*mock_drive_service_, Initialize(&profile_)).Times(1); |
139 EXPECT_CALL(*mock_drive_service_, AddObserver(_)); | 139 EXPECT_CALL(*mock_drive_service_, AddObserver(_)); |
140 | 140 |
141 sync_client_ = DriveFileSyncClient::CreateForTesting( | 141 sync_client_ = DriveFileSyncClient::CreateForTesting( |
142 &profile_, | 142 &profile_, |
| 143 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), |
143 scoped_ptr<DriveServiceInterface>(mock_drive_service_), | 144 scoped_ptr<DriveServiceInterface>(mock_drive_service_), |
144 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)).Pass(); | 145 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)).Pass(); |
145 } | 146 } |
146 | 147 |
147 virtual void TearDown() OVERRIDE { | 148 virtual void TearDown() OVERRIDE { |
148 EXPECT_CALL(*mock_drive_service_, RemoveObserver(_)); | 149 EXPECT_CALL(*mock_drive_service_, RemoveObserver(_)); |
149 EXPECT_CALL(*mock_drive_service(), CancelAll()); | 150 EXPECT_CALL(*mock_drive_service(), CancelAll()); |
150 sync_client_.reset(); | 151 sync_client_.reset(); |
151 } | 152 } |
152 | 153 |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 base::Bind(&DidDeleteFile, &done, &error)); | 847 base::Bind(&DidDeleteFile, &done, &error)); |
847 message_loop()->RunUntilIdle(); | 848 message_loop()->RunUntilIdle(); |
848 | 849 |
849 EXPECT_TRUE(done); | 850 EXPECT_TRUE(done); |
850 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); | 851 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); |
851 } | 852 } |
852 | 853 |
853 #endif // !defined(OS_ANDROID) | 854 #endif // !defined(OS_ANDROID) |
854 | 855 |
855 } // namespace sync_file_system | 856 } // namespace sync_file_system |
OLD | NEW |