[GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 04:40:30 +0000 (04:40 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 04:40:30 +0000 (04:40 +0000)
commitbba3fd22662ae29536f3faaaeaa0328f6d0cb387
tree124987cd51452bceaaf964f8b34bac99e3c9a161
parentc08b175386514fe9abfb0ac5ee9078b7d12f6b16
[GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible
https://bugs.webkit.org/show_bug.cgi?id=76755

Reviewed by Alejandro G. Castro.

Always clear the loading events when loading new content in the load tracking
test. In the WebView test correctly handle loading HTML with a URL that isn't
"about:blank."

* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(LoadTrackingTest::loadURI): Reset the class state when starting a new load.
(LoadTrackingTest::loadHtml): Ditto.
(LoadTrackingTest::loadPlainText): Ditto.
(LoadTrackingTest::loadRequest): Ditto.
* UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(assertNormalLoadHappened): No longer clear loading events. The fixture handles that now.
(testLoadHtml): Update to reflect new method name.
(testLoadPlainText): Ditto.
(testLoadRequest): Ditto.
(testWebViewReload): Ditto.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::loadHtml): Properly interpret the baseURL parameter.
* UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp
Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp
Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp
Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h