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

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: rebase 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 "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/message_pump/message_pump_mojo.h" 10 #include "mojo/message_pump/message_pump_mojo.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 EXPECT_EQ(std::string("hello"), value); 159 EXPECT_EQ(std::string("hello"), value);
160 } 160 }
161 161
162 TEST_F(RequestResponseTest, EchoEnum) { 162 TEST_F(RequestResponseTest, EchoEnum) {
163 sample::ProviderPtr provider; 163 sample::ProviderPtr provider;
164 ProviderImpl provider_impl(GetProxy(&provider)); 164 ProviderImpl provider_impl(GetProxy(&provider));
165 165
166 sample::Enum value; 166 sample::Enum value;
167 base::RunLoop run_loop; 167 base::RunLoop run_loop;
168 provider->EchoEnum(sample::ENUM_VALUE, 168 provider->EchoEnum(sample::Enum::VALUE,
169 EnumRecorder(&value, run_loop.QuitClosure())); 169 EnumRecorder(&value, run_loop.QuitClosure()));
170 170
171 run_loop.Run(); 171 run_loop.Run();
172 172
173 EXPECT_EQ(sample::ENUM_VALUE, value); 173 EXPECT_EQ(sample::Enum::VALUE, value);
174 } 174 }
175 175
176 } // namespace 176 } // namespace
177 } // namespace test 177 } // namespace test
178 } // namespace mojo 178 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc ('k') | mojo/public/cpp/bindings/tests/sample_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698