| 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 --> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 <test-fixture id="basic"> | 27 <test-fixture id="basic"> |
| 28 <template> | 28 <template> |
| 29 <test-radio-button></test-radio-button> | 29 <test-radio-button></test-radio-button> |
| 30 </template> | 30 </template> |
| 31 </test-fixture> | 31 </test-fixture> |
| 32 | 32 |
| 33 <script> | 33 <script> |
| 34 suite('basic', function() { | 34 suite('basic', function() { |
| 35 var button; | 35 var button; |
| 36 var ink; | |
| 37 | 36 |
| 38 setup(function() { | 37 setup(function() { |
| 39 button = fixture('basic'); | 38 button = fixture('basic'); |
| 40 ink = button.querySelector('paper-ripple'); | |
| 41 MockInteractions.blur(button); | 39 MockInteractions.blur(button); |
| 42 }); | 40 }); |
| 43 | 41 |
| 44 test('normal (no states)', function() { | 42 test('normal (no states)', function() { |
| 45 assert.isFalse(button.focused); | 43 assert.isFalse(button.focused); |
| 46 assert.isFalse(ink._animating); | 44 assert.isFalse(button.hasRipple()); |
| 47 assert.equal(ink.ripples.length, 0); | |
| 48 }); | 45 }); |
| 49 | 46 |
| 50 test('receives focus', function() { | 47 test('receives focus', function() { |
| 51 MockInteractions.focus(button); | 48 MockInteractions.focus(button); |
| 52 | 49 |
| 53 assert.isTrue(button.focused); | 50 assert.isTrue(button.focused); |
| 54 assert.isTrue(ink._animating); | 51 assert.isTrue(button.hasRipple()); |
| 55 assert.equal(ink.ripples.length, 1); | |
| 56 }); | 52 }); |
| 57 | 53 |
| 58 }); | 54 }); |
| 59 </script> | 55 </script> |
| 60 | 56 |
| 61 </body> | 57 </body> |
| 62 </html> | 58 </html> |
| OLD | NEW |