3 <script src=
"../../../resources/js-test.js"></script>
5 description('Test the constructor of WebKitMutationObserver');
7 shouldBeNonNull('window.WebKitMutationObserver');
8 shouldBeEqualToString('typeof WebKitMutationObserver.prototype.observe', 'function');
9 shouldBeEqualToString('typeof WebKitMutationObserver.prototype.disconnect', 'function');
10 window
.observer
= new MutationObserver(function(mutations
) { });
11 shouldBeEqualToString('typeof observer.observe', 'function');
12 shouldBeEqualToString('typeof observer.disconnect', 'function');
14 shouldThrow('new MutationObserver({ handleEvent: function() {} })');
15 shouldThrow('new MutationObserver({})');
16 shouldThrow('new MutationObserver(42)');
17 shouldThrow('new MutationObserver("foo")');