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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) { | 287 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) { |
288 } | 288 } |
289 | 289 |
290 virtual void SetUp() OVERRIDE { | 290 virtual void SetUp() OVERRIDE { |
291 worker_thread_.reset(new base::Thread("DriveFileStreamReaderTest")); | 291 worker_thread_.reset(new base::Thread("DriveFileStreamReaderTest")); |
292 ASSERT_TRUE(worker_thread_->Start()); | 292 ASSERT_TRUE(worker_thread_->Start()); |
293 | 293 |
294 // Initialize FakeDriveService. | 294 // Initialize FakeDriveService. |
295 fake_drive_service_.reset(new FakeDriveService); | 295 fake_drive_service_.reset(new FakeDriveService); |
296 fake_drive_service_->LoadResourceListForWapi( | 296 fake_drive_service_->LoadResourceListForWapi( |
297 "chromeos/gdata/root_feed.json"); | 297 "gdata/root_feed.json"); |
298 fake_drive_service_->LoadAccountMetadataForWapi( | 298 fake_drive_service_->LoadAccountMetadataForWapi( |
299 "chromeos/gdata/account_metadata.json"); | 299 "gdata/account_metadata.json"); |
300 | 300 |
301 // Create a testee instance. | 301 // Create a testee instance. |
302 fake_file_system_.reset( | 302 fake_file_system_.reset( |
303 new test_util::FakeFileSystem(fake_drive_service_.get())); | 303 new test_util::FakeFileSystem(fake_drive_service_.get())); |
304 fake_file_system_->Initialize(); | 304 fake_file_system_->Initialize(); |
305 } | 305 } |
306 | 306 |
307 virtual void TearDown() OVERRIDE { | 307 virtual void TearDown() OVERRIDE { |
308 fake_file_system_.reset(); | 308 fake_file_system_.reset(); |
309 fake_drive_service_.reset(); | 309 fake_drive_service_.reset(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 google_apis::test_util::CreateQuitCallback( | 493 google_apis::test_util::CreateQuitCallback( |
494 &run_loop, | 494 &run_loop, |
495 google_apis::test_util::CreateCopyResultCallback(&error, &entry))); | 495 google_apis::test_util::CreateCopyResultCallback(&error, &entry))); |
496 run_loop.Run(); | 496 run_loop.Run(); |
497 } | 497 } |
498 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error); | 498 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error); |
499 EXPECT_FALSE(entry); | 499 EXPECT_FALSE(entry); |
500 } | 500 } |
501 | 501 |
502 } // namespace drive | 502 } // namespace drive |
OLD | NEW |