Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-basics-expected.txt

Issue 2362653002: Convert LayoutTests/svg/dom/SVGTransform*.html js-tests.js to testharness.js based tests (Closed)
Patch Set: Align with review comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 This is a test of the simple SVGTransformList API parts.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 PASS circle1.transform.baseVal != circle1.transform.animVal is true
7 PASS circle1.transform.baseVal.numberOfItems is 2
8 PASS circle1.transform.animVal.numberOfItems is 2
9 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
10 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
11
12 Test uncommon arguments for initialize()
13 PASS transformList.initialize(30) threw exception TypeError: Failed to execute ' initialize' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'..
14 PASS transformList.initialize('aString') threw exception TypeError: Failed to ex ecute 'initialize' on 'SVGTransformList': parameter 1 is not of type 'SVGTransfo rm'..
15 PASS transformList.initialize(circle1) threw exception TypeError: Failed to exec ute 'initialize' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform '..
16 PASS transformList.initialize(null) threw exception TypeError: Failed to execute 'initialize' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'..
17
18 Test uncommon arguments for getItem()
19 PASS transformList.getItem(30) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGTransformList': The index provided (30) is greater than the ma ximum bound (2)..
20 PASS transformList.getItem('aString').toString() is "type=SVG_TRANSFORM_SCALE ma trix=[2.0 0.0 0.0 2.0 0.0 0.0]"
21 PASS transformList.getItem(circle1).toString() is "type=SVG_TRANSFORM_SCALE matr ix=[2.0 0.0 0.0 2.0 0.0 0.0]"
22 PASS transformList.getItem(null).toString() is "type=SVG_TRANSFORM_SCALE matrix= [2.0 0.0 0.0 2.0 0.0 0.0]"
23
24 Test uncommon arguments for insertItemBefore()
25 PASS transformList.insertItemBefore(30) threw exception TypeError: Failed to exe cute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but only 1 present..
26 PASS transformList.insertItemBefore('aString') threw exception TypeError: Failed to execute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but only 1 present..
27 PASS transformList.insertItemBefore(circle1) threw exception TypeError: Failed t o execute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but on ly 1 present..
28 PASS transformList.insertItemBefore(null) threw exception TypeError: Failed to e xecute 'insertItemBefore' on 'SVGTransformList': 2 arguments required, but only 1 present..
29 PASS transformList.insertItemBefore(transformList.getItem(1), 'aString').toStrin g() is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
30 PASS transformList.numberOfItems is 3
31 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
32 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
33 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
34 PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2) translate (10 10)"
35 PASS transformList.insertItemBefore(transformList.getItem(1), circle1).toString( ) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
36 PASS transformList.numberOfItems is 4
37 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
38 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
39 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
40 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
41 PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10) scale(2 2 ) translate(10 10)"
42 PASS transformList.insertItemBefore(transformList.getItem(1), null).toString() i s "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
43 PASS transformList.numberOfItems is 5
44 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
45 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
46 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
47 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
48 PASS transformList.getItem(4).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
49 PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2) translate (10 10) scale(2 2) translate(10 10)"
50 PASS transformList.insertItemBefore(transformList.getItem(1), 0).toString() is " type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
51 PASS transformList.numberOfItems is 6
52 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
53 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
54 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
55 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
56 PASS transformList.getItem(4).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
57 PASS transformList.getItem(5).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
58 PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10) scale(2 2 ) translate(10 10) scale(2 2) translate(10 10)"
59 PASS transformList.insertItemBefore(30, 0) threw exception TypeError: Failed to execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of type 'SV GTransform'..
60 PASS transformList.insertItemBefore('aString', 0) threw exception TypeError: Fai led to execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of t ype 'SVGTransform'..
61 PASS transformList.insertItemBefore(circle1, 0) threw exception TypeError: Faile d to execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of typ e 'SVGTransform'..
62 PASS transformList.insertItemBefore(null, 0) threw exception TypeError: Failed t o execute 'insertItemBefore' on 'SVGTransformList': parameter 1 is not of type ' SVGTransform'..
63
64 Set transform='rotate(90) scale(2 2) translate(10 10) skewX(45)' for circle1
65 PASS circle1.setAttribute('transform', 'rotate(90) scale(2 2) translate(10 10) s kewX(45)') is undefined.
66 PASS transformList.numberOfItems is 4
67 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0 .0 1.0 -1.0 0.0 0.0 0.0]"
68 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
69 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
70 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
71 PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10 ) skewX(45)"
72
73 Test uncommon arguments for replaceItem()
74 PASS transformList.replaceItem(30) threw exception TypeError: Failed to execute 'replaceItem' on 'SVGTransformList': 2 arguments required, but only 1 present..
75 PASS transformList.replaceItem('aString') threw exception TypeError: Failed to e xecute 'replaceItem' on 'SVGTransformList': 2 arguments required, but only 1 pre sent..
76 PASS transformList.replaceItem(circle1) threw exception TypeError: Failed to exe cute 'replaceItem' on 'SVGTransformList': 2 arguments required, but only 1 prese nt..
77 PASS transformList.replaceItem(null) threw exception TypeError: Failed to execut e 'replaceItem' on 'SVGTransformList': 2 arguments required, but only 1 present. .
78 PASS transformList.replaceItem(30, 0) threw exception TypeError: Failed to execu te 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform '..
79 PASS transformList.replaceItem('aString', 0) threw exception TypeError: Failed t o execute 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTr ansform'..
80 PASS transformList.replaceItem(circle1, 0) threw exception TypeError: Failed to execute 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTran sform'..
81 PASS transformList.replaceItem(null, 0) threw exception TypeError: Failed to exe cute 'replaceItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransfo rm'..
82
83 Test uncommon values for indexed setter
84 PASS transformList[0] = 30 threw exception TypeError: Failed to set an indexed p roperty on 'SVGTransformList': The provided value is not of type 'SVGTransform'. .
85 PASS transformList[0] = 'aString' threw exception TypeError: Failed to set an in dexed property on 'SVGTransformList': The provided value is not of type 'SVGTran sform'..
86 PASS transformList[0] = circle1 threw exception TypeError: Failed to set an inde xed property on 'SVGTransformList': The provided value is not of type 'SVGTransf orm'..
87 PASS transformList[0] = null threw exception TypeError: Failed to set an indexed property on 'SVGTransformList': The provided value is not of type 'SVGTransform '..
88 PASS transformList.replaceItem(transformList.getItem(0), 0).toString() is "type= SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"
89 PASS transformList.numberOfItems is 4
90 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0 .0 1.0 -1.0 0.0 0.0 0.0]"
91 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
92 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
93 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
94 PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10 ) skewX(45)"
95 PASS transformList.replaceItem(transformList.getItem(0), 'aString').toString() i s "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"
96 PASS transformList.numberOfItems is 4
97 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0 .0 1.0 -1.0 0.0 0.0 0.0]"
98 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
99 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
100 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
101 PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10 ) skewX(45)"
102 PASS transformList.replaceItem(transformList.getItem(0), circle1).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"
103 PASS transformList.numberOfItems is 4
104 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0 .0 1.0 -1.0 0.0 0.0 0.0]"
105 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
106 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
107 PASS transformList.getItem(3).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
108 PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10 ) skewX(45)"
109 PASS transformList.replaceItem(transformList.getItem(0), null).toString() is "ty pe=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"
110 PASS transformList.numberOfItems is 4
111 PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10 ) skewX(45)"
112
113 Set transform='rotate(90) scale(2 2) translate(10 10) skewX(45)' for circle1
114 PASS circle1.setAttribute('transform', 'rotate(90) scale(2 2) translate(10 10) s kewX(45)') is undefined.
115
116 Test uncommon arguments for removeItem()
117 PASS transformList.removeItem(30) threw exception IndexSizeError: Failed to exec ute 'removeItem' on 'SVGTransformList': The index provided (30) is greater than the maximum bound (4)..
118 PASS transformList.removeItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix =[0.0 1.0 -1.0 0.0 0.0 0.0]"
119 PASS transformList.numberOfItems is 3
120 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_SCALE matrix=[2. 0 0.0 0.0 2.0 0.0 0.0]"
121 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
122 PASS transformList.getItem(2).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
123 PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10) skewX(45) "
124 PASS transformList.removeItem('aString').toString() is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
125 PASS transformList.numberOfItems is 2
126 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_TRANSLATE matrix =[1.0 0.0 0.0 1.0 10.0 10.0]"
127 PASS transformList.getItem(1).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
128 PASS circle1.getAttribute('transform') is "translate(10 10) skewX(45)"
129 PASS transformList.removeItem(circle1).toString() is "type=SVG_TRANSFORM_TRANSLA TE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
130 PASS transformList.numberOfItems is 1
131 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_SKEWX matrix=[1. 0 0.0 1.0 1.0 0.0 0.0]"
132 PASS circle1.getAttribute('transform') is "skewX(45)"
133
134 Test uncommon arguments for appendItem()
135 PASS transformList.appendItem(30) threw exception TypeError: Failed to execute ' appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'..
136 PASS transformList.appendItem('aString') threw exception TypeError: Failed to ex ecute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransfo rm'..
137 PASS transformList.appendItem(circle1) threw exception TypeError: Failed to exec ute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform '..
138 PASS transformList.appendItem(null) threw exception TypeError: Failed to execute 'appendItem' on 'SVGTransformList': parameter 1 is not of type 'SVGTransform'..
139
140 Testing animVal clear throws
141 PASS circle1.transform.animVal.clear() threw exception NoModificationAllowedErro r: Failed to execute 'clear' on 'SVGTransformList': The object is read-only..
142 PASS transformList.clear() is undefined.
143
144 Creating new SVGTransform, with 45 deg rotation about x=50, y=100 and append it to the transform list
145 PASS (transform = svg.createSVGTransform()).toString() is "type=SVG_TRANSFORM_MA TRIX matrix=[1.0 0.0 0.0 1.0 0.0 0.0]"
146 PASS transform.setRotate(45, 50, 100) is undefined.
147 PASS transformList.appendItem(transform).toString() is "type=SVG_TRANSFORM_ROTAT E matrix=[0.7 0.7 -0.7 0.7 85.4 -6.1]"
148 PASS transformList.numberOfItems is 1
149 PASS transformList.getItem(0).toString() is "type=SVG_TRANSFORM_ROTATE matrix=[0 .7 0.7 -0.7 0.7 85.4 -6.1]"
150 PASS circle1.getAttribute('transform') is "rotate(45 50 100)"
151 PASS successfullyParsed is true
152
153 TEST COMPLETE
154
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698