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

Side by Side Diff: tests/html/custom/entered_left_view_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 | « tests/html/custom/attribute_changed_callback_test.dart ('k') | tests/html/html.status » ('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 entered_left_view_test; 5 library entered_left_view_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:js' as js; 9 import 'dart:js' as js;
10 import 'package:unittest/html_individual_config.dart'; 10 import 'package:unittest/html_individual_config.dart';
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 reason: 'calling the constructor should invoke the created callback'); 120 reason: 'calling the constructor should invoke the created callback');
121 }); 121 });
122 122
123 test('Entered document without a view', () { 123 test('Entered document without a view', () {
124 docB.body.append(a); 124 docB.body.append(a);
125 expect(invocations, [], 125 expect(invocations, [],
126 reason: 'entered callback should not be invoked when entering a ' 126 reason: 'entered callback should not be invoked when entering a '
127 'document without a view'); 127 'document without a view');
128 }); 128 });
129 129
130 /*
131 test('Attribute changed in document without a view', () { 130 test('Attribute changed in document without a view', () {
132 a.setAttribute('data-foo', 'bar'); 131 a.setAttribute('data-foo', 'bar');
133 expect(invocations, ['attribute changed'], 132 expect(invocations, ['attribute changed'],
134 reason: 'changing an attribute should invoke the callback, even in a ' 133 reason: 'changing an attribute should invoke the callback, even in a '
135 'document without a view'); 134 'document without a view');
136 }); 135 });
137 */ 136
138 test('Entered document with a view', () { 137 test('Entered document with a view', () {
139 document.body.append(a); 138 document.body.append(a);
140 customElementsTakeRecords(); 139 customElementsTakeRecords();
141 expect(invocations, ['entered'], 140 expect(invocations, ['entered'],
142 reason: 'entered callback should be invoked when entering a document ' 141 reason: 'entered callback should be invoked when entering a document '
143 'with a view'); 142 'with a view');
144 }); 143 });
145 144
146 test('Left document with a view', () { 145 test('Left document with a view', () {
147 a.remove(); 146 a.remove();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 Platform.upgradeCustomElements(div); 237 Platform.upgradeCustomElements(div);
239 invocations = []; 238 invocations = [];
240 document.body.append(div); 239 document.body.append(div);
241 customElementsTakeRecords(); 240 customElementsTakeRecords();
242 expect(invocations, ['entered'], 241 expect(invocations, ['entered'],
243 reason: 'the entered callback should be invoked when inserted into a ' 242 reason: 'the entered callback should be invoked when inserted into a '
244 'document with a view as part of a subtree'); 243 'document with a view as part of a subtree');
245 }); 244 });
246 }); 245 });
247 } 246 }
OLDNEW
« no previous file with comments | « tests/html/custom/attribute_changed_callback_test.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698