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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html

Issue 2179033004: Convert editing/style/5017613-*.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/style/apply_style_to_plaintext_only.html
diff --git a/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html b/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html
new file mode 100644
index 0000000000000000000000000000000000000000..fa2ef989ba2d099d46ae1eee92107c475b9cbcc6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html
@@ -0,0 +1,61 @@
+<!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>^foo</div>',
+ '<table contenteditable="false">',
+ '<tr>',
+ '<td>non-editable</td>',
+ '<td contenteditable="plaintext-only">plaintext-only</td>',
+ '</tr>',
+ '</table>|',
+ '</div>'
+ ].join(''),
+ 'bold',
+ [
+ '<div contenteditable>',
+ '<div><b>^foo</b></div>',
+ '<table contenteditable="false">',
+ '<tbody><tr>',
+ '<td>non-editable</td>',
+ '<td contenteditable="plaintext-only" style="font-weight: bold;">plaintext-only</td>',
+ '</tr></tbody>',
+ '</table>|',
+ '</div>'
+ ].join('')),
+ 'Plaintext-only regions can be styled as long as they are fully selected.');
+
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>^foo</div>',
+ '<table contenteditable="false">',
+ '<tr>',
+ '<td>non-editable</td>',
+ '<td contenteditable="plaintext-only">',
+ '<span>plaintext|</span>-only',
+ '</td>',
+ '</tr>',
+ '</table>',
+ '</div>'
+ ].join(''),
+ 'bold',
+ [
+ '<div contenteditable>',
+ '<div><b>^foo</b></div>',
+ '<table contenteditable="false">',
+ '<tbody><tr>',
+ '<td>non-editable</td>',
+ '<td contenteditable="plaintext-only">',
+ '<span>plaintext|</span>-only',
+ '</td>',
+ '</tr></tbody>',
+ '</table>',
+ '</div>'
+ ].join('')),
+ 'Plaintext-only regions are not styled if they are not fully selected.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698