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

Unified Diff: mojo/public/bindings/sample/sample_service_unittests.cc

Issue 99623010: Add support for enums within structs and interfaces to mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/bindings/sample/sample_service_unittests.cc
diff --git a/mojo/public/bindings/sample/sample_service_unittests.cc b/mojo/public/bindings/sample/sample_service_unittests.cc
index 23f63f676a9934e2d1bffe58d3339a6baeeb2113..bd06dcc0429960fc2b74eeb7fc4f245b32ab956a 100644
--- a/mojo/public/bindings/sample/sample_service_unittests.cc
+++ b/mojo/public/bindings/sample/sample_service_unittests.cc
@@ -209,14 +209,14 @@ static void DumpHex(const uint8_t* bytes, uint32_t num_bytes) {
class ServiceImpl : public ServiceStub {
public:
- virtual void Frobinate(const Foo& foo, bool baz,
+ virtual void Frobinate(const Foo& foo, int32_t baz,
DaveMoore 2013/12/20 02:53:18 Nit: I think there was a reason that we decided no
mojo::ScopedMessagePipeHandle port)
MOJO_OVERRIDE {
// Users code goes here to handle the incoming Frobinate message.
// We mainly check that we're given the expected arguments.
CheckFoo(foo);
- EXPECT_TRUE(baz);
+ EXPECT_EQ(BAZ_EXTRA, baz);
// Also dump the Foo structure and all of its members.
// TODO(vtl): Make it optional, so that the test spews less?
@@ -268,7 +268,7 @@ TEST(BindingsSampleTest, Basic) {
mojo::ScopedMessagePipeHandle port0, port1;
mojo::CreateMessagePipe(&port0, &port1);
- service->Frobinate(foo, true, port0.Pass());
+ service->Frobinate(foo, Service::BAZ_EXTRA, port0.Pass());
}
} // namespace sample

Powered by Google App Engine
This is Rietveld 408576698