| Index: third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-013.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-013.html b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-013.html
|
| index 47115265bbbf3de28b1919f257c52d2d4bbeb067..68f38efe4da02e8cf2ae535157d8360f73622ac0 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-013.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-013.html
|
| @@ -1,42 +1,27 @@
|
| -<html>
|
| -<head>
|
| -
|
| -<style>
|
| -.editing {
|
| - border: 2px solid red;
|
| - padding: 12px;
|
| - font-size: 24px;
|
| -}
|
| -</style>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| -
|
| -<script>
|
| -
|
| -function editingTest() {
|
| - for (i = 0; i < 4; i++)
|
| - extendSelectionForwardByCharacterCommand();
|
| - copyCommand();
|
| - moveSelectionForwardByCharacterCommand();
|
| - typeCharacterCommand();
|
| - pasteCommand();
|
| -}
|
| -
|
| -</script>
|
| -
|
| -<title>Editing Test</title>
|
| -</head>
|
| -<body contenteditable id="root">
|
| -
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| See this bug: <a href="rdar://problem/3918712"><rdar://problem/3918712></a> "Paste as Quotation" in Mail just pastes (<blockquote> tag seems to be lost).
|
| Should see one box with blockquoted "foo" text, followed by another box with an "x" (not in a blockquote) and "foo" (in a blockquote).
|
| -<div style="height: 24px"></div>
|
|
|
| -<div id="test" class="editing"><div><blockquote class="Apple-paste-as-quotation">foo</blockquote></div></div>
|
| -<div class="editing"></div>
|
| -
|
| +<div id="sample" contenteditable><div><blockquote class="Apple-paste-as-quotation">foo</blockquote></div></div>
|
| +<div id="log"></div>
|
| <script>
|
| -runEditingTest();
|
| -</script>
|
| +test(function() {
|
| + var selection = window.getSelection();
|
| + var sample = document.getElementById('sample');
|
|
|
| -</body>
|
| -</html>
|
| + selection.collapse(sample, 0);
|
| + for (i = 0; i < 4; i++)
|
| + selection.modify('extend', 'forward', 'character');
|
| + document.execCommand('copy');
|
| + selection.modify('move', 'forward', 'character');
|
| + document.execCommand('insertText', false, 'x');
|
| + document.execCommand('paste');
|
| +
|
| + assert_equals(sample.innerHTML, '<div><blockquote>fooxfoo</blockquote></div>');
|
| + assert_true(selection.isCollapsed);
|
| + assert_equals(selection.anchorNode, sample.querySelector('blockquote').firstChild);
|
| + assert_equals(selection.anchorOffset, 7);
|
| +});
|
| +</script>
|
|
|