summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-counter-styles/counter-style-at-rule/speak-as-syntax.html
blob: f67896633ff1aecb7069fc3465850890142c2f3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-counter-styles-3/#counter-style-speak_as">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/counter-style-testcommon.js"></script>
<script>
function test_valid_speak_as(value) {
  test_valid_counter_style_descriptor('speak-as', value);
}

function test_invalid_speak_as(value) {
  test_invalid_counter_style_descriptor('speak-as', value);
}

// auto | bullets | numbers | words | spell-out | <counter-style-name>

test_valid_speak_as('auto');
test_valid_speak_as('bullets');
test_valid_speak_as('numbers');
test_valid_speak_as('words');
test_valid_speak_as('spell-out');

test_valid_speak_as('bar');
test_valid_speak_as('spellout'); // 'spellout' is a valid counter style name

test_invalid_speak_as('bullets numbers');

// The following are not valid counter style names
test_invalid_speak_as('none');
test_invalid_speak_as('initial');
test_invalid_speak_as('inherit');
test_invalid_speak_as('unset');

</script>