1 This tests that querySelector, querySelectorAll and matchesSelector (webkitMatchesSelector) don't crash when used in a viewless document.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS testDoc.querySelector('p') is p1
7 PASS testDoc.querySelectorAll('span').length is 2
8 PASS testDoc.querySelectorAll('span').item(1) is s2
9 PASS testDoc.querySelector('.d1') is d1
10 PASS testDoc.querySelectorAll('p span').length is 1
11 PASS p1.webkitMatchesSelector('p') is true
12 PASS s1.webkitMatchesSelector('p span') is true
13 PASS s2.webkitMatchesSelector('#s2') is true
14 PASS d1.webkitMatchesSelector('.d1') is true
15 PASS successfullyParsed is true