Added mojom.FixedArray to the array clause in JavaScriptEncodeSnippet(kind).

Added a dependency on "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom" to validation_unittests.js, just to prove that the bindings can be parsed.

BUG=401977

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

Cr-Commit-Position: refs/heads/master@{#288474}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288474 0039d316-1c4b-4281-b951-d872f2087c98
parent 28474b23
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
define([ define([
"file", "file",
"gin/test/expect", "gin/test/expect",
"mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom",
"mojo/public/js/bindings/buffer", "mojo/public/js/bindings/buffer",
"mojo/public/js/bindings/codec", "mojo/public/js/bindings/codec",
"mojo/public/js/bindings/tests/validation_test_input_parser", "mojo/public/js/bindings/tests/validation_test_input_parser",
"mojo/public/js/bindings/validator", "mojo/public/js/bindings/validator",
], function(file, expect, buffer, codec, parser, validator) { ], function(file, expect, testInterface, buffer, codec, parser, validator) {
function checkTestMessageParser() { function checkTestMessageParser() {
function TestMessageParserFailure(message, input) { function TestMessageParserFailure(message, input) {
......
...@@ -120,7 +120,7 @@ def JavaScriptEncodeSnippet(kind): ...@@ -120,7 +120,7 @@ def JavaScriptEncodeSnippet(kind):
return "encodeStructPointer(%s, " % CodecType(kind.name) return "encodeStructPointer(%s, " % CodecType(kind.name)
if isinstance(kind, mojom.Array) and kind.kind == mojom.BOOL: if isinstance(kind, mojom.Array) and kind.kind == mojom.BOOL:
return "encodeBoolArrayPointer("; return "encodeBoolArrayPointer(";
if isinstance(kind, mojom.Array): if isinstance(kind, (mojom.Array, mojom.FixedArray)):
return "encodeArrayPointer(%s, " % CodecType(kind.kind) return "encodeArrayPointer(%s, " % CodecType(kind.kind)
if isinstance(kind, mojom.Interface) or \ if isinstance(kind, mojom.Interface) or \
isinstance(kind, mojom.InterfaceRequest): isinstance(kind, mojom.InterfaceRequest):
......
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