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

Side by Side Diff: LayoutTests/editing/inserting/insert-without-inheriting-style.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <div id="container"> 1 <div id="container">
2 <div contenteditable="true" id="sample">foo <input type="button" value="bar"> ba z</div> 2 <div contenteditable="true" id="sample">foo <input type="button" value="bar"> ba z</div>
3 </div> 3 </div>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 <script> 5 <script>
6 function $(id) { return document.getElementById(id); } 6 function $(id) { return document.getElementById(id); }
7 7
8 var range = document.createRange(); 8 var range = document.createRange();
9 range.setStartAfter(document.querySelector('input')); 9 range.setStartAfter(document.querySelector('input'));
10 var selection = window.getSelection(); 10 var selection = window.getSelection();
11 selection.removeAllRanges(); 11 selection.removeAllRanges();
12 selection.addRange(range); 12 selection.addRange(range);
13 document.execCommand('Delete'); 13 document.execCommand('Delete');
14 document.execCommand('InsertText', false, 'quux'); 14 document.execCommand('InsertText', false, 'quux');
15 shouldBeEqualToString('$("sample").innerHTML', 'foo quux&nbsp;baz'); 15 shouldBeEqualToString('$("sample").innerHTML', 'foo quux&nbsp;baz');
16 16
17 if (window.testRunner) 17 if (window.testRunner)
18 $('container').outerHTML = ''; 18 $('container').outerHTML = '';
19 </script> 19 </script>
20 <script src="../../fast/js/resources/js-test-post.js"></script>
21 </body> 20 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698