/* 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/. */ /* global STATE_CHECKED, EXT_STATE_EDITABLE, nsIAccessibleStateChangeEvent, EVENT_STATE_CHANGE */ 'use strict'; loadScripts({ name: 'role.js', dir: MOCHITESTS_DIR }, { name: 'states.js', dir: MOCHITESTS_DIR }); function checkStateChangeEvent(event, state, isExtraState, isEnabled) { let scEvent = event.QueryInterface(nsIAccessibleStateChangeEvent); is(scEvent.state, state, 'Correct state of the statechange event.'); is(scEvent.isExtraState, isExtraState, 'Correct extra state bit of the statechange event.'); is(scEvent.isEnabled, isEnabled, 'Correct state of statechange event state'); } // Insert mock source into the iframe to be able to verify the right document // body id. let iframeSrc = `data:text/html,