| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2013, 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"> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 class D extends WebComponent { | 86 class D extends WebComponent { |
| 87 String value = 'x'; | 87 String value = 'x'; |
| 88 } | 88 } |
| 89 </script> | 89 </script> |
| 90 </element> | 90 </element> |
| 91 <div id="a" is="x-a" style="background-color:#fff"></div> | 91 <div id="a" is="x-a" style="background-color:#fff"></div> |
| 92 <div id="b" is="x-b" style="background-color:#f00"></div> | 92 <div id="b" is="x-b" style="background-color:#f00"></div> |
| 93 <div id="c" is="x-c" style="background-color:#0f0"></div> | 93 <div id="c" is="x-c" style="background-color:#0f0"></div> |
| 94 <div id="d" is="x-d" style="background-color:#00f"></div> | 94 <div id="d" is="x-d" style="background-color:#00f"></div> |
| 95 <script type="application/dart"> | 95 <script type="application/dart"> |
| 96 import 'dart:async'; |
| 96 import 'dart:html'; | 97 import 'dart:html'; |
| 97 import 'package:unittest/unittest.dart'; | 98 import 'package:unittest/unittest.dart'; |
| 98 String value = 'x'; | 99 String value = 'x'; |
| 99 | 100 |
| 100 main() { | 101 main() { |
| 101 window.setImmediate(() { | 102 Timer.run(() { |
| 102 var a = query('#a'); | 103 var a = query('#a'); |
| 103 var b = query('#b'); | 104 var b = query('#b'); |
| 104 var c = query('#c'); | 105 var c = query('#c'); |
| 105 var d = query('#d'); | 106 var d = query('#d'); |
| 106 | 107 |
| 107 expect(a.nodes.length, 1); | 108 expect(a.nodes.length, 1); |
| 108 expect(b.nodes.length, 3); | 109 expect(b.nodes.length, 3); |
| 109 expect(c.nodes.length, 1); | 110 expect(c.nodes.length, 1); |
| 110 expect(d.nodes.length, 1); | 111 expect(d.nodes.length, 1); |
| 111 | 112 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 126 expect(d.innerHtml, equalsIgnoringWhitespace( | 127 expect(d.innerHtml, equalsIgnoringWhitespace( |
| 127 '1xx2 3x4<span>5</span><span>x</span>6')); | 128 '1xx2 3x4<span>5</span><span>x</span>6')); |
| 128 | 129 |
| 129 window.postMessage('done', '*'); | 130 window.postMessage('done', '*'); |
| 130 }); | 131 }); |
| 131 } | 132 } |
| 132 </script> | 133 </script> |
| 133 </body> | 134 </body> |
| 134 </html> | 135 </html> |
| 135 | 136 |
| OLD | NEW |