Bug 1645125 [wpt PR 24116] - counter-set: Implement counter-set, a=testonly
authorVladimir Levin <vmpstr@chromium.org>
Mon, 22 Jun 2020 10:39:49 +0000
changeset 536811 80fc16b1b57ff94527c3aaef1b76c06c2ec105f7
parent 536810 4cefe230e6ad102972839e3b3258989182aaeec8
child 536812 5269ab455916b53139a605e3007e57fd828de817
push id119680
push userwptsync@mozilla.com
push dateTue, 23 Jun 2020 11:08:22 +0000
treeherderautoland@7ca3d4bada73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1645125, 24116, 991601, 882383, 2239670, 778318
milestone79.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 1645125 [wpt PR 24116] - counter-set: Implement counter-set, a=testonly Automatic update from web-platform-tests counter-set: Implement counter-set This patch implements counter-set CSS property: https://drafts.csswg.org/css-lists-3/#propdef-counter-set This also adjusts the counter-scoping-002 tests to correct usage. R=chrishtr@chromium.org, futhark@chromium.org Bug: 991601, 882383 Change-Id: I0c1e4f4464d36d0ffa814214f52bccec58fd8e17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239670 Commit-Queue: vmpstr <vmpstr@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Auto-Submit: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#778318} -- wpt-commits: bbbcde8645524e0f81f751db4d1518c4f448185c wpt-pr: 24116
testing/web-platform/tests/css/css-contain/counter-scoping-002.html
testing/web-platform/tests/css/css-lists/parsing/counter-set-computed.html
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/counter-set.html
--- a/testing/web-platform/tests/css/css-contain/counter-scoping-002.html
+++ b/testing/web-platform/tests/css/css-contain/counter-scoping-002.html
@@ -7,17 +7,17 @@
   <meta name=assert content="counter-set is scoped to the subtree and creates a new counter at the root of the subtree">
   <link rel="match" href="reference/counter-scoping-001-ref.html">
   <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-style">
   <link rel=help href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set">
 
 <style>
 div {
   contain: style;
-  counter-set: n;
+  counter-set: n 1;
 }
 div::before, div::after {
   content: counters(n, '.') " ";
 }
 div::after {
   counter-set: n 2;
 }
 </style>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-lists/parsing/counter-set-computed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Lists: getComputedStyle().counterSet</title>
+<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set">
+<meta name="assert" content="tests that counter-set grammar is supported.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value('counter-set', 'none');
+test_computed_value('counter-set', 'myCounter', 'myCounter 0');
+test_computed_value('counter-set', 'myCounter 5');
+test_computed_value('counter-set', 'myCounter 7 otherCounter 8');
+test_computed_value('counter-set', 'myCounter otherCounter 8', 'myCounter 0 otherCounter 8');
+test_computed_value('counter-set', 'myCounter 7 otherCounter', 'myCounter 7 otherCounter 0');
+</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/counter-set.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'counter-set' property</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';
+
+runPropertyTests('counter-set', [
+  { syntax: 'none' },
+]);
+
+runUnsupportedPropertyTests('counter-set', [
+  'chapter', 'chapter 3'
+]);
+
+</script>