mirror of
https://github.com/servo/servo.git
synced 2025-10-03 18:19:14 +01:00
Auto merge of #19946 - paavininanda:Issue18613, r=jdm
Change Offset_to_text_point function and add unit tests <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #18613. <!-- Either: --> - [x] Added unit tests and web platform tests <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19946) <!-- Reviewable:end -->
This commit is contained in:
commit
36eb711d3b
5 changed files with 63 additions and 4 deletions
|
@ -354355,6 +354355,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"selection/setSelectionRange.html": [
|
||||
[
|
||||
"/selection/setSelectionRange.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"selection/type.html": [
|
||||
[
|
||||
"/selection/type.html",
|
||||
|
@ -582154,6 +582160,10 @@
|
|||
"856ba9771d2c1e2eaae00dcf6b8378a42003cc7a",
|
||||
"testharness"
|
||||
],
|
||||
"selection/setSelectionRange.html": [
|
||||
"a047ea5e4c00894fcc30e972f84bcedc4a8226cf",
|
||||
"testharness"
|
||||
],
|
||||
"selection/test-iframe.html": [
|
||||
"3803c785b4a2fe2bbf9ecb895e6d3e1ae9e40164",
|
||||
"support"
|
||||
|
|
4
tests/wpt/metadata/selection/setSelectionRange.html.ini
Normal file
4
tests/wpt/metadata/selection/setSelectionRange.html.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[setSelectionRange.html]
|
||||
type: testharness
|
||||
[setSelectionRange on line boundaries]
|
||||
expected: FAIL
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<textarea>
|
||||
|
||||
</textarea>
|
||||
<script>
|
||||
test(function() {
|
||||
let textarea = document.querySelector('textarea');
|
||||
assert_equals(textarea.selectionStart, 0);
|
||||
assert_equals(textarea.selectionEnd, 0);
|
||||
textarea.setSelectionRange(0, 1);
|
||||
assert_equals(textarea.selectionStart, 0);
|
||||
assert_equals(textarea.selectionEnd, 1);
|
||||
}, "setSelectionRange on line boundaries");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue