From 132184e0b3a4d77db1ca2b787ccf147805a08218 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 4 Oct 2019 21:17:17 +0000 Subject: [PATCH] Bug 1570928 [wpt PR 18253] - MathML: Move tests for vertical math into .tentative.html for now., a=testonly Automatic update from web-platform-tests MathML: Move tests for vertical math into .tentative.html for now. (#18253) https://github.com/mathml-refresh/mathml/issues/18 -- wpt-commits: 8da4c04051c2e456398448b9a5b758c666688474 wpt-pr: 18253 UltraBlame original commit: 0b23e5302fce2092217a9b8662a3eaa0fe7979c3 --- .../writing-mode/writing-mode-001.html | 496 -------- .../writing-mode-001.tentative.html | 1042 +++++++++++++++++ .../writing-mode/writing-mode-002.html | 20 - .../writing-mode-002.tentative.html | 865 ++++++++++++++ 4 files changed, 1907 insertions(+), 516 deletions(-) create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.tentative.html create mode 100644 testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.tentative.html diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html index 68ea1964623d4..17a5991c40969 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html @@ -214,26 +214,6 @@ - tb_rtl " -" -vertical -- -lr_ltr -" -" -vertical -- -lr_rtl -" -" -vertical -- -rl_ltr -" -" -vertical -- -rl_rtl -" ] . forEach @@ -629,482 +609,6 @@ p > < -p -> -< -math -style -= -" -writing -- -mode -: -vertical -- -lr -; -" -> -< -mrow -id -= -" -vertical -- -lr_ltr -" -> -< -mspace -style -= -" -background -: -blue -" -width -= -" -20px -" -height -= -" -30px -" -depth -= -" -40px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -black -" -width -= -" -50px -" -depth -= -" -60px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -yellow -" -width -= -" -70px -" -height -= -" -80px -" -> -< -/ -mspace -> -< -/ -mrow -> -< -/ -math -> -< -/ -p -> -< -p -> -< -math -style -= -" -writing -- -mode -: -vertical -- -lr -; -direction -: -rtl -; -" -> -< -mrow -id -= -" -vertical -- -lr_rtl -" -> -< -mspace -style -= -" -background -: -blue -" -width -= -" -20px -" -height -= -" -30px -" -depth -= -" -40px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -black -" -width -= -" -50px -" -depth -= -" -60px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -yellow -" -width -= -" -70px -" -height -= -" -80px -" -> -< -/ -mspace -> -< -/ -mrow -> -< -/ -math -> -< -/ -p -> -< -p -> -< -math -style -= -" -writing -- -mode -: -vertical -- -rl -; -" -> -< -mrow -id -= -" -vertical -- -rl_ltr -" -> -< -mspace -style -= -" -background -: -blue -" -width -= -" -20px -" -height -= -" -30px -" -depth -= -" -40px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -black -" -width -= -" -50px -" -depth -= -" -60px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -yellow -" -width -= -" -70px -" -height -= -" -80px -" -> -< -/ -mspace -> -< -/ -mrow -> -< -/ -math -> -< -/ -p -> -< -p -> -< -math -style -= -" -writing -- -mode -: -vertical -- -rl -; -direction -: -rtl -; -" -> -< -mrow -id -= -" -vertical -- -rl_rtl -" -> -< -mspace -style -= -" -background -: -blue -" -width -= -" -20px -" -height -= -" -30px -" -depth -= -" -40px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -black -" -width -= -" -50px -" -depth -= -" -60px -" -> -< -/ -mspace -> -< -mspace -style -= -" -background -: -yellow -" -width -= -" -70px -" -height -= -" -80px -" -> -< -/ -mspace -> -< -/ -mrow -> -< -/ -math -> -< -/ -p -> -< / body > diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.tentative.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.tentative.html new file mode 100644 index 0000000000000..3dced46f47ace --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.tentative.html @@ -0,0 +1,1042 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +writing +mode +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +mathml +- +refresh +. +github +. +io +/ +mathml +- +core +/ +# +layout +- +algorithms +" +> +< +meta +name += +" +assert +" +content += +" +Verify +CSS +writing +mode +( +writing +- +mode +and +directionproperties +) +for +mrow +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +mathml +/ +support +/ +feature +- +detection +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +mathml +/ +support +/ +layout +- +comparison +. +js +" +> +< +/ +script +> +< +script +> +var +epsilon += +1 +; +setup +( +{ +explicit_done +: +true +} +) +; +window +. +addEventListener +( +" +load +" +runTests +) +; +function +runTests +( +) +{ +var +reference += +document +. +getElementById +( +" +horizontal +- +tb_ltr +" +) +; +/ +/ +These +tests +are +kept +in +a +separate +tentative +. +html +file +until +it +is +/ +/ +clear +how +to +handle +vertical +math +layout +. +/ +/ +See +https +: +/ +/ +github +. +com +/ +mathml +- +refresh +/ +mathml +/ +issues +/ +18 +[ +" +vertical +- +lr_ltr +" +" +vertical +- +lr_rtl +" +" +vertical +- +rl_ltr +" +" +vertical +- +rl_rtl +" +] +. +forEach +( +id += +> +{ +var +element += +document +. +getElementById +( +id +) +; +test +( +function +( +) +{ +var +style += +window +. +getComputedStyle +( +element +) +; +var +writingMode += +id +. +split +( +" +_ +" +) +; +assert_equals +( +style +. +getPropertyValue +( +" +writing +- +mode +" +) +writingMode +[ +0 +] +" +writing +- +mode +" +) +; +assert_equals +( +style +. +getPropertyValue +( +" +direction +" +) +writingMode +[ +1 +] +" +direction +" +) +; +} +Inheritance +of +CSS +writing +- +mode +and +direction +( +id += +' +{ +id +} +' +) +) +; +test +( +function +( +) +{ +assert_true +( +MathMLFeatureDetection +. +has_mspace +( +) +) +; +compareLayout +( +element +reference +epsilon +) +; +} +Layout +of +mrow +( +id += +' +{ +id +} +' +) +) +; +} +) +; +done +( +) +; +} +< +/ +script +> +< +/ +head +> +< +body +> +< +div +id += +" +log +" +> +< +/ +div +> +< +p +> +< +math +> +< +mrow +id += +" +horizontal +- +tb_ltr +" +> +< +mspace +style += +" +background +: +blue +" +width += +" +20px +" +height += +" +30px +" +depth += +" +40px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +black +" +width += +" +50px +" +depth += +" +60px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +yellow +" +width += +" +70px +" +height += +" +80px +" +> +< +/ +mspace +> +< +/ +mrow +> +< +/ +math +> +< +/ +p +> +< +p +> +< +math +style += +" +writing +- +mode +: +vertical +- +lr +; +" +> +< +mrow +id += +" +vertical +- +lr_ltr +" +> +< +mspace +style += +" +background +: +blue +" +width += +" +20px +" +height += +" +30px +" +depth += +" +40px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +black +" +width += +" +50px +" +depth += +" +60px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +yellow +" +width += +" +70px +" +height += +" +80px +" +> +< +/ +mspace +> +< +/ +mrow +> +< +/ +math +> +< +/ +p +> +< +p +> +< +math +style += +" +writing +- +mode +: +vertical +- +lr +; +direction +: +rtl +; +" +> +< +mrow +id += +" +vertical +- +lr_rtl +" +> +< +mspace +style += +" +background +: +blue +" +width += +" +20px +" +height += +" +30px +" +depth += +" +40px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +black +" +width += +" +50px +" +depth += +" +60px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +yellow +" +width += +" +70px +" +height += +" +80px +" +> +< +/ +mspace +> +< +/ +mrow +> +< +/ +math +> +< +/ +p +> +< +p +> +< +math +style += +" +writing +- +mode +: +vertical +- +rl +; +" +> +< +mrow +id += +" +vertical +- +rl_ltr +" +> +< +mspace +style += +" +background +: +blue +" +width += +" +20px +" +height += +" +30px +" +depth += +" +40px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +black +" +width += +" +50px +" +depth += +" +60px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +yellow +" +width += +" +70px +" +height += +" +80px +" +> +< +/ +mspace +> +< +/ +mrow +> +< +/ +math +> +< +/ +p +> +< +p +> +< +math +style += +" +writing +- +mode +: +vertical +- +rl +; +direction +: +rtl +; +" +> +< +mrow +id += +" +vertical +- +rl_rtl +" +> +< +mspace +style += +" +background +: +blue +" +width += +" +20px +" +height += +" +30px +" +depth += +" +40px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +black +" +width += +" +50px +" +depth += +" +60px +" +> +< +/ +mspace +> +< +mspace +style += +" +background +: +yellow +" +width += +" +70px +" +height += +" +80px +" +> +< +/ +mspace +> +< +/ +mrow +> +< +/ +math +> +< +/ +p +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html index 1ed6e98a619e3..f42c4b20b0964 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html @@ -259,26 +259,6 @@ - tb_rtl " -" -vertical -- -lr_ltr -" -" -vertical -- -lr_rtl -" -" -vertical -- -rl_ltr -" -" -vertical -- -rl_rtl -" ] . forEach diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.tentative.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.tentative.html new file mode 100644 index 0000000000000..e130b34aa40aa --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.tentative.html @@ -0,0 +1,865 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +writing +mode +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +mathml +- +refresh +. +github +. +io +/ +mathml +- +core +/ +# +layout +- +algorithms +" +> +< +meta +name += +" +assert +" +content += +" +Verify +CSS +writing +mode +( +writing +- +mode +and +direction +properties +) +for +mrow +. +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +mathml +/ +support +/ +feature +- +detection +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +mathml +/ +support +/ +layout +- +comparison +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +mathml +/ +support +/ +mathml +- +fragments +. +js +" +> +< +/ +script +> +< +script +> +var +epsilon += +1 +; +setup +( +{ +explicit_done +: +true +} +) +; +window +. +addEventListener +( +" +load +" +runTests +) +; +function +runTests +( +) +{ +for +( +tag +in +MathMLFragments +) +{ +if +( +tag += += +" +annotation +" +| +| +tag += += +" +annotation +- +xml +" +) +continue +; +/ +/ +These +tags +have +display +: +none +. +/ +/ +These +tests +are +kept +in +a +separate +tentative +. +html +file +until +it +is +/ +/ +clear +how +to +handle +vertical +math +layout +. +/ +/ +See +https +: +/ +/ +github +. +com +/ +mathml +- +refresh +/ +mathml +/ +issues +/ +18 +[ +" +vertical +- +lr_ltr +" +" +vertical +- +lr_rtl +" +" +vertical +- +rl_ltr +" +" +vertical +- +rl_rtl +" +] +. +forEach +( +id += +> +{ +var +writingMode += +id +. +split +( +" +_ +" +) +; +var +writingModeString += +writing +- +mode +: +{ +writingMode +[ +0 +] +} +; +direction +: +{ +writingMode +[ +1 +] +} +; +; +document +. +body +. +insertAdjacentHTML +( +" +beforeend +" +< +div +> +\ +< +math +> +{ +MathMLFragments +[ +tag +] +} +< +/ +math +> +\ +< +math +> +{ +MathMLFragments +[ +tag +] +} +< +/ +math +> +\ +< +/ +div +> +) +; +var +div += +document +. +body +. +lastElementChild +; +var +styleMath += +div +. +firstElementChild +; +styleMath +. +setAttribute +( +" +style +" +writingModeString +) +; +var +styleElement += +FragmentHelper +. +element +( +styleMath +) +; +var +referenceMath += +div +. +lastElementChild +; +var +referenceElement += +FragmentHelper +. +element +( +referenceMath +) +; +[ +styleMath +referenceMath +] +. +forEach +( +math += +> +{ +Array +. +from +( +math +. +getElementsByClassName +( +" +mathml +- +container +" +) +) +. +forEach +( +container += +> +{ +container +. +insertAdjacentHTML +( +" +beforeend +" +" +\ +< +mspace +style += +' +background +: +blue +' +\ +width += +' +20px +' +height += +' +30px +' +depth += +' +40px +' +> +< +/ +mspace +> +\ +< +mspace +style += +' +background +: +black +' +\ +width += +' +50px +' +depth += +' +60px +' +> +< +/ +mspace +> +\ +< +mspace +style += +' +background +: +yellow +' +\ +width += +' +70px +' +height += +' +80px +' +> +< +/ +mspace +> +" +) +; +} +) +; +Array +. +from +( +math +. +getElementsByClassName +( +" +foreign +- +container +" +) +) +. +forEach +( +container += +> +{ +container +. +insertAdjacentHTML +( +" +beforeend +" +" +\ +< +span +style += +' +display +: +inline +- +block +; +background +: +lightblue +; +\ +inline +- +size +: +20px +; +block +- +size +: +30px +; +\ +vertical +- +align +: +bottom +; +' +> +< +/ +span +> +\ +< +span +style += +' +display +: +inline +- +block +; +background +: +pink +; +\ +inline +- +size +: +40px +; +block +- +size +: +50px +; +\ +vertical +- +align +: +bottom +; +' +> +< +/ +span +> +" +) +; +} +) +; +} +) +; +test +( +function +( +) +{ +assert_true +( +MathMLFeatureDetection +. +has_mspace +( +) +) +; +var +style += +window +. +getComputedStyle +( +styleElement +) +; +assert_equals +( +style +. +getPropertyValue +( +" +writing +- +mode +" +) +writingMode +[ +0 +] +" +writing +- +mode +" +) +; +assert_equals +( +style +. +getPropertyValue +( +" +direction +" +) +writingMode +[ +1 +] +" +direction +" +) +; +compareLayout +( +styleElement +referenceElement +epsilon +) +; +} +Layout +of +{ +tag +} +( +{ +writingModeString +} +) +) +; +div +. +style += +" +display +: +none +; +" +; +/ +/ +Hide +the +div +after +testing +. +} +) +; +} +done +( +) +; +} +< +/ +script +> +< +/ +head +> +< +body +> +< +div +id += +" +log +" +> +< +/ +div +> +< +/ +body +> +< +/ +html +>