Bug 1444289 [wpt PR 9934] - [css-typed-om] Generate whitelist from CSSProperties.json5., a=testonly
authorDarren Shen <shend@chromium.org>
Mon, 09 Apr 2018 16:35:28 +0000
changeset 467016 8e1c3b842562bca17103a7949e91799635e16152
parent 467015 5eb2f6fefd1620a1bd1e39dedc1129dbfd797e9b
child 467017 1308745abfab7734148db8b7179ce392c2e84d00
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
bugs1444289, 820299, 956903, 542697
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 1444289 [wpt PR 9934] - [css-typed-om] Generate whitelist from CSSProperties.json5., a=testonly Automatic update from web-platform-tests[css-typed-om] Generate whitelist from CSSProperties.json5. Currently, any CSS property in CSSProperties.json5 with keywords will implicitly accept keywords. This can cause crashes if the property doesn't actually store keywords as CSSIdenifierValues. We solved this by having a manual whitelist of properties we explicitly support. However, this is annoying to maintain. So we generate this whitelist from CSSProperties.json5 by explicitly specifying "Keyword" as a typedom_type. e.g. a property that doesn't have typedom_types will not be supported by Typed OM. A property that has "Keyword" in typedom_types will take CSSKeywordValues and reify as CSSKeywordValues. We also add support for scroll-padding-* because the JSON for that was already there and we just to write a test for it. Diff of generated files: https://gist.github.com/darrnshn/03cb617909abab7bf94aaaaad9874a15/revisions Bug: 820299 Change-Id: I6fa01c3623161e0778c5f8764009c6e0cdd6bbf3 Reviewed-on: https://chromium-review.googlesource.com/956903 Reviewed-by: nainar <nainar@chromium.org> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#542697} wpt-commits: 6163df220ac258161a67d92e49fee0604bfdc9e7 wpt-pr: 9934 wpt-commits: 6163df220ac258161a67d92e49fee0604bfdc9e7 wpt-pr: 9934
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -317359,16 +317359,22 @@
     ]
    ],
    "css/css-typed-om/the-stylepropertymap/properties/right.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/right.html",
      {}
     ]
    ],
+   "css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html": [
+    [
+     "/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html",
+     {}
+    ]
+   ],
    "css/css-typed-om/the-stylepropertymap/properties/shape-outside.html": [
     [
      "/css/css-typed-om/the-stylepropertymap/properties/shape-outside.html",
      {}
     ]
    ],
    "css/css-typed-om/the-stylepropertymap/properties/text-align.html": [
     [
@@ -522452,16 +522458,20 @@
   "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
    "6b7b909fe2cf5576ea5e483a0c0ee8a2977171f6",
    "support"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/right.html": [
    "68a2611eaf9eecb7393c2b0db0f4378ebe285f22",
    "testharness"
   ],
+  "css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html": [
+   "d37d336e4695e5055706a7822572b81b943fdbd4",
+   "testharness"
+  ],
   "css/css-typed-om/the-stylepropertymap/properties/shape-outside.html": [
    "3189c7b3903d30f31836ea845aebecf599198c79",
    "testharness"
   ],
   "css/css-typed-om/the-stylepropertymap/properties/text-align.html": [
    "88a1f5866a767c25dec2ef75728c68c5631d371f",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>scroll-padding related properties</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<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';
+
+for (const suffix of ['top', 'left', 'right', 'bottom']) {
+  runPropertyTests('scroll-padding-' + suffix, [
+    { syntax: '<percentage>' },
+    { syntax: '<length>' },
+  ]);
+}
+
+for (const suffix of ['inline-start', 'block-start', 'inline-end', 'block-end']) {
+  runPropertyTests('scroll-padding-' + suffix, [
+    { syntax: '<percentage>' },
+    { syntax: '<length>' },
+  ]);
+}
+
+runUnsupportedPropertyTests('scroll-padding',
+  ['0%', '1px 2px', '3% 4px 5%', '6px 7% 8% 9px']
+);
+
+</script>