<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>

description("Test that accessing document.dir does not crash for a document with no elements (and is the empty string).");

var doc = document.implementation.createHTMLDocument();
while (doc.firstChild)
  doc.removeChild(doc.firstChild);

shouldBeEmptyString('doc.dir');

</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
