Skip to content

Commit cb593bd

Browse files
committed
Move layout checking js script into LayoutTest/resources and generalize
https://bugs.webkit.org/show_bug.cgi?id=91268 Reviewed by Ojan Vafai. flexbox.js contains helper scripts for verifying the size and position of nodes. I will be writing similar tests for grid, so move the js file into a location for sharing and generalize the script. * css3/flexbox/align-absolute-child.html: Change include path and call. * css3/flexbox/auto-height-dynamic.html: * css3/flexbox/columns-auto-size.html: * css3/flexbox/flex-algorithm-min-max.html: * css3/flexbox/flex-algorithm-with-margins.html: * css3/flexbox/flex-algorithm.html: * css3/flexbox/flex-align-column.html: * css3/flexbox/flex-align-end.html: * css3/flexbox/flex-align-max.html: * css3/flexbox/flex-align-percent-height.html: * css3/flexbox/flex-align-stretch.html: * css3/flexbox/flex-align-vertical-writing-mode.html: * css3/flexbox/flex-align.html: * css3/flexbox/flex-flow-auto-margins.html: * css3/flexbox/flex-flow-border.html: * css3/flexbox/flex-flow-margins-auto-size.html: * css3/flexbox/flex-flow-margins.html: * css3/flexbox/flex-flow-orientations.html: * css3/flexbox/flex-flow-overflow.html: * css3/flexbox/flex-flow-padding.html: * css3/flexbox/flex-flow.html: * css3/flexbox/flex-item-child-overflow.html: * css3/flexbox/flex-item-min-size.html: * css3/flexbox/flex-justify-content.html: * css3/flexbox/flex-no-flex.html: * css3/flexbox/flexitem.html: * css3/flexbox/floated-flexbox.html: * css3/flexbox/line-wrapping.html: * css3/flexbox/multiline-align-content-horizontal-column.html: * css3/flexbox/multiline-align-content.html: * css3/flexbox/multiline-align-self.html: * css3/flexbox/multiline-column-auto.html: * css3/flexbox/multiline-justify-content.html: * css3/flexbox/multiline-reverse-wrap-overflow.html: * css3/flexbox/multiline.html: * css3/flexbox/nested-stretch.html: * css3/flexbox/orthogonal-flex-directions.html: * css3/flexbox/perpendicular-writing-modes-inside-flex-item.html: * css3/flexbox/position-absolute-child.html: * css3/flexbox/preferred-widths-orthogonal.html: * css3/flexbox/preferred-widths.html: * css3/flexbox/style-change.html: * css3/flexbox/true-centering.html: * css3/flexbox/writing-modes.html: * resources/check-layout.js: Renamed from LayoutTests/css3/flexbox/resources/flexbox.js. (.): Rename checkFlexboxen to checkLayout that takes a CSS selector. Hide functions in a closure. Canonical link: https://commits.webkit.org/109095@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent a8ccec4 commit cb593bd

47 files changed

Lines changed: 162 additions & 96 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LayoutTests/ChangeLog

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
2012-07-13 Tony Chang <tony@chromium.org>
2+
3+
Move layout checking js script into LayoutTest/resources and generalize
4+
https://bugs.webkit.org/show_bug.cgi?id=91268
5+
6+
Reviewed by Ojan Vafai.
7+
8+
flexbox.js contains helper scripts for verifying the size and position of nodes.
9+
I will be writing similar tests for grid, so move the js file into a location
10+
for sharing and generalize the script.
11+
12+
* css3/flexbox/align-absolute-child.html: Change include path and call.
13+
* css3/flexbox/auto-height-dynamic.html:
14+
* css3/flexbox/columns-auto-size.html:
15+
* css3/flexbox/flex-algorithm-min-max.html:
16+
* css3/flexbox/flex-algorithm-with-margins.html:
17+
* css3/flexbox/flex-algorithm.html:
18+
* css3/flexbox/flex-align-column.html:
19+
* css3/flexbox/flex-align-end.html:
20+
* css3/flexbox/flex-align-max.html:
21+
* css3/flexbox/flex-align-percent-height.html:
22+
* css3/flexbox/flex-align-stretch.html:
23+
* css3/flexbox/flex-align-vertical-writing-mode.html:
24+
* css3/flexbox/flex-align.html:
25+
* css3/flexbox/flex-flow-auto-margins.html:
26+
* css3/flexbox/flex-flow-border.html:
27+
* css3/flexbox/flex-flow-margins-auto-size.html:
28+
* css3/flexbox/flex-flow-margins.html:
29+
* css3/flexbox/flex-flow-orientations.html:
30+
* css3/flexbox/flex-flow-overflow.html:
31+
* css3/flexbox/flex-flow-padding.html:
32+
* css3/flexbox/flex-flow.html:
33+
* css3/flexbox/flex-item-child-overflow.html:
34+
* css3/flexbox/flex-item-min-size.html:
35+
* css3/flexbox/flex-justify-content.html:
36+
* css3/flexbox/flex-no-flex.html:
37+
* css3/flexbox/flexitem.html:
38+
* css3/flexbox/floated-flexbox.html:
39+
* css3/flexbox/line-wrapping.html:
40+
* css3/flexbox/multiline-align-content-horizontal-column.html:
41+
* css3/flexbox/multiline-align-content.html:
42+
* css3/flexbox/multiline-align-self.html:
43+
* css3/flexbox/multiline-column-auto.html:
44+
* css3/flexbox/multiline-justify-content.html:
45+
* css3/flexbox/multiline-reverse-wrap-overflow.html:
46+
* css3/flexbox/multiline.html:
47+
* css3/flexbox/nested-stretch.html:
48+
* css3/flexbox/orthogonal-flex-directions.html:
49+
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
50+
* css3/flexbox/position-absolute-child.html:
51+
* css3/flexbox/preferred-widths-orthogonal.html:
52+
* css3/flexbox/preferred-widths.html:
53+
* css3/flexbox/style-change.html:
54+
* css3/flexbox/true-centering.html:
55+
* css3/flexbox/writing-modes.html:
56+
* resources/check-layout.js: Renamed from LayoutTests/css3/flexbox/resources/flexbox.js.
57+
(.): Rename checkFlexboxen to checkLayout that takes a CSS selector. Hide functions in a closure.
58+
159
2012-07-13 Zan Dobersek <zandobersek@gmail.com>
260

361
Unreviewed GTK gardening, adding a baseline required after unskipping

LayoutTests/css3/flexbox/align-absolute-child.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
</style>
9595

9696
<script src="../../fast/js/resources/js-test-pre.js"></script>
97-
<script src="resources/flexbox.js"></script>
97+
<script src="../../resources/check-layout.js"></script>
9898

99-
<body onload="checkFlexBoxen()">
99+
<body onload="checkLayout('.flexbox')">
100100

101101
<div class='flexbox relative align-center'>
102102
<div id='placed-absolute' class='absolute' data-offset-x=20 data-offset-y=20></div>

LayoutTests/css3/flexbox/auto-height-dynamic.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
if (window.testRunner)
1717
testRunner.dumpAsText();
1818
</script>
19-
<script src="resources/flexbox.js"></script>
20-
<body onload="checkFlexBoxen()">
19+
<script src="../../resources/check-layout.js"></script>
20+
<body onload="checkLayout('.flexbox')">
2121

2222
<div class="flexbox" data-expected-height=0>
2323
<div class="flexitem" data-expected-height=0 style="-webkit-flex: 100px"></div>

LayoutTests/css3/flexbox/columns-auto-size.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
if (window.testRunner)
4747
testRunner.dumpAsText();
4848
</script>
49-
<script src="resources/flexbox.js"></script>
50-
<body onload="checkFlexBoxen()">
49+
<script src="../../resources/check-layout.js"></script>
50+
<body onload="checkLayout('.flexbox')">
5151
<div class="flexbox horizontal">
5252
<div data-expected-height="10" data-offset-y="0" style="-webkit-flex: 1 0 10px"></div>
5353
<div data-expected-height="10" data-offset-y="10" style="height: 10px;"></div>

LayoutTests/css3/flexbox/flex-algorithm-min-max.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
if (window.testRunner)
3030
testRunner.dumpAsText();
3131
</script>
32-
<script src="resources/flexbox.js"></script>
33-
<body onload="checkFlexBoxen()">
32+
<script src="../../resources/check-layout.js"></script>
33+
<body onload="checkLayout('.flexbox')">
3434
<div class="flexbox">
3535
<div data-expected-width="100" style="-webkit-flex: 1 0 0; max-width: 100px;"></div>
3636
<div data-expected-width="250" style="-webkit-flex: 1 0 0;"></div>

LayoutTests/css3/flexbox/flex-algorithm-with-margins.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
if (window.testRunner)
3030
testRunner.dumpAsText();
3131
</script>
32-
<script src="resources/flexbox.js"></script>
33-
<body onload="checkFlexBoxen()">
32+
<script src="../../resources/check-layout.js"></script>
33+
<body onload="checkLayout('.flexbox')">
3434
<div class="flexbox">
3535
<div data-expected-width="200" style="-webkit-flex: 1 0 0;"></div>
3636
<div data-expected-width="100" data-offset-x="250" style="width: 100px; margin: 0 50px; -webkit-flex: none;"></div>

LayoutTests/css3/flexbox/flex-algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
if (window.testRunner)
2828
testRunner.dumpAsText();
2929
</script>
30-
<script src="resources/flexbox.js"></script>
31-
<body onload="checkFlexBoxen()">
30+
<script src="../../resources/check-layout.js"></script>
31+
<body onload="checkLayout('.flexbox')">
3232

3333
<div class="flexbox">
3434
<div data-expected-width="200" style="-webkit-flex: 1"></div>

LayoutTests/css3/flexbox/flex-align-column.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
if (window.testRunner)
4242
testRunner.dumpAsText();
4343
</script>
44-
<script src="resources/flexbox.js"></script>
45-
<body onload="checkFlexBoxen()">
44+
<script src="../../resources/check-layout.js"></script>
45+
<body onload="checkLayout('.flexbox')">
4646

4747
<div class="flexbox">
4848
<div data-offset-x=0 data-expected-width=600 data-expected-height=40 style="-webkit-flex: 1;"></div>

LayoutTests/css3/flexbox/flex-align-end.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
if (window.testRunner)
5757
testRunner.dumpAsText();
5858
</script>
59-
<script src="resources/flexbox.js"></script>
60-
<body onload="checkFlexBoxen()">
59+
<script src="../../resources/check-layout.js"></script>
60+
<body onload="checkLayout('.flexbox')">
6161

6262
<script>
6363
function positionAsString(position)

LayoutTests/css3/flexbox/flex-align-max.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
if (window.testRunner)
3333
testRunner.dumpAsText();
3434
</script>
35-
<script src="resources/flexbox.js"></script>
36-
<body onload="checkFlexBoxen()">
35+
<script src="../../resources/check-layout.js"></script>
36+
<body onload="checkLayout('.flexbox')">
3737

3838
<div class="flexbox">
3939
<div data-expected-height="50" style="-webkit-flex: 1 0 0; max-height: 100px"></div>

0 commit comments

Comments
 (0)