[epiphany] tests: Test /embed/ephy-web-view/normalize_or_autosearch does nothing
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] tests: Test /embed/ephy-web-view/normalize_or_autosearch does nothing
- Date: Mon, 24 Feb 2014 17:19:04 +0000 (UTC)
commit 6068f2f23b081a36f3c8522da72fa7952c8e81eb
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Feb 24 18:14:41 2014 +0100
tests: Test /embed/ephy-web-view/normalize_or_autosearch does nothing
G_N_ELEMENTS macro is incorrectly used, and tests are not actually
executed. Also the test expectations for google autosearch test used the
wrong url.
tests/ephy-web-view-test.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/tests/ephy-web-view-test.c b/tests/ephy-web-view-test.c
index 77f8693..1a01863 100644
--- a/tests/ephy-web-view-test.c
+++ b/tests/ephy-web-view-test.c
@@ -267,17 +267,18 @@ normalize_or_autosearch_t normalize_or_autosearch_test_ddg[] = {
};
normalize_or_autosearch_t normalize_or_autosearch_test_google[] = {
- { "search", "http://www.google.com/search?q=search" },
- { "lala/lala", "http://www.google.com/search/?q=lala%2Flala" },
+ { "search", "http://www.google.com/?q=search" },
+ { "lala/lala", "http://www.google.com/?q=lala%2Flala" },
};
static void
verify_normalize_or_autosearch_urls (EphyWebView *view,
- normalize_or_autosearch_t *test)
+ normalize_or_autosearch_t *test,
+ gint n_tests)
{
int i;
- for (i = 0; i < G_N_ELEMENTS (test); i++) {
+ for (i = 0; i < n_tests; i++) {
char *url, *result;
url = test[i].url;
@@ -303,13 +304,13 @@ test_ephy_web_view_normalize_or_autosearch (void)
EPHY_PREFS_KEYWORD_SEARCH_URL,
"http://duckduckgo.com/?q=%s&t=epiphany");
- verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_ddg);
+ verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_ddg, G_N_ELEMENTS
(normalize_or_autosearch_test_ddg));
g_settings_set_string (EPHY_SETTINGS_MAIN,
EPHY_PREFS_KEYWORD_SEARCH_URL,
"http://www.google.com/?q=%s");
- verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_google);
+ verify_normalize_or_autosearch_urls (view, normalize_or_autosearch_test_google, G_N_ELEMENTS
(normalize_or_autosearch_test_google));
g_settings_set_string (EPHY_SETTINGS_MAIN,
EPHY_PREFS_KEYWORD_SEARCH_URL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]