Update web-platform-tests to revision cdd3b613e1e108d805ae9441e9827777f1d7072c

This commit is contained in:
WPT Sync Bot 2020-01-31 08:23:37 +00:00
parent 4edd1590f4
commit e6a0d5b0bd
163 changed files with 7225 additions and 191 deletions

View file

@ -28,10 +28,10 @@
<script>
function parseWidthInPx(element) {
const value = CSSNumericValue.parse(getComputedStyle(element).width);
if (!value || !(value instanceof CSSUnitValue) || value.unit !== 'px')
throw 'Cannot parse width in pixels';
return value.value;
const value = getComputedStyle(element).width;
if (!value.endsWith('px'))
return NaN;
return parseFloat(value);
}
const testCases = document.querySelectorAll('.test');