-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-import html/rendering/widgets WPT tests
https://bugs.webkit.org/show_bug.cgi?id=274462 Reviewed by Tim Nguyen. Upstream commit: web-platform-tests/wpt@4593ea7 * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/resources/resource-files.json: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/WEB_FEATURES.yml: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/computed-style-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/computed-style.html: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/display-none-or-contents-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/display-none-or-contents-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/display-none-or-contents.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-date-baseline-print-expected.html: Removed. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-password-background-suppresses-appearance-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-password-background-suppresses-appearance-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-password-background-suppresses-appearance.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-text-size-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-text-size.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-cols-rows-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-cols-rows.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-002-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-002.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/w3c-import.log: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/computed-style-expected.txt: Canonical link: https://commits.webkit.org/279080@main
- Loading branch information
1 parent
7b0ca13
commit 8f9c15b
Showing
26 changed files
with
396 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/WEB_FEATURES.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
features: | ||
- name: field-sizing | ||
files: | ||
- field-sizing-* |
32 changes: 32 additions & 0 deletions
32
...d/w3c/web-platform-tests/html/rendering/widgets/button-layout/computed-style-expected.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...latform-tests/html/rendering/widgets/button-layout/display-none-or-contents-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!DOCTYPE html> | ||
<title>button (in button layout) with display: none/contents</title> | ||
2 |
3 changes: 3 additions & 0 deletions
3
...web-platform-tests/html/rendering/widgets/button-layout/display-none-or-contents-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!DOCTYPE html> | ||
<title>button (in button layout) with display: none/contents</title> | ||
2 |
12 changes: 12 additions & 0 deletions
12
...w3c/web-platform-tests/html/rendering/widgets/button-layout/display-none-or-contents.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<title>button (in button layout) with display: none/contents</title> | ||
<link rel=match href=display-none-or-contents-ref.html> | ||
<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#button-layout-2> | ||
<style> | ||
#none{ display: none} | ||
#contents { display: contents; font: initial } | ||
</style> | ||
<!-- Button layout should not impact "display: none" or "display: contents" on button elements --> | ||
<!-- https://github.com/whatwg/html/pull/10244 --> | ||
<button id=none>1</button> | ||
<button id=contents>2</button> |
9 changes: 9 additions & 0 deletions
9
...-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!doctype html> | ||
<style> | ||
button { | ||
width: 10ch; | ||
overflow: clip; | ||
text-overflow: ellipsis; | ||
} | ||
</style> | ||
<button>aaaaaaaaaaaaaaaaaaaaaa</button> |
9 changes: 9 additions & 0 deletions
9
...c/web-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!doctype html> | ||
<style> | ||
button { | ||
width: 10ch; | ||
overflow: clip; | ||
text-overflow: ellipsis; | ||
} | ||
</style> | ||
<button>aaaaaaaaaaaaaaaaaaaaaa</button> |
15 changes: 15 additions & 0 deletions
15
...d/w3c/web-platform-tests/html/rendering/widgets/button-layout/input-type-button-clip.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>button input is clipped by default, and text-overflow: ellipsis works</title> | ||
<link rel="help" href="https://github.com/whatwg/html/issues/9976"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1800077"> | ||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> | ||
<link rel="author" title="Mozilla" href="https://mozilla.org"> | ||
<link rel="match" href="input-type-button-clip-ref.html"> | ||
<style> | ||
input { | ||
width: 10ch; | ||
text-overflow: ellipsis; | ||
} | ||
</style> | ||
<input type="button" value="aaaaaaaaaaaaaaaaaaaaaa"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
...ted/w3c/web-platform-tests/html/rendering/widgets/input-date-baseline-print-expected.html
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...ests/html/rendering/widgets/input-password-background-suppresses-appearance-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<input type="password" style="appearance: none; background-color: blue"> |
3 changes: 3 additions & 0 deletions
3
...orm-tests/html/rendering/widgets/input-password-background-suppresses-appearance-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<input type="password" style="appearance: none; background-color: blue"> |
7 changes: 7 additions & 0 deletions
7
...latform-tests/html/rendering/widgets/input-password-background-suppresses-appearance.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1895561"> | ||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> | ||
<link rel="match" href="input-password-background-suppresses-appearance-ref.html"> | ||
<title>backgrounds disable native password input appearance</title> | ||
<input type="password" style="background-color: blue"> |
8 changes: 8 additions & 0 deletions
8
...Tests/imported/w3c/web-platform-tests/html/rendering/widgets/input-text-size-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
PASS A misssing attribute is equivalent to size=20 | ||
PASS An invalid attribute value is equivalent to size=20 | ||
PASS The width depends on a size attribute | ||
PASS Size attribute value affects layout-dependent computed style | ||
PASS Size attribute value is not a presentational hint | ||
|
45 changes: 45 additions & 0 deletions
45
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-text-size.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://html.spec.whatwg.org/C/#the-input-element-as-a-text-entry-widget"> | ||
<title>Test `size` attribute behaivor</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<body> | ||
|
||
<input id="missing"> | ||
<input id="invalid" size="-1"> | ||
<input id="size0" size="0"> | ||
<input id="size1" size="1"> | ||
<input id="size10" size="10"> | ||
<input id="size20" size="20"> | ||
<input id="size21" size="21"> | ||
<input id="computed" style="border:none; padding:0;" size="19"> | ||
<input id="computedNone" style="display:none" size="17"> | ||
|
||
<script> | ||
test(() => { | ||
assert_equals(missing.offsetWidth, size20.offsetWidth); | ||
}, 'A misssing attribute is equivalent to size=20'); | ||
|
||
test(() => { | ||
assert_equals(invalid.offsetWidth, size20.offsetWidth, 'size="-1"'); | ||
assert_equals(size0.offsetWidth, size20.offsetWidth, 'size="0"'); | ||
}, 'An invalid attribute value is equivalent to size=20'); | ||
|
||
test(() => { | ||
assert_less_than(size1.offsetWidth, size10.offsetWidth, '1 < 10'); | ||
assert_less_than(size10.offsetWidth, size20.offsetWidth, '10 < 20'); | ||
assert_less_than(size20.offsetWidth, size21.offsetWidth, '20 < 21'); | ||
}, 'The width depends on a size attribute'); | ||
|
||
test(() => { | ||
const computedString = getComputedStyle(computed).width; | ||
assert_equals(computed.offsetWidth, | ||
Math.round(computedString.substring(0, computedString.length - 2))); | ||
}, 'Size attribute value affects layout-dependent computed style'); | ||
|
||
test(() => { | ||
const computedString = getComputedStyle(computedNone).width; | ||
assert_equals(computedString, 'auto'); | ||
}, 'Size attribute value is not a presentational hint'); | ||
</script> | ||
|
9 changes: 9 additions & 0 deletions
9
...ts/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-cols-rows-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
PASS A misssing attribute is equivalent to cols=20 rows=2 | ||
PASS An invalid attribute value is equivalent to cols=20 rows=2 | ||
PASS The width depends on a cols attribute | ||
PASS The height depends on a rows attribute | ||
PASS Cols/rows attribute values affect layout-dependent computed style | ||
PASS Cols/rows attribute values are not presentational hints | ||
|
64 changes: 64 additions & 0 deletions
64
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/textarea-cols-rows.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://html.spec.whatwg.org/C/#the-textarea-element-2"> | ||
<title>Test `cols` `rows` attributes behaivor</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<body> | ||
|
||
<textarea id="missing"></textarea> | ||
<textarea id="invalid" cols="-1" rows="-1"></textarea> | ||
<textarea id="computed" style="border:none; padding:0;" cols="19" rows="5"></textarea> | ||
<textarea id="computedNone" style="display:none" cols="17" rows="7"></textarea> | ||
|
||
<textarea id="cols0" cols="0"></textarea> | ||
<textarea id="cols1" cols="1"></textarea> | ||
<textarea id="cols10" cols="10"></textarea> | ||
<textarea id="cols20" cols="20"></textarea> | ||
<textarea id="cols21" cols="21"></textarea> | ||
|
||
<textarea id="rows0" rows="0"></textarea> | ||
<textarea id="rows1" rows="1"></textarea> | ||
<textarea id="rows2" rows="2"></textarea> | ||
<textarea id="rows3" rows="3"></textarea> | ||
|
||
<script> | ||
test(() => { | ||
assert_equals(missing.offsetWidth, cols20.offsetWidth); | ||
assert_equals(missing.offsetHeight, rows2.offsetHeight); | ||
}, 'A misssing attribute is equivalent to cols=20 rows=2'); | ||
|
||
test(() => { | ||
assert_equals(invalid.offsetWidth, cols20.offsetWidth); | ||
assert_equals(invalid.offsetHeight, rows2.offsetHeight); | ||
assert_equals(cols0.offsetWidth, cols20.offsetWidth); | ||
assert_equals(rows0.offsetHeight, rows2.offsetHeight); | ||
}, 'An invalid attribute value is equivalent to cols=20 rows=2'); | ||
|
||
test(() => { | ||
assert_less_than(cols1.offsetWidth, cols10.offsetWidth, '1 < 10'); | ||
assert_less_than(cols10.offsetWidth, cols20.offsetWidth, '10 < 20'); | ||
assert_less_than(cols20.offsetWidth, cols21.offsetWidth, '20 < 21'); | ||
}, 'The width depends on a cols attribute'); | ||
|
||
test(() => { | ||
assert_less_than(rows1.offsetHeight, rows2.offsetHeight, '1 < 2'); | ||
assert_less_than(rows2.offsetHeight, rows3.offsetHeight, '2 < 3'); | ||
}, 'The height depends on a rows attribute'); | ||
|
||
test(() => { | ||
const computedWidth = getComputedStyle(computed).width; | ||
assert_equals(computed.offsetWidth, | ||
parseInt(computedWidth.substring(0, computedWidth.length - 2))); | ||
|
||
const computedHeight = getComputedStyle(computed).height; | ||
assert_equals(computed.offsetHeight, | ||
parseInt(computedHeight.substring(0, computedHeight.length - 2))); | ||
}, 'Cols/rows attribute values affect layout-dependent computed style'); | ||
|
||
test(() => { | ||
const computedNoneStyle = getComputedStyle(computedNone); | ||
assert_equals(computedNoneStyle.width, 'auto'); | ||
assert_equals(computedNoneStyle.height, 'auto'); | ||
}, 'Cols/rows attribute values are not presentational hints'); | ||
</script> | ||
|
6 changes: 6 additions & 0 deletions
6
.../w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-001-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
PASS rows=1 doesnt include scrollbar thickness | ||
PASS rows=1 overflow scroll includes scrollbar thickness | ||
PASS cols=3 includes scrollbar thickness | ||
|
42 changes: 42 additions & 0 deletions
42
...imported/w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://html.spec.whatwg.org/C/#the-textarea-element-2"> | ||
<title>Test textarea width and height accounting for scrollbars</title> | ||
<meta name="author" title="Luke Warlow" href="mailto:lwarlow@igalia.com"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<body> | ||
<textarea id="rows1" rows="1"></textarea> | ||
<textarea id="rows1Hidden" rows="1" style="overflow-x: hidden"></textarea> | ||
<textarea id="rows1Scroll" rows="1" style="overflow-x: scroll"></textarea> | ||
<textarea id="cols3" cols="3"></textarea> | ||
<textarea id="cols3Hidden" cols="3" style="overflow-y: hidden"></textarea> | ||
<textarea id="cols3Scroll" cols="3" style="overflow-y: scroll"></textarea> | ||
<div id="scrollableDiv" style="overflow:scroll"></div> | ||
|
||
<script> | ||
const scrollbarsHaveThickness = (scrollableDiv.offsetHeight != 0); | ||
test(() => { | ||
assert_equals(rows1.offsetWidth, rows1Hidden.offsetWidth); | ||
assert_equals(rows1.offsetHeight, rows1Hidden.offsetHeight); | ||
}, 'rows=1 doesnt include scrollbar thickness'); | ||
|
||
test(() => { | ||
assert_equals(rows1.offsetWidth, rows1Scroll.offsetWidth); | ||
if (scrollbarsHaveThickness) { | ||
assert_less_than(rows1.offsetHeight, rows1Scroll.offsetHeight); | ||
} else { | ||
assert_equals(rows1.offsetHeight, rows1Scroll.offsetHeight); | ||
} | ||
}, 'rows=1 overflow scroll includes scrollbar thickness'); | ||
|
||
test(() => { | ||
assert_equals(cols3.offsetWidth, cols3Scroll.offsetWidth); | ||
if (scrollbarsHaveThickness) { | ||
assert_greater_than(cols3.offsetWidth, cols3Hidden.offsetWidth); | ||
} else { | ||
assert_equals(cols3.offsetWidth, cols3Hidden.offsetWidth); | ||
} | ||
assert_equals(cols3.offsetHeight, cols3Scroll.offsetHeight); | ||
assert_equals(cols3.offsetHeight, cols3Hidden.offsetHeight); | ||
}, 'cols=3 includes scrollbar thickness'); | ||
</script> |
6 changes: 6 additions & 0 deletions
6
.../w3c/web-platform-tests/html/rendering/widgets/textarea-scrollbar-sizing-002-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
FAIL rows=1 doesnt include scrollbar thickness assert_equals: expected 146 but got 161 | ||
PASS rows=1 overflow scroll includes scrollbar thickness | ||
FAIL cols=3 includes scrollbar thickness assert_greater_than: expected a number greater than 42 but got 42 | ||
|
Oops, something went wrong.