37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1673054
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 1673054 </title>
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
|
</head>
|
|
<body onload="test()">
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1673054 ">Mozilla Bug 1673054</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
<script>
|
|
async function test() {
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
let intlUtils = window.intlUtils;
|
|
ok(intlUtils, "window.intlUtils should exist");
|
|
|
|
let originalValue = intlUtils.isAppLocaleRTL();
|
|
ok(originalValue == false, "window.intlUtils.isAppLocaleRTL should exist");
|
|
|
|
await SpecialPowers.pushPrefEnv({ set: [["intl.l10n.pseudo", "bidi"]] });
|
|
let currentValue = intlUtils.isAppLocaleRTL();
|
|
ok(currentValue == true, "If pseudolocale is bidi, isAppLocaleRTL should be true");
|
|
|
|
await SpecialPowers.clearUserPref("intl.l10n.pseudo");
|
|
currentValue = intlUtils.isAppLocaleRTL();
|
|
ok(originalValue == currentValue, "Without override, isAppLocaleRTL should be default");
|
|
|
|
SimpleTest.finish();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|