OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/edk/system/platform_handle_dispatcher.h" | 5 #include "mojo/edk/system/platform_handle_dispatcher.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "mojo/edk/system/test/scoped_test_dir.h" | 11 #include "mojo/edk/system/test/scoped_test_dir.h" |
12 #include "mojo/edk/test/test_utils.h" | 12 #include "mojo/edk/test/test_utils.h" |
13 #include "mojo/edk/util/scoped_file.h" | 13 #include "mojo/edk/util/scoped_file.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using mojo::embedder::ScopedPlatformHandle; | 16 using mojo::platform::ScopedPlatformHandle; |
17 using mojo::util::RefPtr; | 17 using mojo::util::RefPtr; |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 namespace system { | 20 namespace system { |
21 namespace { | 21 namespace { |
22 | 22 |
23 TEST(PlatformHandleDispatcherTest, Basic) { | 23 TEST(PlatformHandleDispatcherTest, Basic) { |
24 test::ScopedTestDir test_dir; | 24 test::ScopedTestDir test_dir; |
25 | 25 |
26 static const char kHelloWorld[] = "hello world"; | 26 static const char kHelloWorld[] = "hello world"; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 EXPECT_EQ(sizeof(kFooBar), | 95 EXPECT_EQ(sizeof(kFooBar), |
96 fread(read_buffer, 1, sizeof(read_buffer), fp.get())); | 96 fread(read_buffer, 1, sizeof(read_buffer), fp.get())); |
97 EXPECT_STREQ(kFooBar, read_buffer); | 97 EXPECT_STREQ(kFooBar, read_buffer); |
98 | 98 |
99 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); | 99 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); |
100 } | 100 } |
101 | 101 |
102 } // namespace | 102 } // namespace |
103 } // namespace system | 103 } // namespace system |
104 } // namespace mojo | 104 } // namespace mojo |
OLD | NEW |