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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 assert.equal(range.value, 5); | 96 assert.equal(range.value, 5); |
97 range.step = 0.1; | 97 range.step = 0.1; |
98 range.value = 5.1; | 98 range.value = 5.1; |
99 flush(function() { | 99 flush(function() { |
100 assert.equal(range.value, 5.1); | 100 assert.equal(range.value, 5.1); |
101 done(); | 101 done(); |
102 }); | 102 }); |
103 }); | 103 }); |
104 }); | 104 }); |
105 | 105 |
| 106 test('set large step', function(done) { |
| 107 // PolymerElements/paper-slider#135 |
| 108 range.min = 0; |
| 109 range.max = 2625; |
| 110 range.step = 875; |
| 111 range.value = 875; |
| 112 flush(function() { |
| 113 assert.equal(range.value, 875); |
| 114 done(); |
| 115 }); |
| 116 }); |
| 117 |
| 118 test('set step with min', function(done) { |
| 119 range.min = -0.9; |
| 120 range.max = 1.1; |
| 121 range.step = 0.5; |
| 122 range.value = -0.5; |
| 123 flush(function() { |
| 124 assert.equal(range.value, -0.4); |
| 125 range.value = 0.7; |
| 126 flush(function() { |
| 127 assert.equal(range.value, 0.6); |
| 128 done(); |
| 129 }); |
| 130 }); |
| 131 }); |
| 132 |
106 test('odd values', function(done) { | 133 test('odd values', function(done) { |
107 range.min = 1; | 134 range.min = 1; |
108 range.max = 7; | 135 range.max = 7; |
109 range.step = 2; | 136 range.step = 2; |
110 range.value = 3; | 137 range.value = 3; |
111 | 138 |
112 flush(function() { | 139 flush(function() { |
113 assert.equal(range.value, 3); | 140 assert.equal(range.value, 3); |
114 | 141 |
115 range.value += range.step; | 142 range.value += range.step; |
(...skipping 28 matching lines...) Expand all Loading... |
144 done(); | 171 done(); |
145 }); | 172 }); |
146 }); | 173 }); |
147 | 174 |
148 }); | 175 }); |
149 | 176 |
150 </script> | 177 </script> |
151 | 178 |
152 </body> | 179 </body> |
153 </html> | 180 </html> |
OLD | NEW |