[Webkit-unassigned] [Bug 232420] Selection extend() should trigger exception with no ranges

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 28 15:16:39 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=232420

Chris Dumez <cdumez at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cdumez at apple.com

--- Comment #6 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 442710
  --> https://bugs.webkit.org/attachment.cgi?id=442710
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442710&action=review

> LayoutTests/fast/dom/Range/missingRange.html:3
> +        <script src="../../../resources/js-test-pre.js"></script>

If you don't end up converting this to a WPT test, you'll need to include this instead:
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

> LayoutTests/fast/dom/Range/missingRange.html:12
> +            getSelection().extend(div1);

And here:
something like this:
```
test(function () {
    let div = document.createElement('div');
    document.body.appendChild(div);
    assert_throws_dom("InvalidStateError", () => {
        getSelection().extend(div);
    });
}, 'Test extend method failure due to missing range');
```

Then move it under LayoutTests/imported/w3c/web-platform-tests/selection/.

Then later on submit a PR for that test to https://github.com/web-platform-tests/wpt.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211028/b03b0d40/attachment.htm>


More information about the webkit-unassigned mailing list