OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 <script src="resources/alignment-parsing-utils-th.js"></script> | 4 <script src="resources/alignment-parsing-utils-th.js"></script> |
5 <html> | 5 <html> |
6 <body> | 6 <body> |
7 <p>Test to verify that the new alignment values are parsed as invalid if Gr
id Layout is disabled and in any case they do not cause a crash because assertio
ns in flexbox layout code.</p> | 7 <p>Test to verify that the new alignment values are parsed as invalid if Gr
id Layout is disabled and in any case they do not cause a crash because assertio
ns in flexbox layout code.</p> |
8 <div id="log"></div> | 8 <div id="log"></div> |
9 | 9 |
10 <div id="flexContainer" style="display: flex"> | 10 <div id="flexContainer" style="display: flex"> |
(...skipping 11 matching lines...) Expand all Loading... |
22 checkValues(item, "alignSelf", "align-self", value, computedValue); | 22 checkValues(item, "alignSelf", "align-self", value, computedValue); |
23 else | 23 else |
24 checkValues(item, "alignSelf", "align-self", "flex-start", "flex-start")
; | 24 checkValues(item, "alignSelf", "align-self", "flex-start", "flex-start")
; |
25 } | 25 } |
26 | 26 |
27 function checkAlignItemsValue(value, computedValue, gridEnabled) | 27 function checkAlignItemsValue(value, computedValue, gridEnabled) |
28 { | 28 { |
29 container.style.webkitAlignItems = value; | 29 container.style.webkitAlignItems = value; |
30 if (gridEnabled) { | 30 if (gridEnabled) { |
31 checkValues(container, "alignItems", "align-items", value, computedValue
); | 31 checkValues(container, "alignItems", "align-items", value, computedValue
); |
32 checkValues(item, "alignSelf", "align-self", "auto", computedValue); | 32 checkValues(item, "alignSelf", "align-self", "auto", "auto"); |
33 } else { | 33 } else { |
34 checkValues(container, "alignItems", "align-items", "flex-end", "flex-en
d"); | 34 checkValues(container, "alignItems", "align-items", "flex-end", "flex-en
d"); |
35 checkValues(item, "alignSelf", "align-self", "auto", "flex-end"); | 35 checkValues(item, "alignSelf", "align-self", "auto", "auto"); |
36 } | 36 } |
37 } | 37 } |
38 | 38 |
39 function checkSelfAlignmentValues(gridEnabled) | 39 function checkSelfAlignmentValues(gridEnabled) |
40 { | 40 { |
41 if (window.internals) | 41 if (window.internals) |
42 internals.runtimeFlags.cssGridLayoutEnabled = gridEnabled; | 42 internals.runtimeFlags.cssGridLayoutEnabled = gridEnabled; |
43 | 43 |
44 item.style.webkitAlignSelf = "flex-start"; | 44 item.style.webkitAlignSelf = "flex-start"; |
45 | 45 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 }, "Even when grid layout is ENABLED, new Self-Alignment values should not viola
te assertions in FlexibleBox layout logic.."); | 80 }, "Even when grid layout is ENABLED, new Self-Alignment values should not viola
te assertions in FlexibleBox layout logic.."); |
81 | 81 |
82 test(function() { | 82 test(function() { |
83 checkDefaultAlignmentValues(true); | 83 checkDefaultAlignmentValues(true); |
84 }, "Even when grid layout is ENABLED, new Default-Alignment values should not vi
olate assertions in FlexibleBox layout logic.."); | 84 }, "Even when grid layout is ENABLED, new Default-Alignment values should not vi
olate assertions in FlexibleBox layout logic.."); |
85 | 85 |
86 </script> | 86 </script> |
87 | 87 |
88 </body> | 88 </body> |
89 </html> | 89 </html> |
OLD | NEW |