| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 @license |
| 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 |
| 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 |
| 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 |
| 10 --> |
| 11 <html> |
| 12 <head> |
| 13 |
| 14 <title>paper-menu tests</title> |
| 15 |
| 16 <meta charset="utf-8"> |
| 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"> |
| 19 |
| 20 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 21 |
| 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"> |
| 27 |
| 28 </head> |
| 29 <body> |
| 30 |
| 31 <test-fixture id="basic"> |
| 32 <template> |
| 33 <paper-menu> |
| 34 <div>item 1</div> |
| 35 <div>item 2</div> |
| 36 <div>item 3</div> |
| 37 </paper-menu> |
| 38 </template> |
| 39 </test-fixture> |
| 40 |
| 41 <script> |
| 42 |
| 43 suite('<paper-menu>', function() { |
| 44 var menu; |
| 45 |
| 46 setup(function() { |
| 47 menu = fixture('basic'); |
| 48 }); |
| 49 |
| 50 test('selected item is styled', function() { |
| 51 |
| 52 var boldDiv = document.createElement('div'); |
| 53 boldDiv.style.fontWeight = 'bold'; |
| 54 document.body.appendChild(boldDiv); |
| 55 |
| 56 menu.selected = 1; |
| 57 |
| 58 assert.equal(getComputedStyle(menu.selectedItem).fontWeight, |
| 59 getComputedStyle(boldDiv).fontWeight, 'selected item is bold'); |
| 60 }); |
| 61 |
| 62 }); |
| 63 |
| 64 </script> |
| 65 |
| 66 </body> |
| 67 </html> |
| OLD | NEW |