browser_treeupdate_canvas.js (891B)
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 /* import-globals-from ../../mochitest/role.js */ 8 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR }); 9 10 addAccessibleTask( 11 ` 12 <canvas id="canvas"> 13 <div id="dialog" role="dialog" style="display: none;"></div> 14 </canvas>`, 15 async function (browser, accDoc) { 16 let canvas = findAccessibleChildByID(accDoc, "canvas"); 17 let dialog = findAccessibleChildByID(accDoc, "dialog"); 18 19 testAccessibleTree(canvas, { CANVAS: [] }); 20 21 let onShow = waitForEvent(EVENT_SHOW, "dialog"); 22 await invokeSetStyle(browser, "dialog", "display", "block"); 23 await onShow; 24 25 testAccessibleTree(dialog, { DIALOG: [] }); 26 }, 27 { iframe: true, remoteIframe: true } 28 );