| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(fals
e); | 118 expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(fals
e); |
| 119 expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true
); | 119 expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true
); |
| 120 expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('tru
e'); | 120 expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('tru
e'); |
| 121 done(); | 121 done(); |
| 122 } catch (e) { | 122 } catch (e) { |
| 123 done(e); | 123 done(e); |
| 124 } | 124 } |
| 125 }); | 125 }); |
| 126 }); | 126 }); |
| 127 }); | 127 }); |
| 128 |
| 129 suite('on blur', function() { |
| 130 test('the pressed property becomes false', function() { |
| 131 MockInteractions.focus(activeTarget); |
| 132 MockInteractions.down(activeTarget); |
| 133 expect(activeTarget.hasAttribute('pressed')).to.be.eql(true); |
| 134 MockInteractions.blur(activeTarget); |
| 135 expect(activeTarget.hasAttribute('pressed')).to.be.eql(false); |
| 136 }); |
| 137 }); |
| 128 }); | 138 }); |
| 129 | 139 |
| 130 suite('without toggles attribute', function() { | 140 suite('without toggles attribute', function() { |
| 131 suite('when mouse is down', function() { | 141 suite('when mouse is down', function() { |
| 132 test('does not get an active attribute', function() { | 142 test('does not get an active attribute', function() { |
| 133 expect(activeTarget.hasAttribute('active')).to.be.eql(false); | 143 expect(activeTarget.hasAttribute('active')).to.be.eql(false); |
| 134 MockInteractions.down(activeTarget); | 144 MockInteractions.down(activeTarget); |
| 135 expect(activeTarget.hasAttribute('active')).to.be.eql(false); | 145 expect(activeTarget.hasAttribute('active')).to.be.eql(false); |
| 136 }); | 146 }); |
| 137 }); | 147 }); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 done(); | 281 done(); |
| 272 }, 1); | 282 }, 1); |
| 273 }, 1); | 283 }, 1); |
| 274 }); | 284 }); |
| 275 }); | 285 }); |
| 276 | 286 |
| 277 }); | 287 }); |
| 278 </script> | 288 </script> |
| 279 </body> | 289 </body> |
| 280 </html> | 290 </html> |
| OLD | NEW |