| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 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 | 139 |
| 140 sync_client_ = DriveFileSyncClient::CreateForTesting( | 140 sync_client_ = DriveFileSyncClient::CreateForTesting( |
| 141 &profile_, | 141 &profile_, |
| 142 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), |
| 142 scoped_ptr<DriveServiceInterface>(mock_drive_service_), | 143 scoped_ptr<DriveServiceInterface>(mock_drive_service_), |
| 143 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)).Pass(); | 144 scoped_ptr<DriveUploaderInterface>(fake_drive_uploader_)).Pass(); |
| 144 } | 145 } |
| 145 | 146 |
| 146 virtual void TearDown() OVERRIDE { | 147 virtual void TearDown() OVERRIDE { |
| 147 EXPECT_CALL(*mock_drive_service(), CancelAll()); | 148 EXPECT_CALL(*mock_drive_service(), CancelAll()); |
| 148 sync_client_.reset(); | 149 sync_client_.reset(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 protected: | 152 protected: |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 base::Bind(&DidDeleteFile, &done, &error)); | 845 base::Bind(&DidDeleteFile, &done, &error)); |
| 845 message_loop()->RunUntilIdle(); | 846 message_loop()->RunUntilIdle(); |
| 846 | 847 |
| 847 EXPECT_TRUE(done); | 848 EXPECT_TRUE(done); |
| 848 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); | 849 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); |
| 849 } | 850 } |
| 850 | 851 |
| 851 #endif // !defined(OS_ANDROID) | 852 #endif // !defined(OS_ANDROID) |
| 852 | 853 |
| 853 } // namespace sync_file_system | 854 } // namespace sync_file_system |
| OLD | NEW |