Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: dom/tests/mochitest/chrome/chrome.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
</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>