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

Side by Side Diff: mojo/public/js/bindings/validation_unittests.js

Issue 651823005: mojom: Add conformance tests for map<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hans pointed out this work around. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 define([ 5 define([
6 "console", 6 "console",
7 "file", 7 "file",
8 "gin/test/expect", 8 "gin/test/expect",
9 "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom", 9 "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom",
10 "mojo/public/js/bindings/buffer", 10 "mojo/public/js/bindings/buffer",
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 var testFiles = getMessageTestFiles(key); 224 var testFiles = getMessageTestFiles(key);
225 expect(testFiles.length).toBeGreaterThan(0); 225 expect(testFiles.length).toBeGreaterThan(0);
226 226
227 for (var i = 0; i < testFiles.length; i++) { 227 for (var i = 0; i < testFiles.length; i++) {
228 // TODO(hansmuller): Temporarily skipping array pointer overflow tests. 228 // TODO(hansmuller): Temporarily skipping array pointer overflow tests.
229 if (testFiles[i].indexOf("overflow") != -1) { 229 if (testFiles[i].indexOf("overflow") != -1) {
230 console.log("[Skipping " + testFiles[i] + "]"); 230 console.log("[Skipping " + testFiles[i] + "]");
231 continue; 231 continue;
232 } 232 }
233 233
234 // TODO(erg): Remove this once Hans' map<> stuff lands.
235 if (testFiles[i].indexOf("mthd10") != -1) {
236 console.log("[Skipping " + testFiles[i] + "]");
237 continue;
238 }
239
234 var testMessage = readTestMessage(testFiles[i]); 240 var testMessage = readTestMessage(testFiles[i]);
235 var handles = new Array(testMessage.handleCount); 241 var handles = new Array(testMessage.handleCount);
236 var message = new codec.Message(testMessage.buffer, handles); 242 var message = new codec.Message(testMessage.buffer, handles);
237 var messageValidator = new validator.Validator(message); 243 var messageValidator = new validator.Validator(message);
238 244
239 var err = messageValidator.validateMessageHeader(); 245 var err = messageValidator.validateMessageHeader();
240 for (var j = 0; err === noError && j < filters.length; ++j) 246 for (var j = 0; err === noError && j < filters.length; ++j)
241 err = filters[j](messageValidator); 247 err = filters[j](messageValidator);
242 248
243 checkValidationResult(testFiles[i], err); 249 checkValidationResult(testFiles[i], err);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 testConnection.close(); 299 testConnection.close();
294 expect(core.close(testMessagePipe.handle0)).toBe(core.RESULT_OK); 300 expect(core.close(testMessagePipe.handle0)).toBe(core.RESULT_OK);
295 } 301 }
296 } 302 }
297 303
298 expect(checkTestMessageParser()).toBeNull(); 304 expect(checkTestMessageParser()).toBeNull();
299 testConformanceMessageValidation(); 305 testConformanceMessageValidation();
300 testIntegratedMessageValidation(); 306 testIntegratedMessageValidation();
301 this.result = "PASS"; 307 this.result = "PASS";
302 }); 308 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698