summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_1089591_still_customizable_after_reset.js
blob: 1f502e8e25a33651aba71355967978ebc2e021e8 (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(function* () {
  yield 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);
  yield 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);

  yield endCustomizing();
});

add_task(function* asyncCleanup() {
  yield resetCustomization();
});