blob: f018c24dcde4be2e3571981f9b0690f5f5de1dab [file] [log] [blame]
CONSOLE WARNING: Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details.
CONSOLE MESSAGE: line 150: [object Selection]
SelectAll and Shadow DOM Tree
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Select all from host content in shadow tree => select all on document
PASS selection.anchorNode.nodeValue is "SelectAll and Shadow DOM Tree"
PASS selection.anchorOffset is 0
PASS selection.focusNode.nodeValue is "end of document"
PASS selection.focusOffset is 15
Select all from "EFO" in shadow tree => select descendants of immediate child of shadow root containing start position
PASS selection.anchorNode is host1.parentNode
PASS selection.anchorOffset is 1
PASS selection.focusNode is host1.parentNode
PASS selection.focusOffset is 1
PASS selectionInHost1.anchorNode.nodeValue is "BEFORE"
PASS selectionInHost1.anchorOffset is 0
PASS selectionInHost1.focusNode.nodeValue is "BEFORE"
PASS selectionInHost1.focusOffset is 6
Select all from host content in editable => select all in editable rather than whole document
PASS selection.anchorNode.nodeValue is "012"
PASS selection.anchorOffset is 0
PASS selection.focusNode.nodeValue is "345"
PASS selection.anchorOffset is 0
Select all from "EFO" in shadow tree => select descendants of immediate child of shadow root containing start position, host editable doesn't affect select all
PASS selection.anchorNode is host2.parentNode
PASS selection.anchorOffset is 1
PASS selection.focusNode is host2.parentNode
PASS selection.focusOffset is 1
PASS selectionInHost2.anchorNode.nodeValue is "BEFORE"
PASS selectionInHost2.anchorOffset is 0
PASS selectionInHost2.focusNode.nodeValue is "BEFORE"
PASS selectionInHost2.focusOffset is 6
Select all from host content in nested shadow tree => select all on document
PASS selection.anchorNode.nodeValue is "SelectAll and Shadow DOM Tree"
PASS selection.anchorOffset is 0
PASS selection.focusNode.nodeValue is "end of document"
PASS selection.focusOffset is 15
Select all from "EFO" in nested shadow tree => select descendants of immediate child of shadow root containing start position
PASS selection.anchorNode is host4.parentNode
PASS selection.anchorOffset is 1
PASS selection.focusNode is host4.parentNode
PASS selection.focusOffset is 1
PASS selectionInHost3.anchorNode is null
PASS selectionInHost3.anchorOffset is 0
PASS selectionInHost3.focusNode is null
PASS selectionInHost3.focusOffset is 0
PASS selectionInHost4.anchorNode.nodeValue is "BEFORE"
PASS selectionInHost4.anchorOffset is 0
PASS selectionInHost4.focusNode.nodeValue is "BEFORE"
PASS selectionInHost4.focusOffset is 6
Select all from selecting node in youngest shadow DOM tree => select descendants of immediate child of shadow root containing start position
PASS selectionInHost5.anchorNode.nodeValue is "BEFORE"
PASS selectionInHost5.anchorOffset is 0
PASS selectionInHost5.focusNode.nodeValue is "BEFORE"
PASS selectionInHost5.focusOffset is 6
Select all from selecting node in oldest shadow DOM tree => select descendants of immediate child of shadow root containing start position
PASS selectionInHost5.anchorNode.nodeValue is "BEFORE"
PASS selectionInHost5.anchorOffset is 0
PASS selectionInHost5.focusNode.nodeValue is "BEFORE"
PASS selectionInHost5.focusOffset is 6
PASS successfullyParsed is true
TEST COMPLETE
012host1345
012host2345
012host3abchost4host3def345
012host5345
end of document