OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>flexbox | computed style | flex-basis: percent</title> | 2 <title>flexbox | computed style | flex-basis: percent</title> |
3 <link rel="author" href="http://opera.com" title="Opera Software"> | 3 <link rel="author" href="http://opera.com" title="Opera Software"> |
4 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property"> | 4 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property"> |
5 <link rel="match" href="ref-pass-body.html"> | 5 <script src="../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../resources/testharnessreport.js"></script> |
6 <meta name="flags" content="dom"> | 7 <meta name="flags" content="dom"> |
7 <style> | 8 <style> |
8 html { | 9 html { |
9 display: flex; | 10 display: flex; |
10 width: 100px; | 11 width: 100px; |
11 } | 12 } |
12 body { | 13 body { |
13 color: red; | 14 color: red; |
14 margin: 0; | 15 margin: 0; |
15 flex-basis: 100%; | 16 flex-basis: 100%; |
16 } | 17 } |
17 .PASS {color: black;} | |
18 </style> | 18 </style> |
19 <h1>FAIL, enable javascript</h1> | 19 <div id="log"></div> |
20 <script> | 20 <script> |
| 21 test(function() { |
21 var body = document.body; | 22 var body = document.body; |
22 | 23 |
23 var passed = | 24 assert_equals(getComputedStyle(body).getPropertyValue("flex-basis"), |
24 » getComputedStyle(body).getPropertyValue("flex-basis") == | 25 » "100%"); |
25 » "100%"; | 26 }); |
26 body.textContent = body.className = passed ? "PASS" : "FAIL"; | |
27 </script> | 27 </script> |
OLD | NEW |