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);
'<div contenteditable="true" id="root">', const details = platform === 'mac'
'<table border="1">', ? 'The content in the deleted paragraph should be moved into the last table cell unless that content is another table.'
'<tr>', : 'The content in the deleted paragraph should not be merged into the table above.';
'<td>All the content in this editable region </td>', const description = `${platform}: Deleting when the caret is at the start of a paragraph just after a table. ${details}`;
'</tr>', selection_test(
'</table>', [
'<div id="div">|should be in one table cell.</div>', '<div contenteditable>',
'</div>' '<table><tbody><tr>',
], '<td>abc</td>',
'Delete', '</tr></tbody></table>',
isMac '<div>|XYZ</div>',
? [
'<div contenteditable="true" id="root">',
'<table border="1">',
'<tbody>',
'<tr>',
'<td>All the content in this editable region |should be in one table cell.</td>',
'</tr>',
'</tbody>',
'</table>',
'</div>'
]
: [
'<div contenteditable="true" id="root">',
'<table border="1">',
'<tbody>',
'<tr>',
'<td>All the content in this editable region </td>',
'</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' + 'Delete',
isMac 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.'); '<div contenteditable>',
'<table><tbody><tr>',
'<td>abc|XYZ</td>',
'</tr></tbody></table>',
'</div>'
]
: [
'<div contenteditable>',
'<table><tbody><tr>',
'<td>abc</td>',
'</tr></tbody></table>',
'|XYZ',
'</div>'
],
description);
}
</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