OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- | 2 <!-- |
3 @license | 3 @license |
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 5 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
8 Code distributed by Google as part of the polymer project is also | 8 Code distributed by Google as part of the polymer project is also |
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
10 --> | 10 --> |
11 <html> | 11 <html> |
12 <head> | 12 <head> |
13 | 13 |
14 <title>paper-menu tests</title> | 14 <title>paper-menu tests</title> |
15 | 15 |
16 <meta charset="utf-8"> | 16 <meta charset="utf-8"> |
17 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 17 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
18 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia
l-scale=1, user-scalable=yes"> | 18 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia
l-scale=1, user-scalable=yes"> |
19 | 19 |
20 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | 20 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
21 | 21 |
22 <script src="../../web-component-tester/browser.js"></script> | 22 <script src="../../web-component-tester/browser.js"></script> |
23 <script src="../../test-fixture/test-fixture-mocha.js"></script> | |
24 | |
25 <link rel="import" href="../../test-fixture/test-fixture.html"> | |
26 <link rel="import" href="../paper-menu.html"> | 23 <link rel="import" href="../paper-menu.html"> |
27 | 24 |
28 </head> | 25 </head> |
29 <body> | 26 <body> |
30 | 27 |
31 <test-fixture id="basic"> | 28 <test-fixture id="basic"> |
32 <template> | 29 <template> |
33 <paper-menu> | 30 <paper-menu> |
34 <div>item 1</div> | 31 <div>item 1</div> |
35 <div>item 2</div> | 32 <div>item 2</div> |
(...skipping 12 matching lines...) Expand all Loading... |
48 }); | 45 }); |
49 | 46 |
50 test('selected item is styled', function() { | 47 test('selected item is styled', function() { |
51 | 48 |
52 var boldDiv = document.createElement('div'); | 49 var boldDiv = document.createElement('div'); |
53 boldDiv.style.fontWeight = 'bold'; | 50 boldDiv.style.fontWeight = 'bold'; |
54 document.body.appendChild(boldDiv); | 51 document.body.appendChild(boldDiv); |
55 | 52 |
56 menu.selected = 1; | 53 menu.selected = 1; |
57 | 54 |
58 assert.equal(getComputedStyle(menu.selectedItem).fontWeight, | 55 assert.equal(getComputedStyle(menu.selectedItem).fontWeight, |
59 getComputedStyle(boldDiv).fontWeight, 'selected item is bold'); | 56 getComputedStyle(boldDiv).fontWeight, 'selected item is bold'); |
60 }); | 57 }); |
61 | 58 |
62 }); | 59 }); |
63 | 60 |
64 </script> | 61 </script> |
65 | 62 |
66 </body> | 63 </body> |
67 </html> | 64 </html> |
OLD | NEW |