Update paste-and-sanitize test to testharness, and add more tests
This was an old test, so this updates it to use testharness.js. It also fixes a few issues with the test, primarily the fact that it used to copy and paste from the same control, and errors in copying or pasting would leave the existing markup in place. Along with this update, I added testing of both "normal" template elements in copied content, in addition to declarative Shadow DOM. And a test that <template shadowroot=open> doesn't get round-tripped back into a declarative Shadow Root. Note that one "flaw" is baked into this test: ABC<div><template></template></div>DEF will get left as ABC<div></div>DEF, rather than just ABCDEF. Bug: 1042130 Change-Id: I870d4a518d722c6f10a9ca2d20aab0d6334b8589 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561273 Auto-Submit: Mason Freed <masonfreed@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#831199}
Showing
Please register or sign in to comment