зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1436438 part 1 - Remove the tests that test SVG path data DOM interfaces. r=longsonr
MozReview-Commit-ID: 78yzAb6Khf1
This commit is contained in:
Родитель
605269a01f
Коммит
843da70a1a
|
@ -1,20 +0,0 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
document.getElementById("path").pathSegList.pathSegTypeAsLetter;
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="boom()">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="400px" width="400px">
|
||||
<path id="path" style="stroke: blue" d="M 200.50000,387.89713 L 201.19970,12.500000" />
|
||||
</svg>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||
<svg width='100%' height='100%'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
onload='boom()'>
|
||||
|
||||
<html:script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
try {
|
||||
document.getElementById("path").pathSegList.getItem(-10000000);
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
</html:script>
|
||||
|
||||
<path id='path' d='M300,25 C320,250 375,150 400,150 S400,340 330,350'/>
|
||||
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 386 B |
|
@ -1,17 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" onload="setTimeout(boom, 30);" class="reftest-wait">
|
||||
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
try {
|
||||
document.getElementById("path_1").pathSegList.insertItemBefore({}, 0);
|
||||
} catch(e) {
|
||||
}
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
|
||||
<path id='path_1' d='M300,25 C500,100 575,300 330,350'/>
|
||||
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 371 B |
|
@ -1,17 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" onload="setTimeout(boom, 30);" class="reftest-wait">
|
||||
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
try {
|
||||
document.getElementById("path_1").pathSegList.insertItemBefore({}, 0);
|
||||
} catch(e) {
|
||||
}
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
|
||||
<path id='path_1' d='M300,25 C500,100 575,300 330,350'/>
|
||||
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 371 B |
|
@ -1,11 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<path/>
|
||||
|
||||
<script xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
|
||||
var x=document.getElementsByTagName('path')[0];
|
||||
var y = x.pathSegList;
|
||||
var z = x.createSVGPathSegMovetoRel(0,0);
|
||||
y.appendItem(z,0);
|
||||
y.replaceItem(z, 0);
|
||||
]]></script>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 277 B |
|
@ -4,14 +4,10 @@ load 336994-1.html
|
|||
load 344888-1.svg
|
||||
load 345445-1.svg
|
||||
load 360836-1.svg
|
||||
load 367357-1.xhtml
|
||||
load 369051-1.svg
|
||||
load 369249-1.svg
|
||||
load 369291-1.svg
|
||||
load 369291-2.svg
|
||||
load 369568-1.svg
|
||||
load 372046-1.svg
|
||||
load 372046-2.svg
|
||||
load 374882-1.svg
|
||||
load 380101-1.svg
|
||||
load 381777-1.svg
|
||||
|
@ -41,7 +37,6 @@ load 414188-1.svg
|
|||
load 427325-1.svg
|
||||
load 428228-1.svg
|
||||
load 428841-1.svg
|
||||
load 435209-1.svg
|
||||
load 436418-mpathRoot-1.svg
|
||||
load 448244-1.svg
|
||||
load 466576-1.xhtml
|
||||
|
|
|
@ -55,8 +55,7 @@ skip-if = true # disabled-for-intermittent-failures--bug-701060
|
|||
[test_object-delayed-intrinsic-size.html]
|
||||
[test_onerror.xhtml]
|
||||
[test_pathAnimInterpolation.xhtml]
|
||||
[test_pathLength.html]
|
||||
[test_pathSeg.xhtml]
|
||||
skip-if = true # We need to polyfill the SVG DOM for path data
|
||||
[test_pointAtLength.xhtml]
|
||||
[test_pointer-events-1a.xhtml]
|
||||
[test_pointer-events-1b.xhtml]
|
||||
|
@ -77,7 +76,6 @@ skip-if = android_version == '18' # bug 1147994
|
|||
[test_SVGMatrix.xhtml]
|
||||
[test_SVG_namespace_ids.html]
|
||||
[test_SVGNumberList.xhtml]
|
||||
[test_SVGPathSegList.xhtml]
|
||||
[test_SVGPointList.xhtml]
|
||||
[test_SVGStringList.xhtml]
|
||||
[test_SVGStyleElement.xhtml]
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=611138
|
||||
-->
|
||||
<head>
|
||||
<title>Generic tests for SVG animated length lists</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="MutationEventChecker.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=611138">Mozilla Bug 611138</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display:none;">
|
||||
<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
||||
<path id="path"/>
|
||||
</svg>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
<![CDATA[
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/*
|
||||
This file runs a series of SVGPathSegList specific tests. Generic SVGXxxList
|
||||
tests can be found in test_SVGxxxList.xhtml. Anything that can be generalized
|
||||
to other list types belongs there.
|
||||
*/
|
||||
|
||||
function run_tests()
|
||||
{
|
||||
document.getElementById('svg').pauseAnimations();
|
||||
|
||||
var d;
|
||||
var seg;
|
||||
var path = document.getElementById("path");
|
||||
var list = path.pathSegList;
|
||||
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=611138
|
||||
// Here we are doing a replace with a segment (arc) that has more arguments
|
||||
// than the total number of arguments in the entire path + 2 (the +2
|
||||
// refering to the encoding of the segment types for the two segments).
|
||||
path.setAttribute('d', 'M0,0 L100,100');
|
||||
var arc = path.createSVGPathSegArcAbs(400, 0, 200, 200, 0, 1, 1);
|
||||
list.replaceItem(arc, 1);
|
||||
|
||||
is(list.numberOfItems, 2, 'The length of the list should be the same after a valid replaceItem() call');
|
||||
is(list.getItem(1), arc, 'The inserted object should now be the object at the index being replaced');
|
||||
|
||||
// Test whether and when we normalize the 'd' attribute:
|
||||
|
||||
d = " \n M 10 , 10 \n L 20 10 \n ";
|
||||
path.setAttribute('d', d);
|
||||
is(path.getAttribute('d'), d, "Values passed to setAttribute for the 'd' attribute should not be normalised");
|
||||
list.getItem(1).y = 20;
|
||||
isnot(path.getAttribute('d'), d, "The 'd' attribute should change when its underlying DOM list changes");
|
||||
|
||||
// Test that path manipulations still work even when the path is invalid due
|
||||
// to it not starting with a moveto segment:
|
||||
|
||||
path.setAttribute('d', 'M0,0 L1,1');
|
||||
is(list.numberOfItems, 2, 'setAttribute should result in two items')
|
||||
|
||||
seg = list.getItem(1);
|
||||
list.removeItem(0);
|
||||
ok(list.numberOfItems == 1 && list.getItem(0) == seg,
|
||||
'If removeItem removes the initial moveto leaving an invalid path, the other items should still be left in the list')
|
||||
|
||||
seg = path.createSVGPathSegLinetoAbs(1, 2);
|
||||
list.appendItem(seg);
|
||||
ok(list.numberOfItems == 2 && list.getItem(1) == seg,
|
||||
'appendItem should be able to append to an invalid path');
|
||||
|
||||
seg = path.createSVGPathSegLinetoAbs(1, 2);
|
||||
list.replaceItem(seg, 1);
|
||||
ok(list.numberOfItems == 2 && list.getItem(1) == seg,
|
||||
'replaceItem should be able to replace items in an invalid path');
|
||||
|
||||
seg = path.createSVGPathSegLinetoAbs(1, 2);
|
||||
list.insertItemBefore(seg, 1);
|
||||
ok(list.numberOfItems == 3 && list.getItem(1) == seg,
|
||||
'insertItemBefore should be able insert items into an invalid path');
|
||||
|
||||
seg = path.createSVGPathSegLinetoAbs(1, 2);
|
||||
list.initialize(seg);
|
||||
ok(list.numberOfItems == 1 && list.getItem(0) == seg,
|
||||
'initialize should be able initialize an invalid path with a non-moveto item');
|
||||
|
||||
// Test mutation events
|
||||
|
||||
eventChecker = new MutationEventChecker;
|
||||
d = 'M0,0 L12,34'
|
||||
path.setAttribute('d', d);
|
||||
eventChecker.watchAttr(path, "d");
|
||||
|
||||
// -- Actual changes
|
||||
eventChecker.expect("modify modify modify");
|
||||
list[0].x = 10;
|
||||
list[0].y = 5;
|
||||
path.setAttribute("d", "M20,5 L12,34");
|
||||
|
||||
// -- Redundant changes
|
||||
eventChecker.expect("");
|
||||
list[0].x = 20;
|
||||
list[1].y = 34;
|
||||
path.setAttribute("d", "M20,5 L12,34");
|
||||
|
||||
// -- Attribute removal
|
||||
eventChecker.expect("remove");
|
||||
path.removeAttribute("d");
|
||||
|
||||
// -- Non-existent attribute removal
|
||||
eventChecker.expect("");
|
||||
path.removeAttribute("d");
|
||||
path.removeAttributeNS(null, "d");
|
||||
eventChecker.finish();
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
window.addEventListener("load", run_tests);
|
||||
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -222,61 +222,6 @@ var tests = [
|
|||
is(itemA.y, itemB.y, message);
|
||||
}
|
||||
},
|
||||
{
|
||||
// SVGPathSegList test:
|
||||
target_element_id: 'path',
|
||||
attr_name: 'd',
|
||||
prop_name: null, // SVGAnimatedPathData is an inherited interface!
|
||||
bv_name: 'pathSegList',
|
||||
av_name: 'animatedPathSegList',
|
||||
el_type: 'SVGPathElement',
|
||||
prop_type: null,
|
||||
list_type: 'SVGPathSegList',
|
||||
item_type: 'SVGPathSeg',
|
||||
attr_val_3a: 'M 10,10 L 50,50 L 90,10',
|
||||
attr_val_3b: 'M 10,50 L 50,10 L 90,50',
|
||||
attr_val_4 : 'M 10,10 L 50,50 L 90,10 M 200,100',
|
||||
attr_val_5a: 'M 10,10 L 50,50 L 90,10 L 130,50 L 170,10',
|
||||
attr_val_5b: 'M 50,10 L 50,10 L 90,50 L 130,10 L 170,50',
|
||||
attr_val_5b_firstItem_x3_constructor: function(constructor) {
|
||||
var expected = constructor();
|
||||
is(expected.pathSegTypeAsLetter, "M",
|
||||
"test error -- expected constructor to generate a segment of type M");
|
||||
expected.x = 150;
|
||||
expected.y = 30;
|
||||
return expected;
|
||||
},
|
||||
item_constructor: function() {
|
||||
// XXX return different values each time
|
||||
return document.getElementById('path').createSVGPathSegMovetoAbs(1, 1);
|
||||
},
|
||||
item_is: function(itemA, itemB, message) {
|
||||
ok(typeof(itemA.pathSegTypeAsLetter) != 'undefined' &&
|
||||
typeof(itemB.pathSegTypeAsLetter) != 'undefined',
|
||||
'expecting pathSegTypeAsLetter property');
|
||||
|
||||
// First: are we dealing with the same type of segment?
|
||||
is(itemA.pathSegTypeAsLetter, itemB.pathSegTypeAsLetter, message);
|
||||
if (itemA.pathSegTypeAsLetter != itemB.pathSegTypeAsLetter)
|
||||
return; // The rest of this function is nonsense if types don't match.
|
||||
|
||||
// Make sure property-counts match (so we can iterate across itemA's
|
||||
// properties and not worry about itemB having extra properties that
|
||||
// we might be skipping over).
|
||||
is(keys(itemA).length, keys(itemB).length,
|
||||
'expecting same property-count when comparing path segs of same type.');
|
||||
|
||||
// Compare the properties, skipping the constant properties inherited
|
||||
// from 'SVGPathSeg', and skipping the pathSegTypeAsLetter field since we
|
||||
// already checked that above.
|
||||
for (var prop in itemA) {
|
||||
if (!SVGPathSeg.hasOwnProperty(prop) &&
|
||||
prop != 'pathSegTypeAsLetter') {
|
||||
is(itemA[prop], itemB[prop], message);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
// SVGStringList test:
|
||||
target_element_id: 'g',
|
||||
|
@ -1170,14 +1115,12 @@ function run_animation_timeline_tests()
|
|||
'in the '+t.list_type+' for '+t.bv_path+' to 5.');
|
||||
|
||||
// TODO
|
||||
if (t.list_type != 'SVGPathSegList') {
|
||||
ok(t.animVal.getItem(3) === t.old_animVal_items[3],
|
||||
'When affected by SMIL animation, list items in the '+t.list_type+
|
||||
' for '+t.bv_path+' that are at indexes that existed prior to the '+
|
||||
'start of the animation should be the exact same objects as the '+
|
||||
'objects that were at those indexes prior to the start of the '+
|
||||
'animation.');
|
||||
}
|
||||
|
||||
t.old_animVal_items = get_array_of_list_items(t.animVal);
|
||||
|
||||
|
|
|
@ -48,13 +48,6 @@ var tests = [
|
|||
subtests: [ { values: null, length: 3 },
|
||||
{ values: "10", length: 1 },
|
||||
{ values: "1 2 3 4 5", length: 5 } ] },
|
||||
{ element: path,
|
||||
attribute: "d",
|
||||
listProperty: "pathSegList",
|
||||
type: "SVGPathSegList",
|
||||
subtests: [ { values: null, length: 2 },
|
||||
{ values: "M50,50", length: 1 },
|
||||
{ values: "M0,0 h10 v20 h30 v40", length: 5 } ] },
|
||||
{ element: poly,
|
||||
attribute: "points",
|
||||
listProperty: "animatedPoints",
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1024926
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test path length changes when manipulated</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1024926">Mozilla Bug 1024926</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<svg width="100%" height="1" id="svg">
|
||||
<path id="path_lines" d="M50,100l0,0l0,-50l100,0l86.3325,122.665z"></path>
|
||||
<path id="path_straight_curve" d="M0,0 C100,0 150,0 200,0" />
|
||||
<path id="path_straight_arc" d="M0,0 A100,0 0 0 0 200, 0" />
|
||||
</svg>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Test a closed path with a series of lines.
|
||||
var path = document.getElementById("path_lines");
|
||||
is(path.getTotalLength(), 500, "Unexpected path length");
|
||||
|
||||
// Test a path that's been shortened via the DOM.
|
||||
for (var i = 0; i < 2; i++) {
|
||||
path.pathSegList.removeItem(path.pathSegList.numberOfItems - 1);
|
||||
}
|
||||
is(path.getTotalLength(), 150, "Unexpected path length");
|
||||
|
||||
// Test a path that's been shortened to be empty, via the DOM.
|
||||
while (path.pathSegList.numberOfItems > 0) {
|
||||
path.pathSegList.removeItem(0);
|
||||
}
|
||||
is(path.getTotalLength(), 0, "Unexpected path length");
|
||||
|
||||
// Test a path with a curve command ("C") that is really a straight line.
|
||||
path = document.getElementById("path_straight_curve");
|
||||
is(path.getTotalLength(), 200, "Unexpected path length, for straight line " +
|
||||
"generated by 'C' command");
|
||||
|
||||
// Test a path with an arc command ("A") that is really a straight line.
|
||||
path = document.getElementById("path_straight_arc");
|
||||
is(path.getTotalLength(), 200, "Unexpected path length, for straight line " +
|
||||
"generated by 'A' command");
|
||||
|
||||
SimpleTest.finish();
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1,142 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=459953
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 459953</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=459953">Mozilla Bug 459953</a>
|
||||
<p id="display"></p>
|
||||
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript">
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest()
|
||||
{
|
||||
var svgns="http://www.w3.org/2000/svg";
|
||||
|
||||
var path1=document.createElementNS(svgns, "path");
|
||||
|
||||
var sseg;
|
||||
|
||||
var a=10,s=20,d=30,z=9; //Arbitrary numbers for arguments
|
||||
|
||||
var whatever=true; //This is often so, but here it does not matter
|
||||
|
||||
sseg=path1.createSVGPathSegMovetoAbs(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegMovetoRel(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoAbs(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoRel(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoVerticalAbs(a);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoVerticalRel(a);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoHorizontalAbs(a);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegLinetoHorizontalRel(a);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoCubicAbs(a, s, d, z, a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoCubicRel(a, s, d, z, a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoCubicSmoothAbs(a, s, d, z);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoCubicSmoothRel(a, s, d, z);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoQuadraticAbs(a, s, d, z);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoQuadraticRel(a, s, d, z);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoQuadraticSmoothAbs(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegCurvetoQuadraticSmoothRel(a, s);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegArcAbs(a, s, d, z, a, whatever, whatever);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegArcRel(a, s, d, z, a, whatever, whatever);
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
sseg=path1.createSVGPathSegClosePath();
|
||||
path1.pathSegList.appendItem(sseg);
|
||||
|
||||
for(var i=0;i<path1.pathSegList.numberOfItems;i++){
|
||||
var seg=path1.pathSegList.getItem(i);
|
||||
switch(seg.pathSegType){
|
||||
case seg.PATHSEG_MOVETO_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "M", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_MOVETO_REL:
|
||||
is(seg.pathSegTypeAsLetter, "m", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CLOSEPATH:
|
||||
is(seg.pathSegTypeAsLetter, "z", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "L", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_REL:
|
||||
is(seg.pathSegTypeAsLetter, "l", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_VERTICAL_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "V", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_VERTICAL_REL:
|
||||
is(seg.pathSegTypeAsLetter, "v", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_HORIZONTAL_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "H", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_LINETO_HORIZONTAL_REL:
|
||||
is(seg.pathSegTypeAsLetter, "h", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_CUBIC_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "C", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_CUBIC_REL:
|
||||
is(seg.pathSegTypeAsLetter, "c", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "S", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
||||
is(seg.pathSegTypeAsLetter, "s", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_QUADRATIC_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "Q", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_QUADRATIC_REL:
|
||||
is(seg.pathSegTypeAsLetter, "q", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "T", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
|
||||
is(seg.pathSegTypeAsLetter, "t", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_ARC_ABS:
|
||||
is(seg.pathSegTypeAsLetter, "A", "wrong path segment letter");
|
||||
break;
|
||||
case seg.PATHSEG_ARC_REL:
|
||||
is(seg.pathSegTypeAsLetter, "a", "wrong path segment letter");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
window.addEventListener("load", runTest);
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1026,48 +1026,8 @@ var interfaceNamesInGlobalScope =
|
|||
{name: "SVGNumberList", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathElement", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSeg", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegArcAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegArcRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegClosePath", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoCubicAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoCubicRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoCubicSmoothAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoCubicSmoothRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoQuadraticAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoQuadraticRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoQuadraticSmoothAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegCurvetoQuadraticSmoothRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoHorizontalAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoHorizontalRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoVerticalAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegLinetoVerticalRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegList", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegMovetoAbs", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPathSegMovetoRel", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "SVGPatternElement", insecureContext: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<title>Testcase for invalid path</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=601699 -->
|
||||
|
||||
<marker id="marker" markerWidth="10" markerHeight="10">
|
||||
<circle cx="5" cy="5" r="5"/>
|
||||
</marker>
|
||||
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
|
||||
<path id="path" fill="red" marker-mid="url(#marker)"/>
|
||||
|
||||
<script><![CDATA[
|
||||
|
||||
// Parser will throw out path without an initial moveto command, so we use
|
||||
// script to inject one and see what happens.
|
||||
|
||||
var path = document.getElementById("path");
|
||||
var curve = path.createSVGPathSegCurvetoCubicAbs(0, 400, 400, 400, 400, 0);
|
||||
path.pathSegList.appendItem(curve);
|
||||
|
||||
]]></script>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 808 B |
|
@ -340,7 +340,6 @@ pref(svg.paint-order.enabled,true) == paint-order-03.svg paint-order-03-ref.svg
|
|||
|
||||
#fuzzy(23,60) fails-if(d2d) == path-01.svg path-01-ref.svg
|
||||
== path-02.svg pass.svg
|
||||
== path-03.svg pass.svg
|
||||
== path-04.svg pass.svg
|
||||
== path-05.svg pass.svg
|
||||
fuzzy-if(skiaContent,1,400) == path-06.svg path-06-ref.svg
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=327709 -->
|
||||
<!-- Just checking for absence of assertion, nothing more -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<script>
|
||||
function init()
|
||||
{
|
||||
var apsl = document.getElementById("n126").animatedPathSegList;
|
||||
apsl.appendItem(apsl.__proto__);
|
||||
}
|
||||
window.addEventListener("load", init, false);
|
||||
</script>
|
||||
|
||||
<path id="n126" d="M 270 60 L 320 60 L 320 110 Z"/>
|
||||
|
||||
</svg>
|
||||
|
До Ширина: | Высота: | Размер: 418 B |
|
@ -15,7 +15,6 @@ load 325427-1.svg
|
|||
load 326495-1.svg
|
||||
load 326974-1.svg
|
||||
load 327706-1.svg
|
||||
load 327709-1.svg
|
||||
load 327711-1.svg
|
||||
load 328137-1.svg
|
||||
load 329848-1.svg
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[historical.html]
|
||||
[SVGPathSeg interface must be removed]
|
||||
expected: FAIL
|
||||
|
||||
[SVGUnitTypes mixin interface must not be exposed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче