summaryrefslogtreecommitdiffstats
path: root/devtools/client/responsive/test/xpcshell/test_update_touch_simulation_enabled.js
blob: e96c4b3a869985934733f56f024726edd1e95461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.");
});