diff --git a/tools/wptrunner/wptrunner/wptmanifest/parser.py b/tools/wptrunner/wptrunner/wptmanifest/parser.py index c0ef9b4dd33d43..11e73841f7c3b5 100644 --- a/tools/wptrunner/wptrunner/wptmanifest/parser.py +++ b/tools/wptrunner/wptrunner/wptmanifest/parser.py @@ -599,6 +599,8 @@ def value_block(self): self.expression_values() if self.token[0] == token_types.string: self.value() + elif self.token[0] == token_types.atom: + self.atom() elif self.token[0] == token_types.list_start: self.consume() self.list_value() diff --git a/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py b/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py index 84917491fc0a13..7635e0ad238648 100644 --- a/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py +++ b/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py @@ -1,5 +1,6 @@ # mypy: allow-untyped-defs +import textwrap import unittest from .. import parser, serializer @@ -146,6 +147,15 @@ def test_18(self): """, """key: ] """) + def test_atom_as_default(self): + self.compare( + textwrap.dedent( + """\ + key: + if a == 1: @True + @False + """).encode()) + def test_escape_0(self): self.compare(br"""k\t\:y: \a\b\f\n\r\t\v""", r"""k\t\:y: \x07\x08\x0c\n\r\t\x0b