Bug 1690879: Make test_bug869314.html pass on macOS with the non-native theme enabled. r=emilio

Depends on D104084

Differential Revision: https://phabricator.services.mozilla.com/D104091
This commit is contained in:
Stephen A Pohl 2021-02-05 12:03:34 +00:00
Родитель 74e08b1d20
Коммит 8aade11c62
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -30,12 +30,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=869314
</select>
<script type="application/javascript">
var Cc = SpecialPowers.Cc;
var Ci = SpecialPowers.Ci;
var sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
var osName = sysInfo.getProperty("name");
if (osName == "Darwin") { // Mac OS X.
// This test is for Mac only. See bug for more info.
let Cc = SpecialPowers.Cc;
let Ci = SpecialPowers.Ci;
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
let osName = sysInfo.getProperty("name");
let isNNT = SpecialPowers.getBoolPref("widget.disable-native-theme-for-content");
if (osName == "Darwin" && !isNNT) { // Native styled macOS form controls.
// This test is for macOS with native styled form controls only. See bug for more info.
ok(document.getElementById("selectbox1").clientWidth >
document.getElementById("selectbox2").clientWidth,
"Non-native styled combobox does not have enough space for a " +