tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_selectpopup_dir.js (565B)


      1 const PAGE = `
      2 <!doctype html>
      3 <select style="direction: rtl">
      4  <option>ABC</option>
      5  <option>DEFG</option>
      6 </select>
      7 `;
      8 
      9 add_setup(async function () {
     10  await SpecialPowers.pushPrefEnv({
     11    set: [["test.wait300msAfterTabSwitch", true]],
     12  });
     13 });
     14 
     15 add_task(async function () {
     16  const url = "data:text/html," + encodeURI(PAGE);
     17  await BrowserTestUtils.withNewTab(
     18    {
     19      gBrowser,
     20      url,
     21    },
     22    async function () {
     23      let popup = await openSelectPopup("click");
     24      is(popup.style.direction, "rtl", "Should be the right dir");
     25    }
     26  );
     27 });