/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // CacheDomain::Bounds, CacheKey::CrossDocOffset addAccessibleTask( `
test
`, async function (browser, _, docAcc) { // Translate the iframe, which should modify cross-process offset. info("Setting the transform on the iframe"); await SpecialPowers.spawn(browser, [DEFAULT_IFRAME_ID], iframeID => { let elm = content.document.getElementById(iframeID); elm.style.transform = "translate(100px,100px)"; }); await waitForContentPaint(browser); let acc = findAccessibleChildByID(docAcc, DEFAULT_IFRAME_ID); await testAttributeCachePresence(acc, "crossorigin", () => { // Querying bounds queries the CrossDocOffset info. acc.getBounds({}, {}, {}, {}); }); }, { topLevel: false, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // CacheKey::IsClipped, CacheDomain::Bounds addAccessibleTask( `
Mozilla
I am some other text
`, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "invisible"); await testAttributeCachePresence(acc, "clip-rule", () => { // Querying bounds queries the IsClipped info. acc.getBounds({}, {}, {}, {}); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // CacheKey::ParentRelativeBounds, CacheDomain::Bounds addAccessibleTask( `
test
`, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "test"); await testAttributeCachePresence(acc, "relative-bounds", () => { // Querying bounds queries the ParentRelativeBounds info. acc.getBounds({}, {}, {}, {}); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } );