From 6267037a74217d3f87ce619f91e0fc40f29f2c6e Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 24 Aug 2023 18:14:36 +0200 Subject: [PATCH] Tests/LibWeb: Split grid/positions-and-spans.html into smaller tests This giant grid test has been a source of problems while iterating on GFC for a long time. Let's split it into smaller tests to make it easier to identify issues without needing further reductions on the test. --- .../Layout/expected/grid/placement-1.txt | 23 ++++ .../Layout/expected/grid/placement-2.txt | 23 ++++ .../Layout/expected/grid/placement-3.txt | 23 ++++ .../Layout/expected/grid/placement-4.txt | 23 ++++ .../expected/grid/positions-and-spans.txt | 110 ------------------ .../LibWeb/Layout/input/grid/placement-1.html | 18 +++ .../LibWeb/Layout/input/grid/placement-2.html | 20 ++++ .../LibWeb/Layout/input/grid/placement-3.html | 18 +++ .../LibWeb/Layout/input/grid/placement-4.html | 15 +++ .../input/grid/positions-and-spans.html | 63 ---------- 10 files changed, 163 insertions(+), 173 deletions(-) create mode 100644 Tests/LibWeb/Layout/expected/grid/placement-1.txt create mode 100644 Tests/LibWeb/Layout/expected/grid/placement-2.txt create mode 100644 Tests/LibWeb/Layout/expected/grid/placement-3.txt create mode 100644 Tests/LibWeb/Layout/expected/grid/placement-4.txt delete mode 100644 Tests/LibWeb/Layout/expected/grid/positions-and-spans.txt create mode 100644 Tests/LibWeb/Layout/input/grid/placement-1.html create mode 100644 Tests/LibWeb/Layout/input/grid/placement-2.html create mode 100644 Tests/LibWeb/Layout/input/grid/placement-3.html create mode 100644 Tests/LibWeb/Layout/input/grid/placement-4.html delete mode 100644 Tests/LibWeb/Layout/input/grid/positions-and-spans.html diff --git a/Tests/LibWeb/Layout/expected/grid/placement-1.txt b/Tests/LibWeb/Layout/expected/grid/placement-1.txt new file mode 100644 index 0000000000..07b3f2f309 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/placement-1.txt @@ -0,0 +1,23 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (1,1) content-size 798x600 [BFC] children: not-inline + BlockContainer at (10,10) content-size 780x21.46875 children: not-inline + Box at (11,11) content-size 778x19.46875 [GFC] children: not-inline + BlockContainer at (12,12) content-size 516.125x17.46875 [BFC] children: inline + line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,12 6.34375x17.46875] + "1" + TextNode <#text> + BlockContainer at (530.125,12) content-size 257.0625x17.46875 [BFC] children: inline + line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [530.125,12 8.8125x17.46875] + "2" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x602] + PaintableWithLines (BlockContainer) [0,0 800x602] + PaintableWithLines (BlockContainer) [9,9 782x23.46875] + PaintableBox (Box
.grid-container) [10,10 780x21.46875] + PaintableWithLines (BlockContainer
.a) [11,11 518.125x19.46875] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer
.b) [529.125,11 259.0625x19.46875] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/grid/placement-2.txt b/Tests/LibWeb/Layout/expected/grid/placement-2.txt new file mode 100644 index 0000000000..465015fb73 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/placement-2.txt @@ -0,0 +1,23 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (1,1) content-size 798x600 [BFC] children: not-inline + BlockContainer at (10,10) content-size 780x21.46875 children: not-inline + Box at (11,11) content-size 778x19.46875 [GFC] children: not-inline + BlockContainer at (12,12) content-size 257.0625x17.46875 [BFC] children: inline + line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,12 6.34375x17.46875] + "1" + TextNode <#text> + BlockContainer at (271.0625,12) content-size 516.125x17.46875 [BFC] children: inline + line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [271.0625,12 8.8125x17.46875] + "2" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x602] + PaintableWithLines (BlockContainer) [0,0 800x602] + PaintableWithLines (BlockContainer) [9,9 782x23.46875] + PaintableBox (Box
.grid-container) [10,10 780x21.46875] + PaintableWithLines (BlockContainer
.grid-item.a) [11,11 259.0625x19.46875] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer
.grid-item.b) [270.0625,11 518.125x19.46875] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/grid/placement-3.txt b/Tests/LibWeb/Layout/expected/grid/placement-3.txt new file mode 100644 index 0000000000..426ccf2914 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/placement-3.txt @@ -0,0 +1,23 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (1,1) content-size 798x600 [BFC] children: not-inline + BlockContainer at (10,10) content-size 780x102 children: not-inline + Box at (11,11) content-size 778x100 [GFC] children: not-inline + BlockContainer at (12,12) content-size 776x38 [BFC] children: inline + line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,12 6.34375x17.46875] + "1" + TextNode <#text> + BlockContainer at (12,52) content-size 776x58 [BFC] children: inline + line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,52 8.8125x17.46875] + "2" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x602] + PaintableWithLines (BlockContainer) [0,0 800x602] + PaintableWithLines (BlockContainer) [9,9 782x104] + PaintableBox (Box
.grid-container) [10,10 780x102] + PaintableWithLines (BlockContainer
.a) [11,11 778x40] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer
.b) [11,51 778x60] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/grid/placement-4.txt b/Tests/LibWeb/Layout/expected/grid/placement-4.txt new file mode 100644 index 0000000000..3775c8125d --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/placement-4.txt @@ -0,0 +1,23 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (1,1) content-size 798x600 [BFC] children: not-inline + BlockContainer at (10,10) content-size 780x40.9375 children: not-inline + Box at (11,11) content-size 778x38.9375 [GFC] children: not-inline + BlockContainer at (12,12) content-size 776x17.46875 [BFC] children: inline + line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,12 6.34375x17.46875] + "1" + TextNode <#text> + BlockContainer
at (12,31.46875) content-size 387x17.46875 [BFC] children: inline + line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 1, rect: [12,31.46875 8.8125x17.46875] + "2" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x602] + PaintableWithLines (BlockContainer) [0,0 800x602] + PaintableWithLines (BlockContainer) [9,9 782x42.9375] + PaintableBox (Box
.grid-container) [10,10 780x40.9375] + PaintableWithLines (BlockContainer
.a) [11,11 778x19.46875] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer
) [11,30.46875 389x19.46875] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/grid/positions-and-spans.txt b/Tests/LibWeb/Layout/expected/grid/positions-and-spans.txt deleted file mode 100644 index 8125795209..0000000000 --- a/Tests/LibWeb/Layout/expected/grid/positions-and-spans.txt +++ /dev/null @@ -1,110 +0,0 @@ -Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer at (8,8) content-size 784x169.875 children: not-inline - Box at (8,8) content-size 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,8) content-size 522.5x17.46875 [BFC] children: inline - line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,8 6.34375x17.46875] - "1" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (530.5,8) content-size 261.25x17.46875 [BFC] children: inline - line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [530.5,8 8.8125x17.46875] - "2" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,25.46875) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,25.46875) content-size 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,25.46875) content-size 261.25x17.46875 [BFC] children: inline - line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,25.46875 6.34375x17.46875] - "1" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (269.25,25.46875) content-size 522.5x17.46875 [BFC] children: inline - line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [269.25,25.46875 8.8125x17.46875] - "2" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,42.9375) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,42.9375) content-size 784x100 [GFC] children: not-inline - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,42.9375) content-size 784x40 [BFC] children: inline - line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,42.9375 6.34375x17.46875] - "1" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,82.9375) content-size 784x60 [BFC] children: inline - line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,82.9375 8.8125x17.46875] - "2" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,142.9375) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,142.9375) content-size 784x34.9375 [GFC] children: not-inline - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,142.9375) content-size 784x17.46875 [BFC] children: inline - line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,142.9375 6.34375x17.46875] - "1" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - BlockContainer at (8,160.40625) content-size 392x17.46875 [BFC] children: inline - line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 1, rect: [8,160.40625 6.34375x17.46875] - "1" - TextNode <#text> - BlockContainer <(anonymous)> (not painted) [BFC] children: inline - TextNode <#text> - -ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x600] - PaintableWithLines (BlockContainer) [8,8 784x169.875] - PaintableBox (Box
.grid-container) [8,8 784x17.46875] - PaintableWithLines (BlockContainer
.grid-item) [8,8 522.5x17.46875] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer
.grid-item) [530.5,8 261.25x17.46875] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,25.46875 784x0] - PaintableBox (Box
.grid-container) [8,25.46875 784x17.46875] - PaintableWithLines (BlockContainer
.grid-item) [8,25.46875 261.25x17.46875] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer
.grid-item) [269.25,25.46875 522.5x17.46875] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,42.9375 784x0] - PaintableBox (Box
.grid-container) [8,42.9375 784x100] - PaintableWithLines (BlockContainer
.grid-item) [8,42.9375 784x40] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer
.grid-item) [8,82.9375 784x60] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,142.9375 784x0] - PaintableBox (Box
.grid-container) [8,142.9375 784x34.9375] - PaintableWithLines (BlockContainer
.grid-item) [8,142.9375 784x17.46875] - TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer
.grid-item) [8,160.40625 392x17.46875] - TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/input/grid/placement-1.html b/Tests/LibWeb/Layout/input/grid/placement-1.html new file mode 100644 index 0000000000..31981c8982 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/placement-1.html @@ -0,0 +1,18 @@ +
1
2
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/placement-2.html b/Tests/LibWeb/Layout/input/grid/placement-2.html new file mode 100644 index 0000000000..77bf69a22d --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/placement-2.html @@ -0,0 +1,20 @@ +
1
2
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/placement-3.html b/Tests/LibWeb/Layout/input/grid/placement-3.html new file mode 100644 index 0000000000..10be1a3669 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/placement-3.html @@ -0,0 +1,18 @@ +
1
2
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/placement-4.html b/Tests/LibWeb/Layout/input/grid/placement-4.html new file mode 100644 index 0000000000..5f743f016f --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/placement-4.html @@ -0,0 +1,15 @@ +
1
2
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/positions-and-spans.html b/Tests/LibWeb/Layout/input/grid/positions-and-spans.html deleted file mode 100644 index 5f88180ffc..0000000000 --- a/Tests/LibWeb/Layout/input/grid/positions-and-spans.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - -
-
1
-
2
-
- - - -
-
1
-
2
-
- - - -
-
1
-
2
-
- - - -
-
1
-
1
-
\ No newline at end of file