summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 15:35:55 +0000
committerqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 15:35:55 +0000
commit07177bac1c498f5f3e8307058dd8a36ca02b1756 (patch)
tree96de289f0c330d9763af4f7ddec4bdd9b75ce0ab
parentc80bc10d668700ca507e96e360dfa4ddab5e1986 (diff)
downloadchromium_src-07177bac1c498f5f3e8307058dd8a36ca02b1756.zip
chromium_src-07177bac1c498f5f3e8307058dd8a36ca02b1756.tar.gz
chromium_src-07177bac1c498f5f3e8307058dd8a36ca02b1756.tar.bz2
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
-rw-r--r--mojo/bindings/js/codec_unittests.js6
-rw-r--r--mojo/public/interfaces/bindings/tests/math_calculator.mojom2
-rw-r--r--mojo/public/interfaces/bindings/tests/sample_factory.mojom2
-rw-r--r--mojo/public/interfaces/bindings/tests/sample_import.mojom2
-rw-r--r--mojo/public/interfaces/bindings/tests/sample_import2.mojom2
-rw-r--r--mojo/public/interfaces/bindings/tests/sample_interfaces.mojom2
-rw-r--r--mojo/public/interfaces/bindings/tests/sample_service.mojom16
-rw-r--r--mojo/public/interfaces/bindings/tests/test_structs.mojom2
8 files changed, 23 insertions, 11 deletions
diff --git a/mojo/bindings/js/codec_unittests.js b/mojo/bindings/js/codec_unittests.js
index 09e5351..c6172ef 100644
--- a/mojo/bindings/js/codec_unittests.js
+++ b/mojo/bindings/js/codec_unittests.js
@@ -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,
diff --git a/mojo/public/interfaces/bindings/tests/math_calculator.mojom b/mojo/public/interfaces/bindings/tests/math_calculator.mojom
index 63b7a69..fd3d54e 100644
--- a/mojo/public/interfaces/bindings/tests/math_calculator.mojom
+++ b/mojo/public/interfaces/bindings/tests/math_calculator.mojom
@@ -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]
diff --git a/mojo/public/interfaces/bindings/tests/sample_factory.mojom b/mojo/public/interfaces/bindings/tests/sample_factory.mojom
index 33de19f..42408bd 100644
--- a/mojo/public/interfaces/bindings/tests/sample_factory.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_factory.mojom
@@ -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
diff --git a/mojo/public/interfaces/bindings/tests/sample_import.mojom b/mojo/public/interfaces/bindings/tests/sample_import.mojom
index 61f7b9c..feeb69d 100644
--- a/mojo/public/interfaces/bindings/tests/sample_import.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_import.mojom
@@ -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
diff --git a/mojo/public/interfaces/bindings/tests/sample_import2.mojom b/mojo/public/interfaces/bindings/tests/sample_import2.mojom
index 1c5ec39..b93be69 100644
--- a/mojo/public/interfaces/bindings/tests/sample_import2.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_import2.mojom
@@ -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,
diff --git a/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom b/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom
index 597fd0d..f2b1dc9 100644
--- a/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom
@@ -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 {
diff --git a/mojo/public/interfaces/bindings/tests/sample_service.mojom b/mojo/public/interfaces/bindings/tests/sample_service.mojom
index 3841365..d4327a4 100644
--- a/mojo/public/interfaces/bindings/tests/sample_service.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_service.mojom
@@ -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 {
diff --git a/mojo/public/interfaces/bindings/tests/test_structs.mojom b/mojo/public/interfaces/bindings/tests/test_structs.mojom
index 168771e..40bcb13 100644
--- a/mojo/public/interfaces/bindings/tests/test_structs.mojom
+++ b/mojo/public/interfaces/bindings/tests/test_structs.mojom
@@ -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 {