2
* Copyright (C) 2010 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 version 3 as
6
* published by the Free Software Foundation.
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/>.
16
* Authored by Neil Jagdish Patel <neil.patel@canonical.com>
24
namespace Unity.Tests.UI
26
public class TestFavorites : Unity.Favorites
28
public override ArrayList<string> get_favorites ()
30
var retlist = new ArrayList<string> ();
31
retlist.add ("app-firefox");
35
public override string find_uid_for_desktop_file (string desktop_file)
40
public override void add_favorite (string uid)
43
public override void remove_favorite (string uid)
46
public override bool is_favorite (string uid)
51
public override string? get_string (string uid, string name)
56
return "/usr/share/applications/firefox.desktop";
59
public override void set_string (string uid, string name, string value)
63
public override int? get_int (string uid, string name)
67
public override void set_int (string uid, string name, int value)
72
public override float? get_float (string uid, string name)
76
public override void set_float (string uid, string name, float value)
80
public override bool? get_bool (string uid, string name)
85
public override void set_bool (string uid, string name, bool value)
93
public static int main (string[] args)
96
QuicklistSuite quicklist_suite;
97
HomeButtonSuite home_button_suite;
98
AutomationBasicTestSuite basic_test_suite;
99
IndicatorTestSuite indicator_test_suite;
102
Environment.set_variable ("UNITY_DISABLE_TRAY", "1", true);
103
Environment.set_variable ("UNITY_DISABLE_IDLES", "1", true);
104
Environment.set_variable ("UNITY_PANEL_INDICATORS_SKIP", "all", true);
107
Gtk.Settings.get_default ().gtk_xft_dpi = 96 * 1024;
110
Test.init (ref args);
112
logger = new Logging ();
114
basic_test_suite = new AutomationBasicTestSuite ();
115
quicklist_suite = new QuicklistSuite ();
116
home_button_suite = new HomeButtonSuite ();
117
indicator_test_suite = new IndicatorTestSuite ();
119
Timeout.add_seconds (3, ()=> {