| OLD | NEW |
| (Empty) |
| 1 description( | |
| 2 'The following test checks if an existing milliseconds value gets preserved if a
call to setHours(), setMinutes() or setSeconds() does not specify the milliseco
nds. See <a href="https://bugs.webkit.org/show_bug.cgi?id=3759">https://bugs.web
kit.org/show_bug.cgi?id=3759</a>' | |
| 3 ); | |
| 4 | |
| 5 var d = new Date(0); | |
| 6 d.setMilliseconds(1); | |
| 7 | |
| 8 var oldValue = d.getMilliseconds(); | |
| 9 | |
| 10 d.setHours(8); | |
| 11 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| 12 d.setHours(8, 30); | |
| 13 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| 14 d.setHours(8, 30, 40); | |
| 15 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| 16 d.setMinutes(45); | |
| 17 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| 18 d.setMinutes(45, 40); | |
| 19 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| 20 d.setSeconds(50); | |
| 21 shouldBe("d.getMilliseconds()", oldValue.toString()); | |
| OLD | NEW |