| 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 "mojo/public/cpp/bindings/interface_request.h" | 7 #include "mojo/public/cpp/bindings/interface_request.h" |
| 8 #include "mojo/public/cpp/bindings/type_converter.h" | 8 #include "mojo/public/cpp/bindings/type_converter.h" |
| 9 #include "services/files/files_test_base.h" | 9 #include "services/files/files_test_base.h" |
| 10 | 10 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 FilePtr file; | 675 FilePtr file; |
| 676 error = Error::INTERNAL; | 676 error = Error::INTERNAL; |
| 677 directory->OpenFile("my_file", GetProxy(&file), | 677 directory->OpenFile("my_file", GetProxy(&file), |
| 678 kOpenFlagRead | kOpenFlagWrite | kOpenFlagCreate, | 678 kOpenFlagRead | kOpenFlagWrite | kOpenFlagCreate, |
| 679 Capture(&error)); | 679 Capture(&error)); |
| 680 ASSERT_TRUE(directory.WaitForIncomingResponse()); | 680 ASSERT_TRUE(directory.WaitForIncomingResponse()); |
| 681 EXPECT_EQ(Error::OK, error); | 681 EXPECT_EQ(Error::OK, error); |
| 682 | 682 |
| 683 // Normal files don't support any ioctls. | 683 // Normal files don't support any ioctls. |
| 684 Array<uint32_t> out_values; | 684 Array<uint32_t> out_values; |
| 685 file->Ioctl(0, Array<uint32_t>(), Capture(&error, &out_values)); | 685 file->Ioctl(0, nullptr, Capture(&error, &out_values)); |
| 686 ASSERT_TRUE(file.WaitForIncomingResponse()); | 686 ASSERT_TRUE(file.WaitForIncomingResponse()); |
| 687 EXPECT_EQ(Error::UNAVAILABLE, error); | 687 EXPECT_EQ(Error::UNAVAILABLE, error); |
| 688 EXPECT_TRUE(out_values.is_null()); | 688 EXPECT_TRUE(out_values.is_null()); |
| 689 } | 689 } |
| 690 | 690 |
| 691 } // namespace | 691 } // namespace |
| 692 } // namespace files | 692 } // namespace files |
| 693 } // namespace mojo | 693 } // namespace mojo |
| OLD | NEW |