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

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

Issue 23451006: Changing onCreated callback to created. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
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 constructor_calls_created_synchronously_test; 5 library constructor_calls_created_synchronously_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 13
14 static int ncallbacks = 0; 14 static int ncallbacks = 0;
15 15
16 void onCreated() { 16 void created() {
17 ncallbacks++; 17 ncallbacks++;
18 } 18 }
19 } 19 }
20 20
21 main() { 21 main() {
22 useHtmlConfiguration(); 22 useHtmlConfiguration();
23 23
24 // Adapted from Blink's 24 // Adapted from Blink's
25 // fast/dom/custom/constructor-calls-created-synchronously test. 25 // fast/dom/custom/constructor-calls-created-synchronously test.
26 26
27 test('createdCallback', () { 27 test('createdCallback', () {
28 document.register(A.tag, A); 28 document.register(A.tag, A);
29 var x = new A(); 29 var x = new A();
30 expect(A.ncallbacks, 1); 30 expect(A.ncallbacks, 1);
31 }); 31 });
32 } 32 }
OLDNEW
« no previous file with comments | « tests/html/custom/attribute_changed_callback_test.dart ('k') | tests/html/custom/created_callback_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698