| Index: third_party/WebKit/LayoutTests/editing/pasteboard/paste-table-002.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-table-002.html b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-table-002.html
|
| index f77ac9edeeaa0d4a7c9de1c48604c3b572233d03..c5ba3258494b4b9f5f49056b25de4fd4bf63da5b 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-table-002.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-table-002.html
|
| @@ -1,65 +1,39 @@
|
| -<html>
|
| -<head>
|
| -
|
| -<style>
|
| -.editing {
|
| - border: 2px solid red;
|
| - font-size: 24px;
|
| -}
|
| -.explanation {
|
| - border: 2px solid blue;
|
| - padding: 12px;
|
| - font-size: 24px;
|
| - margin-bottom: 24px;
|
| -}
|
| -.scenario { margin-bottom: 16px;}
|
| -.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
|
| -.expected-results:first-line { font-weight: bold }
|
| -</style>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| -
|
| -<script>
|
| -function log(message) {
|
| - var console = document.getElementById("console");
|
| - var li = document.createElement("li");
|
| - var text = document.createTextNode(message);
|
| - li.appendChild(text);
|
| - console.appendChild(li);
|
| -}
|
| -
|
| -function editingTest() {
|
| - execSelectAllCommand();
|
| - copyCommand();
|
| - execDeleteCommand();
|
| - pasteCommand();
|
| -}
|
| -
|
| -</script>
|
| -
|
| -<title>Editing Test</title>
|
| -</head>
|
| -<body>
|
| -Problem: copy/pasting some HTML including tables can give rise to a <div> element as the first child of the table element. This is invalid.
|
| -<div contenteditable id="root">
|
| -<div id="test" class="editing">
|
| -<div>
|
| -abcdef
|
| -<div style="text-align: center" >
|
| -<table><tr><td>foo</td><td>bar</td></tr></table>
|
| -ghijk
|
| -</div>
|
| -</div>
|
| -</div>
|
| -</div>
|
| -
|
| -<ol id="console" />
|
| -
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -runEditingTest();
|
| -log(root.innerHTML);
|
| -if (window.testRunner)
|
| - testRunner.dumpAsText();
|
| +test(() => {
|
| + assert_not_equals(window.internals, undefined,
|
| + 'This test requires window.internals to access clipboard');
|
| +
|
| + assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<div>',
|
| + '<div>',
|
| + '^abcdef',
|
| + '<div style="text-align: center;">',
|
| + '<table><tr><td>foo</td><td>bar</td></tr></table>',
|
| + 'ghijk|',
|
| + '</div>',
|
| + '</div>',
|
| + '</div>',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.document.execCommand('copy');
|
| + selection.document.execCommand('delete');
|
| + selection.document.execCommand('paste');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + 'abcdef',
|
| + '<div style="text-align: center;">',
|
| + '<table><tbody><tr><td>foo</td><td>bar</td></tr></tbody></table>',
|
| + 'ghijk|',
|
| + '</div>',
|
| + '</div>',
|
| + ].join(''));
|
| +});
|
| </script>
|
| -
|
| -</body>
|
| -</html>
|
|
|