Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Issue 2303533003: Introduce selection.setClipboardData() in assert_selection() (Closed)

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.

Description

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}

Patch Set 1 : 2016-09-01T18:36:42 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -0 lines) Patch
M third_party/WebKit/LayoutTests/editing/assert_selection.html View 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/assert_selection.js View 2 chunks +27 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
yosin_UTC9
PTAL
4 years, 3 months ago (2016-09-01 09:47:09 UTC) #8
yoichio
lgtm cool!
4 years, 3 months ago (2016-09-02 02:03:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2303533003/1
4 years, 3 months ago (2016-09-02 02:12:02 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-02 02:16:14 UTC) #14
commit-bot: I haz the power
4 years, 3 months ago (2016-09-02 02:19:30 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/6a0e2eab9d3516ed5fe676ff646a9ed7a6bd4aa9
Cr-Commit-Position: refs/heads/master@{#416165}

Powered by Google App Engine
This is Rietveld 408576698