OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 <svg> | 4 <svg> |
5 <text> | 5 <text> |
6 <tspan id="tspan"> | 6 <tspan id="tspan"> |
7 <tspan id="tspan2">%uef5f%u9776%u638a</tspan> | 7 <tspan id="tspan2">%uef5f%u9776%u638a</tspan> |
8 <textPath id="textPath"></textPath> | 8 <textPath id="textPath"></textPath> |
9 </tspan> | 9 </tspan> |
10 </text> | 10 </text> |
11 </svg> | 11 </svg> |
12 <div id="log"></div> | 12 <div id="log"></div> |
13 <script> | 13 <script> |
14 // crbug.com/339185: If we create an anchor element using execCommand('CreateLin
k') in an SVG namespace it won't get a renderer because the command will create | 14 // crbug.com/339185: If we create an anchor element using execCommand('CreateLin
k') in an SVG namespace it won't get a renderer because the command will create |
15 // an HTML rather than an SVG anchor. Our subsequent attempt to apply an inline
style on the should fail rather than result in a crash. | 15 // an HTML rather than an SVG anchor. Our subsequent attempt to apply an inline
style on the should fail rather than result in a crash. |
16 test(function() { | 16 test(function() { |
17 tspan = document.getElementById("tspan"); | 17 tspan = document.getElementById("tspan"); |
18 tspan2 = document.getElementById("tspan2"); | 18 tspan2 = document.getElementById("tspan2"); |
19 textPath = document.getElementById("textPath"); | 19 textPath = document.getElementById("textPath"); |
20 | 20 |
21 colorprofile = document.createElementNS('http://www.w3.org/2000/svg', 'color
_profile'); | 21 colorprofile = document.createElementNS('http://www.w3.org/2000/svg', 'color
_profile'); |
22 li = document.createElement('li'); | 22 li = document.createElement('li'); |
23 colorprofile.appendChild(li); | 23 colorprofile.appendChild(li); |
24 document.implementation.createDocument('' ,'' ,null).adoptNode(colorprofile) | 24 document.implementation.createDocument('' ,'' ,null).adoptNode(colorprofile) |
25 | 25 |
26 input=document.createElement('input'); | 26 input=document.createElement('input'); |
27 textPath.parentNode.insertBefore(input, textPath); | 27 textPath.parentNode.insertBefore(input, textPath); |
28 window.getSelection().setBaseAndExtent(input, 4); | 28 window.getSelection().setBaseAndExtent(input, 4, null, 0); |
29 | 29 |
30 document.designMode='on'; | 30 document.designMode='on'; |
31 document.execCommand('Transpose'); | 31 document.execCommand('Transpose'); |
32 document.execCommand('selectall'); | 32 document.execCommand('selectall'); |
33 document.execCommand('CreateLink', 0, '#'); | 33 document.execCommand('CreateLink', 0, '#'); |
34 document.execCommand('CreateLink', 0, '#'); | 34 document.execCommand('CreateLink', 0, '#'); |
35 document.execCommand('Undo'); | 35 document.execCommand('Undo'); |
36 document.designMode='off' | 36 document.designMode='off' |
37 document.execCommand('Undo'); | 37 document.execCommand('Undo'); |
38 document.execCommand('Undo'); | 38 document.execCommand('Undo'); |
39 document.designMode='on'; | 39 document.designMode='on'; |
40 document.execCommand('italic'); | 40 document.execCommand('italic'); |
41 }); | 41 }); |
42 </script> | 42 </script> |
OLD | NEW |