| 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]));
|
| });
|
| });
|
| }
|
|
|