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

Side by Side Diff: tests/html/custom/attribute_changed_callback_test.dart

Issue 25614002: Fixing analyzer issues in tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/html/custom/document_register_basic_test.dart » ('j') | 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 attribute_changed_callback_test; 5 library attribute_changed_callback_test;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart'; 7 import 'package:unittest/html_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 9
10 class A extends HtmlElement { 10 class A extends HtmlElement {
11 static final tag = 'x-a'; 11 static final tag = 'x-a';
12 factory A() => new Element.tag(tag); 12 factory A() => new Element.tag(tag);
13 A.created() : super.created(); 13 A.created() : super.created();
14 14
15 static var attributeChangedInvocations = 0; 15 static var attributeChangedInvocations = 0;
16 16
17 void attributeChanged(name, oldValue, newValue) { 17 void attributeChanged(name, oldValue, newValue) {
18 attributeChangedInvocations++; 18 attributeChangedInvocations++;
19 } 19 }
20 } 20 }
21 21
22 class B extends HtmlElement { 22 class B extends HtmlElement {
23 static final tag = 'x-b'; 23 static final tag = 'x-b';
24 factory B() => new Element.tag(tag); 24 factory B() => new Element.tag(tag);
25 B.created() : super.created(); 25 B.created() : super.created();
26 26
27 static var invocations = []; 27 static var invocations = [];
28 28
29 void created() { 29 void createdCallback() {
30 invocations.add('created'); 30 invocations.add('created');
31 } 31 }
32 32
33 void attributeChanged(name, oldValue, newValue) { 33 void attributeChanged(name, oldValue, newValue) {
34 invocations.add('$name: $oldValue => $newValue'); 34 invocations.add('$name: $oldValue => $newValue');
35 } 35 }
36 } 36 }
37 37
38 main() { 38 main() {
39 useHtmlConfiguration(); 39 useHtmlConfiguration();
(...skipping 29 matching lines...) Expand all
69 b.attributes['data-v'] = 'w'; 69 b.attributes['data-v'] = 'w';
70 B.invocations = []; 70 B.invocations = [];
71 b.attributes['data-v'] = 'x'; 71 b.attributes['data-v'] = 'x';
72 expect(B.invocations, ['data-v: w => x']); 72 expect(B.invocations, ['data-v: w => x']);
73 73
74 B.invocations = []; 74 B.invocations = [];
75 b.attributes['data-v'] = 'x'; 75 b.attributes['data-v'] = 'x';
76 expect(B.invocations, []); 76 expect(B.invocations, []);
77 }); 77 });
78 } 78 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/custom/document_register_basic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698