Commit 07177bac authored by qsr@chromium.org's avatar qsr@chromium.org

Update mojom example files.

This updates the example mojom files in prevision of the java bindings
generator.

Review URL: https://codereview.chromium.org/295583005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271659 0039d316-1c4b-4281-b951-d872f2087c98
parent c80bc10d
......@@ -86,7 +86,7 @@ define([
foo.source = 23423782;
var messageName = 31;
var payloadSize = 240;
var payloadSize = 304;
var builder = new codec.MessageBuilder(messageName, payloadSize);
builder.encodeStruct(sample.Foo, foo);
......@@ -96,10 +96,10 @@ define([
var expectedMemory = new Uint8Array([
/* 0: */ 16, 0, 0, 0, 2, 0, 0, 0,
/* 8: */ 31, 0, 0, 0, 0, 0, 0, 0,
/* 16: */ 80, 0, 0, 0, 13, 0, 0, 0,
/* 16: */ 88, 0, 0, 0, 14, 0, 0, 0,
/* 24: */ 0xD5, 0xB4, 0x12, 0x02, 0x93, 0x6E, 0x01, 0,
/* 32: */ 5, 0, 0, 0, 0, 0, 0, 0,
/* 40: */ 56, 0, 0, 0, 0, 0, 0, 0,
/* 40: */ 64, 0, 0, 0, 0, 0, 0, 0,
]);
// TODO(abarth): Test more of the message's raw memory.
var actualMemory = new Uint8Array(message.buffer.arrayBuffer,
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.math"]
module math {
[Client=CalculatorUI]
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.sample"]
module sample {
// This sample shows how handles to MessagePipes can be sent as both parameters
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.imported"]
module imported {
// This sample just defines some types that are imported into
......
......@@ -4,7 +4,7 @@
import "sample_import.mojom"
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.imported"]
module imported {
// This sample adds more types and constants to the "imported" namespace,
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test",
[JavaPackage="org.chromium.mojo.bindings.test.sample",
Foo = "hello world"]
module sample {
......
......@@ -5,7 +5,7 @@
import "sample_import.mojom"
import "sample_import2.mojom"
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.sample"]
module sample {
const uint8 kThree = 3;
......@@ -38,7 +38,8 @@ struct Foo {
handle<message_pipe> source @9;
handle<data_pipe_consumer>[] input_streams @10;
handle<data_pipe_producer>[] output_streams @11;
bool[][] array_of_array_of_bools @12;
bool[][] array_of_array_of_bools = [[true], [false, true]] @12;
string[][][] multi_array_of_strings @13;
};
struct DefaultsTestInner {
......@@ -56,6 +57,17 @@ struct DefaultsTest {
Bar.Type bar_type = Bar.TYPE_BOTH;
};
struct StructWithHoleV1 {
int32 v1 = 1;
int64 v2 = 2;
};
struct StructWithHoleV2 {
int32 v1 = 1;
int64 v2 = 2;
int32 v3 = 3;
};
[Client=ServiceClient]
interface Service {
enum BazOptions {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test"]
[JavaPackage="org.chromium.mojo.bindings.test.test_structs"]
module test_structs {
struct Rect {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment