| 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/webkit_file_stream_reader_impl.h" | 5 #include "chrome/browser/chromeos/drive/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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 "gdata/root_feed.json"); | 45 "gdata/root_feed.json"); |
| 46 fake_drive_service_->LoadAccountMetadataForWapi( | 46 fake_drive_service_->LoadAccountMetadataForWapi( |
| 47 "gdata/account_metadata.json"); | 47 "gdata/account_metadata.json"); |
| 48 | 48 |
| 49 // Create a testee instance. | 49 // Create a testee instance. |
| 50 fake_file_system_.reset( | 50 fake_file_system_.reset( |
| 51 new test_util::FakeFileSystem(fake_drive_service_.get())); | 51 new test_util::FakeFileSystem(fake_drive_service_.get())); |
| 52 fake_file_system_->Initialize(); | 52 fake_file_system_->Initialize(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void TearDown() OVERRIDE { | |
| 56 fake_file_system_.reset(); | |
| 57 fake_drive_service_.reset(); | |
| 58 | |
| 59 worker_thread_.reset(); | |
| 60 } | |
| 61 | |
| 62 FileSystemInterface* GetFileSystem() { | 55 FileSystemInterface* GetFileSystem() { |
| 63 return fake_file_system_.get(); | 56 return fake_file_system_.get(); |
| 64 } | 57 } |
| 65 | 58 |
| 66 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() { | 59 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() { |
| 67 return base::Bind(&WebkitFileStreamReaderImplTest::GetFileSystem, | 60 return base::Bind(&WebkitFileStreamReaderImplTest::GetFileSystem, |
| 68 base::Unretained(this)); | 61 base::Unretained(this)); |
| 69 } | 62 } |
| 70 | 63 |
| 71 content::TestBrowserThreadBundle thread_bundle_; | 64 content::TestBrowserThreadBundle thread_bundle_; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 base::Time::FromInternalValue(1))); | 208 base::Time::FromInternalValue(1))); |
| 216 | 209 |
| 217 net::TestInt64CompletionCallback callback; | 210 net::TestInt64CompletionCallback callback; |
| 218 int64 result = reader->GetLength(callback.callback()); | 211 int64 result = reader->GetLength(callback.callback()); |
| 219 result = callback.GetResult(result); | 212 result = callback.GetResult(result); |
| 220 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result); | 213 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result); |
| 221 } | 214 } |
| 222 | 215 |
| 223 } // namespace internal | 216 } // namespace internal |
| 224 } // namespace drive | 217 } // namespace drive |
| OLD | NEW |