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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html

Issue 2284343002: Convert editing/inserting/insert-br-at-tabspan-00[1-3].html to use w3c test harness (Closed)
Patch Set: 2016-08-29T17:02:59 Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html b/third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html
new file mode 100644
index 0000000000000000000000000000000000000000..7907e4b18fe4dff30e489b3c9395c19bdd528a03
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<div id="log"></div>
+<script>
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'a|<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span>z',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('insertLineBreak');
+ selection.document.execCommand('insertText', false, 'x');
+ },
+ [
+ '<div contenteditable>',
+ 'a<br>x|<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span>z',
+ '</div>',
+ ].join('')),
+ 'Insert newline and a character before tabspan');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'a<span class="Apple-tab-span" style="white-space:pre">\t|\t\t</span>z',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('insertLineBreak');
+ selection.document.execCommand('insertText', false, 'x');
+ },
+ [
+ '<div contenteditable>',
+ 'a<span class="Apple-tab-span" style="white-space:pre">\t</span><br>',
+ 'x|<span class="Apple-tab-span" style="white-space:pre">\t\t</span>z',
+ '</div>',
+ ].join('')),
+ 'Insert newline and a character in tabspan');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t|</span>z',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('insertLineBreak');
+ selection.document.execCommand('insertText', false, 'x');
+ },
+ [
+ '<div contenteditable>',
+ 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span><br>x|z',
+ '</div>',
+ ].join('')),
+ 'Insert newline and a character after tabspan');
+</script>

Powered by Google App Engine
This is Rietveld 408576698