2
* Copyright 2016 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Marco Trevisan <marco.trevisan@canonical.com>
21
import Ubuntu.Test 0.1
22
import Ubuntu.Settings.Menus 0.1
39
iconName: "view-fullscreen"
51
function test_iconInvisible() {
52
var menuIcon = findChild(standardMenu, "standardMenuIcon")
53
verify(menuIcon !== undefined)
54
compare(menuIcon.visible, false)
57
function test_iconVisible() {
58
var menuIcon = findChild(iconMenu, "standardMenuIcon")
59
verify(menuIcon !== undefined)
60
compare(menuIcon.visible, true)
63
function test_iconVisibilityChanges() {
64
var menuIcon = findChild(emptyMenu, "standardMenuIcon")
65
verify(menuIcon !== undefined)
66
compare(menuIcon.visible, false)
68
emptyMenu.iconName = "close"
69
compare(menuIcon.visible, true)
71
emptyMenu.iconName = ""
72
compare(menuIcon.visible, false)
74
emptyMenu.iconSource = "image://theme/tick"
75
compare(menuIcon.visible, true)
77
emptyMenu.iconSource = ""
78
compare(menuIcon.visible, false)