blob: 2a97e82371489c1c33128ed20f413c9a1993e34f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="../../../resources/js-test-pre.js"></script>
<style>
.testDiv {-webkit-border-start: 5px solid green; -webkit-border-end: 5px solid red; }
</style>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<div id="result"></div>
<div id="parentDiv">
<div id="has-dir-auto" dir="auto" class="testDiv">
<div id="has-dir-rtl" dir="rtl" class="testDiv">מקור השם עברית</div>
Test test test</div>
<script>
description('Test that directionality of an element with dir=auto is not affected by children that also have the dir attribute.');
var el = document.getElementById("has-dir-auto");
shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('border-right-color')", "'rgb(255, 0, 0)'");
el = document.getElementById("has-dir-rtl");
shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('border-right-color')", "'rgb(0, 128, 0)'");
document.getElementById("parentDiv").style.display = "none";
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>