[Webkit-unassigned] [Bug 136372] [GTK] allow overwriting destination of download

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 1 01:24:06 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136372





--- Comment #9 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-09-01 01:24:11 PST ---
(From update of attachment 237436)
View in context: https://bugs.webkit.org/attachment.cgi?id=237436&action=review

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:159
> +        webkit_download_set_allow_overwrite(download, m_allowOverwrite);

Add an assert here to check that false is always the default and another assert after the set() to check that the get() now returns true.

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:222
> +    const char* filename = "test.pdf";

static const char*

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:229
> +    const char* filename = "test.pdf";

static const char*

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:240
> +    const char* filename = "test.pdf";

static const char*

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:258
> +    Vector<DownloadTest::DownloadEvent>& events = test->m_downloadEvents;
> +    g_assert_cmpint(events.size(), ==, 6);
> +    g_assert_cmpint(events[0], ==, DownloadTest::Started);
> +    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
> +    g_assert_cmpint(events[2], ==, DownloadTest::CreatedDestination);
> +    g_assert_cmpint(events[3], ==, DownloadTest::ReceivedData);
> +    g_assert_cmpint(events[4], ==, DownloadTest::Failed);
> +    g_assert_cmpint(events[5], ==, DownloadTest::Finished);
> +    g_assert_cmpfloat(webkit_download_get_estimated_progress(additionalDownload.get()), ==, 1);

You should use a DownloadErrorTest to check the actual error is the expected one.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list