2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU 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 General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import "../../../../Panel/Menus"
21
import Ubuntu.Components 0.1
22
import Unity.Test 0.1 as UT
25
id: testIndicatorMenuWindowItem
35
id: indicatorMenuWindow
36
name: "TestIndicatorMenuWindow"
41
name: "IndicatorMenuWindow"
44
function test_mouseEvent_data() {
46
{tag: "visible", shown: true, opacity: 1.0, mouseClicks: 0},
47
{tag: "invisible", shown: false, opacity: 0.0, mouseClicks: 1},
51
function test_mouseEvent(data) {
52
indicatorMenuWindow.shown = data.shown
53
tryCompare(indicatorMenuWindow, "opacity", data.opacity)
56
mouseClick(indicatorMenuWindow, indicatorMenuWindow.width / 2,
57
indicatorMenuWindow.height / 2)
58
compare(clickedSpy.count, data.mouseClicks,
59
"Check for Mouse event eating by indicatorMenuWindow failed")