OLD | NEW |
1 Tests that the Text API arguments are correctly validated. | 1 Tests that the Text API arguments are correctly validated. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS text.data is "abcdefg" | 6 PASS text.data is "abcdefg" |
7 PASS text.__proto__ is Text.prototype | 7 PASS text.__proto__ is Text.prototype |
8 PASS text.splitText(4).data is "efg" | 8 PASS text.splitText(4).data is "efg" |
9 PASS text.data is "abcd" | 9 PASS text.data is "abcd" |
10 PASS text.splitText() threw exception TypeError: Failed to execute 'splitText' o
n 'Text': 1 argument required, but only 0 present.. | 10 PASS text.splitText() threw exception TypeError: Failed to execute 'splitText' o
n 'Text': 1 argument required, but only 0 present.. |
11 PASS text.data is "abcd" | 11 PASS text.data is "abcd" |
12 PASS text.splitText(999) threw exception IndexSizeError: Failed to execute 'spli
tText' on 'Text': The offset 999 is larger than the Text node's length.. | 12 PASS text.splitText(999) threw exception IndexSizeError: Failed to execute 'spli
tText' on 'Text': The offset 999 is larger than the Text node's length.. |
13 PASS text.data is "abcd" | 13 PASS text.data is "abcd" |
14 PASS text.splitText(-1) threw exception IndexSizeError: Failed to execute 'split
Text' on 'Text': The offset 4294967295 is larger than the Text node's length.. | 14 PASS text.splitText(-1) threw exception IndexSizeError: Failed to execute 'split
Text' on 'Text': The offset 4294967295 is larger than the Text node's length.. |
15 PASS text.data is "abcd" | 15 PASS text.data is "abcd" |
16 PASS text.splitText(-4294967294).data is "cd" | 16 PASS text.splitText(-4294967294).data is "cd" |
17 PASS text.data is "ab" | 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: Failed to execute 'repla
ceWholeText' on 'Text': 1 argument required, but only 0 present.. | |
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 | 18 PASS successfullyParsed is true |
29 | 19 |
30 TEST COMPLETE | 20 TEST COMPLETE |
31 !DOCTYPE html> | 21 !DOCTYPE html> |
OLD | NEW |