| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/fileapi/webkit_file_stream_reader_impl.h
" | 5 #include "chrome/browser/chromeos/drive/fileapi/webkit_file_stream_reader_impl.h
" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 FileError error = FILE_ERROR_FAILED; | 175 FileError error = FILE_ERROR_FAILED; |
| 176 scoped_ptr<ResourceEntry> entry; | 176 scoped_ptr<ResourceEntry> entry; |
| 177 fake_file_system_->GetResourceEntry( | 177 fake_file_system_->GetResourceEntry( |
| 178 kDriveFile, | 178 kDriveFile, |
| 179 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 179 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
| 180 base::RunLoop().RunUntilIdle(); | 180 base::RunLoop().RunUntilIdle(); |
| 181 EXPECT_EQ(FILE_ERROR_OK, error); | 181 EXPECT_EQ(FILE_ERROR_OK, error); |
| 182 ASSERT_TRUE(entry); | 182 ASSERT_TRUE(entry); |
| 183 | 183 |
| 184 google_apis::GDataErrorCode status = google_apis::GDATA_OTHER_ERROR; | 184 google_apis::DriveApiErrorCode status = google_apis::DRIVE_OTHER_ERROR; |
| 185 scoped_ptr<google_apis::FileResource> server_entry; | 185 scoped_ptr<google_apis::FileResource> server_entry; |
| 186 fake_drive_service_->UpdateResource( | 186 fake_drive_service_->UpdateResource( |
| 187 entry->resource_id(), | 187 entry->resource_id(), |
| 188 std::string(), // parent_resource_id | 188 std::string(), // parent_resource_id |
| 189 std::string(), // title | 189 std::string(), // title |
| 190 expected_modification_time, | 190 expected_modification_time, |
| 191 base::Time(), | 191 base::Time(), |
| 192 google_apis::test_util::CreateCopyResultCallback(&status, | 192 google_apis::test_util::CreateCopyResultCallback(&status, |
| 193 &server_entry)); | 193 &server_entry)); |
| 194 base::RunLoop().RunUntilIdle(); | 194 base::RunLoop().RunUntilIdle(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 223 base::Time::FromInternalValue(1))); | 223 base::Time::FromInternalValue(1))); |
| 224 | 224 |
| 225 net::TestInt64CompletionCallback callback; | 225 net::TestInt64CompletionCallback callback; |
| 226 int64 result = reader->GetLength(callback.callback()); | 226 int64 result = reader->GetLength(callback.callback()); |
| 227 result = callback.GetResult(result); | 227 result = callback.GetResult(result); |
| 228 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result); | 228 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace internal | 231 } // namespace internal |
| 232 } // namespace drive | 232 } // namespace drive |
| OLD | NEW |