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 kTestBtnId = "test-removable-navbar-customize-mode"; michael@0: michael@0: // Items without the removable attribute in the navbar should be considered non-removable michael@0: add_task(function() { michael@0: let btn = createDummyXULButton(kTestBtnId, "Test removable in navbar in customize mode"); michael@0: document.getElementById("nav-bar").customizationTarget.appendChild(btn); michael@0: yield startCustomizing(); michael@0: ok(!CustomizableUI.isWidgetRemovable(kTestBtnId), "Widget should not be considered removable"); michael@0: yield endCustomizing(); michael@0: document.getElementById(kTestBtnId).remove(); michael@0: }); michael@0: michael@0: add_task(function asyncCleanup() { michael@0: yield endCustomizing(); michael@0: yield resetCustomization(); michael@0: });