diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2014-02-24 18:14:41 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2014-02-24 18:18:25 +0100 |
commit | 6068f2f23b081a36f3c8522da72fa7952c8e81eb (patch) | |
tree | b9d78ba02109f241c5374b0094d4a8fe854d7e6f /tests | |
parent | edffbe363015e80c246a05add2541fd1b1d26df3 (diff) | |
download | epiphany-6068f2f23b081a36f3c8522da72fa7952c8e81eb.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | 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 77f8693d6..1a018636c 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, |