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

Unified Diff: tests/html/custom_elements_test.dart

Issue 23276003: Updating custom element's preregister test to follow new contracts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing analyzer test skip. 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 | « no previous file | tests/html/html.status » ('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 e64aca365b82dfdd55c49fc60dcd14ff1118a896..8e71e1492c1838d045620a659540e515e5573896 100644
--- a/tests/html/custom_elements_test.dart
+++ b/tests/html/custom_elements_test.dart
@@ -90,7 +90,8 @@ main() {
var dom = new Element.html('<div><$tag></$tag></div>');
var preElement = dom.children[0];
expect(preElement, isNotNull);
- expect(preElement is UnknownElement, isTrue);
+ expect(preElement is HtmlElement, isTrue);
+ expect(preElement is CustomType, isFalse);
var firedOnPre = false;
preElement.onFocus.listen((_) {
firedOnPre = true;
@@ -104,8 +105,8 @@ main() {
expect(postElement.onCreatedCalled, isTrue);
// Element from first query remains an UnknownElement.
- expect(preElement is UnknownElement, isTrue);
- expect(preElement.parent, isNull);
+ expect(preElement is HtmlElement, isTrue);
+ expect(preElement.parent, dom);
expect(dom.children.length, 1);
var firedOnPost = false;
@@ -114,7 +115,7 @@ main() {
});
// Event handlers should not persist to new element.
postElement.dispatchEvent(new Event('focus'));
- expect(firedOnPre, isFalse);
+ expect(firedOnPre, isTrue);
vsm 2013/08/16 18:28:51 This doesn't match the comment on line #116.
blois 2013/08/16 19:45:48 Done.
expect(firedOnPost, isTrue);
});
});
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698