Commit 7c0b164f authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Fixes to wpt/svg/styling/presentation-attributes-* tests

Missing negation in the "d presentation attribute not supported on other
elements" subtest in ...-special-cases.html test.

Set 'irrelevantElement' to null for 'd', 'height', 'r', 'rx', 'ry',
'transform', 'width', 'x' and 'y' since they are all mentioned in the
table in the spec[1] as being special. They are also covered by the
...-special-cases.html test.
The definition of 'Applies to' for the 'transform' attribute varies
slightly between the SVG specification and CSS transforms
specifications, so this applies essentially the intersection of those
two.

[1] https://svgwg.org/svg2-draft/styling.html#PresentationAttributes

Bug: 1056055
Change-Id: Id7a6e604d4f48abbd601bdc09ec9f7ff795b86ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078581Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#745452}
parent ddc49316
This is a testharness.js-based test. This is a testharness.js-based test.
Found 67 tests; 54 PASS, 13 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 58 tests; 54 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS alignment-baseline presentation attribute supported on an irrelevant element PASS alignment-baseline presentation attribute supported on an irrelevant element
PASS baseline-shift presentation attribute supported on an irrelevant element PASS baseline-shift presentation attribute supported on an irrelevant element
PASS clip-path presentation attribute supported on an irrelevant element PASS clip-path presentation attribute supported on an irrelevant element
...@@ -10,7 +10,6 @@ PASS color-interpolation presentation attribute supported on an irrelevant eleme ...@@ -10,7 +10,6 @@ PASS color-interpolation presentation attribute supported on an irrelevant eleme
PASS cursor presentation attribute supported on an irrelevant element PASS cursor presentation attribute supported on an irrelevant element
PASS direction presentation attribute supported on an irrelevant element PASS direction presentation attribute supported on an irrelevant element
PASS display presentation attribute supported on an irrelevant element PASS display presentation attribute supported on an irrelevant element
FAIL d presentation attribute supported on an irrelevant element assert_true: Presentation attribute d="M0,0 L1,1" should be supported on image element expected true got false
PASS dominant-baseline presentation attribute supported on an irrelevant element PASS dominant-baseline presentation attribute supported on an irrelevant element
PASS fill presentation attribute supported on an irrelevant element PASS fill presentation attribute supported on an irrelevant element
PASS fill-opacity presentation attribute supported on an irrelevant element PASS fill-opacity presentation attribute supported on an irrelevant element
...@@ -25,7 +24,6 @@ PASS font-stretch presentation attribute supported on an irrelevant element ...@@ -25,7 +24,6 @@ PASS font-stretch presentation attribute supported on an irrelevant element
PASS font-style presentation attribute supported on an irrelevant element PASS font-style presentation attribute supported on an irrelevant element
PASS font-variant presentation attribute supported on an irrelevant element PASS font-variant presentation attribute supported on an irrelevant element
PASS font-weight presentation attribute supported on an irrelevant element PASS font-weight presentation attribute supported on an irrelevant element
FAIL height presentation attribute supported on an irrelevant element assert_true: Presentation attribute height="1" should be supported on path element expected true got false
FAIL image-rendering presentation attribute supported on an irrelevant element assert_true: Presentation attribute image-rendering="optimizeSpeed" should be supported on path element expected true got false FAIL image-rendering presentation attribute supported on an irrelevant element assert_true: Presentation attribute image-rendering="optimizeSpeed" should be supported on path element expected true got false
PASS letter-spacing presentation attribute supported on an irrelevant element PASS letter-spacing presentation attribute supported on an irrelevant element
PASS lighting-color presentation attribute supported on an irrelevant element PASS lighting-color presentation attribute supported on an irrelevant element
...@@ -38,9 +36,6 @@ PASS opacity presentation attribute supported on an irrelevant element ...@@ -38,9 +36,6 @@ PASS opacity presentation attribute supported on an irrelevant element
PASS overflow presentation attribute supported on an irrelevant element PASS overflow presentation attribute supported on an irrelevant element
PASS paint-order presentation attribute supported on an irrelevant element PASS paint-order presentation attribute supported on an irrelevant element
PASS pointer-events presentation attribute supported on an irrelevant element PASS pointer-events presentation attribute supported on an irrelevant element
FAIL r presentation attribute supported on an irrelevant element assert_true: Presentation attribute r="1" should be supported on rect element expected true got false
FAIL rx presentation attribute supported on an irrelevant element assert_true: Presentation attribute rx="1" should be supported on path element expected true got false
FAIL ry presentation attribute supported on an irrelevant element assert_true: Presentation attribute ry="1" should be supported on path element expected true got false
PASS shape-rendering presentation attribute supported on an irrelevant element PASS shape-rendering presentation attribute supported on an irrelevant element
PASS stop-color presentation attribute supported on an irrelevant element PASS stop-color presentation attribute supported on an irrelevant element
PASS stop-opacity presentation attribute supported on an irrelevant element PASS stop-opacity presentation attribute supported on an irrelevant element
...@@ -57,15 +52,11 @@ PASS text-decoration presentation attribute supported on an irrelevant element ...@@ -57,15 +52,11 @@ PASS text-decoration presentation attribute supported on an irrelevant element
FAIL text-overflow presentation attribute supported on an irrelevant element assert_true: Presentation attribute text-overflow="ellipsis" should be supported on rect element expected true got false FAIL text-overflow presentation attribute supported on an irrelevant element assert_true: Presentation attribute text-overflow="ellipsis" should be supported on rect element expected true got false
PASS text-rendering presentation attribute supported on an irrelevant element PASS text-rendering presentation attribute supported on an irrelevant element
PASS transform-origin presentation attribute supported on an irrelevant element PASS transform-origin presentation attribute supported on an irrelevant element
FAIL transform presentation attribute supported on an irrelevant element assert_true: Presentation attribute transform="scale(2)" should be supported on linearGradient element expected true got false
PASS unicode-bidi presentation attribute supported on an irrelevant element PASS unicode-bidi presentation attribute supported on an irrelevant element
PASS vector-effect presentation attribute supported on an irrelevant element PASS vector-effect presentation attribute supported on an irrelevant element
PASS visibility presentation attribute supported on an irrelevant element PASS visibility presentation attribute supported on an irrelevant element
FAIL white-space presentation attribute supported on an irrelevant element assert_true: Presentation attribute white-space="pre" should be supported on rect element expected true got false FAIL white-space presentation attribute supported on an irrelevant element assert_true: Presentation attribute white-space="pre" should be supported on rect element expected true got false
FAIL width presentation attribute supported on an irrelevant element assert_true: Presentation attribute width="1" should be supported on path element expected true got false
PASS word-spacing presentation attribute supported on an irrelevant element PASS word-spacing presentation attribute supported on an irrelevant element
PASS writing-mode presentation attribute supported on an irrelevant element PASS writing-mode presentation attribute supported on an irrelevant element
FAIL x presentation attribute supported on an irrelevant element assert_true: Presentation attribute x="1" should be supported on path element expected true got false
FAIL y presentation attribute supported on an irrelevant element assert_true: Presentation attribute y="1" should be supported on path element expected true got false
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -15,7 +15,7 @@ PASS cx and cy presentation attributes not supported on other elements ...@@ -15,7 +15,7 @@ PASS cx and cy presentation attributes not supported on other elements
PASS x, y, width, and height presentation attributes not supported on other elements PASS x, y, width, and height presentation attributes not supported on other elements
PASS r presentation attribute not supported on other elements PASS r presentation attribute not supported on other elements
PASS rx and ry presentation attributes not supported on other elements PASS rx and ry presentation attributes not supported on other elements
FAIL d presentation attribute not supported on other elements assert_true: Presentation attribute d="M0,0 L1,1" should be supported on g element expected true got false PASS d presentation attribute not supported on other elements
FAIL fill presentation attribute not supported on animation elements assert_false: Presentation attribute fill="blue" should be supported on animate element expected false got true FAIL fill presentation attribute not supported on animation elements assert_false: Presentation attribute fill="blue" should be supported on animate element expected false got true
PASS transform presentation attribute supported on g PASS transform presentation attribute supported on g
PASS patternTransform presentation attribute supported on pattern PASS patternTransform presentation attribute supported on pattern
......
...@@ -89,7 +89,7 @@ if (propertiesAreSupported(["rx", "ry"])) { ...@@ -89,7 +89,7 @@ if (propertiesAreSupported(["rx", "ry"])) {
if (CSS.supports("d", "initial")) { if (CSS.supports("d", "initial")) {
test(function() { test(function() {
assertPresentationAttributeIsSupported("g", "d", "M0,0 L1,1", "d"); assertPresentationAttributeIsNotSupported("g", "d", "M0,0 L1,1", "d");
}, `d presentation attribute not supported on other elements`); }, `d presentation attribute not supported on other elements`);
} }
......
This is a testharness.js-based test. This is a testharness.js-based test.
Found 67 tests; 54 PASS, 13 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 58 tests; 54 PASS, 4 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS alignment-baseline presentation attribute supported on an unknown SVG element PASS alignment-baseline presentation attribute supported on an unknown SVG element
PASS baseline-shift presentation attribute supported on an unknown SVG element PASS baseline-shift presentation attribute supported on an unknown SVG element
PASS clip-path presentation attribute supported on an unknown SVG element PASS clip-path presentation attribute supported on an unknown SVG element
...@@ -10,7 +10,6 @@ PASS color-interpolation presentation attribute supported on an unknown SVG elem ...@@ -10,7 +10,6 @@ PASS color-interpolation presentation attribute supported on an unknown SVG elem
PASS cursor presentation attribute supported on an unknown SVG element PASS cursor presentation attribute supported on an unknown SVG element
PASS direction presentation attribute supported on an unknown SVG element PASS direction presentation attribute supported on an unknown SVG element
PASS display presentation attribute supported on an unknown SVG element PASS display presentation attribute supported on an unknown SVG element
FAIL d presentation attribute supported on an unknown SVG element assert_true: Presentation attribute d="M0,0 L1,1" should be supported on unknown element expected true got false
PASS dominant-baseline presentation attribute supported on an unknown SVG element PASS dominant-baseline presentation attribute supported on an unknown SVG element
PASS fill presentation attribute supported on an unknown SVG element PASS fill presentation attribute supported on an unknown SVG element
PASS fill-opacity presentation attribute supported on an unknown SVG element PASS fill-opacity presentation attribute supported on an unknown SVG element
...@@ -25,7 +24,6 @@ PASS font-stretch presentation attribute supported on an unknown SVG element ...@@ -25,7 +24,6 @@ PASS font-stretch presentation attribute supported on an unknown SVG element
PASS font-style presentation attribute supported on an unknown SVG element PASS font-style presentation attribute supported on an unknown SVG element
PASS font-variant presentation attribute supported on an unknown SVG element PASS font-variant presentation attribute supported on an unknown SVG element
PASS font-weight presentation attribute supported on an unknown SVG element PASS font-weight presentation attribute supported on an unknown SVG element
FAIL height presentation attribute supported on an unknown SVG element assert_true: Presentation attribute height="1" should be supported on unknown element expected true got false
FAIL image-rendering presentation attribute supported on an unknown SVG element assert_true: Presentation attribute image-rendering="optimizeSpeed" should be supported on unknown element expected true got false FAIL image-rendering presentation attribute supported on an unknown SVG element assert_true: Presentation attribute image-rendering="optimizeSpeed" should be supported on unknown element expected true got false
PASS letter-spacing presentation attribute supported on an unknown SVG element PASS letter-spacing presentation attribute supported on an unknown SVG element
PASS lighting-color presentation attribute supported on an unknown SVG element PASS lighting-color presentation attribute supported on an unknown SVG element
...@@ -38,9 +36,6 @@ PASS opacity presentation attribute supported on an unknown SVG element ...@@ -38,9 +36,6 @@ PASS opacity presentation attribute supported on an unknown SVG element
PASS overflow presentation attribute supported on an unknown SVG element PASS overflow presentation attribute supported on an unknown SVG element
PASS paint-order presentation attribute supported on an unknown SVG element PASS paint-order presentation attribute supported on an unknown SVG element
PASS pointer-events presentation attribute supported on an unknown SVG element PASS pointer-events presentation attribute supported on an unknown SVG element
FAIL r presentation attribute supported on an unknown SVG element assert_true: Presentation attribute r="1" should be supported on unknown element expected true got false
FAIL rx presentation attribute supported on an unknown SVG element assert_true: Presentation attribute rx="1" should be supported on unknown element expected true got false
FAIL ry presentation attribute supported on an unknown SVG element assert_true: Presentation attribute ry="1" should be supported on unknown element expected true got false
PASS shape-rendering presentation attribute supported on an unknown SVG element PASS shape-rendering presentation attribute supported on an unknown SVG element
PASS stop-color presentation attribute supported on an unknown SVG element PASS stop-color presentation attribute supported on an unknown SVG element
PASS stop-opacity presentation attribute supported on an unknown SVG element PASS stop-opacity presentation attribute supported on an unknown SVG element
...@@ -57,15 +52,11 @@ PASS text-decoration presentation attribute supported on an unknown SVG element ...@@ -57,15 +52,11 @@ PASS text-decoration presentation attribute supported on an unknown SVG element
FAIL text-overflow presentation attribute supported on an unknown SVG element assert_true: Presentation attribute text-overflow="ellipsis" should be supported on unknown element expected true got false FAIL text-overflow presentation attribute supported on an unknown SVG element assert_true: Presentation attribute text-overflow="ellipsis" should be supported on unknown element expected true got false
PASS text-rendering presentation attribute supported on an unknown SVG element PASS text-rendering presentation attribute supported on an unknown SVG element
PASS transform-origin presentation attribute supported on an unknown SVG element PASS transform-origin presentation attribute supported on an unknown SVG element
FAIL transform presentation attribute supported on an unknown SVG element assert_true: Presentation attribute transform="scale(2)" should be supported on unknown element expected true got false
PASS unicode-bidi presentation attribute supported on an unknown SVG element PASS unicode-bidi presentation attribute supported on an unknown SVG element
PASS vector-effect presentation attribute supported on an unknown SVG element PASS vector-effect presentation attribute supported on an unknown SVG element
PASS visibility presentation attribute supported on an unknown SVG element PASS visibility presentation attribute supported on an unknown SVG element
FAIL white-space presentation attribute supported on an unknown SVG element assert_true: Presentation attribute white-space="pre" should be supported on unknown element expected true got false FAIL white-space presentation attribute supported on an unknown SVG element assert_true: Presentation attribute white-space="pre" should be supported on unknown element expected true got false
FAIL width presentation attribute supported on an unknown SVG element assert_true: Presentation attribute width="1" should be supported on unknown element expected true got false
PASS word-spacing presentation attribute supported on an unknown SVG element PASS word-spacing presentation attribute supported on an unknown SVG element
PASS writing-mode presentation attribute supported on an unknown SVG element PASS writing-mode presentation attribute supported on an unknown SVG element
FAIL x presentation attribute supported on an unknown SVG element assert_true: Presentation attribute x="1" should be supported on unknown element expected true got false
FAIL y presentation attribute supported on an unknown SVG element assert_true: Presentation attribute y="1" should be supported on unknown element expected true got false
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -62,7 +62,7 @@ const PROPERTIES = { ...@@ -62,7 +62,7 @@ const PROPERTIES = {
"d": { "d": {
value: "M0,0 L1,1", value: "M0,0 L1,1",
relevantElement: "path", relevantElement: "path",
irrelevantElement: "image", irrelevantElement: null,
}, },
"dominant-baseline": { "dominant-baseline": {
value: "middle", value: "middle",
...@@ -142,7 +142,7 @@ const PROPERTIES = { ...@@ -142,7 +142,7 @@ const PROPERTIES = {
"height": { "height": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
"image-rendering": { "image-rendering": {
value: "optimizeSpeed", value: "optimizeSpeed",
...@@ -207,17 +207,17 @@ const PROPERTIES = { ...@@ -207,17 +207,17 @@ const PROPERTIES = {
"r": { "r": {
value: "1", value: "1",
relevantElement: "circle", relevantElement: "circle",
irrelevantElement: "rect", irrelevantElement: null,
}, },
"rx": { "rx": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
"ry": { "ry": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
"shape-rendering": { "shape-rendering": {
value: "geometricPrecision", value: "geometricPrecision",
...@@ -302,7 +302,7 @@ const PROPERTIES = { ...@@ -302,7 +302,7 @@ const PROPERTIES = {
"transform": { "transform": {
value: "scale(2)", value: "scale(2)",
relevantElement: "g", relevantElement: "g",
irrelevantElement: "linearGradient", irrelevantElement: null,
}, },
"unicode-bidi": { "unicode-bidi": {
value: "embed", value: "embed",
...@@ -327,7 +327,7 @@ const PROPERTIES = { ...@@ -327,7 +327,7 @@ const PROPERTIES = {
"width": { "width": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
"word-spacing": { "word-spacing": {
value: "1", value: "1",
...@@ -342,12 +342,12 @@ const PROPERTIES = { ...@@ -342,12 +342,12 @@ const PROPERTIES = {
"x": { "x": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
"y": { "y": {
value: "1", value: "1",
relevantElement: "rect", relevantElement: "rect",
irrelevantElement: "path", irrelevantElement: null,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment