summaryrefslogtreecommitdiffstats
path: root/devtools/client/responsive.html/test/unit/test_update_touch_simulation_enabled.js
blob: f8ba2a4b6de1bd05722ba9691f962296a9f579cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* 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 {
  changeTouchSimulation,
} = require("devtools/client/responsive.html/actions/touch-simulation");

add_task(function* () {
  let store = Store();
  const { getState, dispatch } = store;

  ok(!getState().touchSimulation.enabled,
    "Touch simulation is disabled by default.");

  dispatch(changeTouchSimulation(true));

  ok(getState().touchSimulation.enabled,
    "Touch simulation is enabled.");
});