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

Side by Side Diff: pkg/polymer/test/build/linter_test.dart

Issue 370423002: Hide linter warning for auto-binding-dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add polymer-element to the list and remove from the if Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/build/linter.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library polymer.test.linter_test; 5 library polymer.test.linter_test;
6 6
7 import 'package:polymer/src/build/common.dart'; 7 import 'package:polymer/src/build/common.dart';
8 import 'package:polymer/src/build/linter.dart'; 8 import 'package:polymer/src/build/linter.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 'warning: definition for Polymer element with tag name "x-foo" not ' 508 'warning: definition for Polymer element with tag name "x-foo" not '
509 'found. (lib/test.html 0 0)' 509 'found. (lib/test.html 0 0)'
510 ]); 510 ]);
511 511
512 _testLinter('tag exists (type extension)', { 512 _testLinter('tag exists (type extension)', {
513 'a|lib/test.html': '<div is="x-foo"></div>', 513 'a|lib/test.html': '<div is="x-foo"></div>',
514 }, [ 514 }, [
515 'warning: definition for Polymer element with tag name "x-foo" not ' 515 'warning: definition for Polymer element with tag name "x-foo" not '
516 'found. (lib/test.html 0 0)' 516 'found. (lib/test.html 0 0)'
517 ]); 517 ]);
518
519 _testLinter('tag exists (internally defined in code)', {
520 'a|lib/test.html': '<div is="auto-binding-dart"></div>',
521 }, []);
518 522
519 _testLinter('used correctly (no base tag)', { 523 _testLinter('used correctly (no base tag)', {
520 'a|lib/test.html': ''' 524 'a|lib/test.html': '''
521 <link rel="import" href="../../packages/polymer/polymer.html"> 525 <link rel="import" href="../../packages/polymer/polymer.html">
522 <polymer-element name="x-a"></polymer-element> 526 <polymer-element name="x-a"></polymer-element>
523 <x-a></x-a> 527 <x-a></x-a>
524 '''.replaceAll(' ', ''), 528 '''.replaceAll(' ', ''),
525 }, []); 529 }, []);
526 530
527 _testLinter('used incorrectly (no base tag)', { 531 _testLinter('used incorrectly (no base tag)', {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 649
646 _testLinter(String name, Map inputFiles, List outputMessages, 650 _testLinter(String name, Map inputFiles, List outputMessages,
647 [bool solo = false]) { 651 [bool solo = false]) {
648 var linter = new Linter(new TransformOptions()); 652 var linter = new Linter(new TransformOptions());
649 var outputFiles = {}; 653 var outputFiles = {};
650 if (outputMessages.every((m) => m.startsWith('warning:'))) { 654 if (outputMessages.every((m) => m.startsWith('warning:'))) {
651 inputFiles.forEach((k, v) => outputFiles[k] = v); 655 inputFiles.forEach((k, v) => outputFiles[k] = v);
652 } 656 }
653 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo); 657 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo);
654 } 658 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/build/linter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698