test_update_touch_simulation_enabled.js (603B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test updating the touch simulation `enabled` property 7 8 const { 9 toggleTouchSimulation, 10 } = require("resource://devtools/client/responsive/actions/ui.js"); 11 12 add_task(async function () { 13 const store = Store(); 14 const { getState, dispatch } = store; 15 16 ok( 17 !getState().ui.touchSimulationEnabled, 18 "Touch simulation is disabled by default." 19 ); 20 21 dispatch(toggleTouchSimulation(true)); 22 23 ok(getState().ui.touchSimulationEnabled, "Touch simulation is enabled."); 24 });