blob: 7282e62d4c0dd292652d8330b6dd20264314a61b [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 {border-inline-start: 5px solid green; border-inline-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>