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

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

Issue 26592009: Removing Element.createdCallback (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/created_callback_test.dart ('k') | tests/html/custom_elements_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 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';
11 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
12 import '../utils.dart'; 12 import '../utils.dart';
13 13
14 var invocations = []; 14 var invocations = [];
15 class Foo extends HtmlElement { 15 class Foo extends HtmlElement {
16 factory Foo() => null; 16 factory Foo() => null;
17 Foo.created() : super.created(); 17 Foo.created() : super.created() {
18
19 void createdCallback() {
20 invocations.add('created'); 18 invocations.add('created');
21 } 19 }
22 20
23 void enteredView() { 21 void enteredView() {
24 invocations.add('entered'); 22 invocations.add('entered');
25 } 23 }
26 24
27 void leftView() { 25 void leftView() {
28 invocations.add('left'); 26 invocations.add('left');
29 } 27 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 Platform.upgradeCustomElements(div); 235 Platform.upgradeCustomElements(div);
238 invocations = []; 236 invocations = [];
239 document.body.append(div); 237 document.body.append(div);
240 customElementsTakeRecords(); 238 customElementsTakeRecords();
241 expect(invocations, ['entered'], 239 expect(invocations, ['entered'],
242 reason: 'the entered callback should be invoked when inserted into a ' 240 reason: 'the entered callback should be invoked when inserted into a '
243 'document with a view as part of a subtree'); 241 'document with a view as part of a subtree');
244 }); 242 });
245 }); 243 });
246 } 244 }
OLDNEW
« no previous file with comments | « tests/html/custom/created_callback_test.dart ('k') | tests/html/custom_elements_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698