2 * Copyright (C) 2011 Lukasz Slachciak
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2,1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #include <glib/gprintf.h>
23 #include <webkit/webkit.h>
25 #if GTK_CHECK_VERSION(2, 14, 0)
27 static void test_application_cache_maximum_size()
29 unsigned long long maxSize = 8192;
30 webkit_application_cache_set_maximum_size(maxSize);
32 // Creating a WebView - make sure that it didn't change anything
33 WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
34 g_object_ref_sink(webView);
35 g_object_unref(webView);
37 g_assert(maxSize == webkit_application_cache_get_maximum_size());
40 int main(int argc, char** argv)
43 gtk_test_init(&argc, &argv, NULL);
45 g_test_bug_base("https://bugs.webkit.org/");
46 g_test_add_func("/webkit/application_cache/maximum_size",
47 test_application_cache_maximum_size);
53 int main(int argc, char** argv)
55 g_critical("You will need gtk-2.14.0 to run the unit tests. Doing nothing now.");