<!DOCTYPE html>
<body>
<script src="../../../resources/js-test.js"></script>
<script>
window.jsTestIsAsync = true;
description('Verifies that MutationObserver is passed to the callback as expected.');
function mutationCallback(mutations, observer) {
window.thisArgument = this;
window.argument2 = observer;
shouldBe('thisArgument', 'mutationObserver');
shouldBe('argument2', 'mutationObserver');
finishJSTest();
}
var mutationObserver = new MutationObserver(mutationCallback);
var div = document.createElement('div');
mutationObserver.observe(div, {attributes: true});
div.setAttribute('foo', 'bar');
</script>
</body>