-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1851420 [wpt PR 41792] - [text-autospace] Add tests for modifying…
… `TextNode`, a=testonly Automatic update from web-platform-tests [text-autospace] Add tests for modifying `TextNode` Following up crrev.com/c/4835563, this patch adds tests for modifying `TextNode`. In Blink, this goes to the optimized code path to `NGInlineNode::SetTextWithOffset`. Note these tests pass when the `text-autospace` is not supported. Bug: 1463890 Change-Id: I5b1c346a7671d9cfd7efcd5064376a391c6ad598 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4835849 Auto-Submit: Koji Ishii <kojii@chromium.org> Reviewed-by: Lingqi Chi <lingqi@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Commit-Queue: Lingqi Chi <lingqi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1191984} -- wpt-commits: 2612a05519ac888b9b00af02b4bed3aac150587c wpt-pr: 41792
- Loading branch information
1 parent
f47d11f
commit c48ac1e
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...g/web-platform/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<div id="target">国国AA国国AA国々</div> |
11 changes: 11 additions & 0 deletions
11
testing/web-platform/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> | ||
<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> | ||
<div id="target">国国</div> | ||
<script> | ||
const target_text = document.getElementById('target').firstChild; | ||
for (const ch of 'AA国国AA国国') { | ||
document.body.offsetTop; // Force layout. | ||
target_text.appendData(ch); | ||
} | ||
</script> |
9 changes: 9 additions & 0 deletions
9
testing/web-platform/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> | ||
<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> | ||
<div id="target">国国国国</div> | ||
<script> | ||
const target_text = document.getElementById('target').firstChild; | ||
document.body.offsetTop; // Force layout. | ||
target_text.insertData(2, 'AA国国AA'); | ||
</script> |
9 changes: 9 additions & 0 deletions
9
testing/web-platform/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> | ||
<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> | ||
<div id="target">国国国国国</div> | ||
<script> | ||
const target_text = document.getElementById('target').firstChild; | ||
document.body.offsetTop; // Force layout. | ||
target_text.replaceData(2, 1, 'AA国国AA'); | ||
</script> |
11 changes: 11 additions & 0 deletions
11
testing/web-platform/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> | ||
<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> | ||
<div id="target">国国AAAA国国AAAA国国</div> | ||
<script> | ||
const target_text = document.getElementById('target').firstChild; | ||
document.body.offsetTop; // Force layout. | ||
target_text.deleteData(2, 2); | ||
document.body.offsetTop; // Force layout. | ||
target_text.deleteData(6, 2); | ||
</script> |