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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/replace-selection-1.html

Issue 2290143002: Convert editing/selection/replace-selection-1.html to use w3c test harness (Closed)
Patch Set: 2016-08-30T17:42:16 Created 4 years, 3 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
(Empty)
1 <script>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests for a bug when a selection is replaced by content with selectRepla cement == true. Below, you should see 'A new link' and 'link' should be select ed.</p>
6 <div id="test" contenteditable="true">A new link</div>
7
8 <script>
9 var s = window.getSelection();
10 var e = document.getElementById("test");
11
12 s.setBaseAndExtent(e.firstChild, 6, e.firstChild, 10);
13 document.execCommand("InsertHTML", false, "<a id='link' href='http://www.google. com'>link</a>");
14 e = document.getElementById("link");
15 s.setBaseAndExtent(e.firstChild, 0, e.firstChild, 4);
16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698