blob: 6a4f6940a534ddd5968559d3f5cc903ee159b951 [file] [log] [blame]
Tests that the Text API arguments are correctly validated.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS text.data is "abcdefg"
PASS text.__proto__ is Text.prototype
PASS text.splitText(4).data is "efg"
PASS text.data is "abcd"
PASS text.splitText() threw exception TypeError: Failed to execute 'splitText' on 'Text': 1 argument required, but only 0 present..
PASS text.data is "abcd"
PASS text.splitText(999) threw exception IndexSizeError: Failed to execute 'splitText' on 'Text': The offset 999 is larger than the Text node's length..
PASS text.data is "abcd"
PASS text.splitText(-1) threw exception IndexSizeError: Failed to execute 'splitText' on 'Text': The offset 4294967295 is larger than the Text node's length..
PASS text.data is "abcd"
PASS text.splitText(-4294967294).data is "cd"
PASS text.data is "ab"
PASS successfullyParsed is true
TEST COMPLETE
!DOCTYPE html>