browser_registerArea.js (802B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /** 7 * Tests that a toolbar area can be registered with overflowable: false 8 * as one of its properties, and this results in a non-overflowable 9 * toolbar. 10 */ 11 add_task(async function test_overflowable_false() { 12 registerCleanupFunction(removeCustomToolbars); 13 14 const kToolbarId = "no-overflow-toolbar"; 15 createToolbarWithPlacements(kToolbarId, ["spring"], { 16 overflowable: false, 17 }); 18 19 let node = CustomizableUI.getWidget(kToolbarId).forWindow(window).node; 20 Assert.ok( 21 !node.hasAttribute("overflowable"), 22 "Toolbar should not be overflowable" 23 ); 24 Assert.ok( 25 !node.overflowable, 26 "OverflowableToolbar instance should not have been created." 27 ); 28 });