summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_1089591_still_customizable_after_reset.js
blob: b0bbbd726c868945554140f8cc11074d03ab86ab (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
"use strict";

// Dragging the elements again after a reset should work
add_task(async function () {
  await startCustomizing();
  let historyButton = document.getElementById("wrapper-history-panelmenu");
  let devButton = document.getElementById("wrapper-developer-button");

  ok(historyButton && devButton, "Draggable elements should exist");
  simulateItemDrag(historyButton, devButton);
  await gCustomizeMode.reset();
  ok(CustomizableUI.inDefaultState, "Should be back in default state");

  historyButton = document.getElementById("wrapper-history-panelmenu");
  devButton = document.getElementById("wrapper-developer-button");
  ok(historyButton && devButton, "Draggable elements should exist");
  simulateItemDrag(historyButton, devButton);

  await endCustomizing();
});

add_task(async function asyncCleanup() {
  await resetCustomization();
});