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/pasteboard/paste_text_with_text_transform.html

Issue 2184033002: Convert editing/paste-text-019.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-27T14:08:02 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/pasteboard/paste_text_with_text_transform.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste_text_with_text_transform.html b/third_party/WebKit/LayoutTests/editing/pasteboard/paste_text_with_text_transform.html
new file mode 100644
index 0000000000000000000000000000000000000000..7c8b6808fad6f2644eb26eef1bdc10d04e2d05a4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste_text_with_text_transform.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+// See detail in http://wkb.ug/3429
+test(() => {
+ assert_not_equals(window.testRunner, undefined,
+ 'This test requires testRunner to read/write clipboard.');
+ assert_selection(
+ [
+ '<div contenteditable>',
+ '<span style="text-transform: capitalize;">^foo|</span>',
+ '<span id="target">bar</span>',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('copy');
+ let target = selection.document.getElementById('target');
+ selection.collapse(target, 1);
+ selection.document.execCommand('pasteAndMatchStyle');
+ },
+ [
+ '<div contenteditable>',
+ '<span style="text-transform: capitalize;">foo</span>',
+ '<span id="target">barFoo|</span>',
+ '</div>',
+ ].join(''));
+ }, 'text-transform should affect text in clipboard');
+</script>

Powered by Google App Engine
This is Rietveld 408576698