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

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: rebase Created 6 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/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 4ad4ae889a45e49932d87900f80a2dabfec2ab76..0588a117f4b41bcfcb198105b38273e10b860acf 100644
--- a/mojo/public/bindings/sample/sample_service_unittests.cc
+++ b/mojo/public/bindings/sample/sample_service_unittests.cc
@@ -240,14 +240,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,
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?
@@ -299,7 +299,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
« no previous file with comments | « mojo/public/bindings/sample/sample_service.mojom ('k') | mojo/public/bindings/sample/sample_service_unittests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698