diff options
Diffstat (limited to 'devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js')
-rw-r--r-- | devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js b/devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js new file mode 100644 index 0000000000..e96c4b3a86 --- /dev/null +++ b/devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js @@ -0,0 +1,24 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test updating the touch simulation `enabled` property + +const { + toggleTouchSimulation, +} = require("resource://devtools/client/responsive/actions/ui.js"); + +add_task(async function () { + const store = Store(); + const { getState, dispatch } = store; + + ok( + !getState().ui.touchSimulationEnabled, + "Touch simulation is disabled by default." + ); + + dispatch(toggleTouchSimulation(true)); + + ok(getState().ui.touchSimulationEnabled, "Touch simulation is enabled."); +}); |