tor-browser

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

browser_text_paragraph_boundary.js (864B)


      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 // Test that we don't crash the parent process when querying the paragraph
      8 // boundary on an Accessible which has remote ProxyAccessible descendants.
      9 addAccessibleTask(
     10  `test`,
     11  async function testParagraphBoundaryWithRemoteDescendants() {
     12    const root = getRootAccessible(document).QueryInterface(
     13      Ci.nsIAccessibleText
     14    );
     15    let start = {};
     16    let end = {};
     17    // The offsets will change as the Firefox UI changes. We don't really care
     18    // what they are, just that we don't crash.
     19    root.getTextAtOffset(0, nsIAccessibleText.BOUNDARY_PARAGRAPH, start, end);
     20    ok(true, "Getting paragraph boundary succeeded");
     21  }
     22 );