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

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

Issue 1785663002: Make setBaseAndExtent's arguments non-optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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);
yoichio 2016/04/19 07:21:16 setBaseAndExtent(node, offset) should be collapse(
philipj_slow 2016/04/19 12:34:31 If this particular instance is replaced with colla
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698