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> | 7 <html> |
8 <head> | 8 <head> |
9 <title>event path</title> | 9 <title>event path</title> |
10 <script src="packages/polymer/testing/testing.js"></script> | 10 <script src="packages/polymer/testing/testing.js"></script> |
11 <script src="packages/unittest/test_controller.js"></script> | 11 <script src="packages/unittest/test_controller.js"></script> |
12 <!-- | 12 <!-- |
13 Test ported from: | 13 Test ported from: |
14 https://github.com/Polymer/polymer/blob/7936ff8/test/html/event-path.html | 14 https://github.com/Polymer/polymer/blob/7936ff8/test/html/event-path.html |
15 | 15 |
16 This test actually doesn't test the polymer's event layer. It just ensures | 16 This test actually doesn't test the polymer's event layer. It just ensures |
17 that tests are propagated in the right order when using Shadow DOM. | 17 that tests are propagated in the right order when using Shadow DOM. |
18 --> | 18 --> |
19 </head> | 19 </head> |
20 <body> | 20 <body> |
21 | 21 |
22 <element name="x-selector"> | 22 <polymer-element name="x-selector"> |
23 <template> | 23 <template> |
24 <div id="selectorDiv"> | 24 <div id="selectorDiv"> |
25 <content id="selectorContent"></content> | 25 <content id="selectorContent"></content> |
26 </div> | 26 </div> |
27 </template> | 27 </template> |
28 </element> | 28 </polymer-element> |
29 | 29 |
30 <element name="x-overlay"> | 30 <polymer-element name="x-overlay"> |
31 <template> | 31 <template> |
32 <content id="overlayContent"></content> | 32 <content id="overlayContent"></content> |
33 </template> | 33 </template> |
34 </element> | 34 </polymer-element> |
35 | 35 |
36 <element name="x-menu" extends="x-selector"> | 36 <polymer-element name="x-menu" extends="x-selector"> |
37 <template> | 37 <template> |
38 <div id="menuDiv"> | 38 <div id="menuDiv"> |
39 <shadow id="menuShadow"></shadow> | 39 <shadow id="menuShadow"></shadow> |
40 </div> | 40 </div> |
41 </template> | 41 </template> |
42 </element> | 42 </polymer-element> |
43 | 43 |
44 <element name="x-menu-button"> | 44 <polymer-element name="x-menu-button"> |
45 <template> | 45 <template> |
46 <div> | 46 <div> |
47 <x-overlay id="overlay"> | 47 <x-overlay id="overlay"> |
48 <div id="menuButtonDiv"> | 48 <div id="menuButtonDiv"> |
49 <x-menu id="menu"> | 49 <x-menu id="menu"> |
50 <content id="menuButtonContent"></content> | 50 <content id="menuButtonContent"></content> |
51 </x-menu> | 51 </x-menu> |
52 </div> | 52 </div> |
53 </x-overlay> | 53 </x-overlay> |
54 </div> | 54 </div> |
55 </template> | 55 </template> |
56 </element> | 56 </polymer-element> |
57 | 57 |
58 <x-menu-button id="menuButton"> | 58 <x-menu-button id="menuButton"> |
59 <div id="item1"><div id="source"></div>Item1</div> | 59 <div id="item1"><div id="source"></div>Item1</div> |
60 <div id="item2">Item2</div> | 60 <div id="item2">Item2</div> |
61 </x-menu-button> | 61 </x-menu-button> |
62 | 62 |
63 | 63 |
64 <script type="application/dart"> | 64 <script type="application/dart"> |
65 import 'dart:html'; | 65 import 'dart:html'; |
66 import 'dart:async'; | 66 import 'dart:async'; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 })); | 113 })); |
114 } | 114 } |
115 | 115 |
116 item1.dispatchEvent(new Event('x', canBubble: true)); | 116 item1.dispatchEvent(new Event('x', canBubble: true)); |
117 })); | 117 })); |
118 }); | 118 }); |
119 } | 119 } |
120 </script> | 120 </script> |
121 </body> | 121 </body> |
122 </html> | 122 </html> |
OLD | NEW |