/* 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"; // Continued from browser_relations_domain_1.js. // Split up to avoid timeouts in test-verify. // RelationType::CONTROLLED_BY, CacheDomain::Relations addAccessibleTask( ` test `, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "controlled"); await testAttributeCachePresence(acc, "for", () => { acc.getRelationByType(0); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // RelationType::DESCRIBED_BY, CacheDomain::Relations addAccessibleTask( ` `, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "button"); await testAttributeCachePresence(acc, "describedby", () => { acc.getRelationByType(0); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // RelationType::FLOWS_TO, CacheDomain::Relations addAccessibleTask( `
flow to
flow from
`, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "flowto"); await testAttributeCachePresence(acc, "flowto", () => { acc.getRelationByType(0); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // RelationType::DETAILS, CacheDomain::Relations addAccessibleTask( `
`, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "has_details"); await testAttributeCachePresence(acc, "details", () => { acc.getRelationByType(0); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } ); // RelationType::ERRORMSG, CacheDomain::Relations addAccessibleTask( `
`, async function (browser, docAcc) { let acc = findAccessibleChildByID(docAcc, "has_error"); await testAttributeCachePresence(acc, "errormessage", () => { acc.getRelationByType(0); }); }, { topLevel: true, iframe: true, remoteIframe: true, cacheDomains: CacheDomain.None, } );