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

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

Issue 562973002: remove event handler warning for auto-binding template elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:polymer/src/build/common.dart'; 9 import 'package:polymer/src/build/common.dart';
10 import 'package:polymer/src/build/linter.dart'; 10 import 'package:polymer/src/build/linter.dart';
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 '(lib/test.html 1 0)' 431 '(lib/test.html 1 0)'
432 ]); 432 ]);
433 433
434 group('event handlers', () { 434 group('event handlers', () {
435 _testLinter('no longer warn about inline onfoo (Javascript)', { 435 _testLinter('no longer warn about inline onfoo (Javascript)', {
436 'a|lib/test.html': '''<html><body> 436 'a|lib/test.html': '''<html><body>
437 <div onfoo="something"></div> 437 <div onfoo="something"></div>
438 '''.replaceAll(' ', ''), 438 '''.replaceAll(' ', ''),
439 }, []); 439 }, []);
440 440
441 _testLinter('no longer warn about on-foo for auto-binding templates', {
442 'a|lib/test.html': '''<html><body>
443 <template is="auto-binding-dart">
444 <div on-foo="{{something}}"></div>
445 </template>
446 '''.replaceAll(' ', ''),
447 }, []);
448
441 _testLinter('on-foo is only supported in polymer elements', { 449 _testLinter('on-foo is only supported in polymer elements', {
442 'a|lib/test.html': '''<html><body> 450 'a|lib/test.html': '''<html><body>
443 <div on-foo="something"></div> 451 <div on-foo="something"></div>
444 '''.replaceAll(' ', ''), 452 '''.replaceAll(' ', ''),
445 }, [ 453 }, [
446 'warning: Inline event handlers are only supported inside ' 454 'warning: Inline event handlers are only supported inside '
447 'declarations of <polymer-element>. ' 455 'declarations of <polymer-element>. '
448 '(lib/test.html 1 5)' 456 '(lib/test.html 1 5)'
449 ]); 457 ]);
450 458
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 779 }
772 if (outputMessages.isEmpty) { 780 if (outputMessages.isEmpty) {
773 var linter = new Linter(new TransformOptions()); 781 var linter = new Linter(new TransformOptions());
774 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo); 782 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo);
775 } else { 783 } else {
776 testLogOutput( 784 testLogOutput(
777 (options) => new Linter(options), name, inputFiles, outputFiles, 785 (options) => new Linter(options), name, inputFiles, outputFiles,
778 outputMessages, solo); 786 outputMessages, solo);
779 } 787 }
780 } 788 }
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