Bug 1462541 [wpt PR 11062] - [css-typed-om] Ignore surrounding whitespace in CSSNumericValue.parse., a=testonly

Automatic update from web-platform-tests[css-typed-om] Ignore surrounding whitespace in CSSNumericValue.parse.

Fixes an issue where CSSNumericValue.parse considers valid strings
surrounded by whitespace to be invalid.

Bug: 844290
Change-Id: I4c40044631276a611ef9a56aac21ddf09316a550
Reviewed-on: https://chromium-review.googlesource.com/1065532
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560207}

--

wpt-commits: 30f00b755539c197f74f6517b7382f1fa050f30b
wpt-pr: 11062
This commit is contained in:
Darren Shen 2018-05-21 16:57:27 +00:00 committed by moz-wptsync-bot
parent 28f491c7fd
commit 44a206f5a2
2 changed files with 5 additions and 1 deletions

View File

@ -532641,7 +532641,7 @@
"testharness"
],
"css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html": [
"a17c4fdc29c474edb1ef3f94d5282d2603dd7227",
"a96190f4a188be1bda9c8259dc2a19703cc134d0",
"testharness"
],
"css/css-typed-om/stylevalue-subclasses/numeric-objects/resources/testhelper.js": [

View File

@ -23,4 +23,8 @@ test(() => {
assert_throws(new SyntaxError(), () => CSSNumericValue.parse('calc(calc(1px * 2s) + 3%)'));
}, 'Parsing a calc with incompatible units throws a SyntaxError');
test(() => {
assert_style_value_equals(new CSSUnitValue(1, 'px'), CSSNumericValue.parse(' 1px '));
}, 'Parsing ignores surrounding spaces');
</script>