diff --git a/t/GtkRecentChooser.t b/t/GtkRecentChooser.t
index 71692d7..48cae52 100644
--- a/t/GtkRecentChooser.t
+++ b/t/GtkRecentChooser.t
@@ -50,7 +50,7 @@ $manager -> add_item($uri_one);
 $manager -> add_item($uri_two);
 
 # add_item() is asynchronous, so let the main loop spin for a while
-run_main while !$manager->get_items;
+Gtk2->main_iteration while !$manager->get_items;
 
 $chooser -> set_select_multiple(FALSE);
 
diff --git a/t/GtkRecentManager.t b/t/GtkRecentManager.t
index 860f744..bb693c5 100644
--- a/t/GtkRecentManager.t
+++ b/t/GtkRecentManager.t
@@ -53,7 +53,7 @@ SKIP: {
 
 	$manager->add_item($icon_uri);
 	# add_item() is asynchronous, so let the main loop spin for a while
-	run_main while !$manager->get_items;
+	Gtk2->main_iteration while !$manager->get_items;
 
 	ok($manager->has_item($icon_uri), 'check add item');
 
