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 @@
define([
"file",
"gin/test/expect",
"mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom",
"mojo/public/js/bindings/buffer",
"mojo/public/js/bindings/codec",
"mojo/public/js/bindings/tests/validation_test_input_parser",
"mojo/public/js/bindings/validator",
], function(file, expect, buffer, codec, parser, validator) {
], function(file, expect, testInterface, buffer, codec, parser, validator) {
function checkTestMessageParser() {
function TestMessageParserFailure(message, input) {
......
......@@ -120,7 +120,7 @@ def JavaScriptEncodeSnippet(kind):
return "encodeStructPointer(%s, " % CodecType(kind.name)
if isinstance(kind, mojom.Array) and kind.kind == mojom.BOOL:
return "encodeBoolArrayPointer(";
if isinstance(kind, mojom.Array):
if isinstance(kind, (mojom.Array, mojom.FixedArray)):
return "encodeArrayPointer(%s, " % CodecType(kind.kind)
if isinstance(kind, mojom.Interface) or \
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