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

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

Issue 25793002: Implementing custom element's attributeChanged callback in Dartium (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/entered_left_view_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 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:js' as js; 8 import 'dart:js' as js;
9 import 'package:unittest/html_individual_config.dart'; 9 import 'package:unittest/html_individual_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 b.attributes['data-v'] = 'x'; 85 b.attributes['data-v'] = 'x';
86 expect(B.invocations, []); 86 expect(B.invocations, []);
87 87
88 b.attributes.remove('data-v'); 88 b.attributes.remove('data-v');
89 expect(B.invocations, ['data-v: x => null']); 89 expect(B.invocations, ['data-v: x => null']);
90 }); 90 });
91 }); 91 });
92 92
93 group('unsupported_on_polyfill', () { 93 group('unsupported_on_polyfill', () {
94 test('add, change ID', () { 94 test('add, change ID', () {
95 B.invocations = [];
96
95 var b = new B(); 97 var b = new B();
96 b.id = 'x'; 98 b.id = 'x';
97 expect(B.invocations, ['created', 'id: null => x']); 99 expect(B.invocations, ['created', 'id: null => x']);
98 100
99 B.invocations = []; 101 B.invocations = [];
100 b.attributes.remove('id'); 102 b.attributes.remove('id');
101 expect(B.invocations, ['id: x => null']); 103 expect(B.invocations, ['id: x => null']);
102 }); 104 });
103 105
104 test('add, change classes', () { 106 test('add, change classes', () {
105 var b = new B(); 107 var b = new B();
106 108
107 B.invocations = []; 109 B.invocations = [];
108 b.classes.toggle('u'); 110 b.classes.toggle('u');
109 expect(B.invocations, ['class: null => u']); 111 expect(B.invocations, ['class: null => u']);
110 }); 112 });
111 }); 113 });
112 } 114 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/custom/entered_left_view_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698