Bug 1689227 - Fix a text input test to not depend on specific padding values. r=dholbert

It was adding 1px manually, but the non-native theme has 2px
inline-padding, so it fails with that enabled.

Differential Revision: https://phabricator.services.mozilla.com/D103240
This commit is contained in:
Emilio Cobos Álvarez 2021-01-28 07:04:57 +00:00
Родитель a1c7db7d76
Коммит 9c258cbdc6
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2,11 +2,15 @@
<html>
<head>
<title>Intrinsic Size Test</title>
<style>input, textarea { border-radius:0; background:none; border:none; }</style>
<style>input, textarea { border-radius:0; background:none; border:none; }</style>
</head>
<body>
<div>
<span style="border:2px solid black"><input style="background-color:transparent; border:none; font-family:monospace; padding-left:201px"/></span>
<span style="border:2px solid black"><input style="background-color:transparent; border:none; font-family:monospace;"/></span>
</div>
<script>
let input = document.querySelector("input");
input.style.paddingLeft = (200 + parseInt(getComputedStyle(input).paddingLeft, 10)) + "px";
</script>
</body>
</html>