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

Side by Side Diff: mojo/public/cpp/bindings/tests/request_response_unittest.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: Created 4 years, 11 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/message_pump/message_pump_mojo.h" 9 #include "mojo/message_pump/message_pump_mojo.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ReadTextMessage(pipe2.handle0.get(), &value); 136 ReadTextMessage(pipe2.handle0.get(), &value);
137 137
138 EXPECT_EQ(std::string("hello"), value); 138 EXPECT_EQ(std::string("hello"), value);
139 } 139 }
140 140
141 TEST_F(RequestResponseTest, EchoEnum) { 141 TEST_F(RequestResponseTest, EchoEnum) {
142 sample::ProviderPtr provider; 142 sample::ProviderPtr provider;
143 ProviderImpl provider_impl(GetProxy(&provider)); 143 ProviderImpl provider_impl(GetProxy(&provider));
144 144
145 sample::Enum value; 145 sample::Enum value;
146 provider->EchoEnum(sample::ENUM_VALUE, EnumRecorder(&value)); 146 provider->EchoEnum(sample::Enum::VALUE, EnumRecorder(&value));
147 147
148 PumpMessages(); 148 PumpMessages();
149 149
150 EXPECT_EQ(sample::ENUM_VALUE, value); 150 EXPECT_EQ(sample::Enum::VALUE, value);
151 } 151 }
152 152
153 } // namespace 153 } // namespace
154 } // namespace test 154 } // namespace test
155 } // namespace mojo 155 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698