From f7a5ec63d940a643fcf8301b8bd2441efe414970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Mon, 15 Apr 2024 16:14:15 +0000 Subject: [PATCH] Bug 1866418 [wpt PR 43334] - Add tests for ::first-letter and ::first-line with MathML, a=testonly Automatic update from web-platform-tests Add tests for ::first-letter and ::first-line with MathML (#43334) * Add tests for ::first-letter and ::first-line with MathML This is related to https://github.com/w3c/mathml-core/issues/211 Note that this does not necessarily aligned with current browser implementations. * fix indent * Correct tests as display math elements _should_ apply first-letter/line for non-mathml elements. Make the 'do not contribute to parents' test use MathML elements * resolve fred's comments about style consistency and using math elements * remove space before period nit --------- Co-authored-by: Brian Kardell -- wpt-commits: 58bd6e4080be7067719c5a516cd91d9e4356d280 wpt-pr: 43334 --- ...-first-letter-pseudo-elements-001-ref.html | 16 ++++++++ ...line-first-letter-pseudo-elements-001.html | 23 +++++++++++ ...-first-letter-pseudo-elements-002-ref.html | 30 +++++++++++++++ ...line-first-letter-pseudo-elements-002.html | 33 ++++++++++++++++ ...-first-letter-pseudo-elements-003-ref.html | 31 +++++++++++++++ ...line-first-letter-pseudo-elements-003.html | 38 +++++++++++++++++++ ...-first-letter-pseudo-elements-004-ref.html | 19 ++++++++++ ...line-first-letter-pseudo-elements-004.html | 22 +++++++++++ 8 files changed, 212 insertions(+) create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html new file mode 100644 index 000000000000..5d4e6b7dca3d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html @@ -0,0 +1,16 @@ + + +MathML and ::first-line/::first-letter pseudo-elements (reference) +

PASS if there is no red.

+
    +
  1. + + Hello,
    World!
    +
    +
  2. +
  3. + + Hello, World! + +
  4. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html new file mode 100644 index 000000000000..42d0f04ed85f --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html @@ -0,0 +1,23 @@ + + +MathML and ::first-line/::first-letter pseudo-elements + + + + +

PASS if there is no red.

+
    +
  1. + + Hello,
    World!
    +
    +
  2. +
  3. + + Hello, World! + +
  4. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html new file mode 100644 index 000000000000..d4c79c721838 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html @@ -0,0 +1,30 @@ + + +MathML and ::first-line/::first-letter pseudo-elements (reference) + +

PASS if the first line or letter is green.

+
    +
  1. +
    + Hello,
    World! +
    +
  2. +
  3. +
    + Hello, World! +
    +
  4. +
  5. +
    + Hello,
    World! +
    +
  6. +
  7. +
    + Hello, World! +
    +
  8. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html new file mode 100644 index 000000000000..7e206c951e55 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html @@ -0,0 +1,33 @@ + + +MathML and ::first-line/::first-letter pseudo-elements + + + + +

PASS if the first line or letter is green.

+
    +
  1. +
    + Hello,
    World! +
    +
  2. +
  3. +
    + Hello, World! +
    +
  4. +
  5. +
    + Hello,
    World! +
    +
  6. +
  7. +
    + Hello, World! +
    +
  8. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html new file mode 100644 index 000000000000..825b397057d6 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html @@ -0,0 +1,31 @@ + + +MathML and ::first-line/::first-letter pseudo-elements (reference) +

PASS if there is no red.

+
    +
  1. +
    + Hello
    World!
    +
  2. +
  3. +
    + + Hello
    World!
    +
    +
    +
  4. +
  5. +
    + + Hello
    World!
    +
    +
    +
  6. +
  7. +
    + + Hello
    World!
    +
    +
    +
  8. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html new file mode 100644 index 000000000000..042a9555e601 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html @@ -0,0 +1,38 @@ + + +MathML and ::first-line/::first-letter pseudo-elements + + + + +

PASS if there is no red.

+
    +
  1. +
    + Hello
    World!
    +
  2. +
  3. +
    + + Hello
    World!
    +
    +
    +
  4. +
  5. +
    + + Hello
    World!
    +
    +
    +
  6. +
  7. +
    + + Hello
    World!
    +
    +
    +
  8. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html new file mode 100644 index 000000000000..60d34274899f --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html @@ -0,0 +1,19 @@ + + +MathML and ::first-line/::first-letter pseudo-elements (reference) + +
    +
  1. PASS if first line is green: + + Hello,
    World!
    +
    +
  2. +
  3. PASS if first letter is green: + + Hello, World! + +
  4. +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html new file mode 100644 index 000000000000..b463266bdbc6 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html @@ -0,0 +1,22 @@ + + +MathML and ::first-line/::first-letter pseudo-elements + + + + +
    +
  1. PASS if first line is green: + + Hello,
    World!
    +
    +
  2. +
  3. PASS if first letter is green: + + Hello, World! + +
  4. +