Skip to content

Commit

Permalink
Fixup a css-shapes test broken by #19577 (#19731)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeZielinski committed Oct 16, 2019
1 parent e5c5b3e commit 88c0d67
Showing 1 changed file with 12 additions and 10 deletions.
Expand Up @@ -19,16 +19,16 @@
// font relative units: em, ex, ch, rem
var units = ['em', 'ex', 'ch', 'rem'];
var resolveds = {};
ParsingUtils.setupFonts(function () {
var div = document.createElement('div');
document.body.appendChild(div);
units.forEach(function(unit) {
div.style.width = '10' + unit;
var s = getComputedStyle(div);
resolveds[unit] = parseFloat(s.width);
});
document.body.removeChild(div);
})();
ParsingUtils.setupFonts();

var div = document.createElement('div');
document.body.appendChild(div);
units.forEach(function(unit) {
div.style.width = '10' + unit;
var s = getComputedStyle(div);
resolveds[unit] = parseFloat(s.width);
});
document.body.removeChild(div);

function fillArray(string, length) {
return Array.apply(null, new Array(length)).map(String.prototype.valueOf, string);
Expand All @@ -49,6 +49,8 @@
});

generate_tests(testUnit, tests);

ParsingUtils.restoreFonts();
</script>
</body>
</html>

0 comments on commit 88c0d67

Please sign in to comment.