DescriptionIntroduce 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/2018463002
BUG=n/a
TEST=n/a; no behavior changes
Committed: https://crrev.com/4af8b92817a88711cb2d42807badcf356a90efb7
Cr-Commit-Position: refs/heads/master@{#396161}
Patch Set 1 : 2016-05-26T16:46:56 #Patch Set 2 : 2016-05-26T16:53:56 #
Total comments: 1
Patch Set 3 : 2016-05-26T17:48:22 #Patch Set 4 : 2016-05-26T18:10:04 #Patch Set 5 : 2016-05-26T18:22:16 #Patch Set 6 : 2016-05-26T19:25:56 #
Messages
Total messages: 21 (13 generated)
|