OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "components/filesystem/files_test_base.h" | 8 #include "components/filesystem/files_test_base.h" |
9 #include "mojo/platform_handle/platform_handle_functions.h" | 9 #include "mojo/platform_handle/platform_handle_functions.h" |
10 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
11 #include "mojo/public/cpp/bindings/type_converter.h" | 11 #include "mojo/public/cpp/bindings/type_converter.h" |
| 12 #include "mojo/util/capture_util.h" |
| 13 |
| 14 using mojo::Capture; |
12 | 15 |
13 namespace filesystem { | 16 namespace filesystem { |
14 namespace { | 17 namespace { |
15 | 18 |
16 using FileImplTest = FilesTestBase; | 19 using FileImplTest = FilesTestBase; |
17 | 20 |
18 TEST_F(FileImplTest, CreateWriteCloseRenameOpenRead) { | 21 TEST_F(FileImplTest, CreateWriteCloseRenameOpenRead) { |
19 DirectoryPtr directory; | 22 DirectoryPtr directory; |
20 GetTemporaryRoot(&directory); | 23 GetTemporaryRoot(&directory); |
21 FileError error; | 24 FileError error; |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 EXPECT_EQ(static_cast<uint8_t>('h'), bytes_read[0]); | 680 EXPECT_EQ(static_cast<uint8_t>('h'), bytes_read[0]); |
678 EXPECT_EQ(static_cast<uint8_t>('e'), bytes_read[1]); | 681 EXPECT_EQ(static_cast<uint8_t>('e'), bytes_read[1]); |
679 EXPECT_EQ(static_cast<uint8_t>('l'), bytes_read[2]); | 682 EXPECT_EQ(static_cast<uint8_t>('l'), bytes_read[2]); |
680 EXPECT_EQ(static_cast<uint8_t>('l'), bytes_read[3]); | 683 EXPECT_EQ(static_cast<uint8_t>('l'), bytes_read[3]); |
681 EXPECT_EQ(static_cast<uint8_t>('o'), bytes_read[4]); | 684 EXPECT_EQ(static_cast<uint8_t>('o'), bytes_read[4]); |
682 } | 685 } |
683 } | 686 } |
684 | 687 |
685 } // namespace | 688 } // namespace |
686 } // namespace filesystem | 689 } // namespace filesystem |
OLD | NEW |