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

Unified Diff: third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html

Issue 2722653002: Convert editing/pasteboard/paste-text-at-tabspan-002.html with assert_selection (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html
index b2b847b22ea29dd38301a77dc3c5f08d5fb531d8..679908edfecdda22588c44ef7526d42b2989518a 100644
--- a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html
@@ -1,29 +1,33 @@
-<!DOCTYPE html>
-<html>
-<body style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">
-<div contenteditable id="root" style="border: 2px solid red; padding: 12px; font-size: 24px">
-<span id="test">a<span class="Apple-tab-span" style="white-space:pre"> </span>z</span>
-</div>
-<script src="../editing.js"></script>
-<script src="../../resources/dump-as-markup.js"></script>
+<!doctype html>
+<head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
<script>
+test(() => {
+ assert_not_equals(window.internals, undefined,
+ 'This test requires clipboard access');
-var test = document.getElementById('test');
-test.focus();
-window.getSelection().collapse(test, 0);
-
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-
-extendSelectionForwardByCharacterCommand();
-copyCommand();
-for (i = 0; i < 2; i++)
- moveSelectionForwardByCharacterCommand();
-pasteCommand();
-typeCharacterCommand();
-
-Markup.dump('root', 'You should see a\\tax\\t\\tz below');
-
+ assert_selection(
+ [
+ '<div contenteditable>',
+ 'a',
+ '<span class="Apple-tab-span" style="white-space:pre"> | </span>',
yosin_UTC9 2017/02/28 01:53:55 FYI: We're working to get rid of "Apple-tab-span"[
+ 'z',
+ '</div>'
+ ].join(''),
+ selection => {
+ selection.setClipboardData('a');
+ selection.document.execCommand('paste');
+ },
+ [
+ '<div contenteditable>',
+ 'a',
+ '<span class="Apple-tab-span" style="white-space:pre"> </span>',
+ 'a|',
+ '<span class="Apple-tab-span" style="white-space:pre"> </span>',
+ 'z',
+ '</div>'
+ ].join(''));
+}, 'Paste text in tabspan');
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698