OLD | NEW |
(Empty) | |
| 1 Tests that the Text API arguments are correctly validated. |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 PASS text.data is "abcdefg" |
| 7 PASS text.__proto__ is Text.prototype |
| 8 PASS text.splitText(4).data is "efg" |
| 9 PASS text.data is "abcd" |
| 10 PASS text.splitText() threw exception TypeError: Not enough arguments. |
| 11 PASS text.data is "abcd" |
| 12 PASS text.splitText(999) threw exception IndexSizeError: Index or size was negat
ive, or greater than the allowed value.. |
| 13 PASS text.data is "abcd" |
| 14 PASS text.splitText(-1) threw exception IndexSizeError: Index or size was negati
ve, or greater than the allowed value.. |
| 15 PASS text.data is "abcd" |
| 16 PASS text.splitText(-4294967294).data is "cd" |
| 17 PASS text.data is "ab" |
| 18 PASS text.replaceWholeText('test') is text |
| 19 PASS text.data is "test" |
| 20 PASS text.replaceWholeText('') is null |
| 21 PASS text.data is "test" |
| 22 PASS text.replaceWholeText() threw exception TypeError: Not enough arguments. |
| 23 PASS text.data is "test" |
| 24 PASS text.replaceWholeText(null) is text |
| 25 PASS text.data is "null" |
| 26 PASS text.replaceWholeText(undefined) is text |
| 27 PASS text.data is "undefined" |
| 28 PASS successfullyParsed is true |
| 29 |
| 30 TEST COMPLETE |
| 31 |
OLD | NEW |