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

Side by Side Diff: mojo/public/cpp/bindings/tests/synchronous_connector_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/public/cpp/bindings/lib/synchronous_connector.h" 5 #include "mojo/public/cpp/bindings/lib/synchronous_connector.h"
6 6
7 #include <string.h> 7 #include <string.h>
8
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 11
12 #include "gtest/gtest.h"
11 #include "mojo/public/cpp/bindings/lib/message_builder.h" 13 #include "mojo/public/cpp/bindings/lib/message_builder.h"
12 #include "mojo/public/cpp/bindings/message.h" 14 #include "mojo/public/cpp/bindings/message.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace mojo { 16 namespace mojo {
16 namespace test { 17 namespace test {
17 namespace { 18 namespace {
18 19
19 void AllocMessage(const std::string& text, Message* message) { 20 void AllocMessage(const std::string& text, Message* message) {
20 size_t payload_size = text.length() + 1; // Plus null terminator. 21 size_t payload_size = text.length() + 1; // Plus null terminator.
21 MessageBuilder builder(1, payload_size); 22 MessageBuilder builder(1, payload_size);
22 memcpy(builder.buffer()->Allocate(payload_size), text.c_str(), payload_size); 23 memcpy(builder.buffer()->Allocate(payload_size), text.c_str(), payload_size);
23 24
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Close the other end of the pipe. 65 // Close the other end of the pipe.
65 pipe.handle1.reset(); 66 pipe.handle1.reset();
66 67
67 Message message; 68 Message message;
68 EXPECT_FALSE(connector0.BlockingRead(&message)); 69 EXPECT_FALSE(connector0.BlockingRead(&message));
69 } 70 }
70 71
71 } // namespace 72 } // namespace
72 } // namespace test 73 } // namespace test
73 } // namespace mojo 74 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698