-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-typed-om] Whitelist supported properties.
This patch whitelists all our supported properties. Any property that is not supported will return a base CSSStyleValue. This ensures that we don't accidentally produce unexpected results for properties that we haven't tested it. We also add a few new properties to support, bringing the total number of property tests to 50. We also remove support for 'z-index' because it uses <integers> which we don't support yet. transition-duration is failing tests because we currently convert ms to seconds when we compute, which is incorrect. Some paint/layout tests depend on properties that are not whitelisted, so we've changed them: - border-radius -> margin-left - align-items -> empty-cell Bug: 816402 Change-Id: I84d2fd8a15df92624122f0c1ecf4f7c42f928928 Reviewed-on: https://chromium-review.googlesource.com/942651 Reviewed-by: nainar <nainar@chromium.org> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#540397}
- Loading branch information
Showing
23 changed files
with
264 additions
and
126 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
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
2 changes: 1 addition & 1 deletion
2
...d_party/WebKit/LayoutTests/external/wpt/css/css-paint-api/style-background-image-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
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
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
10 changes: 0 additions & 10 deletions
10
...ternal/wpt/css/css-typed-om/the-stylepropertymap/computed/computed.tentative-expected.txt
This file was deleted.
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
21 changes: 21 additions & 0 deletions
21
...tTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/border-collapse.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,21 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'border-collapse' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('border-collapse', [ | ||
{ syntax: 'separate' }, | ||
{ syntax: 'collapse' }, | ||
]); | ||
|
||
</script> |
21 changes: 21 additions & 0 deletions
21
.../LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/direction.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,21 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'direction' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('direction', [ | ||
{ syntax: 'ltr' }, | ||
{ syntax: 'rtl' }, | ||
]); | ||
|
||
</script> |
21 changes: 21 additions & 0 deletions
21
...ayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/empty-cells.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,21 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'empty-cells' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('empty-cells', [ | ||
{ syntax: 'show' }, | ||
{ syntax: 'hide' }, | ||
]); | ||
|
||
</script> |
21 changes: 21 additions & 0 deletions
21
...Tests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/list-style-image.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,21 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'list-style-image' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('list-style-image', [ | ||
{ syntax: 'none' }, | ||
{ syntax: '<image>' }, | ||
]); | ||
|
||
</script> |
21 changes: 21 additions & 0 deletions
21
...tTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/overflow-anchor.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,21 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'overflow-anchor' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('overflow-anchor', [ | ||
{ syntax: 'auto' }, | ||
{ syntax: 'none' }, | ||
]); | ||
|
||
</script> |
23 changes: 23 additions & 0 deletions
23
...Kit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/resize.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,23 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>'resize' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
runPropertyTests('resize', [ | ||
{ syntax: 'none' }, | ||
{ syntax: 'both' }, | ||
{ syntax: 'horizontal' }, | ||
{ syntax: 'vertical' }, | ||
]); | ||
|
||
</script> |
11 changes: 11 additions & 0 deletions
11
...nal/wpt/css/css-typed-om/the-stylepropertymap/properties/transition-duration-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,11 @@ | ||
This is a testharness.js-based test. | ||
PASS Can set 'transition-duration' to CSS-wide keywords | ||
PASS Can set 'transition-duration' to var() references | ||
FAIL Can set 'transition-duration' to a time assert_approx_equals: expected -3.14 +/- 0.000001 but got -0.00314 | ||
PASS Setting 'transition-duration' to a length throws TypeError | ||
PASS Setting 'transition-duration' to a percent throws TypeError | ||
PASS Setting 'transition-duration' to a number throws TypeError | ||
PASS Setting 'transition-duration' to a position throws TypeError | ||
PASS Setting 'transition-duration' to a transform throws TypeError | ||
Harness: the test ran to completion. | ||
|
20 changes: 20 additions & 0 deletions
20
...ts/external/wpt/css/css-typed-om/the-stylepropertymap/properties/transition-duration.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,20 @@ | ||
<meta charset="utf-8"> | ||
<title>'transition-duration' property</title> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../../resources/testhelper.js"></script> | ||
<script src="resources/testsuite.js"></script> | ||
<body> | ||
<div id="log"></div> | ||
<script> | ||
'use strict'; | ||
|
||
// FIXME: transition-duration is list-valued. Run list-valued tests here too. | ||
runPropertyTests('transition-duration', [ | ||
{ syntax: '<time>' }, | ||
]); | ||
|
||
</script> |
Oops, something went wrong.