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

Side by Side Diff: LayoutTests/editing/selection/selection-change-in-mutation-event-by-remove-children.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 <div id="container"> 1 <div id="container">
2 <p id="description"></p> 2 <p id="description"></p>
3 <div id="sample">foobar</div> 3 <div id="sample">foobar</div>
4 </div> 4 </div>
5 <div id="console"></div> 5 <div id="console"></div>
6 <script src="../../fast/js/resources/js-test-pre.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <script> 7 <script>
8 description('Selection should be updated after set innerHTML.'); 8 description('Selection should be updated after set innerHTML.');
9 9
10 function $(id) { return document.getElementById(id); } 10 function $(id) { return document.getElementById(id); }
11 11
12 var selection = window.getSelection(); 12 var selection = window.getSelection();
13 document.addEventListener('DOMNodeRemovedFromDocument', function () { 13 document.addEventListener('DOMNodeRemovedFromDocument', function () {
14 selection.selectAllChildren($('sample')); 14 selection.selectAllChildren($('sample'));
15 }, true); 15 }, true);
16 16
17 selection.selectAllChildren($('sample')); 17 selection.selectAllChildren($('sample'));
18 $('sample').innerHTML = ''; 18 $('sample').innerHTML = '';
19 19
20 shouldBe('selection.anchorOffset', '0'); 20 shouldBe('selection.anchorOffset', '0');
21 shouldBe('selection.focusOffset', '0'); 21 shouldBe('selection.focusOffset', '0');
22 22
23 if (window.testRunner) 23 if (window.testRunner)
24 $('container').outerHTML = ''; 24 $('container').outerHTML = '';
25 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698