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.
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 baseline-shift 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
PASS cursor 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
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 fill 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
PASS font-style 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
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
PASS letter-spacing 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
PASS overflow 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
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 stop-color 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
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 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 vector-effect 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 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 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.
......@@ -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 r presentation attribute 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
PASS transform presentation attribute supported on g
PASS patternTransform presentation attribute supported on pattern
......
......@@ -89,7 +89,7 @@ if (propertiesAreSupported(["rx", "ry"])) {
if (CSS.supports("d", "initial")) {
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`);
}
......
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 baseline-shift 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
PASS cursor 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
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 fill 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
PASS font-style 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
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
PASS letter-spacing 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
PASS overflow 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
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 stop-color 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
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 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 vector-effect 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 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 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.
......@@ -62,7 +62,7 @@ const PROPERTIES = {
"d": {
value: "M0,0 L1,1",
relevantElement: "path",
irrelevantElement: "image",
irrelevantElement: null,
},
"dominant-baseline": {
value: "middle",
......@@ -142,7 +142,7 @@ const PROPERTIES = {
"height": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"image-rendering": {
value: "optimizeSpeed",
......@@ -207,17 +207,17 @@ const PROPERTIES = {
"r": {
value: "1",
relevantElement: "circle",
irrelevantElement: "rect",
irrelevantElement: null,
},
"rx": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"ry": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"shape-rendering": {
value: "geometricPrecision",
......@@ -302,7 +302,7 @@ const PROPERTIES = {
"transform": {
value: "scale(2)",
relevantElement: "g",
irrelevantElement: "linearGradient",
irrelevantElement: null,
},
"unicode-bidi": {
value: "embed",
......@@ -327,7 +327,7 @@ const PROPERTIES = {
"width": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"word-spacing": {
value: "1",
......@@ -342,12 +342,12 @@ const PROPERTIES = {
"x": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"y": {
value: "1",
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