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

Unified Diff: tests/lib_strong/html/custom/document_register_basic_test.dart

Issue 2730713003: Update a couple more strong mode tests (Closed)
Patch Set: Created 3 years, 10 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/lib_strong/html/custom/document_register_basic_test.dart
diff --git a/tests/lib_strong/html/custom/document_register_basic_test.dart b/tests/lib_strong/html/custom/document_register_basic_test.dart
index 33f07bafb331c93c703c9aa56c2b0d28c902cefb..95b71f8f9e576a05eac6d72e673692c616092f80 100644
--- a/tests/lib_strong/html/custom/document_register_basic_test.dart
+++ b/tests/lib_strong/html/custom/document_register_basic_test.dart
@@ -39,7 +39,7 @@ abstract class BadC extends HtmlElement {
BadC.created() : super.created();
}
-class BadF implements HtmlElement {
+class BadF implements HtmlElement { /// compile-time error
static final tag = 'x-tag-f';
factory BadF() => new Element.tag(tag);
}
@@ -100,7 +100,7 @@ main() {
var parsedFoo = container.firstChild;
expect(parsedFoo is Foo, isTrue);
- expect(parsedFoo.tagName, "X-FOO");
+ expect((parsedFoo as Foo).tagName, "X-FOO");
// Ensuring the wrapper is retained
var someProperty = new Expando();
@@ -134,9 +134,9 @@ main() {
treeSanitizer: new NullTreeSanitizer());
upgradeCustomElements(container);
expect(container.firstChild is Bar, isTrue);
- expect(container.firstChild.tagName, "X-BAR");
+ expect((container.firstChild as Bar).tagName, "X-BAR");
expect(container.lastChild is Bar, isTrue);
- expect(container.lastChild.tagName, "X-BAR");
+ expect((container.lastChild as Bar).tagName, "X-BAR");
// Constructors shouldn't interfere with each other
expect((new Foo()).tagName, "X-FOO");

Powered by Google App Engine
This is Rietveld 408576698