blob: f99deaf84772f2944e98e181bf2b4f83c9289f27 [file] [log] [blame]
<html>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script>
var headReadDocumentDir = document.dir;
document.dir = "rtl";
var headWriteDocumentDir = document.dir;
</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script src="../js/resources/js-test-pre.js"></script>
<script>
description("This tests:<br>"
+ "Bug 9954 REGRESSION: document.dir should return empty string in &lt;head&gt;<br>"
+ "<a href=\"http://bugzilla.opendarwin.org/show_bug.cgi?id=9954\">http://bugzilla.opendarwin.org/show_bug.cgi?id=9954</a><br>");
debug("Read document.dir in head");
shouldBe("headReadDocumentDir", "''");
debug("");
debug("Write document.dir in head");
shouldBe("headWriteDocumentDir", "''");
debug("");
debug("Read document.dir in body");
shouldBe("document.dir", "''");
debug("");
debug("Read document.body.dir in body");
shouldBe("document.body.dir", "''");
debug("");
debug("Write document.dir in body");
document.dir = "ltr";
shouldBe("document.dir", "'ltr'");
debug("");
debug("Read document.body.dir in body");
shouldBe("document.body.dir", "'ltr'");
debug("");
var successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>