<!doctype html>
<title>old</title>
<script src="../../resources/js-test.js"></script>
<script>
window.jsTestIsAsync = true;
description("Test for mutations to childList when setting document.title.");
var mutations;
function finish() {
shouldBe('mutations.length', '1');
shouldBe('mutations[0].type', '"childList"');
shouldBe('mutations[0].addedNodes.length', '1');
shouldBe('mutations[0].removedNodes.length', '1');
finishJSTest();
}
var titleElement = document.querySelector('title');
var i = 0;
var observer = new MutationObserver(function(mutations) {
window.mutations = mutations;
});
observer.observe(titleElement, { childList: true });
document.title = "new";
setTimeout(finish, 0);
</script>
<body>
</body>