Skip to content

Commit 203f243

Browse files
Fredrik Söderquistchromium-wpt-export-bot
authored andcommitted
Revert "Move/migrate SVGRect and SVGPoint tests to WPT"
This reverts commit 799ef6f917fdff7bab826deb742949e73b3a9b61. Reason for revert: Shouldn't export the matrixTransform() bits Original change's description: > Move/migrate SVGRect and SVGPoint tests to WPT > > Bug: 40779000 > Change-Id: If95877c56ddfd4bc1ec34c13e53a99281452ec30 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6983405 > Reviewed-by: Philip Rogers <[email protected]> > Auto-Submit: Fredrik Söderquist <[email protected]> > Commit-Queue: Philip Rogers <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1520548} Bug: 40779000 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I1dceeadaba8ba32da797d641cc82e666b9bf2b0f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982953 Auto-Submit: Fredrik Söderquist <[email protected]> Commit-Queue: Philip Rogers <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Commit-Queue: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1520687}
1 parent 283275e commit 203f243

File tree

2 files changed

+9
-90
lines changed

2 files changed

+9
-90
lines changed

svg/types/scripted/SVGPoint.html

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,22 @@
44
<script src="/resources/testharnessreport.js"></script>
55
<script>
66
test(function() {
7-
const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
8-
const point = svgElement.createSVGPoint();
7+
let svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
8+
let point = svgElement.createSVGPoint();
99

1010
// Check initial point values.
1111
assert_equals(point.x, 0);
1212
assert_equals(point.y, 0);
1313

14-
// Check assigning points.
15-
point.x = 100;
16-
assert_equals(point.x, 100);
17-
point.y = 200;
18-
assert_equals(point.y, 200);
19-
point.y = null;
20-
assert_equals(point.y, 0);
21-
point.y = 200;
14+
point.y = 2;
15+
16+
// Check setting valid arguments.
17+
assert_equals(point.x, 0);
18+
assert_equals(point.y, 2);
2219

2320
// Check setting invalid arguments.
24-
assert_throws_js(TypeError, function() { point.x = point; });
25-
assert_equals(point.x, 100);
2621
assert_throws_js(TypeError, function() { point.x = NaN; });
27-
assert_equals(point.x, 100);
2822
assert_throws_js(TypeError, function() { point.x = Infinity; });
29-
assert_equals(point.x, 100);
30-
31-
assert_throws_js(TypeError, function() { point.y = point; });
32-
assert_equals(point.y, 200);
33-
assert_throws_js(TypeError, function() { point.y = NaN; });
34-
assert_equals(point.y, 200);
35-
assert_throws_js(TypeError, function() { point.y = Infinity; });
36-
assert_equals(point.y, 200);
37-
}, `${document.title}, 'x' and 'y' attributes`);
38-
39-
test(function() {
40-
const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
41-
const point = svgElement.createSVGPoint();
42-
43-
point.x = -50;
44-
point.y = 100;
45-
46-
// Multiply with -1,0,0,2,10,10 matrix, should flip x coordinate, multiply y
47-
// by two and translate each coordinate by 10.
48-
const ctm = svgElement.createSVGMatrix();
49-
ctm.a = -1;
50-
ctm.d = 2;
51-
ctm.e = 10;
52-
ctm.f = 10;
53-
newPoint = point.matrixTransform(ctm);
54-
assert_true(newPoint instanceof SVGPoint);
55-
assert_equals(newPoint.x, 60);
56-
assert_equals(newPoint.y, 210);
57-
58-
// Check invalid arguments for 'matrixTransform'.
59-
assert_throws_js(TypeError, function() { point.matrixTransform(); });
60-
assert_throws_js(TypeError, function() { point.matrixTransform(-1); });
61-
assert_throws_js(TypeError, function() { point.matrixTransform(5); });
62-
assert_throws_js(TypeError, function() { point.matrixTransform('aString'); });
63-
assert_throws_js(TypeError, function() { point.matrixTransform(point); });
64-
assert_throws_js(TypeError, function() { point.matrixTransform(svgElement); });
65-
}, `${document.title}, matrixTransform()`);
23+
assert_equals(point.x, 0);
24+
});
6625
</script>

svg/types/scripted/SVGRect.html

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)