From 44a206f5a24501691e73e78473c8a9f4c5fc668a Mon Sep 17 00:00:00 2001 From: Darren Shen Date: Mon, 21 May 2018 16:57:27 +0000 Subject: [PATCH] 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 Commit-Queue: Darren Shen Cr-Commit-Position: refs/heads/master@{#560207} -- wpt-commits: 30f00b755539c197f74f6517b7382f1fa050f30b wpt-pr: 11062 --- testing/web-platform/meta/MANIFEST.json | 2 +- .../numeric-objects/parse.tentative.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 39050e63df4a..2cfa09cc4183 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -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": [ diff --git a/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html b/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html index 6b623c22c774..80e4f44b3a01 100644 --- a/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html +++ b/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html @@ -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'); +