5 <script src=
"../../../resources/js-test.js"></script>
10 <div id=
"console"></div>
14 window
.observer
= new MutationObserver(function(mutations
) { });
15 shouldThrow('observer.observe()');
16 shouldThrow('observer.observe(null)');
17 shouldThrow('observer.observe(undefined)');
18 shouldThrow('observer.observe(document.body)');
19 shouldThrow('observer.observe(document.body, null)');
20 shouldThrow('observer.observe(document.body, undefined)');
21 shouldThrow('observer.observe(null, {attributes: true})');
22 shouldThrow('observer.observe(undefined, {attributes: true})');
23 shouldThrow('observer.observe(document.body, {subtree: true})');
25 shouldThrow('observer.observe(document.body, {attributes: false, attributeOldValue: true})');
26 shouldThrow('observer.observe(document.body, {attributes: false, attributeFilter: ["id"]})');
27 shouldThrow('observer.observe(document.body, {attributes: false, attributeOldValue: false})');
29 shouldThrow('observer.observe(document.body, {characterData: false, characterDataOldValue: true})');
30 shouldThrow('observer.observe(document.body, {characterData: false, characterDataOldValue: false})');
33 description('Test that WebKitMutationObserver.observe throws exceptions appropriately');