1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/customizableui/test/browser_940946_removable_from_navbar_customizemode.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 +const kTestBtnId = "test-removable-navbar-customize-mode"; 1.11 + 1.12 +// Items without the removable attribute in the navbar should be considered non-removable 1.13 +add_task(function() { 1.14 + let btn = createDummyXULButton(kTestBtnId, "Test removable in navbar in customize mode"); 1.15 + document.getElementById("nav-bar").customizationTarget.appendChild(btn); 1.16 + yield startCustomizing(); 1.17 + ok(!CustomizableUI.isWidgetRemovable(kTestBtnId), "Widget should not be considered removable"); 1.18 + yield endCustomizing(); 1.19 + document.getElementById(kTestBtnId).remove(); 1.20 +}); 1.21 + 1.22 +add_task(function asyncCleanup() { 1.23 + yield endCustomizing(); 1.24 + yield resetCustomization(); 1.25 +});