OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/drive_file_stream_reader.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_stream_reader.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // Initialize FakeDriveService. | 290 // Initialize FakeDriveService. |
291 fake_drive_service_.reset(new FakeDriveService); | 291 fake_drive_service_.reset(new FakeDriveService); |
292 fake_drive_service_->LoadResourceListForWapi( | 292 fake_drive_service_->LoadResourceListForWapi( |
293 "gdata/root_feed.json"); | 293 "gdata/root_feed.json"); |
294 fake_drive_service_->LoadAccountMetadataForWapi( | 294 fake_drive_service_->LoadAccountMetadataForWapi( |
295 "gdata/account_metadata.json"); | 295 "gdata/account_metadata.json"); |
296 | 296 |
297 // Create a testee instance. | 297 // Create a testee instance. |
298 fake_file_system_.reset( | 298 fake_file_system_.reset( |
299 new test_util::FakeFileSystem(fake_drive_service_.get())); | 299 new test_util::FakeFileSystem(fake_drive_service_.get())); |
300 fake_file_system_->Initialize(); | |
301 } | 300 } |
302 | 301 |
303 FileSystemInterface* GetFileSystem() { | 302 FileSystemInterface* GetFileSystem() { |
304 return fake_file_system_.get(); | 303 return fake_file_system_.get(); |
305 } | 304 } |
306 | 305 |
307 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() { | 306 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() { |
308 return base::Bind(&DriveFileStreamReaderTest::GetFileSystem, | 307 return base::Bind(&DriveFileStreamReaderTest::GetFileSystem, |
309 base::Unretained(this)); | 308 base::Unretained(this)); |
310 } | 309 } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 google_apis::test_util::CreateQuitCallback( | 476 google_apis::test_util::CreateQuitCallback( |
478 &run_loop, | 477 &run_loop, |
479 google_apis::test_util::CreateCopyResultCallback(&error, &entry))); | 478 google_apis::test_util::CreateCopyResultCallback(&error, &entry))); |
480 run_loop.Run(); | 479 run_loop.Run(); |
481 } | 480 } |
482 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error); | 481 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error); |
483 EXPECT_FALSE(entry); | 482 EXPECT_FALSE(entry); |
484 } | 483 } |
485 | 484 |
486 } // namespace drive | 485 } // namespace drive |
OLD | NEW |