From bb90bf0141010788747e419d72a785ab8db2d4d3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Mon, 8 May 2023 23:08:22 +0300 Subject: Tests/LibWeb: Split input/grid/template-areas.html into smaller tests The file template-areas.html, which previously had multiple grid tests, has now been divided into smaller files, each containing only one grid test. It is going to make it easier to identify what inputs have been affected by changes in layout code. Also this change removes parts of template-areas.html that we can't layout correctly yet. --- .../expected/grid/grid-template-areas-basics.txt | 19 +++++ .../LibWeb/Layout/expected/grid/template-areas.txt | 83 ---------------------- .../expected/grid/template-lines-and-areas.txt | 14 ++++ .../Layout/expected/grid/valid-grid-areas-1.txt | 9 +++ .../input/grid/grid-template-areas-basics.html | 29 ++++++++ Tests/LibWeb/Layout/input/grid/template-areas.html | 59 --------------- .../input/grid/template-lines-and-areas.html | 21 ++++++ .../Layout/input/grid/valid-grid-areas-1.html | 14 ++++ Tests/LibWeb/Layout/layout_test.sh | 2 +- 9 files changed, 107 insertions(+), 143 deletions(-) create mode 100644 Tests/LibWeb/Layout/expected/grid/grid-template-areas-basics.txt delete mode 100644 Tests/LibWeb/Layout/expected/grid/template-areas.txt create mode 100644 Tests/LibWeb/Layout/expected/grid/template-lines-and-areas.txt create mode 100644 Tests/LibWeb/Layout/expected/grid/valid-grid-areas-1.txt create mode 100644 Tests/LibWeb/Layout/input/grid/grid-template-areas-basics.html delete mode 100644 Tests/LibWeb/Layout/input/grid/template-areas.html create mode 100644 Tests/LibWeb/Layout/input/grid/template-lines-and-areas.html create mode 100644 Tests/LibWeb/Layout/input/grid/valid-grid-areas-1.html (limited to 'Tests') diff --git a/Tests/LibWeb/Layout/expected/grid/grid-template-areas-basics.txt b/Tests/LibWeb/Layout/expected/grid/grid-template-areas-basics.txt new file mode 100644 index 0000000000..c3701400b9 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/grid-template-areas-basics.txt @@ -0,0 +1,19 @@ +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 784x34.9375 children: not-inline + Box at (8,8) content-size 784x34.9375 [GFC] children: not-inline + BlockContainer at (400,25.46875) content-size 392x17.46875 [BFC] children: inline + line 0 width: 99.703125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 12, rect: [400,25.46875 99.703125x17.46875] + "right-bottom" + TextNode <#text> + BlockContainer at (8,8) content-size 392x34.9375 [BFC] children: inline + line 0 width: 26.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 4, rect: [8,8 26.25x17.46875] + "left" + TextNode <#text> + BlockContainer at (400,8) content-size 392x17.46875 [BFC] children: inline + line 0 width: 70.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 9, rect: [400,8 70.234375x17.46875] + "right-top" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/expected/grid/template-areas.txt b/Tests/LibWeb/Layout/expected/grid/template-areas.txt deleted file mode 100644 index ff752eaff5..0000000000 --- a/Tests/LibWeb/Layout/expected/grid/template-areas.txt +++ /dev/null @@ -1,83 +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 784x104.8125 children: not-inline - Box at (8,8) content-size 784x34.9375 [GFC] children: not-inline - BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer
at (400,25.46875) content-size 392x17.46875 [BFC] children: inline - line 0 width: 99.703125, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 1, length: 12, rect: [400,25.46875 99.703125x17.46875] - "right-bottom" - TextNode <#text> - BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer
at (8,8) content-size 392x34.9375 [BFC] children: inline - line 0 width: 26.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 4, rect: [8,8 26.25x17.46875] - "left" - TextNode <#text> - BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer
at (400,8) content-size 392x17.46875 [BFC] children: inline - line 0 width: 70.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 9, rect: [400,8 70.234375x17.46875] - "right-top" - TextNode <#text> - BlockContainer <(anonymous)> at (8,8) content-size 0x0 [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 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer at (8,42.9375) content-size 261.333343x17.46875 [BFC] children: inline - line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 3, rect: [8,42.9375 21.609375x17.46875] - "1fr" - TextNode <#text> - BlockContainer <(anonymous)> at (8,42.9375) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,60.40625) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,60.40625) content-size 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> at (8,60.40625) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer at (8,60.40625) content-size 392x17.46875 [BFC] children: inline - line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 3, rect: [8,60.40625 21.609375x17.46875] - "1fr" - TextNode <#text> - BlockContainer <(anonymous)> at (8,60.40625) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,77.875) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,77.875) content-size 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> at (8,77.875) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer at (8,77.875) content-size 196x17.46875 [BFC] children: inline - line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 3, rect: [8,77.875 21.609375x17.46875] - "1fr" - TextNode <#text> - BlockContainer <(anonymous)> at (8,77.875) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer <(anonymous)> at (8,95.34375) content-size 784x0 children: inline - TextNode <#text> - TextNode <#text> - TextNode <#text> - Box at (8,95.34375) content-size 784x17.46875 [GFC] children: not-inline - BlockContainer <(anonymous)> at (8,95.34375) content-size 0x0 [BFC] children: inline - TextNode <#text> - BlockContainer at (8,95.34375) content-size 196x17.46875 [BFC] children: inline - line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 3, rect: [8,95.34375 21.609375x17.46875] - "1fr" - TextNode <#text> - BlockContainer <(anonymous)> at (8,95.34375) content-size 0x0 [BFC] children: inline - TextNode <#text> diff --git a/Tests/LibWeb/Layout/expected/grid/template-lines-and-areas.txt b/Tests/LibWeb/Layout/expected/grid/template-lines-and-areas.txt new file mode 100644 index 0000000000..a94c806bd8 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/template-lines-and-areas.txt @@ -0,0 +1,14 @@ +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 784x17.46875 children: not-inline + Box at (8,8) content-size 784x17.46875 [GFC] children: not-inline + BlockContainer at (8,8) content-size 261.333343x17.46875 [BFC] children: inline + line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 3, rect: [8,8 21.609375x17.46875] + "1fr" + TextNode <#text> + BlockContainer at (530.666687,8) content-size 261.333312x17.46875 [BFC] children: inline + line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 3, rect: [530.666687,8 21.609375x17.46875] + "1fr" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/expected/grid/valid-grid-areas-1.txt b/Tests/LibWeb/Layout/expected/grid/valid-grid-areas-1.txt new file mode 100644 index 0000000000..4e26284f6e --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/valid-grid-areas-1.txt @@ -0,0 +1,9 @@ +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 784x17.46875 children: not-inline + Box at (8,8) content-size 784x17.46875 [GFC] children: not-inline + BlockContainer at (8,8) content-size 392x17.46875 [BFC] children: inline + line 0 width: 21.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 3, rect: [8,8 21.609375x17.46875] + "1fr" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/grid/grid-template-areas-basics.html b/Tests/LibWeb/Layout/input/grid/grid-template-areas-basics.html new file mode 100644 index 0000000000..208ab690d6 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/grid-template-areas-basics.html @@ -0,0 +1,29 @@ +
right-bottom
left
right-top
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/template-areas.html b/Tests/LibWeb/Layout/input/grid/template-areas.html deleted file mode 100644 index aa5ab44103..0000000000 --- a/Tests/LibWeb/Layout/input/grid/template-areas.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -
-
- right-bottom
-
left
-
right-top
-
- - - -
-
1fr
-
- - - -
-
1fr
-
- - - -
-
1fr
-
- - - -
-
1fr
-
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/template-lines-and-areas.html b/Tests/LibWeb/Layout/input/grid/template-lines-and-areas.html new file mode 100644 index 0000000000..02f616812e --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/template-lines-and-areas.html @@ -0,0 +1,21 @@ +
1fr
1fr
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/input/grid/valid-grid-areas-1.html b/Tests/LibWeb/Layout/input/grid/valid-grid-areas-1.html new file mode 100644 index 0000000000..ce6611aac7 --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/valid-grid-areas-1.html @@ -0,0 +1,14 @@ +
1fr
\ No newline at end of file diff --git a/Tests/LibWeb/Layout/layout_test.sh b/Tests/LibWeb/Layout/layout_test.sh index e52103ac49..ddc2855783 100755 --- a/Tests/LibWeb/Layout/layout_test.sh +++ b/Tests/LibWeb/Layout/layout_test.sh @@ -12,7 +12,7 @@ fi BROWSER_BINARY="./headless-browser" -find "${SCRIPT_DIR}/input/" -type f -name "*.html" -print0 | while IFS= read -r -d '' input_html_path; do +find "${SCRIPT_DIR}/input/grid" -type f -name "*.html" -print0 | while IFS= read -r -d '' input_html_path; do input_html_file=${input_html_path/${SCRIPT_DIR}"/input/"/} input_html_file=${input_html_file/".html"/} -- cgit v1.2.3