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

Side by Side Diff: third_party/WebKit/LayoutTests/mojo/resources/validation_test_input_parser.js

Issue 2745293005: Moving mojo/validation test into LayoutTests (Closed)
Patch Set: test file contents Created 3 years, 7 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 // Support for parsing binary sequences encoded as readable strings 5 // Support for parsing binary sequences encoded as readable strings
6 // or ".data" files. The input format is described here: 6 // or ".data" files. The input format is described here:
7 // mojo/public/cpp/bindings/tests/validation_test_input_parser.h 7 // mojo/public/cpp/bindings/tests/validation_test_input_parser.h
8 8
9 define([ 9 define("mojo/resources/validation_test_input_parser", [
10 "mojo/public/js/buffer" 10 "mojo/public/js/buffer"
11 ], function(buffer) { 11 ], function(buffer) {
12 12
13 // Files and Lines represent the raw text from an input string 13 // Files and Lines represent the raw text from an input string
14 // or ".data" file. 14 // or ".data" file.
15 15
16 function InputError(message, line) { 16 function InputError(message, line) {
17 this.name = "InputError";
17 this.message = message; 18 this.message = message;
18 this.line = line; 19 this.line = line;
19 } 20 }
20 21
21 InputError.prototype.toString = function() { 22 InputError.prototype.toString = function() {
22 var s = 'Error: ' + this.message; 23 var s = 'Error: ' + this.message;
23 if (this.line) 24 if (this.line)
24 s += ', at line ' + 25 s += ', at line ' +
25 (this.line.number + 1) + ': "' + this.line.contents + '"'; 26 (this.line.number + 1) + ': "' + this.line.contents + '"';
26 return s; 27 return s;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 throw new InputError('no anchors for ' + names, 0); 291 throw new InputError('no anchors for ' + names, 0);
291 292
292 return msg; 293 return msg;
293 } 294 }
294 295
295 var exports = {}; 296 var exports = {};
296 exports.parseTestMessage = parseTestMessage; 297 exports.parseTestMessage = parseTestMessage;
297 exports.InputError = InputError; 298 exports.InputError = InputError;
298 return exports; 299 return exports;
299 }); 300 });
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/gen_data_files_list.py ('k') | third_party/WebKit/LayoutTests/mojo/validation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698