| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 class LocalReaderProxyTest : public ::testing::Test { | 45 class LocalReaderProxyTest : public ::testing::Test { |
| 46 protected: | 46 protected: |
| 47 LocalReaderProxyTest() | 47 LocalReaderProxyTest() |
| 48 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) { | 48 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 void SetUp() override { | 51 void SetUp() override { |
| 52 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 52 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 53 ASSERT_TRUE(google_apis::test_util::CreateFileOfSpecifiedSize( | 53 ASSERT_TRUE(google_apis::test_util::CreateFileOfSpecifiedSize( |
| 54 temp_dir_.path(), 1024, &file_path_, &file_content_)); | 54 temp_dir_.GetPath(), 1024, &file_path_, &file_content_)); |
| 55 | 55 |
| 56 worker_thread_.reset(new base::Thread("ReaderProxyTest")); | 56 worker_thread_.reset(new base::Thread("ReaderProxyTest")); |
| 57 ASSERT_TRUE(worker_thread_->Start()); | 57 ASSERT_TRUE(worker_thread_->Start()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 content::TestBrowserThreadBundle thread_bundle_; | 60 content::TestBrowserThreadBundle thread_bundle_; |
| 61 | 61 |
| 62 base::ScopedTempDir temp_dir_; | 62 base::ScopedTempDir temp_dir_; |
| 63 base::FilePath file_path_; | 63 base::FilePath file_path_; |
| 64 std::string file_content_; | 64 std::string file_content_; |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 ASSERT_TRUE(entry); | 563 ASSERT_TRUE(entry); |
| 564 EXPECT_TRUE(reader->IsInitialized()); | 564 EXPECT_TRUE(reader->IsInitialized()); |
| 565 | 565 |
| 566 // Read data from the reader, again. | 566 // Read data from the reader, again. |
| 567 std::string second_content; | 567 std::string second_content; |
| 568 ASSERT_EQ(net::OK, test_util::ReadAllData(reader.get(), &second_content)); | 568 ASSERT_EQ(net::OK, test_util::ReadAllData(reader.get(), &second_content)); |
| 569 EXPECT_EQ(0u, second_content.size()); | 569 EXPECT_EQ(0u, second_content.size()); |
| 570 } | 570 } |
| 571 | 571 |
| 572 } // namespace drive | 572 } // namespace drive |
| OLD | NEW |