michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: const kTestToolbarId = "test-empty-drag"; michael@0: michael@0: // Attempting to drag an item to an empty container should work. michael@0: add_task(function() { michael@0: yield createToolbarWithPlacements(kTestToolbarId, []); michael@0: yield startCustomizing(); michael@0: let downloadButton = document.getElementById("downloads-button"); michael@0: let customToolbar = document.getElementById(kTestToolbarId); michael@0: simulateItemDrag(downloadButton, customToolbar); michael@0: assertAreaPlacements(kTestToolbarId, ["downloads-button"]); michael@0: ok(downloadButton.parentNode && downloadButton.parentNode.parentNode == customToolbar, michael@0: "Button should really be in toolbar"); michael@0: yield endCustomizing(); michael@0: removeCustomToolbars(); michael@0: }); michael@0: michael@0: add_task(function asyncCleanup() { michael@0: yield endCustomizing(); michael@0: yield resetCustomization(); michael@0: });