browser_root_element.js (1011B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /* import-globals-from ../../mochitest/role.js */ 7 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR }); 8 9 /** 10 * Verify that we don't mutate the accessible tree when the the root 11 * element gets a new overflow style. 12 */ 13 addAccessibleTask( 14 ` 15 <button>button</button> 16 `, 17 async function testNoMutateOnRootOverflow(browser, accDoc) { 18 const tree = { 19 DOCUMENT: [ 20 { 21 // Body element gets a generic container. 22 TEXT_CONTAINER: [ 23 { 24 PUSHBUTTON: [{ TEXT_LEAF: [] }], 25 }, 26 ], 27 }, 28 ], 29 }; 30 testAccessibleTree(accDoc, tree); 31 await contentSpawnMutation( 32 browser, 33 { unexpected: [[EVENT_REORDER, accDoc]] }, 34 function () { 35 content.document.documentElement.style.overflow = "hidden"; 36 } 37 ); 38 }, 39 { 40 contentDocBodyAttrs: { style: "overflow: auto;" }, 41 } 42 );