| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 { | 270 { |
| 271 std::string data("one two three"); | 271 std::string data("one two three"); |
| 272 bool handled = directory->WriteFile( | 272 bool handled = directory->WriteFile( |
| 273 "my_dir", mojo::Array<uint8_t>::From(data), &error); | 273 "my_dir", mojo::Array<uint8_t>::From(data), &error); |
| 274 ASSERT_TRUE(handled); | 274 ASSERT_TRUE(handled); |
| 275 EXPECT_EQ(mojom::FileError::NOT_A_FILE, error); | 275 EXPECT_EQ(mojom::FileError::NOT_A_FILE, error); |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 | 278 |
| 279 TEST_F(DirectoryImplTest, Flush) { |
| 280 mojom::DirectoryPtr directory; |
| 281 GetTemporaryRoot(&directory); |
| 282 mojom::FileError error; |
| 283 |
| 284 { |
| 285 bool handled = directory->Flush(&error); |
| 286 ASSERT_TRUE(handled); |
| 287 EXPECT_EQ(mojom::FileError::OK, error); |
| 288 } |
| 289 } |
| 290 |
| 279 // TODO(vtl): Test delete flags. | 291 // TODO(vtl): Test delete flags. |
| 280 | 292 |
| 281 } // namespace | 293 } // namespace |
| 282 } // namespace filesystem | 294 } // namespace filesystem |
| OLD | NEW |