Bug 1436048: Fix and update other WPT expectations in css-fonts-4 tests. r=jwatt
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 22 Apr 2018 20:46:41 +0200
changeset 468642 b61541f85293fa3fddd7edfe9863624f9a56e92b
parent 468641 9f1091690e59bcbbe9be04d41ee9637e6d6db31b
child 468643 46996fb339f8990b708598813e66394330baa385
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1436048
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1436048: Fix and update other WPT expectations in css-fonts-4 tests. r=jwatt The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of https://github.com/w3c/csswg-drafts/issues/2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see https://github.com/w3c/csswg-drafts/issues/2590 * Accept 0% in font-stretch: https://github.com/w3c/csswg-drafts/issues/2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. MozReview-Commit-ID: CNJ3LG71KRj
testing/web-platform/meta/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html.ini
testing/web-platform/meta/css/css-fonts/variations/font-shorthand.html.ini
testing/web-platform/meta/css/css-fonts/variations/font-stretch.html.ini
testing/web-platform/meta/css/css-fonts/variations/font-style-interpolation.html.ini
testing/web-platform/meta/css/css-fonts/variations/font-style-parsing.html.ini
testing/web-platform/meta/css/css-variables/variable-presentation-attribute.html.ini
testing/web-platform/tests/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html
testing/web-platform/tests/css/css-fonts/variations/font-shorthand.html
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html.ini
+++ /dev/null
@@ -1,49 +0,0 @@
-[font-parse-numeric-stretch-style-weight.html]
-  [Value 500 400 must not be accepted as weight in @font-face.]
-    expected: FAIL
-
-  [Valid value 51% for font property stretch used for styling.]
-    expected: FAIL
-
-  [Valid value 199% for font property stretch used for styling.]
-    expected: FAIL
-
-  [Valid value calc(10% + 20%) for font property stretch used for styling.]
-    expected: FAIL
-
-  [Valid value 100% matches 100% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value 110% matches 110% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value 111.5% matches 111.5% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value 50% 200% matches 50% 200% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value 0.1% 1% matches 0.1% 1% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value 900% 901% matches 900% 901% for stretch in @font-face.]
-    expected: FAIL
-
-  [Valid value oblique 50deg for font property style used for styling.]
-    expected: FAIL
-
-  [Valid value oblique -90deg for font property style used for styling.]
-    expected: FAIL
-
-  [Valid value oblique 90deg for font property style used for styling.]
-    expected: FAIL
-
-  [Valid value oblique calc(30deg + 20deg) for font property style used for styling.]
-    expected: FAIL
-
-  [Valid value oblique 10deg matches oblique 10deg for style in @font-face.]
-    expected: FAIL
-
-  [Valid value oblique 10deg 20deg matches oblique 10deg 20deg for style in @font-face.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-fonts/variations/font-shorthand.html.ini
+++ /dev/null
@@ -1,22 +0,0 @@
-[font-shorthand.html]
-  [Font shorthand: 'oblique' with positive angle]
-    expected: FAIL
-
-  [Font shorthand: 'oblique' with hegative angle]
-    expected: FAIL
-
-  [Font shorthand: 'oblique' with positive angle followed by valid weight]
-    expected: FAIL
-
-  [Font shorthand: 'oblique' with negative angle followed by valid weight]
-    expected: FAIL
-
-  [Font shorthand: calc() weight folowed by 'oblique' and slant angle]
-    expected: FAIL
-
-  [Font shorthand: To-be-clamped calc() weight folowed by 'oblique' and slant angle]
-    expected: FAIL
-
-  [Font shorthand: 'oblique' with angle followed by valid calc() weight]
-    expected: FAIL
-
--- a/testing/web-platform/meta/css/css-fonts/variations/font-stretch.html.ini
+++ b/testing/web-platform/meta/css/css-fonts/variations/font-stretch.html.ini
@@ -1,97 +1,4 @@
 [font-stretch.html]
-  [@supports: 0% - zero is legal]
-    expected: FAIL
-
-  [@getComputedStyle: 0% - zero is legal]
-    expected: FAIL
-
-  [@supports: 1% - legal percentage]
-    expected: FAIL
-
-  [@getComputedStyle: 1% - legal percentage]
-    expected: FAIL
-
-  [@supports: 10% - legal percentage]
-    expected: FAIL
-
-  [@getComputedStyle: 10% - legal percentage]
-    expected: FAIL
-
-  [@supports: 100% - legal percentage]
-    expected: FAIL
-
-  [@getComputedStyle: 100% - legal percentage]
-    expected: FAIL
-
-  [@supports: 1000% - legal percentage]
-    expected: FAIL
-
-  [@getComputedStyle: 1000% - legal percentage]
-    expected: FAIL
-
-  [@supports: 1e9% - huge legal percentage]
-    expected: FAIL
-
   [@getComputedStyle: 1e9% - huge legal percentage]
     expected: FAIL
 
-  [@getComputedStyle: ultra-condensed - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: extra-condensed - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: condensed - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: semi-condensed - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: normal - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: semi-expanded - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: expanded - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: extra-expanded - legal enum]
-    expected: FAIL
-
-  [@getComputedStyle: ultra-expanded - legal enum]
-    expected: FAIL
-
-  [@supports: calc(200.5%) - Simple calc value]
-    expected: FAIL
-
-  [@getComputedStyle: calc(200.5%) - Simple calc value]
-    expected: FAIL
-
-  [@supports: calc(50%*2 - 20%) - Valid calc expression]
-    expected: FAIL
-
-  [@getComputedStyle: calc(50%*2 - 20%) - Valid calc expression]
-    expected: FAIL
-
-  [@supports: calc(-100%) - Negative calc value (to be clamped)]
-    expected: FAIL
-
-  [@getComputedStyle: calc(-100%) - Negative calc value (to be clamped)]
-    expected: FAIL
-
-  [@supports: calc(50% - 50%*2) - Negative calc expression (to be clamped)]
-    expected: FAIL
-
-  [@getComputedStyle: calc(50% - 50%*2) - Negative calc expression (to be clamped)]
-    expected: FAIL
-
-  [Test font-stretch for overridden number condensed]
-    expected: FAIL
-
-  [Test font-stretch for overridden enum name resolved to number condensed]
-    expected: FAIL
-
-  [Test font-stretch for inherited named enum resolved to number condensed]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-fonts/variations/font-style-interpolation.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[font-style-interpolation.html]
-  expected: TIMEOUT
-  [font-style animation]
-    expected: TIMEOUT
-
-  [font-style transition]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-fonts/variations/font-style-parsing.html.ini
+++ /dev/null
@@ -1,43 +0,0 @@
-[font-style-parsing.html]
-  [Font-style: 'oblique' followed by zero degrees is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by positive angle in degrees is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by positive angle in radians is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by positive angle in gradians is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by positive angle in turns is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by negative angle is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by fractional angle is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by maxumum 90 degree angle is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by minimum -90 degree angle is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by positive angle is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by calc is valid]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by calc is valid even if it must be clamped (no computation)]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by calc is valid even if it must be clamped (with computation)]
-    expected: FAIL
-
-  [Font-style: 'oblique' followed by calc is valid even if it mixes units (with computation)]
-    expected: FAIL
-
--- a/testing/web-platform/meta/css/css-variables/variable-presentation-attribute.html.ini
+++ b/testing/web-platform/meta/css/css-variables/variable-presentation-attribute.html.ini
@@ -15,16 +15,19 @@
     expected: FAIL
 
   [Testing 'flood-color'.]
     expected: FAIL
 
   [Testing 'font-family'.]
     expected: FAIL
 
+  [Testing 'font-stretch'.]
+    expected: FAIL
+
   [Testing 'glyph-orientation-horizontal'.]
     expected: FAIL
 
   [Testing 'glyph-orientation-vertical'.]
     expected: FAIL
 
   [Testing 'kerning'.]
     expected: FAIL
--- a/testing/web-platform/tests/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html
+++ b/testing/web-platform/tests/css/css-fonts/variations/font-parse-numeric-stretch-style-weight.html
@@ -18,25 +18,25 @@ var styleValidTests = {
     '900',
     '850',
     '850.3',
     'calc(100 + 300)',
     'calc(0.2 + 205.5)',
     'calc(0 - 100)',
     'calc(200 + 801)',
   ],
-  'stretch': ['51%', '199%', 'calc(10% + 20%)'],
+  'stretch': ['51%', '199%', 'calc(10% + 20%)', '0%'],
   'style' : [ 'normal', 'italic', 'oblique', 'oblique 50deg', 'oblique -90deg', 'oblique 90deg',
-              'oblique calc(30deg + 20deg)' ]
+              'oblique calc(90deg + 20deg)', 'oblique calc(30deg + 20deg)' ]
 };
 
 var styleInvalidTests = {
   'weight': ['100 400'],
-  'stretch': ['100% 110%', '0%', '100% 150%', 'calc(1 + 10%)'],
-  'style' : [ 'normal 10deg', 'italic 10deg', 'oblique -91deg', 'oblique 91deg', 'oblique calc(90deg + 20deg)']
+  'stretch': ['100% 110%', '100% 150%', 'calc(1 + 10%)'],
+  'style' : [ 'normal 10deg', 'italic 10deg', 'oblique -91deg', 'oblique 91deg' ]
 };
 
 function testParseStyle() {
   for (validStyleTestCategory of Object.keys(styleValidTests)) {
     for (validStyleTest of styleValidTests[validStyleTestCategory]) {
       test(
           function() {
             assert_true(
@@ -58,19 +58,22 @@ function testParseStyle() {
     }
   }
 }
 
 var faceTests = {
   'weight': [
     ['100', '100'], ['700', '700'], ['900', '900'], ['bold', 'bold'],
     ['normal', 'normal'], ['100 400', '100 400'], ['100 101.5', '100 101.5'],
-    ['999.8 999.9', '999.8 999.9']
+    ['999.8 999.9', '999.8 999.9'],
+    [ '500 400', '500 400']
   ],
   'stretch': [
+    ['0%', '0%'],
+    ['calc(0% - 10%)', 'calc(-10%)' ],
     ['100%', '100%'],
     ['110%', '110%'],
     ['111.5%', '111.5%'],
     [ "50% 200%", "50% 200%" ],
     [ "0.1% 1%", "0.1% 1%" ],
     [ "900% 901%", "900% 901%" ],
     ['ultra-condensed', 'ultra-condensed'],
     ['ultra-expanded', 'ultra-expanded'],
@@ -85,26 +88,25 @@ var faceTests = {
 };
 
 var faceInvalidTests = {
   'weight': [
     '0',
     '0.9',
     '-100 200',
     '100 -200',
-    '500 400',
     '100 1001',
     '1001',
     '1000.5',
     '100 200 300',
     'a',
     'a b c',
   ],
   'stretch': [
-    '-0.5%', '-1%', '0%', 'calc(0% - 10%)', '60% 70% 80%', 'a%', 'a b c', '0.1',
+    '-0.5%', '-1%', '60% 70% 80%', 'a%', 'a b c', '0.1',
     '-60% 80%', 'ultra-expannnned', '50% 0'
   ],
   'style' : [ 'oblique 100deg', 'oblique italic', 'oblique -91deg', 'oblique 0',
               'oblique 10', 'iiitalic', '90deg', '11', 'italic 90deg' ]
 };
 
 function testParseFace() {
   for (var theProperty of Object.keys(faceTests)) {
--- a/testing/web-platform/tests/css/css-fonts/variations/font-shorthand.html
+++ b/testing/web-platform/tests/css/css-fonts/variations/font-shorthand.html
@@ -38,17 +38,17 @@
             { value: "oblique -45deg 500 24px Arial",                       isValid:true,   expectedStyle: "oblique -45deg", expectedWeight:"500",   message: "'oblique' with negative angle followed by valid weight" },
 
             // font-weight and font-style combined, with calc()
             { value: "oblique calc(200 + 300) 24px Arial",                  isValid:true,  expectedStyle: "oblique",         expectedWeight:"500",   message: "'oblique' followed by valid calc() weight" },
             { value: "oblique 30deg calc(200 + 300) 24px Arial",            isValid:true,  expectedStyle: "oblique 30deg",   expectedWeight:"500",   message: "'oblique' with angle followed by valid calc() weight" },
             { value: "oblique calc(900 + 300) 24px Arial",                  isValid:true,  expectedStyle: "oblique",         expectedWeight:"1000",  message: "'oblique' followed by a to-be-clamped calc() weight" },
             { value: "calc(200 + 300) oblique 24px Arial",                  isValid:true,  expectedStyle: "oblique",         expectedWeight:"500",   message: "calc() weight folowed by 'oblique'" },
             { value: "calc(200 + 300) oblique 45deg 24px Arial",            isValid:true,  expectedStyle: "oblique 45deg",   expectedWeight:"500",   message: "calc() weight folowed by 'oblique' and slant angle" },
-            { value: "calc(900 + 300) oblique 45deg 24px Arial",            isValid:true,  expectedStyle: "oblique",         expectedWeight:"1000",  message: "To-be-clamped calc() weight folowed by 'oblique' and slant angle" },
+            { value: "calc(900 + 300) oblique 45deg 24px Arial",            isValid:true,  expectedStyle: "oblique 45deg",   expectedWeight:"1000",  message: "To-be-clamped calc() weight folowed by 'oblique' and slant angle" },
         ];
 
         testFontShorthand.forEach(function (testCase) {
             test(() => {
                 assert_equals(window.CSS.supports("font", testCase.value), testCase.isValid, "Font shorthand: " + testCase.message);
 
                 let expectedStyle  = (testCase.expectedStyle) ? testCase.expectedStyle : "normal";
                 let expectedWeight = (testCase.expectedWeight) ? testCase.expectedWeight : "400";