Bug 1452840 [wpt PR 10390] - [css-typed-om] Support offset-rotate., a=testonly
authorDarren Shen <shend@chromium.org>
Sun, 22 Apr 2018 15:00:37 +0000
changeset 468870 705bd1cb7b3fab5b8f53a92f400c4e488aff9193
parent 468869 bf219acff879bf5b48dd41e9f8620a8da1f250ca
child 468871 a5e3429241aa802c67decfa3b6b1f54db2f7a11b
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)
reviewerstestonly
bugs1452840, 10390, 820299, 1003433, 550146
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 1452840 [wpt PR 10390] - [css-typed-om] Support offset-rotate., a=testonly Automatic update from web-platform-tests[css-typed-om] Support offset-rotate. Introduces the <angle> data type. Test fails because we compute offset-rotate to a pair rather than 'as specified' had to rebaseline all the tests. Bug: 820299 Change-Id: Ifdc192550b0b544b9887af80c259b3bfeede556b Reviewed-on: https://chromium-review.googlesource.com/1003433 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by: nainar <nainar@chromium.org> Cr-Commit-Position: refs/heads/master@{#550146} -- wpt-commits: 1dd03e794199f6430072ecef144991112136cca5 wpt-pr: 10390
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -527120,17 +527120,17 @@
    "5822486bf8d79310965dddcb5bcbe6bf69ac89c4",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/offset-position.html": [
    "a0e3b777d15caecaee854c3e5fb050df8c736d0a",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html": [
-   "f405f78977c3521f2dfd78316b78ad2bbe61845d",
+   "0372ca67d2d93029b86aed9a189922bfe234922c",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/offset.html": [
    "87b8d31906a2bf96a38e5112600fcd8970642d53",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/opacity.html": [
    "3812b01e648e3b043abbd2fe82c3733309da49ad",
@@ -527212,17 +527212,17 @@
    "ae21056fb993efb7112e0bc42fe1269f6bc0c72e",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/resize.html": [
    "533f287facbc82118469f75f9f88a1372848d3b2",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
-   "57acadafe23908035d6673f3383ef7019265ce3c",
+   "c3eda7402e5175b127d11f2ba610a04b45547a27",
    "support"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/right.html": [
    "68a2611eaf9eecb7393c2b0db0f4378ebe285f22",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/scroll-behavior.html": [
    "a50ff312ff22f3d26fb22764d2da8689887dcb20",
--- a/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html
@@ -7,14 +7,20 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="../../resources/testhelper.js"></script>
 <script src="resources/testsuite.js"></script>
 <body>
 <div id="log"></div>
 <script>
 'use strict';
 
+runPropertyTests('offset-rotate', [
+  { syntax: 'auto' },
+  { syntax: 'reverse' },
+  { syntax: '<angle>' },
+]);
+
 runUnsupportedPropertyTests('offset-rotate', [
   'auto 90deg',
   'reverse -90deg',
 ]);
 
 </script>
--- a/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js
@@ -119,16 +119,70 @@ const gTestSyntaxExamples = {
         input: new CSSMathSum(new CSSUnitValue(0, 's'), new CSSUnitValue(0, 'ms')),
         // Specified/computed calcs are usually simplified.
         // FIXME: Test this properly
         defaultSpecified: (_, result) => assert_is_calc_sum(result),
         defaultComputed: (_, result) => assert_is_unit('s', result)
       }
     ],
   },
+  '<time>': {
+    description: 'a time',
+    examples: [
+      {
+        description: "zero seconds",
+        input: new CSSUnitValue(0, 's')
+      },
+      {
+        description: "negative milliseconds",
+        input: new CSSUnitValue(-3.14, 'ms'),
+        // Computed values use canonical units
+        defaultComputed: (_, result) => assert_style_value_equals(result, new CSSUnitValue(-0.00314, 's'))
+      },
+      {
+        description: "positive seconds",
+        input: new CSSUnitValue(3.14, 's')
+      },
+      {
+        description: "a calc time",
+        input: new CSSMathSum(new CSSUnitValue(0, 's'), new CSSUnitValue(0, 'ms')),
+        // Specified/computed calcs are usually simplified.
+        // FIXME: Test this properly
+        defaultSpecified: (_, result) => assert_is_calc_sum(result),
+        defaultComputed: (_, result) => assert_is_unit('s', result)
+      }
+    ],
+  },
+  '<angle>': {
+    description: 'an angle',
+    examples: [
+      {
+        description: "zero degrees",
+        input: new CSSUnitValue(0, 'deg')
+      },
+      {
+        description: "positive radians",
+        input: new CSSUnitValue(3.14, 'rad'),
+        // Computed values use canonical units
+        defaultComputed: (_, result) => assert_style_value_equals(result, new CSSUnitValue(179.908752, 'deg'))
+      },
+      {
+        description: "negative degrees",
+        input: new CSSUnitValue(-3.14, 'deg')
+      },
+      {
+        description: "a calc angle",
+        input: new CSSMathSum(new CSSUnitValue(0, 'rad'), new CSSUnitValue(0, 'deg')),
+        // Specified/computed calcs are usually simplified.
+        // FIXME: Test this properly
+        defaultSpecified: (_, result) => assert_is_calc_sum(result),
+        defaultComputed: (_, result) => assert_is_unit('deg', result)
+      }
+    ],
+  },
   '<flex>': {
     description: 'a flexible length',
     examples: [
       {
         description: "zero fractions",
         input: new CSSUnitValue(0, 'fr')
       },
       {