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

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

Issue 25325004: Implementing CustomElement's attributeChanged callback. (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 10 matching lines...) Expand all
21 } 21 }
22 22
23 void enteredView() { 23 void enteredView() {
24 invocations.add('entered'); 24 invocations.add('entered');
25 } 25 }
26 26
27 void leftView() { 27 void leftView() {
28 invocations.add('left'); 28 invocations.add('left');
29 } 29 }
30 30
31 void attributeChanged() { 31 void attributeChanged(String name, String oldValue, String newValue) {
32 invocations.add('attribute changed'); 32 invocations.add('attribute changed');
33 } 33 }
34 } 34 }
35 35
36 // Pump custom events polyfill events. 36 // Pump custom events polyfill events.
37 void customElementsTakeRecords() { 37 void customElementsTakeRecords() {
38 if (js.context.hasProperty('CustomElements')) { 38 if (js.context.hasProperty('CustomElements')) {
39 js.context['CustomElements'].callMethod('takeRecords'); 39 js.context['CustomElements'].callMethod('takeRecords');
40 } 40 }
41 } 41 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 Platform.upgradeCustomElements(div); 238 Platform.upgradeCustomElements(div);
239 invocations = []; 239 invocations = [];
240 document.body.append(div); 240 document.body.append(div);
241 customElementsTakeRecords(); 241 customElementsTakeRecords();
242 expect(invocations, ['entered'], 242 expect(invocations, ['entered'],
243 reason: 'the entered callback should be invoked when inserted into a ' 243 reason: 'the entered callback should be invoked when inserted into a '
244 'document with a view as part of a subtree'); 244 'document with a view as part of a subtree');
245 }); 245 });
246 }); 246 });
247 } 247 }
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