tor-browser

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

browser_caching_uniqueid.js (861B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 /**
      8 * Test UniqueID property.
      9 */
     10 addAccessibleTask(
     11  '<div id="div"></div>',
     12  async function (browser, accDoc) {
     13    const div = findAccessibleChildByID(accDoc, "div");
     14    const accUniqueID = await invokeContentTask(browser, [], () => {
     15      const accService = Cc["@mozilla.org/accessibilityService;1"].getService(
     16        Ci.nsIAccessibilityService
     17      );
     18 
     19      return accService.getAccessibleFor(content.document.getElementById("div"))
     20        .uniqueID;
     21    });
     22 
     23    is(
     24      accUniqueID,
     25      div.uniqueID,
     26      "Both proxy and the accessible return correct unique ID."
     27    );
     28  },
     29  { iframe: true, remoteIframe: true }
     30 );