Skip to content

Commit

Permalink
[GridNG] Splitting tests related to track limit to avoid flakiness
Browse files Browse the repository at this point in the history
After increasing the limit of tracks to INT_MAX - 1 in https://crrev.com/c/3668331, four tests were timing out in some
platforms. In this CL, three of them are split and all the grid-auto-repeat-huge-grid-*.html tests are added to SlowTests.

Bug: 1325307
Change-Id: Iceef06e5980baacdec121de6ce7648d09b549aa2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3680642
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1010456}
NOKEYCHECK=True
GitOrigin-RevId: 2404a2c8bd96435139b66a021804fe6f76b05925
  • Loading branch information
Ana SollanoKim authored and copybara-github committed Jun 3, 2022
1 parent fa14c8b commit 3d618fb
Show file tree
Hide file tree
Showing 20 changed files with 383 additions and 309 deletions.
3 changes: 3 additions & 0 deletions blink/web_tests/FlagExpectations/disable-layout-ng
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-013.html [ Fai
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-014.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-015.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-016.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-017.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-018.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-auto-repeat-huge-grid-019.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-item-spanning-and-orthogonal-flows.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html [ Failure ]
crbug.com/1045599 fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html [ Failure ]
Expand Down
19 changes: 19 additions & 0 deletions blink/web_tests/SlowTests
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,25 @@ crbug.com/874695 css3/filters/filter-repaint-composited-fallback.html [ Slow ]
crbug.com/874695 fast/canvas-api/canvas-layerBridgeCrashTest.html [ Slow ]
crbug.com/874695 fast/canvas/canvas-drawImage-animated-images.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/crash-large-positions.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-001.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-002.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-003.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-004.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-005.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-006.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-007.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-008.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-009.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-010.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-011.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-012.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-013.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-014.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-015.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-016.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-017.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-018.html [ Slow ]
crbug.com/874695 fast/css-grid-layout/grid-auto-repeat-huge-grid-019.html [ Slow ]
crbug.com/874695 fast/dnd/dropEffect-for-link.html [ Slow ]
crbug.com/874695 fast/dom/HTMLLinkElement/link-preload-unused.html [ Slow ]
crbug.com/874695 fast/dom/timer-throttling-hidden-page.html [ Slow ]
Expand Down
8 changes: 0 additions & 8 deletions blink/web_tests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -7083,17 +7083,9 @@ crbug.com/1327764 inspector-protocol/overlay/overlay-persistent-overlays.js [ Fa
crbug.com/1322004 http/tests/inspector-protocol/attribution-reporting/insecure-subresource.js [ Pass Timeout ]
crbug.com/1329596 virtual/gpu-rasterization/images/jpeg-with-non-interleaved-dc-channels.html [ Failure Pass ]

# Sheriff 2022-05-27
crbug.com/1325307 fast/css-grid-layout/grid-auto-repeat-huge-grid-003.html [ Skip ]
crbug.com/1325307 fast/css-grid-layout/grid-auto-repeat-huge-grid-009.html [ Skip ]
crbug.com/1325307 fast/css-grid-layout/grid-auto-repeat-huge-grid-010.html [ Skip ]

# Sheriff 2022-05-30
crbug.com/1330238 [ Mac ] http/tests/devtools/elements/styles-3/styles-computed-trace.js [ Failure Pass Timeout ]

# Sheriff 2022-05-31
crbug.com/1330300 fast/css-grid-layout/grid-auto-repeat-huge-grid-006.html [ Pass Timeout ]

# Sheriff 2022-05-31
crbug.com/1330555 external/wpt/service-workers/service-worker/resource-timing-fetch-variants.https.html [ Failure Pass ]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,16 @@
<script src="resources/grid-tracks-length.js"></script>

<div id="autoFillGrid" class="grid tallGrid lotsOfFixedRepeatWithAutoFillRows"></div>
<div id="autoFitGrid" class="grid tallGrid lotsOfFixedRepeatWithAutoFitRows">
<div>Item1</div>
<div>Item2</div>
<div class="lastRow">Item3</div>
</div>

<script>

test(function() {
var autoFillGrid = testElement("autoFillGrid", "grid-template-rows", 3570505);
var autoFitGrid = testElement("autoFitGrid", "grid-template-rows", 5034005);

assert_equals(autoFillGrid[3570505 - 1], "1px");
assert_equals(autoFillGrid[3570505 - 2], "1px");
assert_equals(autoFillGrid[0], "10px");
assert_equals(autoFillGrid[1], "2px");

assert_equals(autoFitGrid[5034005 - 1], "1px");
assert_equals(autoFitGrid[5034005 - 2], "1px");
assert_equals(autoFitGrid[0], "10px");
assert_equals(autoFitGrid[1], "2px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids (normal tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="wideAutoFillGridFewRepetitions" class="grid wideGrid lotsOfAutoRepeatWithAutoFillCols"></div>
<div id="wideAutoFitGridFewRepetitions" class="grid wideGrid lotsOfAutoRepeatWithAutoFitCols">
<div>Item1</div>
<div>Item2</div>
<div class="lastColumn">Item3</div>
</div>

<div id="tallAutoFillGridFewRepetitions" class="grid tallGrid lotsOfAutoRepeatWithAutoFillRows"></div>
<div id="tallAutoFitGridFewRepetitions" class="grid tallGrid lotsOfAutoRepeatWithAutoFitRows">
<div id="autoFitGrid" class="grid tallGrid lotsOfFixedRepeatWithAutoFitRows">
<div>Item1</div>
<div>Item2</div>
<div class="lastRow">Item3</div>
Expand All @@ -27,53 +19,12 @@
<script>

test(function() {
var fillGridElement = document.getElementById("wideAutoFillGridFewRepetitions");
var fitGridElement = document.getElementById("wideAutoFitGridFewRepetitions");

fillGridElement.style.gridGap = "100px";
fitGridElement.style.gridGap = "100px";

var autoFillGrid = testElement("wideAutoFillGridFewRepetitions", "grid-template-columns", 306710);
var autoFitGrid = testElement("wideAutoFitGridFewRepetitions", "grid-template-columns", 314572);

assert_equals(autoFillGrid[306710 - 1], "1px");
assert_equals(autoFillGrid[306710 - 2], "1px");
assert_equals(autoFitGrid[314572 - 1], "1px");
assert_equals(autoFitGrid[314572 - 2], "1px");

fillGridElement.style.gridGap = "1000000px";
fitGridElement.style.gridGap = "1000000px";

testElement("wideAutoFillGridFewRepetitions", "grid-template-columns", 30);
testElement("wideAutoFitGridFewRepetitions", "grid-template-columns", 34);

fillGridElement.style.gridGap = "0px";
fitGridElement.style.gridGap = "0px";
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids with gaps.");

test(function() {
var autoFillGridElement = document.getElementById("tallAutoFillGridFewRepetitions");
var autoFitGridElement = document.getElementById("tallAutoFitGridFewRepetitions");

autoFillGridElement.style.gridGap = "100px";
autoFitGridElement.style.gridGap = "100px";

var autoFillGrid = testElement("tallAutoFillGridFewRepetitions", "grid-template-rows", 306710);
var autoFitGrid = testElement("tallAutoFitGridFewRepetitions", "grid-template-rows", 314572);

assert_equals(autoFillGrid[306710 - 1], "1px");
assert_equals(autoFillGrid[306710 - 2], "1px");
assert_equals(autoFitGrid[314572 - 1], "1px");
assert_equals(autoFitGrid[314572 - 2], "1px");

autoFillGridElement.style.gridGap = "1000000px";
autoFitGridElement.style.gridGap = "1000000px";

testElement("tallAutoFillGridFewRepetitions", "grid-template-rows", 30);
testElement("tallAutoFitGridFewRepetitions", "grid-template-rows", 34);
var autoFitGrid = testElement("autoFitGrid", "grid-template-rows", 5034005);

autoFillGridElement.style.gridGap = "0px";
autoFitGridElement.style.gridGap = "0px";
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids with gaps.");
assert_equals(autoFitGrid[5034005 - 1], "1px");
assert_equals(autoFitGrid[5034005 - 2], "1px");
assert_equals(autoFitGrid[0], "10px");
assert_equals(autoFitGrid[1], "2px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids (normal tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,70 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="wideAutoFillGridReversed" class="grid wideGrid lotsOfFixedRepeatWithAutoFillColsReversed"></div>
<div id="wideAutoFillGridFewRepetitions" class="grid wideGrid lotsOfAutoRepeatWithAutoFillCols"></div>
<div id="wideAutoFitGridFewRepetitions" class="grid wideGrid lotsOfAutoRepeatWithAutoFitCols">
<div>Item1</div>
<div>Item2</div>
<div class="lastColumn">Item3</div>
</div>

<div id="tallAutoFillGridFewRepetitions" class="grid tallGrid lotsOfAutoRepeatWithAutoFillRows"></div>
<div id="tallAutoFitGridFewRepetitions" class="grid tallGrid lotsOfAutoRepeatWithAutoFitRows">
<div>Item1</div>
<div>Item2</div>
<div class="lastRow">Item3</div>
</div>

<script>

test(function() {
var autoFillGrid = testElement("wideAutoFillGridReversed", "grid-template-columns", 3570505);
var fillGridElement = document.getElementById("wideAutoFillGridFewRepetitions");
var fitGridElement = document.getElementById("wideAutoFitGridFewRepetitions");

fillGridElement.style.gridGap = "100px";
fitGridElement.style.gridGap = "100px";

var autoFillGrid = testElement("wideAutoFillGridFewRepetitions", "grid-template-columns", 306710);
var autoFitGrid = testElement("wideAutoFitGridFewRepetitions", "grid-template-columns", 314572);

assert_equals(autoFillGrid[306710 - 1], "1px");
assert_equals(autoFillGrid[306710 - 2], "1px");
assert_equals(autoFitGrid[314572 - 1], "1px");
assert_equals(autoFitGrid[314572 - 2], "1px");

fillGridElement.style.gridGap = "1000000px";
fitGridElement.style.gridGap = "1000000px";

testElement("wideAutoFillGridFewRepetitions", "grid-template-columns", 30);
testElement("wideAutoFitGridFewRepetitions", "grid-template-columns", 34);

fillGridElement.style.gridGap = "0px";
fitGridElement.style.gridGap = "0px";
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids with gaps.");

test(function() {
var autoFillGridElement = document.getElementById("tallAutoFillGridFewRepetitions");
var autoFitGridElement = document.getElementById("tallAutoFitGridFewRepetitions");

autoFillGridElement.style.gridGap = "100px";
autoFitGridElement.style.gridGap = "100px";

var autoFillGrid = testElement("tallAutoFillGridFewRepetitions", "grid-template-rows", 306710);
var autoFitGrid = testElement("tallAutoFitGridFewRepetitions", "grid-template-rows", 314572);

assert_equals(autoFillGrid[306710 - 1], "1px");
assert_equals(autoFillGrid[306710 - 2], "1px");
assert_equals(autoFitGrid[314572 - 1], "1px");
assert_equals(autoFitGrid[314572 - 2], "1px");

autoFillGridElement.style.gridGap = "1000000px";
autoFitGridElement.style.gridGap = "1000000px";

assert_equals(autoFillGrid[3570505 - 1], "20px");
assert_equals(autoFillGrid[3570505 - 2], "7px");
assert_equals(autoFillGrid[0], "1px");
assert_equals(autoFillGrid[1], "1px");
testElement("tallAutoFillGridFewRepetitions", "grid-template-rows", 30);
testElement("tallAutoFitGridFewRepetitions", "grid-template-rows", 34);

}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids (auto repeat tracks clamped).");
autoFillGridElement.style.gridGap = "0px";
autoFitGridElement.style.gridGap = "0px";
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids with gaps.");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="wideAutoFitGridReversed" class="grid wideGrid lotsOfFixedRepeatWithAutoFitColsReversed">
<div>Item1</div>
<div>Item2</div>
<div class="lastColumn">Item3</div>
</div>
<div id="wideAutoFillGridReversed" class="grid wideGrid lotsOfFixedRepeatWithAutoFillColsReversed"></div>

<script>

test(function() {
var autoFitGrid = testElement("wideAutoFitGridReversed", "grid-template-columns", 5034005);
var autoFillGrid = testElement("wideAutoFillGridReversed", "grid-template-columns", 3570505);

assert_equals(autoFillGrid[3570505 - 1], "20px");
assert_equals(autoFillGrid[3570505 - 2], "7px");
assert_equals(autoFillGrid[0], "1px");
assert_equals(autoFillGrid[1], "1px");

assert_equals(autoFitGrid[5034005 - 1], "8px");
assert_equals(autoFitGrid[5034005 - 2], "0px");
assert_equals(autoFitGrid[0], "1px");
assert_equals(autoFitGrid[1], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids (auto repeat tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="tallAutoFillGridReversed" class="grid tallGrid lotsOfFixedRepeatWithAutoFillRowsReversed"></div>
<div id="wideAutoFitGridReversed" class="grid wideGrid lotsOfFixedRepeatWithAutoFitColsReversed">
<div>Item1</div>
<div>Item2</div>
<div class="lastColumn">Item3</div>
</div>

<script>

test(function() {
var autoFillGrid = testElement("tallAutoFillGridReversed", "grid-template-rows", 3570505);
var autoFitGrid = testElement("wideAutoFitGridReversed", "grid-template-columns", 5034005);

assert_equals(autoFillGrid[3570505 - 1], "20px");
assert_equals(autoFillGrid[3570505 - 2], "7px");
assert_equals(autoFillGrid[0], "1px");
assert_equals(autoFillGrid[1], "1px");

}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids (auto repeat tracks clamped).");
assert_equals(autoFitGrid[5034005 - 1], "8px");
assert_equals(autoFitGrid[5034005 - 2], "0px");
assert_equals(autoFitGrid[0], "1px");
assert_equals(autoFitGrid[1], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids (auto repeat tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="tallAutoFitGridReversed" class="grid tallGrid lotsOfFixedRepeatWithAutoFitRowsReversed">
<div>Item1</div>
<div>Item2</div>
<div class="lastRow">Item3</div>
</div>
<div id="tallAutoFillGridReversed" class="grid tallGrid lotsOfFixedRepeatWithAutoFillRowsReversed"></div>

<script>

test(function() {
var autoFitGrid = testElement("tallAutoFitGridReversed", "grid-template-rows", 5034005);
var autoFillGrid = testElement("tallAutoFillGridReversed", "grid-template-rows", 3570505);

assert_equals(autoFillGrid[3570505 - 1], "20px");
assert_equals(autoFillGrid[3570505 - 2], "7px");
assert_equals(autoFillGrid[0], "1px");
assert_equals(autoFillGrid[1], "1px");

assert_equals(autoFitGrid[5034005 - 1], "8px");
assert_equals(autoFitGrid[5034005 - 2], "0px");
assert_equals(autoFitGrid[0], "1px");
assert_equals(autoFitGrid[1], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids (auto repeat tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,21 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="wideAutoFillGridFewRepetitionsMinSize" class="grid lotsOfAutoRepeatWithAutoFillCols minSizeWideGrid min-content"></div>
<div id="wideAutoFitGridFewRepetitionsMinSize" class="grid lotsOfAutoRepeatWithAutoFitCols minSizeWideGrid min-content">
<div id="tallAutoFitGridReversed" class="grid tallGrid lotsOfFixedRepeatWithAutoFitRowsReversed">
<div>Item1</div>
<div>Item2</div>
<div class="lastColumn">Item3</div>
<div class="lastRow">Item3</div>
</div>

<script>

test(function() {
var autoFillCols = testElement("wideAutoFillGridFewRepetitionsMinSize", "grid-template-columns", 3569630);
var autoFitCols = testElement("wideAutoFitGridFewRepetitionsMinSize", "grid-template-columns", 5033170);
var autoFitGrid = testElement("tallAutoFitGridReversed", "grid-template-rows", 5034005);

/* Check that clamping auto repetitions does not reduce the amount of the other tracks. */
assert_equals(autoFillCols[3569630 - 1], "0.390625px");
assert_equals(autoFillCols[3569630 - 2], "0.390625px");
assert_equals(autoFitCols[5033170 - 1], "1px");
assert_equals(autoFitCols[5033170 - 2], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids with gaps and min-width.");
assert_equals(autoFitGrid[5034005 - 1], "8px");
assert_equals(autoFitGrid[5034005 - 2], "0px");
assert_equals(autoFitGrid[0], "1px");
assert_equals(autoFitGrid[1], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids (auto repeat tracks clamped).");

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script src="resources/grid-tracks-length.js"></script>

<div id="tallAutoFillGridFewRepetitionsMinSize" class="grid lotsOfAutoRepeatWithAutoFillRows minSizeTallGrid min-content"></div>
<div id="tallAutoFitGridFewRepetitionsMinSize" class="grid lotsOfAutoRepeatWithAutoFitRows minSizeTallGrid min-content">
<div>Item1</div>
<div>Item2</div>
<div class="lastRow">Item3</div>
</div>
<div id="wideAutoFillGridFewRepetitionsMinSize" class="grid lotsOfAutoRepeatWithAutoFillCols minSizeWideGrid min-content"></div>

<script>

test(function() {
var autoFillRows = testElement("tallAutoFillGridFewRepetitionsMinSize", "grid-template-rows", 3569630);
var autoFitRows = testElement("tallAutoFitGridFewRepetitionsMinSize", "grid-template-rows", 5033173);
var autoFillCols = testElement("wideAutoFillGridFewRepetitionsMinSize", "grid-template-columns", 3569630);

assert_equals(autoFillRows[3569630 - 1], "0.390625px");
assert_equals(autoFillRows[3569630 - 2], "0.390625px");
assert_equals(autoFitRows[5033173 - 1], "1px");
assert_equals(autoFitRows[5033173 - 2], "1px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very tall grids with gaps and min-height.");
/* Check that clamping auto repetitions does not reduce the amount of the other tracks. */
assert_equals(autoFillCols[3569630 - 1], "0.390625px");
assert_equals(autoFillCols[3569630 - 2], "0.390625px");
}, "Test that we don't get more than kGridMaxTracks repetitions even on very wide grids with gaps and min-width.");

</script>
Loading

0 comments on commit 3d618fb

Please sign in to comment.