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

Unified Diff: tests/html/shadow_dom_test.dart

Issue 11642004: Revert "Cleaning up shadow dom tests." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/shadow_dom_test.dart
diff --git a/tests/html/shadow_dom_test.dart b/tests/html/shadow_dom_test.dart
index b4cbc57bc1fb680bf0cd7389f297307ff3b7727c..8e9a93209e4df399723812d29a4ae4ceb609b86a 100644
--- a/tests/html/shadow_dom_test.dart
+++ b/tests/html/shadow_dom_test.dart
@@ -14,7 +14,7 @@ main() {
var div1, div2, shadowRoot, paragraph1, paragraph2;
- void init() {
+ setUp(() {
paragraph1 = new ParagraphElement();
paragraph2 = new ParagraphElement();
[paragraph1, paragraph2].forEach((p) { p.classes.add('foo');});
@@ -29,24 +29,14 @@ main() {
div2.nodes.add(paragraph2);
document.body.nodes.add(div1);
document.body.nodes.add(div2);
- }
-
- var expectation = ShadowRoot.supported ? returnsNormally : throws;
+ });
test("Shadowed nodes aren't visible to queries from outside ShadowDOM", () {
- expect(() {
- init();
-
- expect(queryAll('.foo'), equals([div1, paragraph2]));
- }, expectation);
+ expect(queryAll('.foo'), equals([div1, paragraph2]));
});
test('Parent node of a shadow root must be null.', () {
- expect(() {
- init();
-
- expect(shadowRoot.parent, isNull);
- }, expectation);
+ expect(shadowRoot.parent, isNull);
});
@@ -56,11 +46,7 @@ main() {
// rendering tests.
test('Querying in shadowed fragment respects the shadow boundary.', () {
- expect(() {
- init();
-
- expect(shadowRoot.queryAll('.foo'), equals([paragraph1]));
- }, expectation);
+ expect(shadowRoot.queryAll('.foo'), equals([paragraph1]));
});
});
}
« tests/html/shadow_dom_layout_test.dart ('K') | « tests/html/shadow_dom_layout_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698