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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/text/lengthAdjust-text-metrics-expected.txt

Issue 1773403002: Update SVG text layout to use shaped glyph data & go fast (O(n^2)->O(n)) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1773353003
Patch Set: Minor cleanup of comments and tests Created 4 years, 9 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
1 Complete test of the SVGTextContentElement API 1 Complete test of the SVGTextContentElement API
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 Test SVGTextContentElement SVG DOM properties 6 Test SVGTextContentElement SVG DOM properties
7 PASS svgText.textLength.baseVal.value.toFixed(1) is "200.0" 7 PASS svgText.textLength.baseVal.value.toFixed(1) is "200.0"
8 PASS svgText.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGA NDGLYPHS 8 PASS svgText.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGA NDGLYPHS
9 9
10 Test getNumberOfChars() API 10 Test getNumberOfChars() API
11 PASS svgText.getNumberOfChars() is 4 11 PASS svgText.getNumberOfChars() is 4
12 12
13 Test getComputedTextLength() API 13 Test getComputedTextLength() API
14 PASS lengthToString(svgText.getComputedTextLength()) is "200.0" 14 PASS lengthToString(svgText.getComputedTextLength()) is "200.0"
15 15
16 Test getSubStringLength() API 16 Test getSubStringLength() API
17 FAIL lengthToString(svgText.getSubStringLength(0, 1)) should be 61.5. Was 66.6. 17 FAIL lengthToString(svgText.getSubStringLength(0, 1)) should be 61.5. Was 54.5.
18 FAIL lengthToString(svgText.getSubStringLength(0, 2)) should be 117.9. Was 115.2 . 18 FAIL lengthToString(svgText.getSubStringLength(0, 2)) should be 117.9. Was 115.2 .
19 FAIL lengthToString(svgText.getSubStringLength(0, 3)) should be 169.2. Was 169.7 . 19 FAIL lengthToString(svgText.getSubStringLength(0, 3)) should be 169.2. Was 169.7 .
20 PASS lengthToString(svgText.getSubStringLength(0, 4)) is "200.0" 20 PASS lengthToString(svgText.getSubStringLength(0, 4)) is "200.0"
21 FAIL lengthToString(svgText.getSubStringLength(1, 1)) should be 56.4. Was 48.6. 21 FAIL lengthToString(svgText.getSubStringLength(1, 1)) should be 56.4. Was 60.6.
22 FAIL lengthToString(svgText.getSubStringLength(1, 2)) should be 107.7. Was 103.1 . 22 FAIL lengthToString(svgText.getSubStringLength(1, 2)) should be 107.7. Was 115.2 .
23 FAIL lengthToString(svgText.getSubStringLength(1, 3)) should be 138.5. Was 133.4 . 23 FAIL lengthToString(svgText.getSubStringLength(1, 3)) should be 138.5. Was 145.5 .
24 FAIL lengthToString(svgText.getSubStringLength(2, 1)) should be 51.3. Was 54.5. 24 FAIL lengthToString(svgText.getSubStringLength(2, 1)) should be 51.3. Was 54.5.
25 FAIL lengthToString(svgText.getSubStringLength(2, 2)) should be 82.1. Was 84.8. 25 FAIL lengthToString(svgText.getSubStringLength(2, 2)) should be 82.1. Was 84.8.
26 FAIL lengthToString(svgText.getSubStringLength(3, 1)) should be 30.8. Was 30.3. 26 FAIL lengthToString(svgText.getSubStringLength(3, 1)) should be 30.8. Was 30.3.
27 27
28 Test getStartPositionOfChar() API 28 Test getStartPositionOfChar() API
29 PASS pointToString(svgText.getStartPositionOfChar(0)) is "(10.0,20.0)" 29 PASS pointToString(svgText.getStartPositionOfChar(0)) is "(10.0,20.0)"
30 FAIL pointToString(svgText.getStartPositionOfChar(1)) should be (71.5,20.0). Was (76.6,20.0). 30 FAIL pointToString(svgText.getStartPositionOfChar(1)) should be (71.5,20.0). Was (64.5,20.0).
31 FAIL pointToString(svgText.getStartPositionOfChar(2)) should be (127.9,20.0). Wa s (125.2,20.0). 31 FAIL pointToString(svgText.getStartPositionOfChar(2)) should be (127.9,20.0). Wa s (125.2,20.0).
32 FAIL pointToString(svgText.getStartPositionOfChar(3)) should be (179.2,20.0). Wa s (179.7,20.0). 32 FAIL pointToString(svgText.getStartPositionOfChar(3)) should be (179.2,20.0). Wa s (179.7,20.0).
33 33
34 Test getEndPositionOfChar() API 34 Test getEndPositionOfChar() API
35 FAIL pointToString(svgText.getEndPositionOfChar(0)) should be (71.5,20.0). Was ( 76.6,20.0). 35 FAIL pointToString(svgText.getEndPositionOfChar(0)) should be (71.5,20.0). Was ( 64.5,20.0).
36 FAIL pointToString(svgText.getEndPositionOfChar(1)) should be (127.9,20.0). Was (125.2,20.0). 36 FAIL pointToString(svgText.getEndPositionOfChar(1)) should be (127.9,20.0). Was (125.2,20.0).
37 FAIL pointToString(svgText.getEndPositionOfChar(2)) should be (179.2,20.0). Was (179.7,20.0). 37 FAIL pointToString(svgText.getEndPositionOfChar(2)) should be (179.2,20.0). Was (179.7,20.0).
38 PASS pointToString(svgText.getEndPositionOfChar(3)) is "(210.0,20.0)" 38 PASS pointToString(svgText.getEndPositionOfChar(3)) is "(210.0,20.0)"
39 39
40 Test getExtentOfChar() API 40 Test getExtentOfChar() API
41 FAIL rectToString(svgText.getExtentOfChar(0)) should be (10.0,1.9)-(61.5x22.3). Was (10.0,2.0)-(66.6x22.0). 41 FAIL rectToString(svgText.getExtentOfChar(0)) should be (10.0,1.9)-(61.5x22.3). Was (10.0,2.0)-(54.5x22.0).
42 FAIL rectToString(svgText.getExtentOfChar(1)) should be (71.5,1.9)-(56.4x22.3). Was (76.6,2.0)-(48.6x22.0). 42 FAIL rectToString(svgText.getExtentOfChar(1)) should be (71.5,1.9)-(56.4x22.3). Was (64.5,2.0)-(60.6x22.0).
43 FAIL rectToString(svgText.getExtentOfChar(2)) should be (127.9,1.9)-(51.3x22.3). Was (125.2,2.0)-(54.5x22.0). 43 FAIL rectToString(svgText.getExtentOfChar(2)) should be (127.9,1.9)-(51.3x22.3). Was (125.2,2.0)-(54.5x22.0).
44 FAIL rectToString(svgText.getExtentOfChar(3)) should be (179.2,1.9)-(30.8x22.3). Was (179.7,2.0)-(30.3x22.0). 44 FAIL rectToString(svgText.getExtentOfChar(3)) should be (179.2,1.9)-(30.8x22.3). Was (179.7,2.0)-(30.3x22.0).
45 45
46 Test getRotationOfChar() API 46 Test getRotationOfChar() API
47 PASS svgText.getRotationOfChar(0).toFixed(1) is "0.0" 47 PASS svgText.getRotationOfChar(0).toFixed(1) is "0.0"
48 PASS svgText.getRotationOfChar(1).toFixed(1) is "0.0" 48 PASS svgText.getRotationOfChar(1).toFixed(1) is "0.0"
49 PASS svgText.getRotationOfChar(2).toFixed(1) is "0.0" 49 PASS svgText.getRotationOfChar(2).toFixed(1) is "0.0"
50 PASS svgText.getRotationOfChar(3).toFixed(1) is "0.0" 50 PASS svgText.getRotationOfChar(3).toFixed(1) is "0.0"
51 51
52 Test getCharNumAtPosition() API 52 Test getCharNumAtPosition() API
53 > Testing point=(0.0,10.0) 53 > Testing point=(0.0,10.0)
54 PASS svgText.getCharNumAtPosition(point) is -1 54 PASS svgText.getCharNumAtPosition(point) is -1
55 > Testing point=(9.9,10.0) 55 > Testing point=(9.9,10.0)
56 PASS svgText.getCharNumAtPosition(point) is -1 56 PASS svgText.getCharNumAtPosition(point) is -1
57 > Testing point=(10.1,10.0) 57 > Testing point=(10.1,10.0)
58 PASS svgText.getCharNumAtPosition(point) is 0 58 PASS svgText.getCharNumAtPosition(point) is 0
59 > Testing point=(71.4,10.0) 59 > Testing point=(71.4,10.0)
60 PASS svgText.getCharNumAtPosition(point) is 0 60 FAIL svgText.getCharNumAtPosition(point) should be 0. Was 1.
61 > Testing point=(71.6,10.0) 61 > Testing point=(71.6,10.0)
62 FAIL svgText.getCharNumAtPosition(point) should be 1. Was 0. 62 PASS svgText.getCharNumAtPosition(point) is 1
63 > Testing point=(127.8,10.0) 63 > Testing point=(127.8,10.0)
64 FAIL svgText.getCharNumAtPosition(point) should be 1. Was 2. 64 FAIL svgText.getCharNumAtPosition(point) should be 1. Was 2.
65 > Testing point=(128.0,10.0) 65 > Testing point=(128.0,10.0)
66 PASS svgText.getCharNumAtPosition(point) is 2 66 PASS svgText.getCharNumAtPosition(point) is 2
67 > Testing point=(179.1,10.0) 67 > Testing point=(179.1,10.0)
68 PASS svgText.getCharNumAtPosition(point) is 2 68 PASS svgText.getCharNumAtPosition(point) is 2
69 > Testing point=(179.3,10.0) 69 > Testing point=(179.3,10.0)
70 FAIL svgText.getCharNumAtPosition(point) should be 3. Was 2. 70 FAIL svgText.getCharNumAtPosition(point) should be 3. Was 2.
71 > Testing point=(209.9,10.0) 71 > Testing point=(209.9,10.0)
72 PASS svgText.getCharNumAtPosition(point) is 3 72 PASS svgText.getCharNumAtPosition(point) is 3
73 > Testing point=(210.1,10.0) 73 > Testing point=(210.1,10.0)
74 PASS svgText.getCharNumAtPosition(point) is -1 74 PASS svgText.getCharNumAtPosition(point) is -1
75 > Testing point=(250.0,10.0) 75 > Testing point=(250.0,10.0)
76 PASS svgText.getCharNumAtPosition(point) is -1 76 PASS svgText.getCharNumAtPosition(point) is -1
77 PASS successfullyParsed is true 77 PASS successfullyParsed is true
78 78
79 TEST COMPLETE 79 TEST COMPLETE
80 80
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698