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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html

Issue 1456333002: Make layout tests in editing/inserting to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-19T14:56:35 Created 5 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
OLDNEW
1 <script> 1 <!DOCTYPE html>
2 if (window.testRunner) 2 <script src="../../resources/testharness.js"></script>
3 testRunner.dumpEditingCallbacks(); 3 <script src="../../resources/testharnessreport.js"></script>
4 </script>
5 <p>This tests inserting a paragraph separator after a horizontal rule. You shou ld see 'foo', empty paragraph, horizontal rule, 'bar', and the caret should be j ust after the horizontal rule. <b>This demonstrates 8345. The caret after a hor izontal rule is drawn in the same location as the caret before a horizontal rule .</p> 4 <p>This tests inserting a paragraph separator after a horizontal rule. You shou ld see 'foo', empty paragraph, horizontal rule, 'bar', and the caret should be j ust after the horizontal rule. <b>This demonstrates 8345. The caret after a hor izontal rule is drawn in the same location as the caret before a horizontal rule .</p>
6 <div contenteditable="true" id="div">foo<hr>bar</div> 5 <div contenteditable="true" id="div">foo<hr>bar</div>
6 <div id="log"></div>
7 <script>
8 test(function() {
9 if (window.internals)
10 internals.settings.setEditingBehavior('mac');
11 var selection = window.getSelection();
12 var div = document.getElementById('div');
13 selection.collapse(div, 0);
14 selection.modify('move', 'forward', 'word');
15 selection.modify('move', 'forward', 'character');
16 selection.modify('move', 'forward', 'character');
17 document.execCommand('insertParagraph');
7 18
8 <script> 19 assert_equals(div.innerHTML, 'foo<hr><br>bar');
9 if (window.internals) 20 });
10 internals.settings.setEditingBehavior('mac');
11 var sel = window.getSelection();
12 var div = document.getElementById("div");
13 sel.collapse(div, 0);
14 sel.modify("move", "forward", "word");
15 sel.modify("move", "forward", "character");
16 sel.modify("move", "forward", "character");
17 document.execCommand("InsertParagraph");
18 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698