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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-character-003.html

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html Created 3 years, 10 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 <div id="container"> 1 <div id="container">
2 <div id="sample" contenteditable="true"></div> 2 <div id="sample" contenteditable="true"></div>
3 </div> 3 </div>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 function $(id) { return document.getElementById(id); } 6 function $(id) { return document.getElementById(id); }
7 var sample = $('sample'); 7 var sample = $('sample');
8 var selection = window.getSelection(); 8 var selection = window.getSelection();
9 function testIt(sourceHTML, expectedHTML, expectedNode, expectedOffset) 9 function testIt(sourceHTML, expectedHTML, expectedNode, expectedOffset)
10 { 10 {
(...skipping 22 matching lines...) Expand all
33 33
34 testIt('a|<br>', '<br>', 'sample', 0); 34 testIt('a|<br>', '<br>', 'sample', 0);
35 testIt('a<br>|<br>', 'a<br>', 'sample.firstChild', 1); 35 testIt('a<br>|<br>', 'a<br>', 'sample.firstChild', 1);
36 testIt('a<br><br>|<br>', 'a<br><br>', 'sample', 2); 36 testIt('a<br><br>|<br>', 'a<br><br>', 'sample', 2);
37 37
38 testIt('a|<br><br>', '<br><br>', 'sample', 0); 38 testIt('a|<br><br>', '<br><br>', 'sample', 0);
39 testIt('a<br>|<br><br>', 'a<br><br>', 'sample.firstChild', 1); 39 testIt('a<br>|<br><br>', 'a<br><br>', 'sample.firstChild', 1);
40 testIt('a<br><br>|<br><br>', 'a<br><br><br>', 'sample', 2); 40 testIt('a<br><br>|<br><br>', 'a<br><br><br>', 'sample', 2);
41 41
42 testIt('a<br>|b', 'ab', 'sample.firstChild', 1); 42 testIt('a<br>|b', 'ab', 'sample.firstChild', 1);
43 testIt('a<br><br>|b', 'a<br>b', 'sample', 2); 43 testIt('a<br><br>|b', 'a<br>b', 'sample.lastChild', 0);
44 testIt('a<br><br><br>|b', 'a<br><br>b', 'sample', 3); 44 testIt('a<br><br><br>|b', 'a<br><br>b', 'sample.lastChild', 0);
45 45
46 testIt('a<br>b|', 'a<br><br>', 'sample', 2); 46 testIt('a<br>b|', 'a<br><br>', 'sample', 2);
47 testIt('a<br><br>b|', 'a<br><br><br>', 'sample', 3); 47 testIt('a<br><br>b|', 'a<br><br><br>', 'sample', 3);
48 testIt('a<br><br><br>b|', 'a<br><br><br><br>', 'sample', 4); 48 testIt('a<br><br><br>b|', 'a<br><br><br><br>', 'sample', 4);
49 49
50 if (window.testRunner) 50 if (window.testRunner)
51 $('container').outerHTML = ''; 51 $('container').outerHTML = '';
52 </script> 52 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698