Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: mojo/edk/system/platform_handle_dispatcher_unittest.cc

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/ref_counted.h"
12 #include "mojo/edk/system/test/scoped_test_dir.h" 11 #include "mojo/edk/system/test/scoped_test_dir.h"
13 #include "mojo/edk/test/test_utils.h" 12 #include "mojo/edk/test/test_utils.h"
14 #include "mojo/edk/util/scoped_file.h" 13 #include "mojo/edk/util/scoped_file.h"
15 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
16 15
16 using mojo::util::RefPtr;
17
17 namespace mojo { 18 namespace mojo {
18 namespace system { 19 namespace system {
19 namespace { 20 namespace {
20 21
21 TEST(PlatformHandleDispatcherTest, Basic) { 22 TEST(PlatformHandleDispatcherTest, Basic) {
22 test::ScopedTestDir test_dir; 23 test::ScopedTestDir test_dir;
23 24
24 static const char kHelloWorld[] = "hello world"; 25 static const char kHelloWorld[] = "hello world";
25 26
26 util::ScopedFILE fp(test_dir.CreateFile()); 27 util::ScopedFILE fp(test_dir.CreateFile());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 EXPECT_EQ(sizeof(kFooBar), 95 EXPECT_EQ(sizeof(kFooBar),
95 fread(read_buffer, 1, sizeof(read_buffer), fp.get())); 96 fread(read_buffer, 1, sizeof(read_buffer), fp.get()));
96 EXPECT_STREQ(kFooBar, read_buffer); 97 EXPECT_STREQ(kFooBar, read_buffer);
97 98
98 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); 99 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close());
99 } 100 }
100 101
101 } // namespace 102 } // namespace
102 } // namespace system 103 } // namespace system
103 } // namespace mojo 104 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/platform_handle_dispatcher.cc ('k') | mojo/edk/system/proxy_message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698