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

Unified Diff: tests/html/custom_elements_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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/custom/created_callback_test.dart ('k') | tools/dom/src/dart2js_CustomElementSupport.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/custom_elements_test.dart
diff --git a/tests/html/custom_elements_test.dart b/tests/html/custom_elements_test.dart
index 6a369fd3396a41b27cb99cbc2d6d7c74c9f73fdb..56c7757b47405b7866fd3ee788777a7d5c3a1a1b 100644
--- a/tests/html/custom_elements_test.dart
+++ b/tests/html/custom_elements_test.dart
@@ -18,9 +18,9 @@ class CustomMixin {
class CustomType extends HtmlElement with CustomMixin{
factory CustomType() => null;
- bool onCreatedCalled; // = false;
- void onCreated() {
- onCreatedCalled = true;
+ bool createdCalled; // = false;
+ void created() {
+ createdCalled = true;
customCreatedCount++;
}
@@ -61,7 +61,7 @@ main() {
var element = new Element.tag(tag);
expect(element, isNotNull);
expect(element is CustomType, isTrue);
- expect(element.onCreatedCalled, isTrue);
+ expect(element.createdCalled, isTrue);
});
test('register twice', () {
@@ -121,7 +121,7 @@ main() {
var postElement = dom.children[0];
expect(postElement, isNotNull);
expect(postElement is CustomType, isTrue);
- expect(postElement.onCreatedCalled, isTrue);
+ expect(postElement.createdCalled, isTrue);
// Element from first query remains an UnknownElement.
expect(preElement is HtmlElement, isTrue);
@@ -150,7 +150,7 @@ main() {
expect(queried, isNotNull);
expect(queried is CustomType, isTrue);
- expect(queried.onCreatedCalled, isTrue);
+ expect(queried.createdCalled, isTrue);
});
test('query id', () {
@@ -168,7 +168,7 @@ main() {
});
group('lifecycle', () {
- test('onCreated', () {
+ test('created', () {
int oldCount = customCreatedCount;
var tag = nextTag;
document.register(tag, CustomType);
« no previous file with comments | « tests/html/custom/created_callback_test.dart ('k') | tools/dom/src/dart2js_CustomElementSupport.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698