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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/apply-inline-style-to-element-with-no-renderer-crash.html

Issue 1604163002: Make apply-inline-style-to-element-with-no-renderer-crash.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-01-20T18:25:00 Created 4 years, 11 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 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <svg>
5 <text>
6 <tspan id="tspan">
7 <tspan id="tspan2">%uef5f%u9776%u638a</tspan>
8 <textPath id="textPath"></textPath>
9 </tspan>
10 </text>
11 </svg>
12 <div id="log"></div>
1 <script> 13 <script>
2 // 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
3 // 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.
4 onload = function() { 16 test(function() {
5 tspan = document.getElementById("tspan"); 17 tspan = document.getElementById("tspan");
6 tspan2 = document.getElementById("tspan2"); 18 tspan2 = document.getElementById("tspan2");
7 textPath = document.getElementById("textPath"); 19 textPath = document.getElementById("textPath");
8 20
9 colorprofile = document.createElementNS('http://www.w3.org/2000/svg', 'color _profile'); 21 colorprofile = document.createElementNS('http://www.w3.org/2000/svg', 'color _profile');
10 li = document.createElement('li'); 22 li = document.createElement('li');
11 colorprofile.appendChild(li); 23 colorprofile.appendChild(li);
12 document.implementation.createDocument('' ,'' ,null).adoptNode(colorprofile) 24 document.implementation.createDocument('' ,'' ,null).adoptNode(colorprofile)
13 25
14 input=document.createElement('input'); 26 input=document.createElement('input');
15 textPath.parentNode.insertBefore(input, textPath); 27 textPath.parentNode.insertBefore(input, textPath);
16 window.getSelection().setBaseAndExtent(input, 4); 28 window.getSelection().setBaseAndExtent(input, 4);
17 29
18 document.designMode='on'; 30 document.designMode='on';
19 document.execCommand('Transpose'); 31 document.execCommand('Transpose');
20 document.execCommand('selectall'); 32 document.execCommand('selectall');
21 document.execCommand('CreateLink', 0, '#'); 33 document.execCommand('CreateLink', 0, '#');
22 document.execCommand('CreateLink', 0, '#'); 34 document.execCommand('CreateLink', 0, '#');
23 document.execCommand('Undo'); 35 document.execCommand('Undo');
24 document.designMode='off' 36 document.designMode='off'
25 document.execCommand('Undo'); 37 document.execCommand('Undo');
26 document.execCommand('Undo'); 38 document.execCommand('Undo');
27 document.designMode='on'; 39 document.designMode='on';
28 document.execCommand('italic'); 40 document.execCommand('italic');
29 } 41 });
30 </script> 42 </script>
31 <svg>
32 <text>
33 <tspan id="tspan">
34 <tspan id="tspan2">%uef5f%u9776%u638a</tspan>
35 <textPath id="textPath"></textPath>
36 </tspan>
37 </text>
38 </svg>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698