blob: e8d796494413855cefadd62c1508c73e18aa1208 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<body>
<script>
description("On setting document.title to the empty string, no text node should be created");
shouldBeEmptyString("document.title");
evalAndLog("document.title = ''");
shouldBeEmptyString("document.title");
shouldBeNull("document.getElementsByTagName('title')[0].firstChild");
document.title = "titletext";
shouldBeEqualToString("document.title", "titletext");
shouldBeNonNull("document.getElementsByTagName('title')[0].firstChild");
evalAndLog("document.title = ''");
shouldBeEmptyString("document.title");
shouldBeNull("document.getElementsByTagName('title')[0].firstChild");
document.title = "titletextnew";
shouldBeEqualToString("document.title", "titletextnew");
shouldBeNonNull("document.getElementsByTagName('title')[0].firstChild");
document.title = "updatetitletextnew";
shouldBeEqualToString("document.title", "updatetitletextnew");
shouldBeNonNull("document.getElementsByTagName('title')[0].firstChild");
</script>
</body>