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

Unified Diff: tests/html/custom_elements_test.dart

Issue 268313002: [dart:html] rename register to registerElement per spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 7 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
Index: tests/html/custom_elements_test.dart
diff --git a/tests/html/custom_elements_test.dart b/tests/html/custom_elements_test.dart
index f31f84ac7883175d33609595a0b4b47e657d28f5..3ab52074aceeb906cdf1893508aa144f8eb11415 100644
--- a/tests/html/custom_elements_test.dart
+++ b/tests/html/custom_elements_test.dart
@@ -46,7 +46,7 @@ main() {
group('register', () {
test('register', () {
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
var element = new Element.tag(tag);
expect(element, isNotNull);
@@ -56,13 +56,13 @@ main() {
test('register twice', () {
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
expect(() {
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
}, throws, reason: 'Cannot register a tag more than once.');
var newTag = nextTag;
- document.register(newTag, CustomType);
+ document.registerElement(newTag, CustomType);
var element = new Element.tag(newTag);
expect(element, isNotNull);
@@ -71,19 +71,19 @@ main() {
test('register null', () {
expect(() {
- document.register(nextTag, null);
+ document.registerElement(nextTag, null);
}, throws, reason: 'Cannot register a null type.');
});
test('register native', () {
expect(() {
- document.register(nextTag, BodyElement);
+ document.registerElement(nextTag, BodyElement);
}, throws, reason: 'Cannot register a native element.');
});
test('register non-element', () {
expect(() {
- document.register(nextTag, NotAnElement);
+ document.registerElement(nextTag, NotAnElement);
}, throws, reason: 'Cannot register a non-element.');
});
});
@@ -105,7 +105,7 @@ main() {
firedOnPre = true;
});
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
upgradeCustomElements(dom);
var postElement = dom.children[0];
@@ -132,7 +132,7 @@ main() {
group('innerHtml', () {
test('query', () {
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
var element = new DivElement();
element.setInnerHtml('<$tag></$tag>',
treeSanitizer: new NullTreeSanitizer());
@@ -147,7 +147,7 @@ main() {
test('query id', () {
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
var element = new DivElement();
element.setInnerHtml('<$tag id="someid"></$tag>',
treeSanitizer: new NullTreeSanitizer());
@@ -165,7 +165,7 @@ main() {
test('created', () {
int oldCount = customCreatedCount;
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
var element = new DivElement();
element.setInnerHtml('<$tag></$tag>',
treeSanitizer: new NullTreeSanitizer());
@@ -178,7 +178,7 @@ main() {
group('mixins', () {
test('can invoke mixin methods', () {
var tag = nextTag;
- document.register(tag, CustomType);
+ document.registerElement(tag, CustomType);
var element = new Element.tag(tag);
element.invokeMixinMethod();
« no previous file with comments | « tests/html/custom/template_wrappers_test.dart ('k') | tools/dom/templates/html/impl/impl_Document.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698