Bug 1452145 [wpt PR 9965] - [css-typed-om] Fix DCHECK when creating a CSSUnitValue an empty unit., a=testonly
authorDarren Shen <shend@chromium.org>
Mon, 09 Apr 2018 16:34:49 +0000
changeset 467015 5eb2f6fefd1620a1bd1e39dedc1129dbfd797e9b
parent 467014 42d184e6b7ec17668b4cd9b4637920edc01febb4
child 467016 8e1c3b842562bca17103a7949e91799635e16152
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452145, 820905, 958624, 542693
milestone61.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 1452145 [wpt PR 9965] - [css-typed-om] Fix DCHECK when creating a CSSUnitValue an empty unit., a=testonly Automatic update from web-platform-tests[css-typed-om] Fix DCHECK when creating a CSSUnitValue an empty unit. When we create a CSSUnitValue with '' as the unit, we hit a DCHECK in the unit trie code because the length is 0. This is because we don't correctly reject the empty string as an invalid unit. In this patch we fix this. Interestingly, we already have a test to assert that using an empty unit throws type error. However the test used an incorrect variable name, causing it to throw a TypeError anyway, so our tests would've passed no matter what. Bug: 820905 Change-Id: I72ab5e4010d892042b2cfddf1014ab79d04a846d Reviewed-on: https://chromium-review.googlesource.com/958624 Reviewed-by: nainar <nainar@chromium.org> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#542693} wpt-commits: 592bb790b11c7cb873482c4eade2cc4e3aa2bdb9 wpt-pr: 9965 wpt-commits: 592bb790b11c7cb873482c4eade2cc4e3aa2bdb9 wpt-pr: 9965
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -522113,17 +522113,17 @@
    "98d69118f7b5c26031ec55e66112cd1424f74d4f",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssMathValue.tentative.html": [
    "e19ec7ede86d52ecf29a142607de481facabcfb2",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [
-   "9d855c711332b344078fc89bac6ed67091fa1ddd",
+   "e2d56515f3580649fc9cc8188b39056beb030036",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssnumericvalue-multiply-two-types.tentative.html": [
    "1b5a65d6cbc52cc263cfdb2c896e1d9591ac322f",
    "testharness"
   ],
   "css/css-typed-om/stylevalue-subclasses/numeric-objects/equals.tentative.html": [
    "466d97791b5fbec3dd52406bd8da3d277ae5ccdc",
--- a/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html
+++ b/testing/web-platform/tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html
@@ -4,18 +4,18 @@
 <link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#simple-numeric">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="../../resources/testhelper.js"></script>
 <script>
 'use strict';
 
 const gInvalidTestUnits = [
-  { value: '', desc: 'an empty string' },
-  { value: 'lemon', desc: 'an invalid unit' },
+  { unit: '', desc: 'an empty string' },
+  { unit: 'lemon', desc: 'an invalid unit' },
 ];
 
 for (const {unit, desc} of gInvalidTestUnits) {
   test(() => {
     assert_throws(new TypeError(), () => new CSSUnitValue(0, unit));
   }, 'Constructing CSSUnitValue with ' + desc + ' as the unit throws a TypeError');
 }