aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2014-01-16 15:01:40 -0500
committerWilliam Hua <william.hua@canonical.com>2014-01-16 15:01:40 -0500
commitf7128240c9f9e64140dc8cd604116396bce83830 (patch)
treeebb175f166e26853a5b8874d65bd8e80cf8edc33 /tests
parent03897a50bce55645fa514345bebb9ab4065193e3 (diff)
downloadayatana-indicator-keyboard-f7128240c9f9e64140dc8cd604116396bce83830.tar.gz
ayatana-indicator-keyboard-f7128240c9f9e64140dc8cd604116396bce83830.tar.bz2
ayatana-indicator-keyboard-f7128240c9f9e64140dc8cd604116396bce83830.zip
Prevent double removal of timeout sources.
Diffstat (limited to 'tests')
-rw-r--r--tests/main.vala28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/main.vala b/tests/main.vala
index 1a7833a2..35d40c56 100644
--- a/tests/main.vala
+++ b/tests/main.vala
@@ -194,7 +194,7 @@ static void test_activate_character_map (void *data) {
action_group.activate_action ("map", null);
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -233,7 +233,7 @@ static void test_activate_keyboard_layout_chart (void *data) {
action_group.activate_action ("chart", null);
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -261,7 +261,7 @@ static void test_activate_text_entry_settings (void *data) {
action_group.activate_action ("settings", null);
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -295,7 +295,7 @@ static void test_migration (void *data) {
try {
var cancellable = new Cancellable ();
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return true; });
var dbus_proxy = new DBusProxy.sync ((!) fixture.connection,
DBusProxyFlags.NONE,
@@ -361,7 +361,7 @@ static void test_no_migration (void *data) {
try {
var cancellable = new Cancellable ();
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return true; });
var dbus_proxy = new DBusProxy.sync ((!) fixture.connection,
DBusProxyFlags.NONE,
@@ -432,7 +432,7 @@ static void test_update_visible (void *data) {
action_group.list_actions ();
- var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -456,7 +456,7 @@ static void test_update_visible (void *data) {
return;
}
- source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -480,7 +480,7 @@ static void test_update_visible (void *data) {
return;
}
- source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -530,7 +530,7 @@ static void test_update_input_source (void *data) {
return;
}
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -565,7 +565,7 @@ static void test_update_input_source (void *data) {
return;
}
- source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -617,7 +617,7 @@ static void test_update_input_sources (void *data) {
menu_model.get_n_items ();
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
menu_model.disconnect (signal_name);
@@ -630,7 +630,7 @@ static void test_update_input_sources (void *data) {
menu.get_n_items ();
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
menu.disconnect (signal_name);
@@ -643,7 +643,7 @@ static void test_update_input_sources (void *data) {
section.get_n_items ();
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
section.disconnect (signal_name);
@@ -672,7 +672,7 @@ static void test_update_input_sources (void *data) {
return;
}
- source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return true; });
loop.run ();
Source.remove (source);
section.disconnect (signal_name);