diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 23:50:46 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 23:50:46 +0200 |
commit | 7dfc8b77b94ef102962b474dcbcee272fb8934f7 (patch) | |
tree | 476216fe0737f2609fb9360816a962007b2c0629 /toolkit | |
parent | e14c686ac0ad5e6cfdd933049c11b80a425283dc (diff) | |
download | UXP-7dfc8b77b94ef102962b474dcbcee272fb8934f7.tar UXP-7dfc8b77b94ef102962b474dcbcee272fb8934f7.tar.gz UXP-7dfc8b77b94ef102962b474dcbcee272fb8934f7.tar.lz UXP-7dfc8b77b94ef102962b474dcbcee272fb8934f7.tar.xz UXP-7dfc8b77b94ef102962b474dcbcee272fb8934f7.zip |
Bug 1381421 - (Part 2) Add browser chrome tests for the minimum and maximum dates
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/content/tests/browser/browser_datetime_datepicker.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/toolkit/content/tests/browser/browser_datetime_datepicker.js b/toolkit/content/tests/browser/browser_datetime_datepicker.js index a0db761b7..808ef4fef 100644 --- a/toolkit/content/tests/browser/browser_datetime_datepicker.js +++ b/toolkit/content/tests/browser/browser_datetime_datepicker.js @@ -220,3 +220,43 @@ add_task(async function test_datepicker_step() { await helper.tearDown(); }); + +add_task(async function test_datepicker_abs_min() { + const inputValue = "0001-01-01"; + await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`); + + Assert.deepEqual( + getCalendarText(), + [ + "", "1", "2", "3", "4", "5", "6", + "7", "8", "9", "10", "11", "12", "13", + "14", "15", "16", "17", "18", "19", "20", + "21", "22", "23", "24", "25", "26", "27", + "28", "29", "30", "31", "1", "2", "3", + "4", "5", "6", "7", "8", "9", "10", + ], + "0001-01", + ); + + await helper.tearDown(); +}); + +add_task(async function test_datepicker_abs_max() { + const inputValue = "275760-09-13"; + await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`); + + Assert.deepEqual( + getCalendarText(), + [ + "31", "1", "2", "3", "4", "5", "6", + "7", "8", "9", "10", "11", "12", "13", + "", "", "", "", "", "", "", + "", "", "", "", "", "", "", + "", "", "", "", "", "", "", + "", "", "", "", "", "", "", + ], + "275760-09", + ); + + await helper.tearDown(); +}); |