зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1589112 [wpt PR 19731] - Fixup a css-shapes test broken by #19577, a=testonly
Automatic update from web-platform-tests Fixup a css-shapes test broken by #19577 (#19731) -- wpt-commits: 88c0d6780f897eacd4783e1aaf0ff15756515530 wpt-pr: 19731
This commit is contained in:
Родитель
1c3c08a417
Коммит
d4bad658e6
|
@ -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);
|
||||
|
@ -49,6 +49,8 @@
|
|||
});
|
||||
|
||||
generate_tests(testUnit, tests);
|
||||
|
||||
ParsingUtils.restoreFonts();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче