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

Unified Diff: tests/html/custom/document_register_basic_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/document_register_basic_test.dart
diff --git a/tests/html/custom/document_register_basic_test.dart b/tests/html/custom/document_register_basic_test.dart
index c5a0d6e8f506e569830b0244c94004c7b753bfce..e127ebf648d526adaae8c38b4688aa900920af6b 100644
--- a/tests/html/custom/document_register_basic_test.dart
+++ b/tests/html/custom/document_register_basic_test.dart
@@ -47,23 +47,23 @@ main() {
setUp(() => customElementsReady);
- test('Testing document.register() basic behaviors', () {
- document.register(Foo.tag, Foo);
+ test('Testing document.registerElement() basic behaviors', () {
+ document.registerElement(Foo.tag, Foo);
// Cannot register an existing dart:html type.
- expect(() => document.register('x-bad-a', HtmlElement), throws);
+ expect(() => document.registerElement('x-bad-a', HtmlElement), throws);
// Invalid user type. Doesn't inherit from HtmlElement.
- expect(() => document.register('x-bad-b', BadB), throws);
+ expect(() => document.registerElement('x-bad-b', BadB), throws);
// Not a type.
- expect(() => document.register('x-bad-c', null), throws);
+ expect(() => document.registerElement('x-bad-c', null), throws);
// Cannot register system type.
- expect(() => document.register('x-bad-d', Object), throws);
+ expect(() => document.registerElement('x-bad-d', Object), throws);
// Must extend HtmlElement, not just implement it.
- expect(() => document.register(BadE.tag, BadE), throws);
+ expect(() => document.registerElement(BadE.tag, BadE), throws);
// Constructor initiated instantiation
var createdFoo = new Foo();
@@ -104,14 +104,14 @@ main() {
expect(someProperty[container.firstChild], someProperty[parsedFoo]);
// Having another constructor
- document.register(Bar.tag, Bar);
+ document.registerElement(Bar.tag, Bar);
var createdBar = new Bar();
expect(createdBar is Bar, isTrue);
expect(createdBar is Foo, isFalse);
expect(createdBar.tagName, "X-BAR");
// Having a subclass
- document.register(Baz.tag, Baz);
+ document.registerElement(Baz.tag, Baz);
var createdBaz = new Baz();
expect(createdBaz.tagName, "X-BAZ");
expect(createdBaz.thisIsACustomClass, isTrue);
« no previous file with comments | « tests/html/custom/created_callback_test.dart ('k') | tests/html/custom/document_register_type_extensions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698