summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
commitb1e9e47fa11f608ae16bc07f97a2acf95bf80272 (patch)
treec88c45e80c9c44506e7cdf9a3bb39ebf82a8cd5b /Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
parentbe01689f43cf6882cf670d33df49ead1f570c53a (diff)
downloadqtwebkit-b1e9e47fa11f608ae16bc07f97a2acf95bf80272.tar.gz
Imported WebKit commit 499c84c99aa98e9870fa7eaa57db476c6d160d46 (http://svn.webkit.org/repository/webkit/trunk@119200)
Weekly update :). Particularly relevant changes for Qt are the use of the WebCore image decoders and direct usage of libpng/libjpeg if available in the system.
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp b/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
index a119e4477..acec9ece1 100644
--- a/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
@@ -88,6 +88,7 @@ public:
static void downloadStartedCallback(WebKitWebContext* context, WebKitDownload* download, DownloadTest* test)
{
+ g_assert(webkit_download_get_request(download));
test->started(download);
g_signal_connect(download, "notify::response", G_CALLBACK(receivedResponseCallback), test);
g_signal_connect(download, "created-destination", G_CALLBACK(createdDestinationCallback), test);
@@ -191,6 +192,10 @@ static void testDownloadLocalFile(DownloadTest* test, gconstpointer)
g_assert_cmpint(events[3], ==, DownloadTest::ReceivedData);
g_assert_cmpint(events[4], ==, DownloadTest::Finished);
+ WebKitURIRequest* request = webkit_download_get_request(download.get());
+ g_assert(request);
+ g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, sourceURI.get());
+
g_assert_cmpint(test->m_downloadSize, ==, g_file_info_get_size(sourceInfo.get()));
g_assert(webkit_download_get_destination(download.get()));
g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), ==, 1);
@@ -328,6 +333,11 @@ static void testDownloadRemoteFile(DownloadTest* test, gconstpointer)
g_assert_cmpint(events[4], ==, DownloadTest::Finished);
events.clear();
+ WebKitURIRequest* request = webkit_download_get_request(download.get());
+ g_assert(request);
+ CString requestURI = kServer->getURIForPath("/test.pdf");
+ g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, requestURI.data());
+
g_assert(webkit_download_get_destination(download.get()));
g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), ==, 1);
test->checkDestinationAndDeleteFile(download.get(), kServerSuggestedFilename);