blob: 743cc88b4e87d5ce297a5e9148661b9c1c7c03a8 [file] [log] [blame]
<!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>