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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/set_base_and_extent/crossing_editable_boundary.html

Issue 2695193002: Selection API: setBaseAndExtent() and selectAllChildren() should create new Range based on the spec… (Closed)
Patch Set: rebase 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 <!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 <script src="../../assert_selection.js"></script> 4 <script src="../../assert_selection.js"></script>
5 <script> 5 <script>
6 test(function(){ 6 test(function(){
7 assert_selection( 7 assert_selection(
8 [ 8 [
9 '<div contenteditable><table id="base"><tbody>', 9 '<div contenteditable><table id="base"><tbody>',
10 '<tr><td contenteditable="false" id="extent">foo</td></tr>', 10 '<tr><td contenteditable="false" id="extent">foo</td></tr>',
11 '</tbody></table></div>' 11 '</tbody></table></div>'
12 ].join(''), 12 ].join(''),
13 selection => { 13 selection => {
14 const base = selection.document.getElementById('base'); 14 const base = selection.document.getElementById('base');
15 const extent = selection.document.getElementById('extent'); 15 const extent = selection.document.getElementById('extent');
16 selection.setBaseAndExtent(base, 0, extent, 0); 16 selection.setBaseAndExtent(base, 0, extent, 0);
17 }, 17 },
18 [ 18 [
19 '<div contenteditable>|<table id="base"><tbody>', 19 '<div contenteditable><table id="base">^<tbody>',
20 '<tr><td contenteditable="false" id="extent">foo</td></tr>', 20 '<tr><td contenteditable="false" id="extent">|foo</td></tr>',
21 '</tbody></table></div>' 21 '</tbody></table></div>'
22 ].join('') 22 ].join('')
23 ); 23 );
24 }, 24 },
25 'with one endpoint in non-editable content and the other in editable content'); 25 'with one endpoint in non-editable content and the other in editable content');
26 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698