| Test that WebKitMutationObserver.observe throws exceptions appropriately |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS observer.observe() threw exception TypeError: Not enough arguments. |
| PASS observer.observe(null) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node. |
| PASS observer.observe(undefined) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node. |
| PASS observer.observe(document.body) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, null) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, undefined) threw exception TypeError: Type error. |
| PASS observer.observe(null, {attributes: true}) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node. |
| PASS observer.observe(undefined, {attributes: true}) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node. |
| PASS observer.observe(document.body, {subtree: true}) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, {childList: true, attributeOldValue: true}) did not throw exception. |
| PASS observer.observe(document.body, {attributes: true, characterDataOldValue: true}) did not throw exception. |
| PASS observer.observe(document.body, {characterData: true, attributeFilter: ["id"]}) did not throw exception. |
| PASS observer.observe(document.body, {attributes: false, attributeOldValue: true}) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, {attributes: false, attributeFilter: ["id"]}) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, {characterData: false, characterDataOldValue: true}) threw exception TypeError: Type error. |
| PASS observer.observe(document.body, {attributeFilter: 1}) threw exception TypeError: Value is not a sequence. |
| PASS observer.observe(document.body, {attributeFilter: "abc"}) threw exception TypeError: Value is not a sequence. |
| PASS x = { [Symbol.iterator]: function* () { yield "foo"; } }; observer.observe(document.body, {attributeFilter: x}) did not throw exception. |
| PASS x = { [Symbol.iterator]: 1 }; observer.observe(document.body, {attributeFilter: x}) threw exception TypeError: Type error. |
| PASS x = { [Symbol.iterator]: null }; observer.observe(document.body, {attributeFilter: x}) threw exception TypeError: Type error. |
| PASS x = { [Symbol.iterator]: function* () { throw {name: "error", toString: () => "error"}; } }; observer.observe(document.body, {attributeFilter: x}) threw exception error. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |