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

Unified Diff: mojo/public/cpp/bindings/tests/interface_ptr_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, 12 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/interface_ptr_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index bce17b4273d27ad9b391ac742b7756f9bb408eb5..b52fc0bc13f92f206b346cfa6f04f197c5b9babd 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -180,7 +180,7 @@ class IntegerAccessorImpl : public sample::IntegerAccessor {
private:
// sample::IntegerAccessor implementation.
void GetInteger(const GetIntegerCallback& callback) override {
- callback.Run(integer_, sample::ENUM_VALUE);
+ callback.Run(integer_, sample::Enum::VALUE);
}
void SetInteger(int64_t data, sample::Enum type) override { integer_ = data; }
@@ -384,9 +384,9 @@ TEST_F(InterfacePtrTest, ReentrantWaitForIncomingMethodCall) {
sample::ServicePtr proxy;
ReentrantServiceImpl impl(GetProxy(&proxy));
- proxy->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ proxy->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
sample::Service::FrobinateCallback());
- proxy->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ proxy->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
sample::Service::FrobinateCallback());
PumpMessages();
@@ -418,14 +418,14 @@ TEST_F(InterfacePtrTest, RequireVersion) {
ptr.RequireVersion(1u);
EXPECT_EQ(1u, ptr.version());
- ptr->SetInteger(123, sample::ENUM_VALUE);
+ ptr->SetInteger(123, sample::Enum::VALUE);
PumpMessages();
EXPECT_FALSE(ptr.encountered_error());
EXPECT_EQ(123, impl.integer());
ptr.RequireVersion(3u);
EXPECT_EQ(3u, ptr.version());
- ptr->SetInteger(456, sample::ENUM_VALUE);
+ ptr->SetInteger(456, sample::Enum::VALUE);
PumpMessages();
EXPECT_FALSE(ptr.encountered_error());
EXPECT_EQ(456, impl.integer());
@@ -434,7 +434,7 @@ TEST_F(InterfacePtrTest, RequireVersion) {
ptr.RequireVersion(4u);
// This value is set to the input of RequireVersion() synchronously.
EXPECT_EQ(4u, ptr.version());
- ptr->SetInteger(789, sample::ENUM_VALUE);
+ ptr->SetInteger(789, sample::Enum::VALUE);
PumpMessages();
EXPECT_TRUE(ptr.encountered_error());
// The call to SetInteger() after RequireVersion(4u) is ignored.

Powered by Google App Engine
This is Rietveld 408576698