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

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

Issue 2441363002: Convert editing/selection/5497643.html to use assert_selection() (Closed)
Patch Set: 2016-10-24T18:04:56 Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/after-removing-textarea.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <p>This tests to make sure that a selection inside a textarea is updated when th e textarea is removed from the document.</p>
5 <textarea id="textarea"></textarea>
6 <div id="log"></div>
7 <script>
8 textarea = document.getElementById("textarea");
9 textarea.setSelectionRange(0, 0);
10 textarea.focus();
11 textarea.parentNode.removeChild(textarea);
12 test(function() {
13 assert_equals(window.getSelection().type, 'Caret');
14 assert_equals(window.getSelection().getRangeAt(0).startContainer, document.b ody);
15 assert_equals(window.getSelection().getRangeAt(0).startOffset, 2);
16 });
17 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/after-removing-textarea.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698