Bug 1089591 - Customize mode should be customizable after reset. r=Gijs r=mconley

This commit is contained in:
Alex Bardas 2014-10-30 10:28:00 +01:00
parent c173dad3a3
commit d8cd387cb6
3 changed files with 27 additions and 0 deletions

View File

@ -1068,6 +1068,7 @@ CustomizeMode.prototype = {
}
this._removeDragHandlers(target);
}
this.areas.clear();
}.bind(this)).then(null, ERROR);
},

View File

@ -150,3 +150,4 @@ skip-if = e10s # Bug 1088710
[browser_1058573_showToolbarsDropdown.js]
[browser_bootstrapped_custom_toolbar.js]
[browser_panel_toggle.js]
[browser_1089591_still_customizable_after_reset.js]

View File

@ -0,0 +1,25 @@
"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);
gCustomizeMode.reset();
yield waitForCondition(() => !gCustomizeMode.resetting);
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();
});