[GTK] Fix unit test webkit2/WebKitFindController/hide
https://bugs.webkit.org/show_bug.cgi?id=89810

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-20
Reviewed by Carlos Garcia Campos.

Source/WebKit2:

The test had some hacks in order to compare a page with highlighted
results after using the find command with the original page. Now it uses
the snapshots API that allows to make the test simpler and more
reliable.

* UIProcess/API/gtk/tests/TestMain.h:
(Test::cairoSurfacesEqual): Moved helper function to compare two cairo
surfaces from TestWebKitWebView.
(Test):
* UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
(testFindControllerHide): Modify test to use snapshots.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewSnapshot): Move basic snapshop methods to WebViewTest to
share them with TestWebKitFindController test.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::WebViewTest): Initialize cairo surface.
(WebViewTest::~WebViewTest): Destroy cairo surface.
(onSnapshotReady): Callback to set the cairo surface when the snapshot
is ready.
(WebViewTest::getSnapshotAndWaitUntilReady): Method that takes a
snapshot and returns the cairo surface when it is ready.
* UIProcess/API/gtk/tests/WebViewTest.h: Add new method headers and
attribute for the cairo surface.

Tools:

* Scripts/run-gtk-tests:
(TestRunner): Unskip test webkit2/WebKitFindController/hide.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148788 268f45cc-cd09-0410-ab3c-d52691b4dbfc