Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / svg / dom / SVGLengthList-insertItemBefore-expected.txt
1 ABC
2 ABC
3 This is a test of the SVGLengthList::insertItemBefore() API.
4
5 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6
7
8
9 Create three SVGLength objects, with values=50,100,150
10 PASS newLength1.value is 50
11 PASS newLength2.value is 100
12 PASS newLength3.value is 150
13 PASS newLength1 != newLength2 is true
14 PASS newLength2 != newLength3 is true
15 PASS newLength3 != newLength1 is true
16 PASS newLength1.value == newLength2.value - 50 is true
17 PASS newLength2.value + 50 == newLength3.value is true
18
19 Check initial list state
20 PASS text1.x.baseVal.numberOfItems is 3
21 PASS text1.x.baseVal.getItem(0).value is 500
22 PASS text1.x.baseVal.getItem(1).value is 1000
23 PASS text1.x.baseVal.getItem(2).value is 1500
24 PASS text1.x.baseVal.getItem(3) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (3) is greater than or equal to the maximum bound (3)..
25
26 Insert item 'newLength1' at the end of the list, by using a large index
27 PASS text1.x.baseVal.insertItemBefore(newLength1, 1000) is newLength1
28 PASS text1.x.baseVal.numberOfItems is 4
29 PASS text1.x.baseVal.getItem(0).value is 500
30 PASS text1.x.baseVal.getItem(1).value is 1000
31 PASS text1.x.baseVal.getItem(2).value is 1500
32 PASS text1.x.baseVal.getItem(3).value is 50
33 PASS text1.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal to the maximum bound (4)..
34
35 Storing getItem(0/1/2) in local variables
36
37 Insert item 'newLength2' at the front of the list, by using index=0
38 PASS text1.x.baseVal.insertItemBefore(newLength2, 0) is newLength2
39 PASS text1.x.baseVal.numberOfItems is 5
40 PASS text1.x.baseVal.getItem(0).value is 100
41 PASS text1.x.baseVal.getItem(1).value is 500
42 PASS text1.x.baseVal.getItem(2).value is 1000
43 PASS text1.x.baseVal.getItem(3).value is 1500
44 PASS text1.x.baseVal.getItem(4).value is 50
45 PASS text1.x.baseVal.getItem(5) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (5) is greater than or equal to the maximum bound (5)..
46
47 Assure that previously saved wrappers still show the old values
48 PASS item0.value is 500
49 PASS item1.value is 1000
50 PASS item2.value is 1500
51 PASS item3.value is 50
52
53 Insert item 'newLength3' at position=2, between '500' and '1000'
54 PASS text1.x.baseVal.insertItemBefore(newLength3, 2) is newLength3
55 PASS text1.x.baseVal.numberOfItems is 6
56 PASS text1.x.baseVal.getItem(0).value is 100
57 PASS text1.x.baseVal.getItem(1).value is 500
58 PASS text1.x.baseVal.getItem(2).value is 150
59 PASS text1.x.baseVal.getItem(3).value is 1000
60 PASS text1.x.baseVal.getItem(4).value is 1500
61 PASS text1.x.baseVal.getItem(5).value is 50
62 PASS text1.x.baseVal.getItem(6) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (6) is greater than or equal to the maximum bound (6)..
63
64 Insert item 'newLength3' at position=1, between '100' and '500', remove it from the old position=2 afterwards.
65 PASS text1.x.baseVal.insertItemBefore(newLength3, 1) is newLength3
66 PASS text1.x.baseVal.numberOfItems is 6
67 PASS text1.x.baseVal.getItem(0).value is 100
68 PASS text1.x.baseVal.getItem(1).value is 150
69 PASS text1.x.baseVal.getItem(2).value is 500
70 PASS text1.x.baseVal.getItem(3).value is 1000
71 PASS text1.x.baseVal.getItem(4).value is 1500
72 PASS text1.x.baseVal.getItem(5).value is 50
73 PASS text1.x.baseVal.getItem(6) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (6) is greater than or equal to the maximum bound (6)..
74
75 Insert item 'newLength3' at position=0, before '100', remove it from the old position=5 afterwards.
76 PASS text1.x.baseVal.insertItemBefore(newLength1, 0) is newLength1
77 PASS text1.x.baseVal.numberOfItems is 6
78 PASS text1.x.baseVal.getItem(0).value is 50
79 PASS text1.x.baseVal.getItem(1).value is 100
80 PASS text1.x.baseVal.getItem(2).value is 150
81 PASS text1.x.baseVal.getItem(3).value is 500
82 PASS text1.x.baseVal.getItem(4).value is 1000
83 PASS text1.x.baseVal.getItem(5).value is 1500
84 PASS text1.x.baseVal.getItem(6) threw exception IndexSizeError: Failed to execute 'getItem' on 'SVGLengthList': The index provided (6) is greater than or equal to the maximum bound (6)..
85
86 The test passes if you only see 'PASS' messages, and both text elements on top look the same
87
88 PASS successfullyParsed is true
89
90 TEST COMPLETE
91