| Index: mojo/public/bindings/sample/sample_test.js
|
| diff --git a/mojo/public/bindings/sample/sample_test.js b/mojo/public/bindings/sample/sample_test.js
|
| index 230f4df51a1d3bee2c6a99fe895c90768452c9d7..e361b85da279490f96062388deb519043f2ff51e 100644
|
| --- a/mojo/public/bindings/sample/sample_test.js
|
| +++ b/mojo/public/bindings/sample/sample_test.js
|
| @@ -3,16 +3,21 @@
|
| // found in the LICENSE file.
|
|
|
| define([
|
| + "console",
|
| + "mojo/public/bindings/js/test/hexdump",
|
| "gtest",
|
| // TODO(abarth): We shouldn't need to depend on codec, but there seems to
|
| // be a bug in the module loading system whereby this test doesn't run if
|
| // we don't import codec here.
|
| "mojo/public/bindings/js/codec",
|
| "mojo/public/bindings/sample/mojom/sample_service"
|
| - ], function(gtest, codec, sample) {
|
| + ], function(console, hexdump, gtest, codec, sample) {
|
|
|
| var global = this;
|
|
|
| + // Set this variable to true to print the binary message in hex.
|
| + var dumpMessageAsHex = false;
|
| +
|
| function makeFoo() {
|
| var bar = new sample.Bar();
|
| bar.alpha = 20;
|
| @@ -107,6 +112,8 @@ define([
|
| }
|
|
|
| SimpleMessageReceiver.prototype.accept = function(message) {
|
| + if (dumpMessageAsHex)
|
| + console.log(hexdump.dumpArray(message.memory));
|
| // Imagine some IPC happened here.
|
| var serviceImpl = new ServiceImpl();
|
| serviceImpl.accept(message);
|
|
|