browser_style_domain.js (1913B)
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 // CacheKey::CSSDisplay, CacheDomain::Style 8 addAccessibleTask( 9 `<div id="test" style="display:flex;">test</div>`, 10 async function (browser, docAcc) { 11 let acc = findAccessibleChildByID(docAcc, "test"); 12 await testAttributeCachePresence(acc, "display", () => { 13 acc.attributes; 14 }); 15 }, 16 { 17 topLevel: true, 18 iframe: true, 19 remoteIframe: true, 20 cacheDomains: CacheDomain.None, 21 } 22 ); 23 24 // CacheKey::CSSOverflow, CacheDomain::Style 25 addAccessibleTask( 26 `<div id="test" style="overflow:hidden;">test</div>`, 27 async function (browser, docAcc) { 28 let acc = findAccessibleChildByID(docAcc, "test"); 29 await testAttributeCachePresence(acc, "overflow", () => { 30 acc.getChildAtPoint({}, {}); 31 }); 32 }, 33 { 34 topLevel: true, 35 iframe: true, 36 remoteIframe: true, 37 cacheDomains: CacheDomain.None, 38 } 39 ); 40 41 // CacheKey::CssPosition, CacheDomain::Style 42 addAccessibleTask( 43 `<div id="test" style="position:fixed;">test</div>`, 44 async function (browser, docAcc) { 45 let acc = findAccessibleChildByID(docAcc, "test"); 46 await testAttributeCachePresence(acc, "position", () => { 47 acc.getChildAtPoint({}, {}); 48 }); 49 }, 50 { 51 topLevel: true, 52 iframe: true, 53 remoteIframe: true, 54 cacheDomains: CacheDomain.None, 55 } 56 ); 57 58 // CacheKey::Opacity, CacheDomain::Style 59 addAccessibleTask( 60 `<div id="test" style="opacity:0.5;">test</div>`, 61 async function (browser, docAcc) { 62 let acc = findAccessibleChildByID(docAcc, "test"); 63 await testAttributeCachePresence(acc, "opacity", () => { 64 acc.getState({}, {}); 65 }); 66 }, 67 { 68 topLevel: true, 69 iframe: true, 70 remoteIframe: true, 71 cacheDomains: CacheDomain.None, 72 } 73 );