OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../fast/js/resources/js-test-pre.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 #control { | 4 #control { |
5 margin-left: 33%; | 5 margin-left: 33%; |
6 margin-top: 10%; | 6 margin-top: 10%; |
7 margin-right: 45%; | 7 margin-right: 45%; |
8 margin-bottom: 69%; | 8 margin-bottom: 69%; |
9 } | 9 } |
10 #calc { | 10 #calc { |
11 margin-left: calc(33%); | 11 margin-left: calc(33%); |
12 margin-top: calc(10%); | 12 margin-top: calc(10%); |
13 margin-right: calc(45%); | 13 margin-right: calc(45%); |
14 margin-bottom: calc(69%); | 14 margin-bottom: calc(69%); |
15 } | 15 } |
16 </style> | 16 </style> |
17 <div id="control"></div> | 17 <div id="control"></div> |
18 <div id="calc"></div> | 18 <div id="calc"></div> |
19 <script> | 19 <script> |
20 function test(prop) { | 20 function test(prop) { |
21 shouldEvaluateTo("getComputedStyle(document.getElementById('calc'), null
).getPropertyValue('" + prop + "')", "getComputedStyle(document.getElementById('
control', null)).getPropertyValue('" + prop + "')"); | 21 shouldEvaluateTo("getComputedStyle(document.getElementById('calc'), null
).getPropertyValue('" + prop + "')", "getComputedStyle(document.getElementById('
control', null)).getPropertyValue('" + prop + "')"); |
22 } | 22 } |
23 | 23 |
24 description("Tests calling getPropertyValue on computed margin styles involv
ing CSS calc"); | 24 description("Tests calling getPropertyValue on computed margin styles involv
ing CSS calc"); |
25 | 25 |
26 test('margin-left'); | 26 test('margin-left'); |
27 test('margin-top'); | 27 test('margin-top'); |
28 test('margin-right'); | 28 test('margin-right'); |
29 test('margin-bottom'); | 29 test('margin-bottom'); |
30 </script> | 30 </script> |
OLD | NEW |