aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-03-24 03:57:31 +0800
committerXan Lopez <xan@igalia.com>2013-03-24 03:58:43 +0800
commita06498057762d695d044584d76fb388650a10e12 (patch)
tree7f62a3c31871bcc94c13e21068001e63af304c5a /tests
parent35b2a8970c28e322bad1ee2c67ee1ba7a4824e95 (diff)
downloadgsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar.gz
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar.bz2
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar.lz
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar.xz
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.tar.zst
gsoc2013-epiphany-a06498057762d695d044584d76fb388650a10e12.zip
Get rid of EphyEmbedSingle
Move the remaining initialization code to EphyEmbedShell https://bugzilla.gnome.org/show_bug.cgi?id=693703
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/ephy-embed-single-test.c115
2 files changed, 0 insertions, 119 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6236ad3be..b69d60284 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,6 @@ noinst_PROGRAMS = \
test-ephy-completion-model \
test-ephy-download \
test-ephy-embed-shell \
- test-ephy-embed-single \
test-ephy-embed-utils \
test-ephy-encodings \
test-ephy-file-helpers \
@@ -130,9 +129,6 @@ test_ephy_download_SOURCES = \
test_ephy_embed_shell_SOURCES = \
ephy-embed-shell-test.c
-test_ephy_embed_single_SOURCES = \
- ephy-embed-single-test.c
-
test_ephy_embed_utils_SOURCES = \
ephy-embed-utils-test.c
diff --git a/tests/ephy-embed-single-test.c b/tests/ephy-embed-single-test.c
deleted file mode 100644
index be6c0ca7e..000000000
--- a/tests/ephy-embed-single-test.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* vim: set sw=2 ts=2 sts=2 et: */
-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * ephy-embed-single-test.c
- * This file is part of Epiphany
- *
- * Copyright © 2010 - Igalia S.L.
- *
- * Epiphany is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Epiphany is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Epiphany; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "ephy-debug.h"
-#include "ephy-embed-single.h"
-#include "ephy-embed-prefs.h"
-#include "ephy-file-helpers.h"
-#include "ephy-private.h"
-#include "ephy-shell.h"
-#include <gtk/gtk.h>
-
-static void
-test_embed_single_new (void)
-{
- EphyEmbedSingle *single;
-
- single = EPHY_EMBED_SINGLE (g_object_new (EPHY_TYPE_EMBED_SINGLE, NULL));
- g_assert (EPHY_IS_EMBED_SINGLE (single));
-
- g_object_unref (single);
-}
-
-static void
-test_embed_single_get_from_shell (void)
-{
- EphyEmbedShell *embed_shell = ephy_embed_shell_get_default ();
- EphyEmbedSingle *single;
-
- single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
- g_assert (EPHY_IS_EMBED_SINGLE (single));
-}
-
-#ifndef HAVE_WEBKIT2
-static void
-test_embed_single_form_auth (void)
-{
- EphyEmbedSingle *single;
- GSList *results = NULL;
-
- single = EPHY_EMBED_SINGLE (g_object_new (EPHY_TYPE_EMBED_SINGLE, NULL));
- g_assert (EPHY_IS_EMBED_SINGLE (single));
-
- results = ephy_embed_single_get_form_auth (single, "gnome.org");
- g_assert_cmpint (g_slist_length (results), ==, 0);
-
- ephy_embed_single_add_form_auth (single, "gnome.org",
- "form_username_field", "form_password_field",
- "username");
-
- results = ephy_embed_single_get_form_auth (single, "gnome.org");
- g_assert_cmpint (g_slist_length (results), ==, 1);
-
- results = ephy_embed_single_get_form_auth (single, "www.gnome.org");
- g_assert_cmpint (g_slist_length (results), ==, 0);
-
- g_object_unref (single);
-}
-#endif
-
-int
-main (int argc, char *argv[])
-{
- int ret;
-
- gtk_test_init (&argc, &argv);
-
- ephy_debug_init ();
- ephy_embed_prefs_init ();
- _ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST);
-
- if (!ephy_file_helpers_init (NULL,
- EPHY_FILE_HELPERS_ENSURE_EXISTS | EPHY_FILE_HELPERS_PRIVATE_PROFILE,
- NULL)) {
- g_debug ("Something wrong happened with ephy_file_helpers_init()");
- return -1;
- }
-
- g_test_add_func ("/embed/ephy-embed-single/new",
- test_embed_single_new);
- g_test_add_func ("/embed/ephy-embed-single/get_from_shell",
- test_embed_single_get_from_shell);
-#ifndef HAVE_WEBKIT2
- g_test_add_func ("/embed/ephy-embed-single/form_auth",
- test_embed_single_form_auth);
-#endif
-
- ret = g_test_run ();
-
- g_object_unref (ephy_shell_get_default ());
- ephy_file_helpers_shutdown ();
-
- return ret;
-}