<!DOCTYPE html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description('Test the constructor of WebKitMutationObserver');

shouldBeNonNull('window.WebKitMutationObserver');
shouldBeEqualToString('typeof WebKitMutationObserver.prototype.observe', 'function');
shouldBeEqualToString('typeof WebKitMutationObserver.prototype.disconnect', 'function');
window.observer = new MutationObserver(function(mutations) { });
shouldBeEqualToString('typeof observer.observe', 'function');
shouldBeEqualToString('typeof observer.disconnect', 'function');

shouldThrow('new MutationObserver({ handleEvent: function() {} })');
shouldThrow('new MutationObserver({})');
shouldThrow('new MutationObserver(42)');
shouldThrow('new MutationObserver("foo")');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
