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

Unified Diff: mojo/public/cpp/bindings/tests/binding_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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/tests/binding_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/binding_unittest.cc b/mojo/public/cpp/bindings/tests/binding_unittest.cc
index e3741bb07e96ed495184f858e56109b8f2519b9c..1949c21d85b0094e55495f44c4094f69f1415ec7 100644
--- a/mojo/public/cpp/bindings/tests/binding_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/binding_unittest.cc
@@ -101,7 +101,7 @@ TEST_F(BindingTest, DestroyClosesMessagePipe) {
};
{
Binding<sample::Service> binding(&impl, std::move(request));
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
run_loop2.Run();
EXPECT_TRUE(called);
@@ -114,7 +114,7 @@ TEST_F(BindingTest, DestroyClosesMessagePipe) {
// And calls should fail.
called = false;
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_FALSE(called);
@@ -210,7 +210,7 @@ TEST_F(BindingTest, Unbind) {
called = true;
run_loop.Quit();
};
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
run_loop.Run();
EXPECT_TRUE(called);
@@ -219,7 +219,7 @@ TEST_F(BindingTest, Unbind) {
auto request = binding.Unbind();
EXPECT_FALSE(binding.is_bound());
// All calls should fail when not bound...
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_FALSE(called);
@@ -233,7 +233,7 @@ TEST_F(BindingTest, Unbind) {
called = true;
run_loop2.Quit();
};
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb2);
run_loop2.Run();
EXPECT_TRUE(called);
@@ -247,7 +247,7 @@ class IntegerAccessorImpl : public sample::IntegerAccessor {
private:
// sample::IntegerAccessor implementation.
void GetInteger(const GetIntegerCallback& callback) override {
- callback.Run(1, sample::ENUM_VALUE);
+ callback.Run(1, sample::Enum::VALUE);
}
void SetInteger(int64_t data, sample::Enum type) override {}
@@ -273,7 +273,7 @@ TEST_F(BindingTest, PauseResume) {
ServiceImpl impl;
Binding<sample::Service> binding(&impl, std::move(request));
binding.PauseIncomingMethodCallProcessing();
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
EXPECT_FALSE(called);
loop().RunUntilIdle();
@@ -337,7 +337,7 @@ TEST_F(StrongBindingTest, DestroyClosesMessagePipe) {
};
{
StrongBinding<sample::Service> binding(&impl, std::move(request));
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
run_loop2.Run();
EXPECT_TRUE(called);
« no previous file with comments | « mojo/converters/surfaces/tests/surface_unittest.cc ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698