webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DownloadTest Class Reference
Inheritance diagram for DownloadTest:
Test DownloadErrorTest

Public Types

enum  DownloadEvent {
  Started, ReceivedResponse, CreatedDestination, ReceivedData,
  Failed, Finished
}
 
- Public Types inherited from Test
enum  ResourcesDir { WebKit2GTKResources, WebKit2Resources }
 

Public Member Functions

 MAKE_GLIB_TEST_FIXTURE (DownloadTest)
 
 DownloadTest ()
 
 ~DownloadTest ()
 
virtual void started (WebKitDownload *download)
 
virtual void receivedResponse (WebKitDownload *download)
 
virtual void createdDestination (WebKitDownload *download, const char *destination)
 
virtual void receivedData (WebKitDownload *download, guint64 dataLength)
 
virtual void finished (WebKitDownload *download)
 
virtual void failed (WebKitDownload *download, GError *error)
 
virtual void decideDestination (WebKitDownload *download, const gchar *suggestedFilename)
 
GRefPtr< WebKitDownloaddownloadURIAndWaitUntilFinishes (const CString &requestURI)
 
void checkDestinationAndDeleteFile (WebKitDownload *download, const char *expectedName)
 
- Public Member Functions inherited from Test
 MAKE_GLIB_TEST_FIXTURE (Test)
 
 Test ()
 
 ~Test ()
 
virtual void initializeWebExtensions ()
 
void assertObjectIsDeletedWhenTestFinishes (GObject *object)
 
void addLogFatalFlag (unsigned flag)
 
void removeLogFatalFlag (unsigned flag)
 

Static Public Member Functions

static void receivedResponseCallback (WebKitDownload *download, GParamSpec *, DownloadTest *test)
 
static void createdDestinationCallback (WebKitDownload *download, const gchar *destination, DownloadTest *test)
 
static void receivedDataCallback (WebKitDownload *download, guint64 dataLength, DownloadTest *test)
 
static void finishedCallback (WebKitDownload *download, DownloadTest *test)
 
static void failedCallback (WebKitDownload *download, GError *error, DownloadTest *test)
 
static gboolean decideDestinationCallback (WebKitDownload *download, const gchar *suggestedFilename, DownloadTest *test)
 
static void downloadStartedCallback (WebKitWebContext *context, WebKitDownload *download, DownloadTest *test)
 
- Static Public Member Functions inherited from Test
static const char * dataDirectory ()
 
static void initializeWebExtensionsCallback (WebKitWebContext *context, Test *test)
 
static void objectFinalized (Test *test, GObject *finalizedObject)
 
static CString getResourcesDir (ResourcesDir resourcesDir=WebKit2GTKResources)
 
static bool cairoSurfacesEqual (cairo_surface_t *s1, cairo_surface_t *s2)
 

Public Attributes

GMainLoopm_mainLoop
 
Vector< DownloadEventm_downloadEvents
 
guint64 m_downloadSize
 
bool m_allowOverwrite
 
- Public Attributes inherited from Test
const char * name
 
bool(* func )(FileTest *t, BN_CTX *ctx)
 
HashSet< GObject * > m_watchedObjects
 
GRefPtr< WebKitWebContextm_webContext
 

Additional Inherited Members

- Static Public Attributes inherited from Test
static uint32_t s_webExtensionID = 0
 

Member Enumeration Documentation

◆ DownloadEvent

Enumerator
Started 
ReceivedResponse 
CreatedDestination 
ReceivedData 
Failed 
Finished 

Constructor & Destructor Documentation

◆ DownloadTest()

DownloadTest::DownloadTest ( )
inline

◆ ~DownloadTest()

DownloadTest::~DownloadTest ( )
inline

Member Function Documentation

◆ checkDestinationAndDeleteFile()

void DownloadTest::checkDestinationAndDeleteFile ( WebKitDownload download,
const char *  expectedName 
)
inline

◆ createdDestination()

virtual void DownloadTest::createdDestination ( WebKitDownload download,
const char *  destination 
)
inlinevirtual

Reimplemented in DownloadErrorTest.

◆ createdDestinationCallback()

static void DownloadTest::createdDestinationCallback ( WebKitDownload download,
const gchar destination,
DownloadTest test 
)
inlinestatic

◆ decideDestination()

virtual void DownloadTest::decideDestination ( WebKitDownload download,
const gchar suggestedFilename 
)
inlinevirtual

Reimplemented in DownloadErrorTest.

◆ decideDestinationCallback()

static gboolean DownloadTest::decideDestinationCallback ( WebKitDownload download,
const gchar suggestedFilename,
DownloadTest test 
)
inlinestatic

◆ downloadStartedCallback()

static void DownloadTest::downloadStartedCallback ( WebKitWebContext context,
WebKitDownload download,
DownloadTest test 
)
inlinestatic

◆ downloadURIAndWaitUntilFinishes()

GRefPtr<WebKitDownload> DownloadTest::downloadURIAndWaitUntilFinishes ( const CString &  requestURI)
inline

◆ failed()

virtual void DownloadTest::failed ( WebKitDownload download,
GError *  error 
)
inlinevirtual

Reimplemented in DownloadErrorTest.

◆ failedCallback()

static void DownloadTest::failedCallback ( WebKitDownload download,
GError *  error,
DownloadTest test 
)
inlinestatic

◆ finished()

virtual void DownloadTest::finished ( WebKitDownload download)
inlinevirtual

◆ finishedCallback()

static void DownloadTest::finishedCallback ( WebKitDownload download,
DownloadTest test 
)
inlinestatic

◆ MAKE_GLIB_TEST_FIXTURE()

DownloadTest::MAKE_GLIB_TEST_FIXTURE ( DownloadTest  )

◆ receivedData()

virtual void DownloadTest::receivedData ( WebKitDownload download,
guint64  dataLength 
)
inlinevirtual

◆ receivedDataCallback()

static void DownloadTest::receivedDataCallback ( WebKitDownload download,
guint64  dataLength,
DownloadTest test 
)
inlinestatic

◆ receivedResponse()

virtual void DownloadTest::receivedResponse ( WebKitDownload download)
inlinevirtual

Reimplemented in DownloadErrorTest.

◆ receivedResponseCallback()

static void DownloadTest::receivedResponseCallback ( WebKitDownload download,
GParamSpec *  ,
DownloadTest test 
)
inlinestatic

◆ started()

virtual void DownloadTest::started ( WebKitDownload download)
inlinevirtual

Member Data Documentation

◆ m_allowOverwrite

bool DownloadTest::m_allowOverwrite

◆ m_downloadEvents

Vector<DownloadEvent> DownloadTest::m_downloadEvents

◆ m_downloadSize

guint64 DownloadTest::m_downloadSize

◆ m_mainLoop

GMainLoop* DownloadTest::m_mainLoop

The documentation for this class was generated from the following file: