blob: d4bcba1b2771e359f499c2c618e2035cb87550c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function empty_message_on_non_empty_bookmarks_toolbar() {
await resetCustomization();
ok(CustomizableUI.inDefaultState, "Default state to begin");
await SpecialPowers.pushPrefEnv({
set: [["browser.toolbars.bookmarks.visibility", "always"]],
});
CustomizableUI.removeWidgetFromArea("import-button");
CustomizableUI.removeWidgetFromArea("personal-bookmarks");
CustomizableUI.addWidgetToArea(
"bookmarks-menu-button",
CustomizableUI.AREA_BOOKMARKS,
0
);
let newWin = await BrowserTestUtils.openNewBrowserWindow();
let doc = newWin.document;
ok(
BrowserTestUtils.is_visible(doc.getElementById("PersonalToolbar")),
"Personal toolbar should be visible"
);
ok(
doc.getElementById("personal-toolbar-empty").hidden,
"Empty message should be hidden"
);
await BrowserTestUtils.closeWindow(newWin);
await resetCustomization();
});
|