From faddf9408045d69a4b1ab71f89c42914b71485f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 17 Jan 2018 17:20:20 +0100 Subject: [PATCH] Bug 1431031: Tests for calc() on font-size on various situations. r=Manishearth It makes no sense to pass a custom base size of zero in presence of rem, ex, or ch units. MozReview-Commit-ID: 7ZZwRzQKREX --- testing/web-platform/meta/MANIFEST.json | 50 +++++++++++++++++++ .../css/css-values/calc-ch-ex-lang-ref.html | 12 +++++ .../tests/css/css-values/calc-ch-ex-lang.html | 16 ++++++ .../css/css-values/calc-rem-lang-ref.html | 6 +++ .../tests/css/css-values/calc-rem-lang.html | 17 +++++++ 5 files changed, 101 insertions(+) create mode 100644 testing/web-platform/tests/css/css-values/calc-ch-ex-lang-ref.html create mode 100644 testing/web-platform/tests/css/css-values/calc-ch-ex-lang.html create mode 100644 testing/web-platform/tests/css/css-values/calc-rem-lang-ref.html create mode 100644 testing/web-platform/tests/css/css-values/calc-rem-lang.html diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index c7384cbc08b0..ccb5c9c86704 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -146383,6 +146383,18 @@ {} ] ], + "css/css-values/calc-ch-ex-lang.html": [ + [ + "/css/css-values/calc-ch-ex-lang.html", + [ + [ + "/css/css-values/calc-ch-ex-lang-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-values/calc-in-calc.html": [ [ "/css/css-values/calc-in-calc.html", @@ -146443,6 +146455,18 @@ {} ] ], + "css/css-values/calc-rem-lang.html": [ + [ + "/css/css-values/calc-rem-lang.html", + [ + [ + "/css/css-values/calc-rem-lang-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-values/ch-unit-001.html": [ [ "/css/css-values/ch-unit-001.html", @@ -253668,6 +253692,16 @@ {} ] ], + "css/css-values/calc-ch-ex-lang-ref.html": [ + [ + {} + ] + ], + "css/css-values/calc-rem-lang-ref.html": [ + [ + {} + ] + ], "css/css-values/ex-calc-expression-001-ref.html": [ [ {} @@ -510100,6 +510134,14 @@ "70627dbbfc5af5fb859fdf1362f0004b38c64e34", "reftest" ], + "css/css-values/calc-ch-ex-lang-ref.html": [ + "218e1cb6782b554de35aad70913cddb8e7d71da2", + "support" + ], + "css/css-values/calc-ch-ex-lang.html": [ + "d15f42e237b281793ac808e06af92217d4f9593e", + "reftest" + ], "css/css-values/calc-in-calc.html": [ "be08a1510714e8b4fbc4d35582db5708924d06b2", "reftest" @@ -510120,6 +510162,14 @@ "080551c1bee3d7bf54dda2c3d5b7e5a9fbd8aed6", "reftest" ], + "css/css-values/calc-rem-lang-ref.html": [ + "08bbc95f3078421a489e1e93cc7a4f035af40d5b", + "support" + ], + "css/css-values/calc-rem-lang.html": [ + "6fa668d2bcaf01f5c4680e3e14a0e86160d1b5d5", + "reftest" + ], "css/css-values/calc-unit-analysis.html": [ "c5fd567b4fa257ce53c48ebf8c444bf382459fec", "testharness" diff --git a/testing/web-platform/tests/css/css-values/calc-ch-ex-lang-ref.html b/testing/web-platform/tests/css/css-values/calc-ch-ex-lang-ref.html new file mode 100644 index 000000000000..e0ac1ead1e52 --- /dev/null +++ b/testing/web-platform/tests/css/css-values/calc-ch-ex-lang-ref.html @@ -0,0 +1,12 @@ + + +CSS Test Reference + + +
diff --git a/testing/web-platform/tests/css/css-values/calc-ch-ex-lang.html b/testing/web-platform/tests/css/css-values/calc-ch-ex-lang.html new file mode 100644 index 000000000000..eb447475d528 --- /dev/null +++ b/testing/web-platform/tests/css/css-values/calc-ch-ex-lang.html @@ -0,0 +1,16 @@ + + +CSS Test: Calc in font-size with ch / ex units across lang changes + + + + + + +
+
+
diff --git a/testing/web-platform/tests/css/css-values/calc-rem-lang-ref.html b/testing/web-platform/tests/css/css-values/calc-rem-lang-ref.html new file mode 100644 index 000000000000..a0f6add684a5 --- /dev/null +++ b/testing/web-platform/tests/css/css-values/calc-rem-lang-ref.html @@ -0,0 +1,6 @@ + + +CSS Test Reference + +

You should see a green box twice-the-initial-font-size wide.

+
diff --git a/testing/web-platform/tests/css/css-values/calc-rem-lang.html b/testing/web-platform/tests/css/css-values/calc-rem-lang.html new file mode 100644 index 000000000000..3994efc003b5 --- /dev/null +++ b/testing/web-platform/tests/css/css-values/calc-rem-lang.html @@ -0,0 +1,17 @@ + + + +CSS Test: Calc with rem and relative units on the root element + + + + + + +

You should see a green box twice-the-initial-font-size wide.

+
+