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

Side by Side Diff: LayoutTests/editing/deleting/delete-br-after-image.html

Issue 58533003: Move fast/js/resources files to resources. (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 <body> 1 <body>
2 <div id="container"> 2 <div id="container">
3 <div contenteditable="true" id="work"> 3 <div contenteditable="true" id="work">
4 <span id="sample"><img width="70" height="70" style="background: #DEF"><br>[clic k here, hold backspace]</span> 4 <span id="sample"><img width="70" height="70" style="background: #DEF"><br>[clic k here, hold backspace]</span>
5 </div> 5 </div>
6 </div> 6 </div>
7 </div> 7 </div>
8 <script src="../../fast/js/resources/js-test-pre.js"></script> 8 <script src="../../resources/js-test.js"></script>
9 <script> 9 <script>
10 function $(id) { return document.getElementById(id); } 10 function $(id) { return document.getElementById(id); }
11 11
12 var range = document.createRange(); 12 var range = document.createRange();
13 range.setStartAfter($('work').querySelector('br')); 13 range.setStartAfter($('work').querySelector('br'));
14 var selection = window.getSelection(); 14 var selection = window.getSelection();
15 selection.removeAllRanges(); 15 selection.removeAllRanges();
16 selection.addRange(range); 16 selection.addRange(range);
17 document.execCommand('Delete'); 17 document.execCommand('Delete');
18 shouldBeEqualToString('$("sample").innerHTML', '<img width="70" height="70" styl e="background: #DEF">[click here, hold backspace]'); 18 shouldBeEqualToString('$("sample").innerHTML', '<img width="70" height="70" styl e="background: #DEF">[click here, hold backspace]');
19 shouldBeEqualToString('selection.type', 'Caret'); 19 shouldBeEqualToString('selection.type', 'Caret');
20 shouldBe('selection.anchorNode', '$("sample")'); 20 shouldBe('selection.anchorNode', '$("sample")');
21 shouldBe('selection.anchorOffset', '1'); 21 shouldBe('selection.anchorOffset', '1');
22 if (window.testRunner) 22 if (window.testRunner)
23 $('container').outerHTML = ''; 23 $('container').outerHTML = '';
24 </script> 24 </script>
25 </body> 25 </body>
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/delete-br-001.html ('k') | LayoutTests/editing/deleting/delete-character-002.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698