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

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

Issue 2176113002: Convert editing/inserting/insert-div-01[1-7].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-25T15:18:37 Created 4 years, 5 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_div_with_attr.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert_div_with_attr.html b/third_party/WebKit/LayoutTests/editing/inserting/insert_div_with_attr.html
new file mode 100644
index 0000000000000000000000000000000000000000..c83d07008d99af3979acfb422f52b8ad3e0014da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert_div_with_attr.html
@@ -0,0 +1,153 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">|baz</div>bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false"><br></div>',
+ '<div spellcheck="false">|baz</div>bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR with attribute before "baz"');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz|</div>bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>',
+ '<div spellcheck="false">|<br></div>bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR with attribute after "baz"');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>|bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>',
+ '<div><br></div>|bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR without attribute before "bar"');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar|',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>|<br>',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR without attribute after "bar"');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>|foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div><br></div>',
+ '<div>|foo</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR without attribute before "foo"')
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>foo|</div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>foo</div>',
+ '<div>|<br></div>',
+ '<div><br class="xyz"></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR without attribute after "foo"')
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>foo</div>',
+ '<div>|<br class="xyz"></div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ '<div spellcheck="false">baz</div>bar',
+ '<div>foo</div>',
+ '<div><br class="xyz"></div>',
+ '<div>|<br></div>',
+ '</div>',
+ ].join('')),
+ 'insert DIV+BR without attribute after BR')
+</script>

Powered by Google App Engine
This is Rietveld 408576698