| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script> | 9 <script> |
| 10 description('Check stepUp() and stepDown() bahevior for type=date.'); | 10 description('Check stepUp() and stepDown() bahevior for type=date.'); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 shouldThrow('stepUp("", null, null)', invalidStateErr); | 42 shouldThrow('stepUp("", null, null)', invalidStateErr); |
| 43 shouldThrow('stepDown("", null, null)', invalidStateErr); | 43 shouldThrow('stepDown("", null, null)', invalidStateErr); |
| 44 debug('Non-number arguments'); | 44 debug('Non-number arguments'); |
| 45 shouldBe('stepUp("2010-02-10", null, null, "0")', '"2010-02-10"'); | 45 shouldBe('stepUp("2010-02-10", null, null, "0")', '"2010-02-10"'); |
| 46 shouldBe('stepDown("2010-02-10", null, null, "0")', '"2010-02-10"'); | 46 shouldBe('stepDown("2010-02-10", null, null, "0")', '"2010-02-10"'); |
| 47 shouldBe('stepUp("2010-02-10", null, null, "foo")', '"2010-02-10"'); | 47 shouldBe('stepUp("2010-02-10", null, null, "foo")', '"2010-02-10"'); |
| 48 shouldBe('stepDown("2010-02-10", null, null, "foo")', '"2010-02-10"'); | 48 shouldBe('stepDown("2010-02-10", null, null, "foo")', '"2010-02-10"'); |
| 49 shouldBe('stepUp("2010-02-10", null, null, null)', '"2010-02-10"'); | 49 shouldBe('stepUp("2010-02-10", null, null, null)', '"2010-02-10"'); |
| 50 shouldBe('stepDown("2010-02-10", null, null, null)', '"2010-02-10"'); | 50 shouldBe('stepDown("2010-02-10", null, null, null)', '"2010-02-10"'); |
| 51 debug('Normal cases'); | 51 debug('Normal cases'); |
| 52 shouldBe('stepDown("1970-01-04", "2", null)', '"1970-01-02"'); |
| 52 shouldBe('stepUp("2010-02-10", null, null)', '"2010-02-11"'); | 53 shouldBe('stepUp("2010-02-10", null, null)', '"2010-02-11"'); |
| 53 shouldBe('stepDown("2010-02-10", null, null)', '"2010-02-09"'); | 54 shouldBe('stepDown("2010-02-10", null, null)', '"2010-02-09"'); |
| 54 shouldBe('stepUp("2010-02-10", null, null, 10)', '"2010-02-20"'); | 55 shouldBe('stepUp("2010-02-10", null, null, 10)', '"2010-02-20"'); |
| 55 shouldBe('stepDown("2010-02-10", null, null, 11)', '"2010-01-30"'); | 56 shouldBe('stepDown("2010-02-10", null, null, 11)', '"2010-01-30"'); |
| 56 shouldBe('stepUp("1970-01-01", "4", null, 2)', '"1970-01-09"'); | 57 shouldBe('stepUp("1970-01-01", "4", null, 2)', '"1970-01-09"'); |
| 57 shouldBe('stepDown("1970-01-01", "4", null, 3)', '"1969-12-20"'); | 58 shouldBe('stepDown("1970-01-01", "4", null, 3)', '"1969-12-20"'); |
| 58 debug('Step=any'); | 59 debug('Step=any'); |
| 59 shouldThrow('stepUp("2010-02-10", "any", null)', invalidStateErr); | 60 shouldThrow('stepUp("2010-02-10", "any", null)', invalidStateErr); |
| 60 shouldThrow('stepDown("2010-02-10", "any", null)', invalidStateErr); | 61 shouldThrow('stepDown("2010-02-10", "any", null)', invalidStateErr); |
| 61 debug('Overflow/underflow'); | 62 debug('Overflow/underflow'); |
| 62 shouldThrow('stepUp("2010-02-10", "3.40282346e+38", null)', invalidStateErr); | 63 shouldThrow('stepUp("2010-02-10", "3.40282346e+38", null)', invalidStateErr); |
| 63 shouldThrow('stepDown("2010-02-10", "3.40282346e+38", null)', invalidStateErr); | 64 shouldThrow('stepDown("2010-02-10", "3.40282346e+38", null)', invalidStateErr); |
| 64 shouldThrow('stepUp("2010-02-10", "1", "2010-02-10")', invalidStateErr); | 65 shouldThrow('stepUp("2010-02-10", "1", "2010-02-10")', invalidStateErr); |
| 65 shouldThrow('stepDown("2010-02-10", "1", "2010-02-10")', invalidStateErr); | 66 shouldThrow('stepDown("2010-02-10", "1", "2010-02-10")', invalidStateErr); |
| 66 | 67 |
| 67 debug(''); | 68 debug(''); |
| 68 </script> | 69 </script> |
| 69 </body> | 70 </body> |
| 70 </html> | 71 </html> |
| OLD | NEW |