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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/remove_format_and_extract_contents.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 <!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 // This tests for a bug in GMail's Editor, they try to extract the contents 6 // This tests for a bug in GMail's Editor, they try to extract the contents
7 // of a range that has had it's contents removed from the document by an 7 // of a range that has had it's contents removed from the document by an
8 // editing command. Since the bug 43017 requires WebKit does not remove 8 // editing command. Since the bug 43017 requires WebKit does not remove
9 // anchor elements, div should be empty after the extraction. We currently 9 // anchor elements, div should be empty after the extraction. We currently
10 // leave anchor element in the div due to the Bug 47916. 10 // leave anchor element in the div due to the Bug 47916.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 selection.document.execCommand('selectAll'); 44 selection.document.execCommand('selectAll');
45 selection.document.execCommand('removeFormat'); 45 selection.document.execCommand('removeFormat');
46 var result = range.extractContents(); 46 var result = range.extractContents();
47 var element = selection.document.createElement('div'); 47 var element = selection.document.createElement('div');
48 element.appendChild(result); 48 element.appendChild(result);
49 assert_equals(element.innerHTML, 49 assert_equals(element.innerHTML,
50 'dog<a href="http://example.com/">food</a>'); 50 'dog<a href="http://example.com/">food</a>');
51 }, 51 },
52 [ 52 [
53 '<div contenteditable id="div">', 53 '<div contenteditable id="div">',
54 '^<a href="http://example.com/">|</a>', 54 '|<a href="http://example.com/"></a>',
55 '</div>', 55 '</div>',
56 ].join('')), 56 ].join('')),
57 'Range#extractContents() extracts A with anchor text but leaves A.'); 57 'Range#extractContents() extracts A with anchor text but leaves A.');
58 </script> 58 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698