Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: LayoutTests/fast/css-grid-layout/implicit-position-dynamic-change.html

Issue 213423009: [CSS Grid Layout] Remove unused variable in test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <link href="resources/grid.css" rel="stylesheet"> 3 <link href="resources/grid.css" rel="stylesheet">
4 <style> 4 <style>
5 .gridFixedContent { 5 .gridFixedContent {
6 grid-template-columns: 50px minmax(min-content, 50px) minmax(max-content, 50 px) minmax(50px, min-content); 6 grid-template-columns: 50px minmax(min-content, 50px) minmax(max-content, 50 px) minmax(50px, min-content);
7 grid-template-rows: 70px minmax(max-content, 70px) minmax(50px, min-content) minmax(65px, max-content); 7 grid-template-rows: 70px minmax(max-content, 70px) minmax(50px, min-content) minmax(65px, max-content);
8 } 8 }
9 </style> 9 </style>
10 <script src="../../resources/check-layout.js"></script> 10 <script src="../../resources/check-layout.js"></script>
11 <script> 11 <script>
12 function testPosition(gridElementID, position, size) 12 function testPosition(gridElementID, position, size)
13 { 13 {
14 gridItem = document.getElementById(gridElementID).firstChild; 14 gridItem = document.getElementById(gridElementID).firstChild;
15 gridItem.style.gridColumn = position.column; 15 gridItem.style.gridColumn = position.column;
16 gridItem.style.gridRow = position.row; 16 gridItem.style.gridRow = position.row;
17 gridItem.setAttribute("data-expected-width", size.width); 17 gridItem.setAttribute("data-expected-width", size.width);
18 gridItem.setAttribute("data-expected-height", size.height); 18 gridItem.setAttribute("data-expected-height", size.height);
19 checkLayout("#" + gridElementID, document.getElementById("test-output")); 19 checkLayout("#" + gridElementID, document.getElementById("test-output"));
20 } 20 }
21 21
22 function updateImplicitGridColumn() 22 function updateImplicitGridColumn()
23 { 23 {
24 var gridItem = document.getElementById("constrainedGrid").firstChild;
25 testPosition("constrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '5 0', 'height': '70' }); 24 testPosition("constrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '5 0', 'height': '70' });
26 testPosition("constrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '5 0', 'height': '30' }); 25 testPosition("constrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '5 0', 'height': '30' });
27 testPosition("constrainedGrid", { 'column': '1', 'row': '3' }, { 'width': '5 0', 'height': '50' }); 26 testPosition("constrainedGrid", { 'column': '1', 'row': '3' }, { 'width': '5 0', 'height': '50' });
28 testPosition("constrainedGrid", { 'column': '1', 'row': '4' }, { 'width': '5 0', 'height': '65' }); 27 testPosition("constrainedGrid", { 'column': '1', 'row': '4' }, { 'width': '5 0', 'height': '65' });
29 testPosition("constrainedGrid", { 'column': '1', 'row': '5' }, { 'width': '5 0', 'height': '30' }); 28 testPosition("constrainedGrid", { 'column': '1', 'row': '5' }, { 'width': '5 0', 'height': '30' });
30 29
31 testPosition("constrainedGrid", { 'column': '2', 'row': '1' }, { 'width': '4 0', 'height': '70' }); 30 testPosition("constrainedGrid", { 'column': '2', 'row': '1' }, { 'width': '4 0', 'height': '70' });
32 testPosition("constrainedGrid", { 'column': '2', 'row': '2' }, { 'width': '4 0', 'height': '30' }); 31 testPosition("constrainedGrid", { 'column': '2', 'row': '2' }, { 'width': '4 0', 'height': '30' });
33 testPosition("constrainedGrid", { 'column': '2', 'row': '3' }, { 'width': '4 0', 'height': '50' }); 32 testPosition("constrainedGrid", { 'column': '2', 'row': '3' }, { 'width': '4 0', 'height': '50' });
34 testPosition("constrainedGrid", { 'column': '2', 'row': '4' }, { 'width': '4 0', 'height': '65' }); 33 testPosition("constrainedGrid", { 'column': '2', 'row': '4' }, { 'width': '4 0', 'height': '65' });
35 testPosition("constrainedGrid", { 'column': '2', 'row': '5' }, { 'width': '4 0', 'height': '30' }); 34 testPosition("constrainedGrid", { 'column': '2', 'row': '5' }, { 'width': '4 0', 'height': '30' });
36 35
37 testPosition("constrainedGrid", { 'column': '3', 'row': '1' }, { 'width': '1 40', 'height': '70' }); 36 testPosition("constrainedGrid", { 'column': '3', 'row': '1' }, { 'width': '1 40', 'height': '70' });
38 testPosition("constrainedGrid", { 'column': '3', 'row': '2' }, { 'width': '1 40', 'height': '10' }); 37 testPosition("constrainedGrid", { 'column': '3', 'row': '2' }, { 'width': '1 40', 'height': '10' });
39 testPosition("constrainedGrid", { 'column': '3', 'row': '3' }, { 'width': '1 40', 'height': '50' }); 38 testPosition("constrainedGrid", { 'column': '3', 'row': '3' }, { 'width': '1 40', 'height': '50' });
40 testPosition("constrainedGrid", { 'column': '3', 'row': '4' }, { 'width': '1 40', 'height': '65' }); 39 testPosition("constrainedGrid", { 'column': '3', 'row': '4' }, { 'width': '1 40', 'height': '65' });
41 testPosition("constrainedGrid", { 'column': '3', 'row': '5' }, { 'width': '1 40', 'height': '10' }); 40 testPosition("constrainedGrid", { 'column': '3', 'row': '5' }, { 'width': '1 40', 'height': '10' });
42 41
43 testPosition("constrainedGrid", { 'column': '4', 'row': '1' }, { 'width': '5 0', 'height': '70' }); 42 testPosition("constrainedGrid", { 'column': '4', 'row': '1' }, { 'width': '5 0', 'height': '70' });
44 testPosition("constrainedGrid", { 'column': '4', 'row': '2' }, { 'width': '5 0', 'height': '30' }); 43 testPosition("constrainedGrid", { 'column': '4', 'row': '2' }, { 'width': '5 0', 'height': '30' });
45 testPosition("constrainedGrid", { 'column': '4', 'row': '3' }, { 'width': '5 0', 'height': '50' }); 44 testPosition("constrainedGrid", { 'column': '4', 'row': '3' }, { 'width': '5 0', 'height': '50' });
46 testPosition("constrainedGrid", { 'column': '4', 'row': '4' }, { 'width': '5 0', 'height': '65' }); 45 testPosition("constrainedGrid", { 'column': '4', 'row': '4' }, { 'width': '5 0', 'height': '65' });
47 testPosition("constrainedGrid", { 'column': '4', 'row': '5' }, { 'width': '5 0', 'height': '30' }); 46 testPosition("constrainedGrid", { 'column': '4', 'row': '5' }, { 'width': '5 0', 'height': '30' });
48 47
49 testPosition("constrainedGrid", { 'column': '10', 'row': '15' }, { 'width': '40', 'height': '30' }); 48 testPosition("constrainedGrid", { 'column': '10', 'row': '15' }, { 'width': '40', 'height': '30' });
50 49
51 var gridItem = document.getElementById("constrainedGridUndefinedHeight").fir stChild;
52 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '1' } , { 'width': '50', 'height': '70' }); 50 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '1' } , { 'width': '50', 'height': '70' });
53 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '2' } , { 'width': '50', 'height': '70' }); 51 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '2' } , { 'width': '50', 'height': '70' });
54 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '3' } , { 'width': '50', 'height': '50' }); 52 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '3' } , { 'width': '50', 'height': '50' });
55 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '4' } , { 'width': '50', 'height': '65' }); 53 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '4' } , { 'width': '50', 'height': '65' });
56 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '5' } , { 'width': '50', 'height': '30' }); 54 testPosition("constrainedGridUndefinedHeight", { 'column': '1', 'row': '5' } , { 'width': '50', 'height': '30' });
57 55
58 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '1' } , { 'width': '40', 'height': '70' }); 56 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '1' } , { 'width': '40', 'height': '70' });
59 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '2' } , { 'width': '40', 'height': '70' }); 57 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '2' } , { 'width': '40', 'height': '70' });
60 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '3' } , { 'width': '40', 'height': '50' }); 58 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '3' } , { 'width': '40', 'height': '50' });
61 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '4' } , { 'width': '40', 'height': '65' }); 59 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '4' } , { 'width': '40', 'height': '65' });
62 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '5' } , { 'width': '40', 'height': '30' }); 60 testPosition("constrainedGridUndefinedHeight", { 'column': '2', 'row': '5' } , { 'width': '40', 'height': '30' });
63 61
64 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '1' } , { 'width': '140', 'height': '70' }); 62 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '1' } , { 'width': '140', 'height': '70' });
65 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '2' } , { 'width': '140', 'height': '70' }); 63 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '2' } , { 'width': '140', 'height': '70' });
66 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '3' } , { 'width': '140', 'height': '50' }); 64 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '3' } , { 'width': '140', 'height': '50' });
67 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '4' } , { 'width': '140', 'height': '65' }); 65 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '4' } , { 'width': '140', 'height': '65' });
68 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '5' } , { 'width': '140', 'height': '10' }); 66 testPosition("constrainedGridUndefinedHeight", { 'column': '3', 'row': '5' } , { 'width': '140', 'height': '10' });
69 67
70 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '1' } , { 'width': '50', 'height': '70' }); 68 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '1' } , { 'width': '50', 'height': '70' });
71 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '2' } , { 'width': '50', 'height': '70' }); 69 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '2' } , { 'width': '50', 'height': '70' });
72 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '3' } , { 'width': '50', 'height': '50' }); 70 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '3' } , { 'width': '50', 'height': '50' });
73 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '4' } , { 'width': '50', 'height': '65' }); 71 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '4' } , { 'width': '50', 'height': '65' });
74 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '5' } , { 'width': '50', 'height': '30' }); 72 testPosition("constrainedGridUndefinedHeight", { 'column': '4', 'row': '5' } , { 'width': '50', 'height': '30' });
75 73
76 testPosition("constrainedGridUndefinedHeight", { 'column': '10', 'row': '15' }, { 'width': '40', 'height': '30' }); 74 testPosition("constrainedGridUndefinedHeight", { 'column': '10', 'row': '15' }, { 'width': '40', 'height': '30' });
77 75
78 gridItem = document.getElementById("unconstrainedGrid").firstChild;
79 testPosition("unconstrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '50', 'height': '70' }); 76 testPosition("unconstrainedGrid", { 'column': '1', 'row': '1' }, { 'width': '50', 'height': '70' });
80 testPosition("unconstrainedGrid", { 'column': '2', 'row': '1' }, { 'width': '60', 'height': '70' }); 77 testPosition("unconstrainedGrid", { 'column': '2', 'row': '1' }, { 'width': '60', 'height': '70' });
81 testPosition("unconstrainedGrid", { 'column': '3', 'row': '1' }, { 'width': '130', 'height': '70' }); 78 testPosition("unconstrainedGrid", { 'column': '3', 'row': '1' }, { 'width': '130', 'height': '70' });
82 testPosition("unconstrainedGrid", { 'column': '4', 'row': '1' }, { 'width': '60', 'height': '70' }); 79 testPosition("unconstrainedGrid", { 'column': '4', 'row': '1' }, { 'width': '60', 'height': '70' });
83 testPosition("unconstrainedGrid", { 'column': '5', 'row': '1' }, { 'width': '130', 'height': '70' }); 80 testPosition("unconstrainedGrid", { 'column': '5', 'row': '1' }, { 'width': '130', 'height': '70' });
84 81
85 testPosition("unconstrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '50', 'height': '70' }); 82 testPosition("unconstrainedGrid", { 'column': '1', 'row': '2' }, { 'width': '50', 'height': '70' });
86 testPosition("unconstrainedGrid", { 'column': '2', 'row': '2' }, { 'width': '60', 'height': '70' }); 83 testPosition("unconstrainedGrid", { 'column': '2', 'row': '2' }, { 'width': '60', 'height': '70' });
87 testPosition("unconstrainedGrid", { 'column': '3', 'row': '2' }, { 'width': '130', 'height': '70' }); 84 testPosition("unconstrainedGrid", { 'column': '3', 'row': '2' }, { 'width': '130', 'height': '70' });
88 testPosition("unconstrainedGrid", { 'column': '4', 'row': '2' }, { 'width': '60', 'height': '70' }); 85 testPosition("unconstrainedGrid", { 'column': '4', 'row': '2' }, { 'width': '60', 'height': '70' });
(...skipping 29 matching lines...) Expand all
118 115
119 <!-- Allow the extra logical space distribution to occur. --> 116 <!-- Allow the extra logical space distribution to occur. -->
120 <div style="width: 1000px; height: 1000px"> 117 <div style="width: 1000px; height: 1000px">
121 <div class="grid gridFixedContent" id="unconstrainedGrid"><div class="sizedT oGridArea">XXXXXX XXXXXX</div></div> 118 <div class="grid gridFixedContent" id="unconstrainedGrid"><div class="sizedT oGridArea">XXXXXX XXXXXX</div></div>
122 </div> 119 </div>
123 120
124 <div id="test-output"></div> 121 <div id="test-output"></div>
125 122
126 </body> 123 </body>
127 </html> 124 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698