Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: mojo/public/js/validation_unittests.js

Issue 921223002: Cpp bindings: Return false from Validator::Accept() on unrecognized message or invalid flags (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/js/validation_unittests.js
diff --git a/mojo/public/js/validation_unittests.js b/mojo/public/js/validation_unittests.js
index a04879cd4b00f3bda1d466b88837bcdcae35371d..4fdb5d474600808e4fedc2605235bd631ec2d8ce 100644
--- a/mojo/public/js/validation_unittests.js
+++ b/mojo/public/js/validation_unittests.js
@@ -225,11 +225,19 @@ define([
expect(testFiles.length).toBeGreaterThan(0);
for (var i = 0; i < testFiles.length; i++) {
- // TODO(hansmuller, yzshen): Temporarily skipping:
- // - array pointer overflow tests;
- // - struct versioning tests (tests with "mthd11" in the name).
+ // TODO(hansmuller) Temporarily skipping array pointer overflow tests
+ // because JS numbers are limited to 53 bits.
+ // TODO(yzshen) Skipping struct versioning tests (tests with "mthd11"
+ // in the name) because the feature is not supported in JS yet.
+ // TODO(rudominer): Temporarily skipping 'no-such-method',
+ // 'invalid_request_flags', and 'invalid_response_flags' until additional
+ // logic in *RequestValidator and *ResponseValidator is ported from
+ // cpp to js.
if (testFiles[i].indexOf("overflow") != -1 ||
- testFiles[i].indexOf("mthd11") != -1) {
+ testFiles[i].indexOf("mthd11") != -1 ||
+ testFiles[i].indexOf("no_such_method") != -1 ||
+ testFiles[i].indexOf("invalid_request_flags") != -1 ||
+ testFiles[i].indexOf("invalid_response_flags") != -1) {
console.log("[Skipping " + testFiles[i] + "]");
continue;
}
@@ -257,12 +265,6 @@ define([
expect(testFiles.length).toBeGreaterThan(0);
for (var i = 0; i < testFiles.length; i++) {
- // TODO(hansmuller): Temporarily skipping array pointer overflow tests.
- if (testFiles[i].indexOf("overflow") != -1) {
- console.log("[Skipping " + testFiles[i] + "]");
- continue;
- }
-
var testMessage = readTestMessage(testFiles[i]);
var handles = new Array(testMessage.handleCount);
var testMessagePipe = new core.createMessagePipe();

Powered by Google App Engine
This is Rietveld 408576698