OLD | NEW |
(Empty) | |
| 1 This test makes sure the closest() API works correctly |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 PASS theTarget.closest("#theTarget") is theTarget |
| 7 PASS theTarget.closest("ancestor") is ancestor |
| 8 PASS theTarget.closest("tribe ancestor") is ancestor |
| 9 PASS theTarget.closest("tribe > ancestor") is ancestor |
| 10 PASS theTarget.closest("realm + ancestor") is ancestor |
| 11 PASS theTarget.closest("realm ~ ancestor") is ancestor |
| 12 PASS theTarget.closest("tribe, ancestor") is ancestor |
| 13 PASS theTarget.closest("ancestor, tribe") is ancestor |
| 14 PASS theTarget.closest("tribe realm") is null |
| 15 PASS theTarget.closest("tribe realm throne") is null |
| 16 PASS theTarget.closest("tribe realm ancestor") is null |
| 17 PASS theTarget.closest("realm > ancestor") is null |
| 18 PASS theTarget.closest("throne + ancestor") is null |
| 19 PASS theTarget.closest("throne ~ ancestor") is null |
| 20 PASS theTarget.closest(".classic") is ancestor |
| 21 PASS theTarget.closest("#john") is ancestor |
| 22 PASS theTarget.closest("doe") is null |
| 23 PASS theTarget.closest("ancestor[name=old]") is ancestor |
| 24 PASS theTarget.closest("ancestor[name=young]") is null |
| 25 PASS theTarget.closest(null) is null |
| 26 PASS theTarget.closest(undefined) is null |
| 27 PASS sour.closest("lemon") is sour |
| 28 PASS sour.closest("a, b, c, d, e") is e |
| 29 PASS sour.closest("a, b, c") is c |
| 30 PASS sour.closest("a, b") is b |
| 31 PASS sour.closest("e, d, c, b, a") is e |
| 32 PASS sour.closest("d, c, b, a") is d |
| 33 PASS sour.closest("c, b, a") is c |
| 34 PASS sour.closest("b, a") is b |
| 35 PASS sour.closest("a") is a |
| 36 PASS document.closest is undefined |
| 37 PASS document.closest() threw exception TypeError: undefined is not a function. |
| 38 PASS theTarget.closest() threw exception TypeError: Failed to execute 'closest'
on 'Element': 1 argument required, but only 0 present.. |
| 39 PASS theTarget.closest("") threw exception SyntaxError: Failed to execute 'close
st' on 'Element': '' is not a valid selector.. |
| 40 PASS theTarget.closest(".123") threw exception SyntaxError: Failed to execute 'c
losest' on 'Element': '.123' is not a valid selector.. |
| 41 PASS theTarget.closest(" ") threw exception SyntaxError: Failed to execute 'c
losest' on 'Element': ' ' is not a valid selector.. |
| 42 PASS theTarget.closest(")") threw exception SyntaxError: Failed to execute 'clos
est' on 'Element': ')' is not a valid selector.. |
| 43 PASS theTarget.closest("(") threw exception SyntaxError: Failed to execute 'clos
est' on 'Element': '(' is not a valid selector.. |
| 44 PASS theTarget.closest("()") threw exception SyntaxError: Failed to execute 'clo
sest' on 'Element': '()' is not a valid selector.. |
| 45 PASS theTarget.closest("^_^") threw exception SyntaxError: Failed to execute 'cl
osest' on 'Element': '^_^' is not a valid selector.. |
| 46 PASS theTarget.closest("{") threw exception SyntaxError: Failed to execute 'clos
est' on 'Element': '{' is not a valid selector.. |
| 47 PASS theTarget.closest("}") threw exception SyntaxError: Failed to execute 'clos
est' on 'Element': '}' is not a valid selector.. |
| 48 PASS theTarget.closest("{}") threw exception SyntaxError: Failed to execute 'clo
sest' on 'Element': '{}' is not a valid selector.. |
| 49 PASS successfullyParsed is true |
| 50 |
| 51 TEST COMPLETE |
| 52 |
OLD | NEW |