From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../dynamic-getter.html | 88 +++++ .../getter-first-letter-marker-multicol.html | 18 + .../getter-tests.js | 401 +++++++++++++++++++++ .../getter.html | 64 ++++ .../innertext-setter-tests.js | 42 +++ .../innertext-setter.html | 88 +++++ .../multiple-text-nodes.window.js | 16 + .../outertext-setter.html | 180 +++++++++ 8 files changed, 897 insertions(+) create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/dynamic-getter.html create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-first-letter-marker-multicol.html create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-tests.js create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter.html create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/innertext-setter-tests.js create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/innertext-setter.html create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/multiple-text-nodes.window.js create mode 100644 testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/outertext-setter.html (limited to 'testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties') diff --git a/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/dynamic-getter.html b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/dynamic-getter.html new file mode 100644 index 0000000000..e34fcf5ac1 --- /dev/null +++ b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/dynamic-getter.html @@ -0,0 +1,88 @@ + +innerText/outerText getter test with dynamic style changes + + +
+ diff --git a/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-first-letter-marker-multicol.html b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-first-letter-marker-multicol.html new file mode 100644 index 0000000000..3b579dca1c --- /dev/null +++ b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-first-letter-marker-multicol.html @@ -0,0 +1,18 @@ + +Test innerText/outerText for a combination of a list item with ::first-letter in multicol + + + + + +
PASS
+ diff --git a/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-tests.js b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-tests.js new file mode 100644 index 0000000000..fd32e8d69a --- /dev/null +++ b/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/getter-tests.js @@ -0,0 +1,401 @@ +testText("
abc", "abc", "Simplest possible test"); + +/**** white-space:normal ****/ + +testText("
abc", "abc", "Leading whitespace removed"); +testText("
abc ", "abc", "Trailing whitespace removed"); +testText("
abc def", "abc def", "Internal whitespace compressed"); +testText("
abc\ndef", "abc def", "\\n converted to space"); +testText("
abc\rdef", "abc def", "\\r converted to space"); +testText("
abc\tdef", "abc def", "\\t converted to space"); +testText("
abc
def", "abc\ndef", "Trailing whitespace before hard line break removed"); +testText("
abc
def", "abc\ndef", "Leading whitespace after hard line break removed"); + +/****
 ****/
+
+testText("
 abc", " abc", "Leading whitespace preserved");
+testText("
abc ", "abc ", "Trailing whitespace preserved");
+testText("
abc  def", "abc  def", "Internal whitespace preserved");
+testText("
abc\ndef", "abc\ndef", "\\n preserved");
+testText("
abc\rdef", "abc\ndef", "\\r converted to newline");
+testText("
abc\tdef", "abc\tdef", "\\t preserved");
+testText("
abc
def
", "abc\ndef", "Two
 siblings");
+
+/**** 
****/ + +testText("
abc", " abc", "Leading whitespace preserved"); +testText("
abc ", "abc ", "Trailing whitespace preserved"); +testText("
abc def", "abc def", "Internal whitespace preserved"); +testText("
abc\ndef", "abc\ndef", "\\n preserved"); +testText("
abc\rdef", "abc\ndef", "\\r converted to newline"); +testText("
abc\tdef", "abc\tdef", "\\t preserved"); + +/**** ****/ + +testText(" abc", " abc", "Leading whitespace preserved"); +testText("abc ", "abc ", "Trailing whitespace preserved"); +testText("abc def", "abc def", "Internal whitespace preserved"); +testText("abc\ndef", "abc\ndef", "\\n preserved"); +testText("abc\rdef", "abc\ndef", "\\r converted to newline"); +testText("abc\tdef", "abc\tdef", "\\t preserved"); + +/****
****/ + +testText("
abc", "abc", "Leading whitespace removed"); +testText("
abc ", "abc", "Trailing whitespace removed"); +testText("
abc def", "abc def", "Internal whitespace collapsed"); +testText("
abc\ndef", "abc\ndef", "\\n preserved"); +testText("
abc\rdef", "abc\ndef", "\\r converted to newline"); +testText("
abc\tdef", "abc def", "\\t converted to space"); + +/**** Collapsing whitespace across element boundaries ****/ + +testText("
abc def", "abc def", "Whitespace collapses across element boundaries"); +testText("
abc def", "abc def", "Whitespace collapses across element boundaries"); +testText("
abc def", "abc def", "Whitespace collapses across element boundaries"); +testText("
abc def", "abc def", "Whitespace around should not be collapsed"); +testText("
abc def", "abc def", "Whitespace around inline-block should not be collapsed"); +testText("
abc def ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed"); +testText("
abc
", "abc", "Whitespace between and block should be collapsed"); +testText("
abc
", "abc", "Whitespace between inline-block and block should be collapsed"); +testText("
abc def", "abc def", "Whitespace around should not be collapsed"); +testText("
abc def", "abc def", "Whitespace around should not be collapsed"); +testText("
abc", " abc", "Leading whitesapce should not be collapsed"); +testText("
abc ", "abc ", "Trailing whitesapce should not be collapsed"); +testText("
abc def", "abc def", "Whitespace around empty span should be collapsed"); +testText("
abc def", "abc def", "Whitespace around empty spans should be collapsed"); +testText("
abc", " abc", " should not collapse following space"); +testText("
abc def", "abc\ndef", "Replaced element with display:block should be treated as block-level"); +testText("
abc def", "abc\ndef", "Replaced element with display:block should be treated as block-level"); + +/**** Soft line breaks ****/ + +testText("
abc def", "abc def", "Soft line breaks ignored"); +testText("
abc-def", "abc-def", "Soft line break at hyphen ignored"); +testText("
abc def", "abc def", "Whitespace text node preserved"); + +/**** Soft line breaks when word-break:break-word is in effect ****/ +/* (based on Testcase #2 at https://bugzilla.mozilla.org/show_bug.cgi?id=1241631) */ + +testText("
Hello Kitty
", "Hello Kitty", "Soft breaks ignored in presence of word-break:break-word"); +testText("
Hello Kitty
", "Hello Kitty", "Element boundaries ignored for soft break handling (1)"); +testText("
Hello Kitty
", "Hello Kitty", "Whitespace collapses across element boundaries at soft break (1)"); +testText("
Hello Kitty
", "Hello Kitty", "Element boundaries ignored for soft break handling (2)"); +testText("
Hello Kitty
", "Hello Kitty", "Whitespace collapses across element boundaries at soft break (2)"); +testText("
Hello Kitty
", "Hello Kitty", "Element boundaries ignored for soft break handling (3)"); +testText("
Hello Kitty
", "Hello Kitty", "Whitespace collapses across element boundaries at soft break (3)"); +testText("
Hello Kitty
", "Hello Kitty", "Whitespace collapses across element boundaries at soft break (4)"); +testText("
Hello Kitty
", "Hello Kitty", "Element boundaries ignored for soft break handling (4)"); +testText("
Hello Kitty
", "Hello Kitty", "Element boundaries ignored for soft break handling (5)"); +testText("
Hello Kitty
", "HELLO KITTY", "Soft breaks ignored, text-transform applied"); +testText("
Hello
Kitty
", "Hello\nKitty", "
returned as newline, following space collapsed"); +testText("
Hello
Kitty
", "Hello\nKitty", "
returned as newline, preceding space collapsed"); +testText("
Hello
Kitty
", "Hello\nKitty", "
returned as newline, adjacent spaces collapsed across element boundaries"); + +/**** first-line/first-letter ****/ + +testText("
abc def", "ABC def", "::first-line styles applied"); +testText("
abc def", "Abc def", "::first-letter styles applied"); +testText("
abc def", "abc def", "::first-letter float ignored"); + +/****   ****/ + +testText("
 ", "\xA0", "  preserved"); + +/**** display:none ****/ + +testText("
abc", "abc", "display:none container"); +testText("
abc def", "abc def", "No whitespace compression in display:none container"); +testText("
abc def ", " abc def ", "No removal of leading/trailing whitespace in display:none container"); +testText("
123abc", "123", "display:none child not rendered"); +testText("
abc", "abc", "display:none container with non-display-none target child"); +testTextInSVG("
abc", "abc", "non-display-none child of svg"); +testTextInSVG("