| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
| 5 BSD-style license that can be found in the LICENSE file. | 5 BSD-style license that can be found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html lang="en"> | 7 <html lang="en"> |
| 8 <head> | 8 <head> |
| 9 <meta charset="utf-8"> | 9 <meta charset="utf-8"> |
| 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 11 <title>root_query_no_shadowroot</title> | 11 <title>root_query_no_shadowroot</title> |
| 12 <script type='application/javascript' src="testing.js"></script> | 12 <script type='application/javascript' src="testing.js"></script> |
| 13 </head> | 13 </head> |
| 14 <body> | 14 <body> |
| 15 <element name="x-test" extends="div"> | 15 <element name="x-test" extends="div"> |
| 16 <template> | 16 <template> |
| 17 <pre>FAIL - this text should be replaced</pre> | 17 <pre>FAIL - this text should be replaced</pre> |
| 18 </template> | 18 </template> |
| 19 <script type="application/dart"> | 19 <script type="application/dart"> |
| 20 import 'package:web_components/web_components.dart'; | 20 import 'package:web_ui/web_ui.dart'; |
| 21 import 'package:unittest/unittest.dart'; | 21 import 'package:unittest/unittest.dart'; |
| 22 class Test extends WebComponent { | 22 class Test extends WebComponent { |
| 23 inserted() { | 23 inserted() { |
| 24 var pre = _root.query('pre'); | 24 var pre = _root.query('pre'); |
| 25 expect(pre, isNotNull, reason: '_root.query should find "pre"'); | 25 expect(pre, isNotNull, reason: '_root.query should find "pre"'); |
| 26 pre.text = 'PASS'; | 26 pre.text = 'PASS'; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 </script> | 29 </script> |
| 30 </element> | 30 </element> |
| 31 <div is="x-test"></div> | 31 <div is="x-test"></div> |
| 32 <script type="application/dart"> | 32 <script type="application/dart"> |
| 33 import 'dart:html'; | 33 import 'dart:html'; |
| 34 import 'package:web_components/web_components.dart'; | 34 import 'package:web_ui/web_ui.dart'; |
| 35 main() { | 35 main() { |
| 36 // This is a regression test for our emulated Shadow DOM. | 36 // This is a regression test for our emulated Shadow DOM. |
| 37 useShadowDom = false; | 37 useShadowDom = false; |
| 38 window.setTimeout(() => window.postMessage('done', '*'), 0); | 38 window.setTimeout(() => window.postMessage('done', '*'), 0); |
| 39 } | 39 } |
| 40 </script> | 40 </script> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |