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

Side by Side Diff: mojo/public/cpp/environment/tests/async_wait_unittest.cc

Issue 2244503002: mojo/public: Include gtest.h as "gtest/gtest.h", instead of via "absolute" path. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months 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/environment/async_waiter.h> 5 #include <mojo/environment/async_waiter.h>
6 #include <mojo/result.h> 6 #include <mojo/result.h>
7 #include <mojo/system/time.h> 7 #include <mojo/system/time.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "gtest/gtest.h"
11 #include "mojo/public/cpp/environment/environment.h" 12 #include "mojo/public/cpp/environment/environment.h"
12 #include "mojo/public/cpp/system/handle.h" 13 #include "mojo/public/cpp/system/handle.h"
13 #include "mojo/public/cpp/system/macros.h" 14 #include "mojo/public/cpp/system/macros.h"
14 #include "mojo/public/cpp/system/message_pipe.h" 15 #include "mojo/public/cpp/system/message_pipe.h"
15 #include "mojo/public/cpp/test_support/test_utils.h" 16 #include "mojo/public/cpp/test_support/test_utils.h"
16 #include "mojo/public/cpp/utility/run_loop.h" 17 #include "mojo/public/cpp/utility/run_loop.h"
17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace { 20 namespace {
21 21
22 class TestAsyncWaitCallback { 22 class TestAsyncWaitCallback {
23 public: 23 public:
24 TestAsyncWaitCallback() : result_count_(0), last_result_(MOJO_RESULT_OK) {} 24 TestAsyncWaitCallback() : result_count_(0), last_result_(MOJO_RESULT_OK) {}
25 ~TestAsyncWaitCallback() {} 25 ~TestAsyncWaitCallback() {}
26 26
27 int result_count() const { return result_count_; } 27 int result_count() const { return result_count_; }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 EXPECT_TRUE(test::WriteTextMessage(test_pipe.handle1.get(), std::string())); 108 EXPECT_TRUE(test::WriteTextMessage(test_pipe.handle1.get(), std::string()));
109 109
110 CallCancelWait(CallAsyncWait( 110 CallCancelWait(CallAsyncWait(
111 test_pipe.handle0.get(), MOJO_HANDLE_SIGNAL_READABLE, &callback)); 111 test_pipe.handle0.get(), MOJO_HANDLE_SIGNAL_READABLE, &callback));
112 RunLoop::current()->Run(); 112 RunLoop::current()->Run();
113 EXPECT_EQ(0, callback.result_count()); 113 EXPECT_EQ(0, callback.result_count());
114 } 114 }
115 115
116 } // namespace 116 } // namespace
117 } // namespace mojo 117 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/tests/BUILD.gn ('k') | mojo/public/cpp/environment/tests/async_waiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698