1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/test/test_bug323656.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=323656 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 323656</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 + <style> 1.14 + /** 1.15 + * The idea is that "color" inherits by default while "border-color" does 1.16 + * not. So if the former is red and the latter is green on a parent, and 1.17 + * the child's border-color is set to "inherit", it'll be green only if 1.18 + * the child is inheriting from the parent. If not, it'll either be 1.19 + * whatever the border-color is on what it's inheriting from, which will 1.20 + * be red if what it's inheriting from has the default (currentColor) 1.21 + *border-color). 1.22 + */ 1.23 + 1.24 + /* 't' for "test" */ 1.25 + #display, #display * 1.26 + { color: red; border: 0px hidden red; background: transparent } 1.27 + #display .t { border-color: green } 1.28 + #display .t > :first-child 1.29 + { border-color: inherit; border-style: solid; border-width: 10px } 1.30 + </style> 1.31 +</head> 1.32 +<body> 1.33 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=323656">Mozilla Bug 323656</a> 1.34 +<p id="display"> 1.35 + <select size="1" class="t"> 1.36 + <option id="testOption"></option> 1.37 + </select> 1.38 +</p> 1.39 +<div id="content" style="display: none"> 1.40 + 1.41 +</div> 1.42 +<pre id="test"> 1.43 +<script class="testbody" type="text/javascript"> 1.44 + 1.45 +/** Test for Bug 323656 **/ 1.46 +var s = document.defaultView.getComputedStyle($("testOption"), ""); 1.47 +is(s.borderRightColor, "rgb(0, 128, 0)", "Inheritance broken"); 1.48 + 1.49 + 1.50 +</script> 1.51 +</pre> 1.52 +</body> 1.53 +</html> 1.54 +