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 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<div id="log"></div>
<script>
const isMac = navigator.platform.indexOf('Mac') === 0;
selection_test(
for (const platform of ['android', 'mac', 'unix', 'win']) {
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">',
'<table border="1">',
'<tr>',
'<td>All the content in this editable region </td>',
'</tr>',
'</table>',
'<div id="div">|should be in one table cell.</div>',
'<div contenteditable>',
'<table><tbody><tr>',
'<td>abc</td>',
'</tr></tbody></table>',
'<div>|XYZ</div>',
'</div>'
],
'Delete',
isMac
platform === 'mac'
? [
'<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 contenteditable>',
'<table><tbody><tr>',
'<td>abc|XYZ</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 contenteditable>',
'<table><tbody><tr>',
'<td>abc</td>',
'</tr></tbody></table>',
'|XYZ',
'</div>'
],
'Deleting when the caret is at the start of a paragraph just after a table' +
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.');
description);
}
</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