|
|
Created:
4 years, 3 months ago by yosin_UTC9 Modified:
4 years, 3 months ago Reviewers:
yoichio, Xiaocheng CC:
blink-reviews, chromium-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionIntroduce selection.setClipboardData() in assert_selection()
This patch introduces |selection.setClipboardData(html, opt_text)| in
|assert_selection()| to write "paste" command test scripts without
executing "copy" command for improving test scripts isolation.
Before this patch, we should write a test case as:
assert_selection(
'<div contenteditable>^foo|</div>',
selection => {
selection.document.execCommand('copy');
// Replace existing selection; we can't observe changes
selection.document.execCommand('paste');
selection.document.execCommand('paste');
},
'<div contenteditable>^foofoo|</div>');
After this patch, we would write as:
assert_selection(
'<div contenteditable>|</div>',
selection => {
selection.setClipboardData('<b>foo</b>');
selection.document.execCommand('paste');
},
'<div contenteditable><b>foo|</b></div>');
BUG=n/a
TEST=LayoutTests/editing/assert_selection.html
Committed: https://crrev.com/6a0e2eab9d3516ed5fe676ff646a9ed7a6bd4aa9
Cr-Commit-Position: refs/heads/master@{#416165}
Patch Set 1 : 2016-09-01T18:36:42 #
Created: 4 years, 3 months ago
Messages
Total messages: 16 (11 generated)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== 2016-09-01T18:36:42 BUG= ========== to ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. BUG=n/a TEST=LayoutTests/editing/assert_selection.html ==========
yosin@chromium.org changed reviewers: + xiaochengh@chromium.org, yoichio@chromium.org
Description was changed from ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. BUG=n/a TEST=LayoutTests/editing/assert_selection.html ========== to ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we could write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ==========
Description was changed from ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we could write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ========== to ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we would write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ==========
Description was changed from ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we would write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ========== to ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); // Replace existing selection; we can't observe changes selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we would write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ==========
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm cool!
The CQ bit was checked by yosin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); // Replace existing selection; we can't observe changes selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we would write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html ========== to ========== Introduce selection.setClipboardData() in assert_selection() This patch introduces |selection.setClipboardData(html, opt_text)| in |assert_selection()| to write "paste" command test scripts without executing "copy" command for improving test scripts isolation. Before this patch, we should write a test case as: assert_selection( '<div contenteditable>^foo|</div>', selection => { selection.document.execCommand('copy'); // Replace existing selection; we can't observe changes selection.document.execCommand('paste'); selection.document.execCommand('paste'); }, '<div contenteditable>^foofoo|</div>'); After this patch, we would write as: assert_selection( '<div contenteditable>|</div>', selection => { selection.setClipboardData('<b>foo</b>'); selection.document.execCommand('paste'); }, '<div contenteditable><b>foo|</b></div>'); BUG=n/a TEST=LayoutTests/editing/assert_selection.html Committed: https://crrev.com/6a0e2eab9d3516ed5fe676ff646a9ed7a6bd4aa9 Cr-Commit-Position: refs/heads/master@{#416165} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/6a0e2eab9d3516ed5fe676ff646a9ed7a6bd4aa9 Cr-Commit-Position: refs/heads/master@{#416165} |