Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / inherited-properties-explicit.html
blob0d624d11e398c692ea3fc8ffa708b14e5acf8385
1 <script src="../../resources/js-test.js"></script>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
6 <style>
7 .a { margin-left:5px; }
8 .b { margin-left:inherit; }
9 .c { margin-left:10px; }
10 </style>
11 <div class=a>
12 <div class="" id=test1a></div>
13 </div>
14 <div>
15 <div class=a>
16 <div class="" id=test1b></div>
17 </div>
18 </div>
19 <div class=a>
20 <div class="b" id=test2a></div>
21 </div>
22 <div>
23 <div class=a>
24 <div class="b" id=test2b></div>
25 </div>
26 </div>
27 <div class=a>
28 <div class="b c" id=test3a></div>
29 </div>
30 <div>
31 <div class=a>
32 <div class="b c" id=test3b></div>
33 </div>
34 </div>
35 <p>
36 Test that the matched declaration cache handles explicitly inherited properties correctly.
37 <p>
38 <script>
39 function test(e, p) {
40 var testDiv = document.getElementById(e);
41 return getComputedStyle(testDiv).marginLeft;
43 shouldBeEqualToString("test('test1a')", "0px");
44 shouldBeEqualToString("test('test1b')", "0px");
45 shouldBeEqualToString("test('test2a')", "5px");
46 shouldBeEqualToString("test('test2b')", "5px");
47 shouldBeEqualToString("test('test3a')", "10px");
48 shouldBeEqualToString("test('test3b')", "10px");
49 </script>