test_bug1666613.html (1127B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Test for Bug 1666613</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 <style>iframe { width: 90%; }</style> 8 </head> 9 <body> 10 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1666613">Mozilla Bug 691215</a> 11 <p id="display"></p> 12 <script class="testbody" type="text/javascript"> 13 14 SimpleTest.waitForExplicitFinish(); 15 16 function checkDir(expected) { 17 return new Promise(resolve => { 18 let iframe = document.createElement("iframe"); 19 document.body.append(iframe); 20 iframe.onload = () => { 21 let parserError = iframe.contentDocument.documentElement; 22 is(parserError.getAttribute("dir"), expected); 23 resolve(); 24 }; 25 iframe.src = "file_bug1666613.xml"; 26 }); 27 } 28 29 async function sanityTest() { 30 await checkDir("ltr"); 31 await pseudoBidiTest(); 32 } 33 34 async function pseudoBidiTest() { 35 await SpecialPowers.pushPrefEnv({ 36 set: [["intl.l10n.pseudo", "bidi"]] 37 }); 38 await checkDir("rtl"); 39 SimpleTest.finish(); 40 } 41 42 sanityTest(); 43 </script> 44 </body> 45 </html>