browser_treeupdate_ariadialog.js (1198B)
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 // Test ARIA Dialog 11 addAccessibleTask( 12 "e10s/doc_treeupdate_ariadialog.html", 13 async function (browser, accDoc) { 14 testAccessibleTree(accDoc, { 15 role: ROLE_DOCUMENT, 16 children: [], 17 }); 18 19 // Make dialog visible and update its inner content. 20 let onShow = waitForEvent(EVENT_SHOW, "dialog"); 21 await invokeContentTask(browser, [], () => { 22 content.document.getElementById("dialog").style.display = "block"; 23 }); 24 await onShow; 25 26 testAccessibleTree(accDoc, { 27 role: ROLE_DOCUMENT, 28 children: [ 29 { 30 role: ROLE_DIALOG, 31 children: [ 32 { 33 role: ROLE_PUSHBUTTON, 34 children: [{ role: ROLE_TEXT_LEAF }], 35 }, 36 { 37 role: ROLE_ENTRY, 38 }, 39 ], 40 }, 41 ], 42 }); 43 }, 44 { iframe: true, remoteIframe: true } 45 );