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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html

Issue 2550633002: Convert editing/execCommand/format-block-contenteditable-false.html to utilize w3c test harness (Closed)
Patch Set: 2016-12-02T15:40:50 Created 4 years 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/execCommand/format-block-contenteditable-false-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!doctype html>
2 <html> 2 <script src="../../resources/testharness.js"></script>
3 <head> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../../resources/dump-as-markup.js"></script> 4 <script src="../assert_selection.js"></script>
5 </head>
6 <body>
7 <div id="editorcontainer" contenteditable="true">
8 Will select from here
9 <div contenteditable="false">
10 over this contenteditable=false div
11 </div>
12 until here.
13 </div>
14 </body>
15 <script> 5 <script>
16 Markup.description('formatblock on selection with a contenteditable="false" child.'); 6 test(() => assert_selection(
17 7 [
18 var selection = window.getSelection(); 8 '<div contenteditable>',
19 selection.removeAllRanges(); 9 ' ^Will select from here',
20 10 ' <div contenteditable="false">',
21 var container = document.getElementById('editorcontainer'); 11 ' over this contenteditable=false div',
22 var range = document.createRange() 12 ' </div>',
23 range.setStartBefore(container.firstChild); 13 ' until here.|',
24 range.setEndAfter(container.lastChild); 14 '</div>',
25 selection.addRange(range); 15 ].join('\n'),
26 16 selection => {
27 document.execCommand('italic', false, ""); 17 selection.document.execCommand('italic');
28 document.execCommand('formatblock', false, "<h1>"); 18 selection.document.execCommand('formatblock', false, '<h1>');
29 19 },
30 Markup.dump(container); 20 [
21 '<div contenteditable><h1><i>',
22 ' ^Will select from here',
23 ' </i><br><i>',
24 ' until here.|',
25 '</i></h1><div contenteditable="false">',
26 ' over this contenteditable=false div',
27 ' </div></div>',
28 ].join('\n')),
29 'formatBlock with uneditable');
31 </script> 30 </script>
32 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698