Commit a0c50db3 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

[EditingNG] Make "editing/deleting/5032066.html" to test all platform behaviors

This patch chnages "5032066.html" to test all platform behaviors instead to
detect failure on locally for all platforms for ease of debugging.

Bug: 707656
Change-Id: I5f7e477a88b6fdaefe98ec34567f927a9f159dad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259700
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781220}
parent c2cfec34
...@@ -2,47 +2,40 @@ ...@@ -2,47 +2,40 @@
<script src="../../resources/testharness.js"></script> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script> <script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script> <script src="../assert_selection.js"></script>
<div id="log"></div>
<script> <script>
const isMac = navigator.platform.indexOf('Mac') === 0; for (const platform of ['android', 'mac', 'unix', 'win']) {
selection_test( if (window.internals)
internals.settings.setEditingBehavior(platform);
const details = platform === 'mac'
? 'The content in the deleted paragraph should be moved into the last table cell unless that content is another table.'
: 'The content in the deleted paragraph should not be merged into the table above.';
const description = `${platform}: Deleting when the caret is at the start of a paragraph just after a table. ${details}`;
selection_test(
[ [
'<div contenteditable="true" id="root">', '<div contenteditable>',
'<table border="1">', '<table><tbody><tr>',
'<tr>', '<td>abc</td>',
'<td>All the content in this editable region </td>', '</tr></tbody></table>',
'</tr>', '<div>|XYZ</div>',
'</table>',
'<div id="div">|should be in one table cell.</div>',
'</div>' '</div>'
], ],
'Delete', 'Delete',
isMac platform === 'mac'
? [ ? [
'<div contenteditable="true" id="root">', '<div contenteditable>',
'<table border="1">', '<table><tbody><tr>',
'<tbody>', '<td>abc|XYZ</td>',
'<tr>', '</tr></tbody></table>',
'<td>All the content in this editable region |should be in one table cell.</td>',
'</tr>',
'</tbody>',
'</table>',
'</div>' '</div>'
] ]
: [ : [
'<div contenteditable="true" id="root">', '<div contenteditable>',
'<table border="1">', '<table><tbody><tr>',
'<tbody>', '<td>abc</td>',
'<tr>', '</tr></tbody></table>',
'<td>All the content in this editable region </td>', '|XYZ',
'</tr>',
'</tbody>',
'</table>',
'|should be in one table cell.',
'</div>' '</div>'
], ],
'Deleting when the caret is at the start of a paragraph just after a table' + description);
isMac }
? 'The content in the deleted paragraph should be moved into the last table cell unless that content is another table.'
: 'The content in the deleted paragraph should not be merged into the table above.');
</script> </script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment