Reviewers: tkent, yoichio
CL:
https://codereview.chromium.org/2013603004/Message:
PTAL
Description:
Introduce assert_selection() for editing tests
This patch introduces |assert_selection()| function to help writing editing test
cases with W3C test harness.
Using |assert_selection()|, we can write test cases for execCommand as below:
assert_selection(
'<div conteneditable>^foo|</div>',
'createLink abc',
'<div conteneditable><a href="abc">foo</a></div>')
rather than sequence of |assert_equals()| for |Selection| and |innerHTML|.
More samples are found in
crrev.com/2018463002BUG=n/a
TEST=n/a; no behavior changes
Base URL:
https://chromium.googlesource.com/chromium/src.git@masterAffected files (+637, -164 lines):
A third_party/WebKit/LayoutTests/editing/assert_selection.js
M third_party/WebKit/LayoutTests/editing/execCommand/createLink.html
D third_party/WebKit/LayoutTests/editing/execCommand/createLink-expected.txt
D third_party/WebKit/LayoutTests/platform/win/editing/execCommand/createLink-expected.txt