blob: 39934200ac22f64d8dce93e902e23e9f4cffa074 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
|
"use strict";
// This test checks whether the applied theme transition effects are applied
// correctly.
add_task(async function test_theme_transition_effects() {
const TOOLBAR = "#f27489";
const TEXT_COLOR = "#000000";
const TRANSITION_PROPERTY = "background-color";
let extension = ExtensionTestUtils.loadExtension({
manifest: {
theme: {
colors: {
tab_background_text: TEXT_COLOR,
toolbar: TOOLBAR,
bookmark_text: TEXT_COLOR,
},
},
},
});
await extension.startup();
// check transition effect for toolbars
let navbar = document.querySelector("#nav-bar");
let navbarCS = window.getComputedStyle(navbar);
Assert.ok(
navbarCS
.getPropertyValue("transition-property")
.includes(TRANSITION_PROPERTY),
"Transition property set for #nav-bar"
);
let bookmarksBar = document.querySelector("#PersonalToolbar");
setToolbarVisibility(bookmarksBar, true, false, true);
let bookmarksBarCS = window.getComputedStyle(bookmarksBar);
Assert.ok(
bookmarksBarCS
.getPropertyValue("transition-property")
.includes(TRANSITION_PROPERTY),
"Transition property set for #PersonalToolbar"
);
await extension.unload();
});
|