| 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 <!--polymer-test: this comment is needed for test_suite.dart--> |
| 8 <head> | 9 <head> |
| 9 <title>event path</title> | 10 <title>event path</title> |
| 10 <script src="packages/unittest/test_controller.js"></script> | 11 <script src="packages/unittest/test_controller.js"></script> |
| 11 <!-- | 12 <!-- |
| 12 Test ported from: | 13 Test ported from: |
| 13 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 |
| 14 | 15 |
| 15 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 |
| 16 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. |
| 17 --> | 18 --> |
| 18 </head> | 19 </head> |
| 19 <body> | 20 <body> |
| 20 | 21 |
| 21 <polymer-element name="x-selector"> | 22 <polymer-element name="x-selector"> |
| 22 <template> | 23 <template> |
| 23 <div id="selectorDiv"> | 24 <div id="selectorDiv"> |
| 24 <content id="selectorContent"></content> | 25 <content id="selectorContent"></content> |
| 25 </div> | 26 </div> |
| 26 </template> | 27 </template> |
| 27 <script type="application/dart"> | |
| 28 import 'package:polymer/polymer.dart'; | |
| 29 @CustomTag("x-selector") | |
| 30 class XSelector extends PolymerElement { | |
| 31 XSelector.created() : super.created(); | |
| 32 } | |
| 33 </script> | |
| 34 </polymer-element> | 28 </polymer-element> |
| 35 | 29 |
| 36 <polymer-element name="x-overlay"> | 30 <polymer-element name="x-overlay"> |
| 37 <template> | 31 <template> |
| 38 <content id="overlayContent"></content> | 32 <content id="overlayContent"></content> |
| 39 </template> | 33 </template> |
| 40 <script type="application/dart"> | |
| 41 import 'package:polymer/polymer.dart'; | |
| 42 @CustomTag("x-overlay") | |
| 43 class XOverlay extends PolymerElement { | |
| 44 XOverlay.created() : super.created(); | |
| 45 } | |
| 46 </script> | |
| 47 </polymer-element> | 34 </polymer-element> |
| 48 | 35 |
| 49 <polymer-element name="x-menu" extends="x-selector"> | 36 <polymer-element name="x-menu" extends="x-selector"> |
| 50 <template> | 37 <template> |
| 51 <div id="menuDiv"> | 38 <div id="menuDiv"> |
| 52 <shadow id="menuShadow"></shadow> | 39 <shadow id="menuShadow"></shadow> |
| 53 </div> | 40 </div> |
| 54 </template> | 41 </template> |
| 55 <script type="application/dart"> | |
| 56 import 'package:polymer/polymer.dart'; | |
| 57 @CustomTag("x-menu") | |
| 58 class XMenu extends PolymerElement { | |
| 59 XMenu.created() : super.created(); | |
| 60 } | |
| 61 </script> | |
| 62 </polymer-element> | 42 </polymer-element> |
| 63 | 43 |
| 64 <polymer-element name="x-menu-button"> | 44 <polymer-element name="x-menu-button"> |
| 65 <template> | 45 <template> |
| 66 <div> | 46 <div> |
| 67 <x-overlay id="overlay"> | 47 <x-overlay id="overlay"> |
| 68 <div id="menuButtonDiv"> | 48 <div id="menuButtonDiv"> |
| 69 <x-menu id="menu"> | 49 <x-menu id="menu"> |
| 70 <content id="menuButtonContent"></content> | 50 <content id="menuButtonContent"></content> |
| 71 </x-menu> | 51 </x-menu> |
| 72 </div> | 52 </div> |
| 73 </x-overlay> | 53 </x-overlay> |
| 74 </div> | 54 </div> |
| 75 </template> | 55 </template> |
| 76 <script type="application/dart"> | |
| 77 import 'package:polymer/polymer.dart'; | |
| 78 @CustomTag("x-menu-button") | |
| 79 class XMenuButton extends PolymerElement { | |
| 80 XMenuButton.created() : super.created(); | |
| 81 } | |
| 82 </script> | |
| 83 </polymer-element> | 56 </polymer-element> |
| 84 | 57 |
| 85 <x-menu-button id="menuButton"> | 58 <x-menu-button id="menuButton"> |
| 86 <div id="item1"><div id="source"></div>Item1</div> | 59 <div id="item1"><div id="source"></div>Item1</div> |
| 87 <div id="item2">Item2</div> | 60 <div id="item2">Item2</div> |
| 88 </x-menu-button> | 61 </x-menu-button> |
| 89 | 62 |
| 90 | 63 |
| 91 <script type="application/dart" src="event_path_test.dart"></script> | 64 <script type="application/dart" src="event_path_test.dart"></script> |
| 92 <script type="application/dart" src="packages/polymer/init.dart"></script> | |
| 93 </body> | 65 </body> |
| 94 </html> | 66 </html> |
| OLD | NEW |