diff options
author | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-12-11 00:48:36 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-12-11 01:09:44 +0800 |
commit | 533c34899f09a1fa0e80aa198bd72ec2a90b1689 (patch) | |
tree | f11f94d4c0e12703cd3a1d1379ccdea6e0cbe852 /tests/ephy-session-test.c | |
parent | e65754da16f9af433cd90279b60855705855253a (diff) | |
download | gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar.gz gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar.bz2 gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar.lz gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar.xz gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.tar.zst gsoc2013-epiphany-533c34899f09a1fa0e80aa198bd72ec2a90b1689.zip |
ephy-shell: remove the ephy_shell global
https://bugzilla.gnome.org/show_bug.cgi?id=683614
Diffstat (limited to 'tests/ephy-session-test.c')
-rw-r--r-- | tests/ephy-session-test.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/ephy-session-test.c b/tests/ephy-session-test.c index 6295be475..4923f2779 100644 --- a/tests/ephy-session-test.c +++ b/tests/ephy-session-test.c @@ -51,13 +51,13 @@ test_ephy_session_load (void) EphyEmbed *embed; EphyWebView *view; - session = EPHY_SESSION (ephy_shell_get_session (ephy_shell)); + session = EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())); g_assert (session); ret = ephy_session_load_from_string (session, session_data, -1, 0); g_assert (ret); - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 1); @@ -86,7 +86,7 @@ test_ephy_session_load_empty_session (void) EphyEmbed *embed; EphyWebView *view; - session = EPHY_SESSION (ephy_shell_get_session (ephy_shell)); + session = EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())); g_assert (session); ret = ephy_session_load_from_string (session, session_data_empty, -1, 0); @@ -99,7 +99,7 @@ test_ephy_session_load_empty_session (void) while (g_main_context_pending (NULL)) g_main_context_iteration (NULL, FALSE); - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 1); @@ -136,13 +136,13 @@ test_ephy_session_load_many_windows (void) EphyEmbed *embed; EphyWebView *view; - session = EPHY_SESSION (ephy_shell_get_session (ephy_shell)); + session = EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())); g_assert (session); ret = ephy_session_load_from_string (session, session_data_many_windows, -1, 0); g_assert (ret); - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 2); @@ -170,7 +170,7 @@ test_ephy_session_open_uri_after_loading_session (void) guint32 user_time; const char* uris[] = { "ephy-about:epiphany", NULL }; - session = EPHY_SESSION (ephy_shell_get_session (ephy_shell)); + session = EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())); g_assert (session); user_time = gdk_x11_display_get_user_time (gdk_display_get_default ()); @@ -178,7 +178,7 @@ test_ephy_session_open_uri_after_loading_session (void) ret = ephy_session_load_from_string (session, session_data_many_windows, -1, 0); g_assert (ret); - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 2); @@ -206,7 +206,7 @@ test_ephy_session_open_uri_after_loading_session (void) while (gtk_events_pending ()) gtk_main_iteration_do (FALSE); - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 2); @@ -227,7 +227,7 @@ test_ephy_session_open_uri_after_loading_session (void) /* We should still have 2 windows here, since the new URI should be * in a new tab of an existing window. */ - l = ephy_shell_get_windows (ephy_shell); + l = ephy_shell_get_windows (ephy_shell_get_default ()); g_assert (l); g_assert_cmpint (g_list_length (l), ==, 2); } @@ -250,9 +250,9 @@ main (int argc, char *argv[]) } _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST); - g_assert (ephy_shell); + g_assert (ephy_shell_get_default ()); - g_application_register (G_APPLICATION (ephy_shell), NULL, NULL); + g_application_register (G_APPLICATION (ephy_shell_get_default ()), NULL, NULL); g_test_add_func ("/src/ephy-session/load", test_ephy_session_load); @@ -268,7 +268,7 @@ main (int argc, char *argv[]) ret = g_test_run (); - g_object_unref (ephy_shell); + g_object_unref (ephy_shell_get_default ()); ephy_file_helpers_shutdown (); return ret; |