<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162336] releases/WebKitGTK/webkit-2.2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162336">162336</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-01-20 05:29:36 -0800 (Mon, 20 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/161366">r161366</a> - [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=126342

Patch by Carlos Garcia Campos &lt;cgarcia@igalia.com&gt; on 2014-01-04
Reviewed by Gustavo Noronha Silva.

.:

* GNUmakefile.am: Remove unused variable.

Source/WebKit/gtk:

* tests/GNUmakefile.am: Removed.

Source/WebKit2:

* UIProcess/API/gtk/tests/GNUmakefile.am: Removed.

Tools:

* Scripts/run-gtk-tests: Update to refer to the new build locations.
* Scripts/webkitpy/style/checker.py: Update the style checker.
* Scripts/webkitpy/style/checker_unittest.py:
* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Added.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp: Added.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/LoadTrackingTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/LoadTrackingTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h.
* TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp: Added.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMain.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMain.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h.
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestBus.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestBus.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h.
* TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestServer.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTestRunner.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTestRunner.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h.
* TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp.
* TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem.
* TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml.
* TestWebKitAPI/Tests/WebKitGtk/CMakeLists.txt: Added.
* TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico: Renamed from Source/WebKit/gtk/tests/resources/blank.ico.
* TestWebKitAPI/Tests/WebKitGtk/resources/test.html: Renamed from Source/WebKit/gtk/tests/resources/test.html.
* TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg: Renamed from Source/WebKit/gtk/tests/resources/test.ogg.
* TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf: Renamed from Source/WebKit/gtk/tests/resources/test.pdf.
* TestWebKitAPI/Tests/WebKitGtk/resources/test.txt: Renamed from Source/WebKit/gtk/tests/resources/test.txt.
* TestWebKitAPI/Tests/WebKitGtk/test_utils.c: Renamed from Source/WebKit/gtk/tests/test_utils.c.
* TestWebKitAPI/Tests/WebKitGtk/test_utils.h: Renamed from Source/WebKit/gtk/tests/test_utils.h.
* TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c: Renamed from Source/WebKit/gtk/tests/testapplicationcache.c.
* TestWebKitAPI/Tests/WebKitGtk/testatk.c: Renamed from Source/WebKit/gtk/tests/testatk.c.
* TestWebKitAPI/Tests/WebKitGtk/testatkroles.c: Renamed from Source/WebKit/gtk/tests/testatkroles.c.
* TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c: Renamed from Source/WebKit/gtk/tests/testcontextmenu.c.
* TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c: Renamed from Source/WebKit/gtk/tests/testcopyandpaste.c.
* TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c: Renamed from Source/WebKit/gtk/tests/testdomdocument.c.
* TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c: Renamed from Source/WebKit/gtk/tests/testdomdomwindow.c.
* TestWebKitAPI/Tests/WebKitGtk/testdomnode.c: Renamed from Source/WebKit/gtk/tests/testdomnode.c.
* TestWebKitAPI/Tests/WebKitGtk/testdownload.c: Renamed from Source/WebKit/gtk/tests/testdownload.c.
* TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c: Renamed from Source/WebKit/gtk/tests/testfavicondatabase.c.
* TestWebKitAPI/Tests/WebKitGtk/testglobals.c: Renamed from Source/WebKit/gtk/tests/testglobals.c.
* TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c: Renamed from Source/WebKit/gtk/tests/testhittestresult.c.
* TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c: Renamed from Source/WebKit/gtk/tests/testhttpbackend.c.
* TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c: Renamed from Source/WebKit/gtk/tests/testkeyevents.c.
* TestWebKitAPI/Tests/WebKitGtk/testloading.c: Renamed from Source/WebKit/gtk/tests/testloading.c.
* TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c: Renamed from Source/WebKit/gtk/tests/testmimehandling.c.
* TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c: Renamed from Source/WebKit/gtk/tests/testnetworkrequest.c.
* TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c: Renamed from Source/WebKit/gtk/tests/testnetworkresponse.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c: Renamed from Source/WebKit/gtk/tests/testwebbackforwardlist.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c: Renamed from Source/WebKit/gtk/tests/testwebdatasource.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebframe.c: Renamed from Source/WebKit/gtk/tests/testwebframe.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c: Renamed from Source/WebKit/gtk/tests/testwebhistoryitem.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c: Renamed from Source/WebKit/gtk/tests/testwebinspector.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c: Renamed from Source/WebKit/gtk/tests/testwebplugindatabase.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebresource.c: Renamed from Source/WebKit/gtk/tests/testwebresource.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c: Renamed from Source/WebKit/gtk/tests/testwebsettings.c.
* TestWebKitAPI/Tests/WebKitGtk/testwebview.c: Renamed from Source/WebKit/gtk/tests/testwebview.c.
* TestWebKitAPI/Tests/WebKitGtk/testwindow.c: Renamed from Source/WebKit/gtk/tests/testwindow.c.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit22ChangeLog">releases/WebKitGTK/webkit-2.2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22GNUmakefileam">releases/WebKitGTK/webkit-2.2/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkChangeLog">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkGNUmakefileam">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsChangeLog">releases/WebKitGTK/webkit-2.2/Tools/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsScriptsrungtktests">releases/WebKitGTK/webkit-2.2/Tools/Scripts/run-gtk-tests</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsScriptswebkitpystylecheckerpy">releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker.py</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsScriptswebkitpystylechecker_unittestpy">releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker_unittest.py</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIGNUmakefileam">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/GNUmakefile.am</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/</li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkAccessibilityTestServercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkDOMDOMWindowTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkDOMNodeTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkFrameTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkInspectorTestServercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestAuthenticationcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestBackForwardListcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestContextMenucpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestCookieManagercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDOMDOMWindowcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDOMNodecpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDownloadscpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestFramecpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestInspectorcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestInspectorServercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestLoaderClientcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestPrintingcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestResourcescpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestSSLcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestUIClientcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebExtensionscpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitAccessibilitycpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitFaviconDatabasecpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitFindControllercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitPolicyClientcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitSettingscpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitVersioncpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebContextcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewGroupcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebViewEditorcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebExtensionTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebProcessTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebProcessTesth">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h</a></li>
<li>releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/</li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourceslinktitlejs">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourcestestcertpem">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourcestestkeypem">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourceswebkit2gtktestsgresourcexml">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml</a></li>
<li>releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/</li>
<li>releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/</li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcesblankico">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestesthtml">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestestogg">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestestpdf">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestesttxt">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktest_utilsc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktest_utilsh">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestapplicationcachec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestatkc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestatkrolesc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatkroles.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestcontextmenuc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestcopyandpastec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomdocumentc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomdomwindowc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomnodec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomnode.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdownloadc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdownload.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestfavicondatabasec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestglobalsc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testglobals.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktesthittestresultc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktesthttpbackendc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestkeyeventsc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestloadingc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testloading.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestmimehandlingc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestnetworkrequestc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestnetworkresponsec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebbackforwardlistc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebdatasourcec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebframec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebframe.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebhistoryitemc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebinspectorc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebplugindatabasec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebresourcec">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebresource.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebsettingsc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebviewc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebview.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwindowc">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwindow.c</a></li>
<li>releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/</li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTesth">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkTestMaincpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkTestMainh">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestBuscpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestBush">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestServercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestServerh">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebProcessTestRunnercpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebProcessTestRunnerh">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebViewTestcpp">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebViewTesth">releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcesblankico">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/blank.ico</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesthtml">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.html</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestogg">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.ogg</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestpdf">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.pdf</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesttxt">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsh">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestapplicationcachec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testapplicationcache.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatk.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkrolesc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatkroles.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestcontextmenuc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcontextmenu.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestcopyandpastec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcopyandpaste.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdocumentc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdocument.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdomwindowc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdomwindow.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomnodec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomnode.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestdownloadc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdownload.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestfavicondatabasec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testfavicondatabase.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestglobalsc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testglobals.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststesthittestresultc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhittestresult.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststesthttpbackendc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhttpbackend.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestkeyeventsc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testkeyevents.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestloadingc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testloading.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestmimehandlingc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testmimehandling.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkrequestc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkrequest.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkresponsec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkresponse.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebbackforwardlistc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebbackforwardlist.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebdatasourcec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebdatasource.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebframec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebframe.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebhistoryitemc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebhistoryitem.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebinspectorc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebinspector.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebplugindatabasec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebplugindatabase.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebresourcec">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebresource.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebsettingsc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebsettings.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebviewc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebview.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKitgtkteststestwindowc">releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwindow.c</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsAccessibilityTestServercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsDOMNodeTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsFrameTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsGNUmakefileam">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsInspectorTestServercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTesth">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestAuthenticationcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestBackForwardListcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestContextMenucpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestCookieManagercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDOMNodecpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDownloadscpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestFramecpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorServercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestLoaderClientcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMaincpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMainh">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestPrintingcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestResourcescpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestSSLcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestUIClientcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebExtensionscpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitAccessibilitycpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFaviconDatabasecpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFindControllercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitPolicyClientcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitSettingscpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitVersioncpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebContextcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewGroupcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebViewEditorcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebExtensionTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBuscpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBush">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServerh">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTesth">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnercpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnerh">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTestcpp">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTesth">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceslinktitlejs">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestcertpem">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestkeypem">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceswebkit2gtktestsgresourcexml">releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit22ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/ChangeLog (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/ChangeLog        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/ChangeLog        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-01-04  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=126342
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * GNUmakefile.am: Remove unused variable.
+        * Source/PlatformGTK.cmake: No longer include the old unit tests directories.
+
</ins><span class="cx"> 2013-12-06  Alberto Garcia  &lt;berto@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Enable web audio by default
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22GNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/GNUmakefile.am (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/GNUmakefile.am        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/GNUmakefile.am        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -57,7 +57,6 @@
</span><span class="cx"> noinst_LTLIBRARIES :=
</span><span class="cx"> lib_LTLIBRARIES :=
</span><span class="cx"> IDL_BINDINGS :=
</span><del>-TEST_PROGS :=
</del><span class="cx"> POFILES :=
</span><span class="cx"> PO_LINGUAS :=
</span><span class="cx"> USER_LINGUAS :=
</span><span class="lines">@@ -204,7 +203,6 @@
</span><span class="cx"> include Tools/GNUmakefile.am
</span><span class="cx"> 
</span><span class="cx"> include Source/WebKit2/GNUmakefile.am
</span><del>-include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
</del><span class="cx"> include Tools/MiniBrowser/gtk/GNUmakefile.am
</span><span class="cx"> include Tools/WebKitTestRunner/GNUmakefile.am
</span><span class="cx"> include Source/ThirdParty/ANGLE/GNUmakefile.am
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/ChangeLog (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/ChangeLog        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/ChangeLog        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-01-04  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=126342
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * tests/CMakeLists.txt: Removed.
+        * tests/GNUmakefile.am: Removed.
+
</ins><span class="cx"> 2013-12-07  Gustavo Noronha Silva  &lt;gns@gnome.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix API test expectation following 160220.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkGNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/GNUmakefile.am (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/GNUmakefile.am        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/GNUmakefile.am        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -413,211 +413,6 @@
</span><span class="cx"> dist_resources_DATA = \
</span><span class="cx">         $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
</span><span class="cx"> 
</span><del>-# Build unit tests
-webkit_tests_cflags = \
-        -fno-strict-aliasing \
-        -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
-        -I$(WebKit) \
-        -I$(GENSOURCES) \
-        -I$(top_builddir)/Source/WebKit/gtk \
-        -I$(top_srcdir)/Source/WebCore/bindings \
-        -I$(top_srcdir)/Source/WebCore/bindings/gobject \
-        $(global_cppflags) \
-        $(global_cflags) \
-        $(javascriptcore_cppflags) \
-        $(FREETYPE_CFLAGS) \
-        $(GLIB_CFLAGS) \
-        $(GTK_CFLAGS) \
-        $(LIBSOUP_CFLAGS) \
-        $(XRENDER_CFLAGS) \
-        $(XT_CFLAGS)
-
-webkit_tests_ldadd = \
-        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-        libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-        $(FREETYPE_LIBS) \
-        $(GTK_LIBS) \
-        $(GLIB_LIBS) \
-        $(LIBSOUP_LIBS) \
-        $(XRENDER_LIBS)
-
-webkit_tests_ldflags = \
-        -no-install \
-        -no-fast-install
-
-if ENABLE_WEBKIT1
-noinst_PROGRAMS += \
-        Programs/unittests/testapplicationcache \
-        Programs/unittests/testcontextmenu \
-        Programs/unittests/testdomdocument \
-        Programs/unittests/testdomdomwindow \
-        Programs/unittests/testdomnode \
-        Programs/unittests/testhttpbackend \
-        Programs/unittests/testfavicondatabase \
-        Programs/unittests/testloading \
-        Programs/unittests/testglobals \
-        Programs/unittests/testmimehandling \
-        Programs/unittests/testnetworkrequest \
-        Programs/unittests/testnetworkresponse \
-        Programs/unittests/testwebframe \
-        Programs/unittests/testwebbackforwardlist \
-        Programs/unittests/testwebhistoryitem \
-        Programs/unittests/testwindow \
-        Programs/unittests/testdownload \
-        Programs/unittests/testatk \
-        Programs/unittests/testatkroles \
-        Programs/unittests/testhittestresult \
-        Programs/unittests/testwebinspector \
-        Programs/unittests/testwebsettings \
-        Programs/unittests/testwebresource \
-        Programs/unittests/testwebdatasource \
-        Programs/unittests/testwebplugindatabase \
-        Programs/unittests/testwebview \
-        Programs/unittests/testkeyevents \
-        Programs/unittests/testcopyandpaste
-endif
-
-# Add additional tests here
-Programs_unittests_testapplicationcache_SOURCES = Source/WebKit/gtk/tests/testapplicationcache.c
-Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testcontextmenu_SOURCES = Source/WebKit/gtk/tests/testcontextmenu.c
-Programs_unittests_testcontextmenu_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testcontextmenu_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testcontextmenu_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
-Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
-Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
-Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
-Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testfavicondatabase_SOURCES = Source/WebKit/gtk/tests/testfavicondatabase.c Source/WebKit/gtk/tests/test_utils.c
-Programs_unittests_testfavicondatabase_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testfavicondatabase_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testfavicondatabase_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
-Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
-Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
-Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
-Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
-Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
-Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
-Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\&quot;${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\&quot; $(webkit_tests_cflags)
-Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
-Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
-Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
-Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
-Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
-Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
-Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebinspector_SOURCES = Source/WebKit/gtk/tests/testwebinspector.c Source/WebKit/gtk/tests/test_utils.c
-Programs_unittests_testwebinspector_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebinspector_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebinspector_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
-Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
-Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
-
-Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
-Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
-
-Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
-Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
-Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
-
-Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
-Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
-Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
-
-Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
-        Source/WebCore/platform/gtk/GtkVersioning.c
-Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
-        -I$(srcdir)/Source/WebCore/platform/gtk \
-        -I$(srcdir)/Source/WebCore
-Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
-Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
-
</del><span class="cx"> # Project-wide clean rules
</span><span class="cx"> # Files that will be cleaned
</span><span class="cx"> CLEANFILES += \
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcesblankico"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/blank.ico (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/blank.ico        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/blank.ico        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-\xB0( \xFF\xFF\xFF
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesthtml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.html (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.html        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.html        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
-&lt;body&gt;test&lt;/body&gt;
-&lt;/html&gt;&gt;&lt;/head&gt;
-&lt;body&gt;test&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestogg"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.ogg (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.ogg        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.ogg        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,341 +0,0 @@
</span><del>-OggSlrU,q\xA2vorbisD\xACq\xB8OggSlrD}g&gt;-\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFvorbisXiph.Org libVorbis I 20090709vorbis)BCV1L ŀАU`$)\x93fI)\xA5\x94\xA1(y\x98\x94HI)\xA5\x94\xC50\x89\x98\x94\x89\xC5c\x8C1\xC6c\x8C1\xC6c\x8C 4d\x80(        \x8E\xA3\xE6Ij\xCE9g'\x8Er\xA09iN8\xA7 \x8AQ\xE09        \xC2\xF5&amp;cn\xA6\xB4\xA6kn\xCE)% -Y@H!\x85RH!\x85b\x88!\x86b\x88!\x87r\xC8!\xA7\x9Cr
-*\xA8\xA0\x82
-2\xC8 \x83L2餓N:騣\x8E:\xEA(\xB4\xD0B -\xB4\xD2JL1\xD5Vc\xAE\xBD]|s\xCE9\xE7\x9Cs\xCE9\xE7\x9Cs\xCE        BCV BdB!\x85R\x88)\xA6\x98r
-2ȀАU \x80G\x91I\xB1˱\xCD\xD1$O\xF2,Q5\xD13ESTMUUUUu]Wve\xD7vu\xD7v}Y\x98\x85[\xB8}Y\xB8\x85[؅]\xF7\x85a\x86a\x86a\x86a\xF8}\xDF\xF7}\xDF\xF7} 4d \xA0#9\x96\xE3)\xA2&quot;\xA2\xE29\xA2\x84\x86\xACd         \x92&quot;)\x92\xA3I\xA6fj\xAEi\x9B\xB6h\xAB\xB6m˲,˲ \x84\x86\xAC\xA0i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9AfY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY@h\xC8*@@\xC7q\xC7q$ER$\xC7r, -Y\xC8@R,\xC5r4Gs4\xC7s&lt;\xC7s&lt;GtDɔL\xCD\xF4L -Y@1\xC5q\xC9\xD1$OR-\xD3r5Ws=\xD7sM\xD7u]WUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x81АU!\x9Df\x96j\x803\x90a 4d\x80\xA1C  -Y\x88\xA1\xE4 \x9AК\xF3\xCD9\x9A堩\x9B\xD3\xC1\x89T\x9B'\xB9\xA9\x98\x9Bs\xCE9\xE7\x9Cl\xCE\xE3\x9Cs\xCE)ʙŠ\x99Кs\xCEI \x9A\xA5\xA0\x99Кs\xCEy\x9B\xAD\xA9Қs\xCE\xE7\x9C\xC6a\x9Cs\xCEiҚ\xA9\xD9X\x9Bs\xCEYК樹\x9BsΉ\x94\x9B'\xB5\xB9T\x9Bs\xCE9\xE7\x9Cs\xCE9\xE7\x9CsΩ^\x9C\xCE\xC19\xE1\x9CsΉڛk\xB9        ]\x9Cs\xCE\xF9d\x9C\xEE\xCD        \xE1\x9Cs\xCE9\xE7\x9Cs\xCE9\xE7\x9Cs\xCE        BCV@a\xD8Ɲ\x82 }\x8Eb!\xA6!\x93t\x8F\x93\xA01\xC8)\xA4\x8D\x8EFJ\xA9\x83PR'\xA5t\x82АU \x84RH!\x85RH!\x85RH!\x86b\x88!\xA7\x9Cr
-*\xA8\xA4\x92\x8A*\xCA(\xB3\xCC2\xCB,\xB3\xCC2ˬ\xC3\xCE:\xEB\xB0\xC3C 1\xB4\xD2J,5\xD5Vc\x8D\xB5\xE6\x9Es\xAE9Hk\xA5\xB5\xD6Z+\xA5\x94RJ)\xA5 4d@ d\x90A\x85RH!\x86\x98r\xCA)\xA7\xA0\x82
- -Y\xF0$\xCF\xD1\xD1\xD1\xD1\xCF\xF1Q%Q%\xD12-S3=UTUWvmY\x97u۷\x85]\xD8u\xDF\xD7}\xDF׍_\x86eY\x96eY\x96eY\x96eY\x96eY\x96e        BCV B!\x84RH!\x85\x94b\x8C1ǜ\x83NB        \x81АU \x80GqǑɑ$K\xB2$M\xD2,\xCD\xF24O\xF34\xD1EQ4MS]\xD1u\xD3eS6]\xD35e\xD3Ue\xD5veٶe[\xB7}Y\xB6}\xDF\xF7}\xDF\xF7}\xDF\xF7}\xDF\xF7}\xDF\xD7u 4d \xA0#9\x92&quot;)\x92&quot;9\x8E\xE3H\x92\x84\x86\xACd\xA0(\x8E\xE28\x8E#I\x92$Y\x92&amp;y\x96g\x89\x9A\xA9\x99\x9E驢
-\x84\x86\xAC\xA0h\x8A\xA7\x98\x8A\xA7\x88\x8A爎(\x89\x96i\x89\x9A\xAA\xB9\xA2lʮ뺮뺮뺮뺮뺮뺮뺮뺮뺮뺮뺮\xEB\xBA@h\xC8*@@Gr$Gr$ER$Er$ -Y\xC8\xC01CR$Dz,M\xF34O\xF34\xD1=\xD13=UtE -Y\xC0\x90 K\xB1\xCD\xD1$QR-\xD5R5\xD5R-UT=UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xD54M\xD34\x81А\x95䤦\xD4zb\x909\x89AhI\xC4\xC5\:霣\\x8C\x87\x90#FI\xED!S\xCC\xB5\x98\xD0I\x85\xD4\xE2ZjsT\x8B\x8D\xADdHA-\xB6\xC6R!\xE5\xA8BCV\xA1\xC7MKI\xD3M\xCD\xC0\xD14@=@EM4Q4QM\xD1T\xD14@E\xC03E@4UM4Q4QMQ5O4@E@4M@TMB\xA1!+\x808\x87\xE3@\x92 I\xF04\x80cY\xF0&lt;xL\xE0X&lt;\x9A\xD3@\xF24x&lt;\xA6        \x904\x9Eσi y&lt;\x9E\xD3H\x9Eσ\xE7\xC14\xF0L\xA6        фj&lt;ӄi\xC24a\xAA\x80\x80\x80\xCA@\xA1!+\x808\x87\xA3H8\x92dY\xA0H\x92e\x80eY\x9E\x92ey\x80\x80\x80\xCA@\xA1!+\x80(\x87\xA2Xp\xCB\x8EcY@\x92, `YMx@\x80\x80\x804%(4d%\xE0p\xCB\xD24Q\xE48\x96\xA5i\xA2\xC8q,K\xD3D\x91ei\x9A\xA6\x89&quot;4K\xD3D\x9E\xE7y\xA6        \xCF\xF3&lt;ӄ(\x8A\xA2iQ4M6hJ,Ph\xC8J $\xC0\xE18\x96\xE5y\xA2(\x8A\xA6i\x9A\xAA\xCAq,\xCB\xF3DQMSU]\x97\xE3X\x96牢(\x9A\xA6\xAA\xBA.\xCB\xD24\xCFEQ4MUu]h\x9A牢(\x9A\xA6\xAA\xBA.4MM\xD34UUU]\x9A扦i\x9A\xAA\xAA\xAA\xAE \xCFE\xD34MUu]\xD7\xA2h\x9A\xA6\xA9\xAA\xAE\xEB\xBA@M\xD34U\xD5u]\x88\xA2h\x9A\xA6\xAA\xBA\xAE\xEB\xD34MUU]וe\x80i\xAA\xAA\xAA\xBA\xAE,TUU]וe\xA0\xAA\xAA꺮+\xCB\xD7u]ٕeYຮ+˲,\xE0\xC0 \xC0:ɨ\xB2M\xB8\xF0\xB2&quot;\x88\x8CaJ1\xA5 cB
-\xA1aLBH!dRR*)\xA5
-B*%\x95RAH\xA5\xA4R2J-\xA5\x96R!\x95\x92J\xA9 \xA4RR)\x808\x80X\x85\x86\xAC\xF2c\x94b\xCC9\xE7$BJ1\xE6\x9Cs!\xA5s\xCE9\xA9c\xCE9眔\x921\xE7\x9CsNJɘs\xCE9'\xA5d\xCC9眓R:\xE7\x9CsJ)\xA5t\xCE9礔RB\xE8\x9CsRJ)\x9Ds\xCE9@6\x8AlN0Th\xC8J \xC0\xE08\x96\xA5i\x9E'\x8A\xA6iI\x92\xA6y\x9E'\x9A\xA6ij\x92\xA4i\x9E'\x8A\xA6i\x9A&lt;\xCF\xF3DQMSUy\x9E牢(\x9A\xA6\xAAr]QM\xD34MU%ˢ(\x8A\xA6\xA9\xAA\xAA
-\xD34M\xD3TUU\x85i\x9A\xA6i\xAA\xAA\xEB¶UUU]\xD7ua۪\xAA\xAA\xAE\xEB\xBA\xC0u]\xD7ue\xB8\xAE뺮, Op*\xB0au\x84\x93\xA2\xB1\xC0BCV\x841)\x84R!\xA4BH)\x85\x90\x80\x80\xCA@\xA1!+\x80p\x80\x8C1\xC6c\x8C16\x8Ca\x8C1\xC6c\x8C1q
-c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6\xD8Zk\xAD\xB5V΅@Y\x84\x8D3\xAC$\x9D\x8E\xB2        \x8CA\x881\xE8$\x94\x92JJB\x8C9(%\x95\x96Z\x8A\xADB\x881\xA5\xA4\xD4Zl1\xCF9\xA1\xA4\x94Z\x8A)\xB6\xE29礤\xD4Z\x8C1\xC6Z\ !\xA5\x94Z\x8B-\xB6\x9Bl!\xA4\x94Rk1\xC6Zc3J\xB5\x94Z\x8B1\xC6k,J\xB9\x94Rk\xB1\xC5k\x8DE(\x9B[k1\xC6Zk\xAD5)\xE5sK\xB1\xD5Zc\xAC\xB5&amp;\xA3\x8C\x921\xC6Zk\xAC\xB5\xD6&quot;\x94R2\xC6S\xAC\xB5֚\x840\xC6\xF7c\xAC1\xE7Z\x93\xC2\xF8S-\xB1\xD5ZkRJ)#d\x8D\xA9\xC6ZsNJ        e\x8C\x8D-Քs\xCE@=8@%A'Ua\xA3        \x80BCV\xB9BJ1Ƙs\xCE9\xE7\x9CsR\xA4s\xCC9\xE7 \x84B!\xA41Ƙs\xCEA!\x84BHc\xCC9\xE7 \x84B\xA1\x84\x92Rʘs\xCEA!\x84RJ)%\xA5\xD49\xE7 \x84B(\xA5\x94RJJ\xA9s\xCEA!\x84RJ)\xA5\x94\x94R!\x84B\xA5\x94RJ))\xA5\x94B!\x84J)\xA5\x94RRJ)\x85B\xA5\x94RJ)\xA5\xA4\x94R
-!\x84J)\xA5\x94RJI)\xA5B        \xA5\x94RJ)\xA5\x94\x92RJ)\xA5J)\xA5\x94RJ)%\xA5\x94RJ\xA5\x94RJ)\xA5\x94RJJ)\xA5\x94J)\xA5\x94RJ)\xA5\x94\x94RJ)\x95RJ)\xA5\x94RJ))\xA5\x94RJ\xA9\x94RJ)\xA5\x94RRJ)\xA5\x94R)\xA5\x94RJ)\xA5\xA4\x94RJ)\xA5RJ)\xA5\x94RJI)\xA5\x94RJ\xA5\x94RJ)\xA5\x94\x92RJ)\xA5\x94R*\xA5\x94RJ)\xA5\xA0\x80#*-\xC4N3\xAE&lt;G2L@\x85\x86\xAC\xC8\xB1\xB4\xD6Z\xAB\x8Cr\xCAII\xADCF栤\xD8I!\xB5XKe A\xCAIJ\x9D\x82)\xA9\x85\x8C*\xA5\x98\x93\x96B˘R b+1t\x8C1G9\xE5TB\xC7\x822@\x81\x81 8@H\x90
- \xC3E@@.!\xA3\xC0\xA0pL8'\x9D6A\x88OggSlr[ID+\x91\xCC\x89\x88\xC5 1\xA1(*\xA6\x80\xC5\x86|\xC8\xD0\xD8H\xBB\xB8\x80.\\xD0\xC5]BB\x82X@        88\xE1\x86'\xDE\xF0\x84\x9C\xA0ST\xEA@\xE0 \xD9&quot;&quot;\xA2\x99\xE3\xE8\xF0\xF8        !)19A;\xF8HR\x80\x88\x88h\xE68:&lt;&gt;@BDFHJLNP@OggS@'lr\xE3C\ZS\xFFp\xFFs\xFFz\xFF\x86\xFF\x83\xFF\x82\xFF\x87\xFF\x8A\xFF|\xFF\x82\xFF\xE4\xD1L\x8E\xC5j- \xB2\xC1xWD36s\xC2N\xF8\x8BYkh
-p]6_\x80\x87\xB8\xA2\xB5\xAD(hUѡ\xB8\xEC\x9E\xED\xB0\xE8\xD4]\xCD΄\x95\x92\ \xB9)\xB1T\h\xD0k$ \xABa+,\xAF\x9FA\xA4ԪX\xABU -\xFCA`\xC7,J\xC1\x93\xFE\xEF;:!\x81\xE0\xB3\xDEJ&amp;\x99\xE9\x96()\xA45#*\xD6F \xE1̌jET$n{\xDD\xCB*\xF4r\xE9\xF3E\xB7\xA7\xF6R\xC2Q]\xC0\xA2a1x\xAD ELE\xC5D\xCA@\xC4\xC1\xFA{\x8C\xE2@!\xA4)\xF5ƾ9\xE3 -\xB2\xBE \xE9\xB3\xF6%H3\x95\x8E\xB0M0\x81H\xA9\x80\xFC&quot;F\xC48\x9F\xB1Uk\xD0\xC1&quot;ʮ\xAC\xED2De\xAA\xB2X)FԂ\x9CB۱+-\xF5#C\x81/eDk\xB0\x88\xADQ\x91\x9C\xDD\xD9!\x9AT\xA1\xC1s FiA;4\x8BA\xC3H`\xFC\x90EjdfY*rK\x95\xCCQ\xF3CU\xAD҉'\x9E\x83I\xB0Skh$ #x-\x89޵\xD1\xDB`\x8D -\x82\xC4 -q\x98(\xF18a~\xA7\x82;\xE8+ Q\xEB\x8E\x8D*\xA8V\x87\xAAՉ\xB6\x82\xAAD\xC4C\x8B\x91\xB1&amp;Q\x90\x8Fk\xFA\xD3n\x90Ɗ -Z&amp;h\x87j\xA6&quot; A\x90h\xA8D\xE1D(\xC6X\xE0\xAAn]jb()ք\x85fe\x86\xF6\x9AP\xC5DT\x88\xA7 \x97\x92\xAAwp\x8Eŝ!\xD1Z\x83\xC1\x80\x80ZB \xAE\x98\xA6Z\xA0r\xA0\xA1 -XMV{\xB2KÑ$\x8B8HZ3$\x91#\x95\xC42\xA8\xC6\xB2\x9B\xA2\x97\xE0\xA6h\xBA.9@\x9C}qYrW.\x81NA\x80\xE3\xD4D\xDBw\xA4\x9A        DF9j\xC0\xA0r\x86E\x83A
-\xC9&quot;\xB1\x99\x84e\x81\xA4,\xEFmV\x888Ah        -\x83\xC2PE\xD5
-p{\x91!j\xA2\x88@\xC1\xB4\x80A\xB7P08\xDA\xC7vE\xD0\x82 b@  \xAC\x85\x8C*\xEC\xC3p\x95\x81\x82hl&gt;\x94Z\x91\xC08O\x88\x81D\xA3\xF7\x8D&amp;[7fJ        \x81Lvs\xCCڬ5\xD4̧?\xDD)~0;u\xE13\xD1G\xEF\x8D\xEB
-R\xB3\xAF͙NQ%J\x8D\x89a\x94i9 \x92\xAD\x96\x8A\x98\x95ű\xA4\xB2-\xB3\x96a
-ڪ\xA01\xAEbB\x81D\xA8 E\xCC\xB0\xE3A\xC5\xA6ҍ&amp;0\xAA\xC5\xD2-h\xB1\x88Gad\xC9x\x82t -\x9A\xBAk\xB2Ȫ4V\x92\x96\xA10\xC0$@\x83X\\xD0ݚ\xF5&amp;\x846\x8EBaD\xC4$\xE2Y\x8Bs\xC6\xCB*c TZ        c\x93LI\xAB\x90]\xA3\x82\xB35}\xAE촺\x-\xBBL)i\x92pHЄ\xC4 \xDCxp\xAE==\xC6t\x86^r\xF0#M\x99\xE08\xEC\xDE`\x87\xE5\x86l\xF0\xF0\xBC0chPH2e\xC7Z\x85\xC60\xD6-`\xADX\x85F@ \x801\xA0\xB3&lt;\x88@(\xA0j\xC0`t\x83\xAA\xD4؈\xAA\x8C -` \xBE\xEF\x9D:[\xB4*\xE8~\x842d`\xE2\xC0\xBChkQ,V D\x88?k8bX(o\xC0r\xA0\xB3
-~(\x8CF&quot; 3A\x86\xC4\xE8P\x9DF\xC0`0\xBA\x{34F0419}\xB37|\xEB\xAD\xE6C[_\x81\x9C\x9E\x8E\x9C0\x83\x80ة1M5M\xABboh\xBD\x9D\xADQ\xA2\xB8\xF84\xDEb\xE7\x94\xB3W5\x8C̗\x85\xA5\x84\x99\x8AX\x92\x99Z
-\x997ܰ\x82 \xAAK;.0E\xC1:\xDDhAV`\xA2\xA4A1\xED3\x97\x8A\x9D(&amp;\xC0\x90]z\xD5\xD4@E\xDCa\xE8t\x92v\xA0\x8E\x90\x84\x9B \xAB&quot;\xB1\x8AhCQ)\xC0 \xA4|\x82E1&quot;\xA5U}
-i\xD3G\xD1-E\x93 A'DVBQ\xC32\xE4d\x99\x9A\x9A\xB5Œ\xA0\xC6\xC4YۑXc*\xAB\x85\xD6B\x86\x88\xA5\xA7l\x9Av/N'\xA3\x9E\xED\xF51&gt;\xEC\x8E[b
-9qZ\xE2\xB2a
-\x9A\x86*\x80X^pO\xD7\xC8\xA6;\xB45\xB6\xD6[i$\xA1I\x95\x86\x82\xD8X&quot;X\xE5fD\xD0\x80\xE84*\x82 -\x88\xA2\xA8\xB0\xEF\xE8\x92v\xEB\xC4,`\x9DX@D (\x85\xB1\xC0 -F\xC2(\x82h@\x802\xB0 k( \x84\xF4AԎ?|\x80\x9A\xE2@\x98\xA0Y \x9E(t\xC5\x9E\x81 \xD2q\xA2\xD0D\xA4\xE3;7\x81a\x8D}\xF8\x8E\xFAֆ\xA9u:q\xD8\xED~2\x83\x9C\xAA\x95\xC5\xF6j\x9A\x8E\x82\xCF\xF1F-\xB5\x8F\xEC\xB0s\xE3\xC5\xDEjX\xEDƌR\xB1\xC1F\xAB\x96V\xACf[\x8E\xB6Z#\xA2\xF6c\xCA
-\x86Z\xB8S(R\x8B\x8Bbb\xC4\xD0dHȺ&quot;,JЄ\x82\xA9D\xB0h\xADZ\x84\xC1ZH\x82Zf,\x8D\xB5\xDAZH\xB1\x80\x87t\xD0m4#B\xE2\xB5\xE8\x80r\x81L\x99\x82\x85\xC5T6\x8D&gt;g\xCCad\x84\xD4!\xCE/\xD9l F\x93\xB2\xC5\xD4j\xA8\xA9l5\xA8\x89j\x8C\xA2Xt\xB7$\xA1W\x92b)\xD6IT\xF4\xC0L\xC3\xDF\xFB\xD4ճL\xC2P\x8C2U\xE1p\xB0\xBD]Csl \xEB\x89i\xA25i5\xE0\x914 \xE0\x9DL\xCF\xC2\xD8$\x8D\xB0\xC9Q\x84X\x894&amp;\xAC\xA4E\xD6$        XP0vCd!~O\x90gPk\x82\x99bQA -\x82 `\xC0\x88cF UP\xEB 
-\xD6LTDL \x850\x81X\x90l\xAC\x9D\xA0X\x8C\xA01\xD4BE\x8C\x8DX\xF5\栅8h\xC0\xE0 \x80\xA0\xB4:^(4́!aE\xF3`Â\x80\x85\xF1\x95\x80kE\xC2hg\xF8\xB6\x99Fu\xBF \xEC\xD3\xE9b b\xA7&amp;\xD8\xD8\xD8\xDA\xA6\xD5 f\xC1;װ7\xCCZ\xAES -\x96\xB4R\x8CԺd\x8B\xC5H\x92\x8C=\xD6\xECr\xEB&quot;9\xC9HY\xA0f\x9A        &quot;\xF4\xA1*\xD4Np\xD8vHCK,6H!BR\x88\xE9\xB2\xA1\xC2IJ\xE9P5j`4l\x97z\x9Ab\x95i &quot;\x92R@\x92\x91Pq\xDCG\xE9L\xEC\x9AISKC\x88\xDDT\xA4I\xC80v\x90m\x90V'\xB4G\x9DSDIc\xB51\x94`E\xD5t\x8D \x83\x9B,Q\x86erdI 1\xB0Rc\xA1P3b
-O\xF6\xE5e\xCE\xEC\xB5+k\xFExjP\xC2Ӵ\xE1)\xBC\xE14{\xA3g\x82l\x8DU$T\x89x\x92\x92\xA9\xCFh}&lt;\xB5\x8D t\xAD\xC50^\xAA\xA0`\x93\xE0\xEA\x80q\xC6a\xB0 @\xA1p\xD6 \xA8UD\xADY 
-b]\x95\\xC0
-\xB0gހ\x80\xA3- 6\x80\x96c        \x86\xA26$\xA0\xA0\xD6E\xD0`\xDB\xA21\xA0\xA35\xB5\x86\xAAj\xB9ڊAoB\xF0 \xC5=\x96\xE0E'(\xCEj`(\xCEn`t\xB7w\x8C\xFED\xCE6\x84\x9B -\x91\xB7\xA8\x86\xD9S`\xCET\xAEX@\xDC][5쬪^\xEC10\xED\x8C\xECl\xB2\xB3^b\x8Eq\xA6-J\xA9Uӊ -\xD6 \xD3\xCC`\x8A\x94\xAA\xA2A1\xD8P\xDA\xC8\xD4%aEBLhaل\x93M\xC9\xC8        J&quot;\x88P%\x9B \x8Am\x9Bd\xB0D&quot;j\xA8I\xBAI\x8D\xA3@@\x97\x9AyM\x8D-0ZfZ\xA4Դd@\x88u\xCFa\x91
-gD\xA9'\xD2
-\x9A\x802\xE0\x94\x94\xD0\x8A\xEAi\xC3\xCA\xFE첳J Zq#\xA0 D\x9A\x9C\xA29/T        4cV -)i\xB1\x84\xA5.\x82\x9A\xC63^\xC6M\x99l\xE9\xA7e\x874n\xC1d\x92\xC5 \xCCmx1\xB0ܾ\xA2Ӡ*\xA2(Ү\xC9B\xE0\xC8ZqcR!\xA7\x93Fwxk\xA0        \x94T\x84 A \x940\x85C\xF7&quot;\x80F\xD8(\xE8\xABZAD\xA4Ё\xE0\xFCC\ZĠ\xE8\xA1k
-c1:uBVt  -*Z\xC0
-0\x8D\x82\x88Ĩ:Qp~\xB0\xB0\x80E\xC224\xA0=\x80\x84X\x8C-\xA4\xD6^(\xD4\xC9\x9E\xC0xP(\xA3&lt;@&lt;~W\x95\xB5EDJ\x82\xD8\xDA1\x87o;aۘ\xB3s\xA6b\x8B\xFBd\xED\x8D\xB1j\x8DJ\xA2ab\x93`\xAB1+\xA2\xC1 \x83\xA5\x8D1Z\xC6&amp;\xEA%\x89\xA9t.b\xCA\xCAj\xA5C\xD4@\xF2ʂ\xEDPaQ0j\xC7f\xB0\x87@*B\x83        %la/\xD9^%d\xDCX@ ʙ\x8EȄ\xAE^\x8C\xB5\xC8 QV\x9C\x99
-\x8E^0        \xB6(\xACdA\xBA\xEC!\xC2L'239\xE4\xDAe!\xADfC\xB2RwH\x85\xB5\x8C\xC9        '\xA2\x83)\xA7ɴ
-#\xA6i =\x8C(Hi&quot;7Ȍ\xA6\x84-\xDC\xEEZx\x90\xD4b
-AC\xB7\xA1V\xA4#E\xAAz\xA4\xF6˔\xE20adL\xAA\xB3,\xA0\x9A2IŒ\xB2\xC4-\xB1g\x87 
-j5 ͹L(\xCE\\xE0\xA01)rm\xCB#w\xD0i\x80V[\xC0\xCCh
-L\x82@!\xD8T\xC1@m- \x88V'\x88\x80N\xACQDD -`66\x96\xF0
-\x921\xB2\xA2\xD3X\x81\xB5:\xAC\xEAB\xD0!h@l0\xA20\x88\xD0a,bEU -`-BV4\xFCU(\x82\x8C\x80\xF0f0\xB0g\xB1\x8E\xDE7\xC4.\x91@\xC4ĢoȌDB\x85\xBF\xEAJuBH\xDB\xF0\xEDM\xB5a\x9DN\xE6\xEE(w4]fv\xAA\xA8\xD5o\x8D\xCDƨ\xE3Z\xEB\xC3Xc\x8B\xB1\x93,\xC7~\xB0\xA5-\xB3\xDA`]\xA4\xAC\x9B\xA2Mfb\xA9hG\x8BR+hijPŰr\xD5m\xA4djR!\xEE@iࠦe\xB0\xA8\xD4R\x8C\xC7!\x92Ƕ*\xD3C\x98\xB0&quot;U\xA7\xF7\xD0Sc\x96\xEAn\x90\xA5\xDAٔݞ,\xAF\xAE\xB7\x81\x9B \x9F`)
-\x80DSD\xA4\xB1^2\xD0!B -͙\xE6I\xE6mG\xC5~\xDB\xD3\xFB\x86\xDB\xC70#\xE8LX+\xC5\xEDD\xD3L\xBD\xF4B\xB6\xC4\xE3\xC6\xE9\xB9[\xAC        3$tE $\xA81Ę\xFA$\xC5l\ h{\x84\xB7Cܗ%\xDCH\x8Da\x94\x91ƒhh+rb\x8DP(\xAA@[Q\x80\xC1h:@\xA6\x91gɀX \xA2\xC0\x8A\x80\xD1V\xAC!XC E \xC1\x87$\xEA\xC6X\xB1E+B\x8DU\x9D\x82\x88Eg)؈\xAA\x80i) \xA0h\xC0&quot;\x88@\xD0!b\x8D&quot;\x8A\x8CBDa/\x80\x810\x8C`P\xC0\xC1\x96P\xE8\x9E(4\xD1\x9E \x8F\x8B&amp;F@X@ʝ\xB0\xCC&gt;:\xA6\xDA4k\xD5l\xD6a\xFA9\x87\x83\x80X\xDCŰO -[\x86\x8BUM;;\xD3P\x89\x8F\xCFb$\xD4ً\xAD\xA5\x95T,\xAD%h\xB6%\xAA\x96b-1\xED01uD\xC0\xC2B\xA5\xC4+\xB1\xB5\xD2j\x8D&quot;\xDBE         \x83\x96\xC0;        L\xCAS2\x90\xC0\xD8RY B\x93\x84\xC42\x82t\xD7j\xB5\xA8\xAFY\xC4 jY\xBA,\xB54\x97&quot;\xA3+\xF6(&lt;\x9Fd \xC5x'\xE9\xB8+\x800B\xB4Ɔh\x{134403}\xD0~\xBA\xEF\xB0\xC6\xE3\xC6\x8BF\xBDL\x9A؝\xB3\xC1\xB0
-TK\xC94bM:M\x84\x96\xAE\xB2\xA0\x9Dw-9N\xAA
-AB&quot;bC\xD4\xCCĭaw\xBA\xD9i\xBFͥ\xF1\xB2,\x93\xC5\xFEđ x\xAE6\xAD\xB0\x81H\xD5\xD1\xD2F\xAB
-\x88+iHQl\x8AeR\xD8\x800\x84\xC0%#.E\xDDD\xB7,\xE8]&quot;\xAA\xA0/@        &quot;@\x80@\xF4
-h\x85\xA3\xD3bĢS\xC5J\xC5`\xD0\x8A#\x8A
- -F\x80Z\x82\xAA*$p @\xE2C\xA2\xAA\xAA::\xC0\xC1@\xC7\xBEt\xC9\x91\xC0a1h\x8A&quot;\xC0\xE1\xCE        `\xB5\x99\xD89\xD3\xFCh\xBDY\xE8\xAC\xDF\xED~2\x83\x80X\xDC\xD5\xD6T[\x89,jcb\xA6 - -\x86\x9D\xADZ\xB4\xD8ڋ\x8DU6\xB8\x8Dn\x8C`ULU\xC4&quot;t\xA0\x82&quot;\xE3\xB6\xF5\xF4\x91&gt;\x9B\x9CU\x8D \xB5@&quot;\xD1&gt;q\xDC\x80\x8AQ\xB1\x84\x8D \xDA\x981\xEE\xB5`a\xAA,8Ԓ\xE8*@\xC4&quot;\x91F\xDD ;B&quot;pM&lt;0\xD0\xED\xAEFjhw\x85\xA0 -\xB5\xA4\xEAa\xA4\x92HA\x9AP,\x8A\xE7\x905\x80\xE8r\xDCY\x9D        \x86qU\xD2!\xA4 )\x88!¸\xF2\xB14
-+]HLk3{\xE1\xC6\xF6\x98Ʌ=\xC5 \xC8\x92a\xD5\xE7\xB2|\xA8N -!j@\xEDH\xCA(H\xEF\\xB5\xA6ݩ\x8F\xA7\xDB(\xBE\xF3&gt;T\xA0\xAA@\xB4U\x88
-\xD4Ba\x80d&quot;\xAA\x82%@\x80\x850\xE8+ (\xAA\xA3\xC1\xD4FTɊ&quot;X\xC2\xC3\xC4Z\xAC
-؄\x88*\xD6\xC81\xC8&amp;` - \P2Vi\xACh,t*(ZU@\xA3X\xC0\xA8\x80\xAC\\xD6KDr:
-p\xB0\xC0@&gt;\x9EHtɣx\xD2\xA4M\xF4(\x954\xB8\xB3\xC0&amp;\xA3\xBF\xD5\xFB\x86\x9Fj5\x8B\x98\xC3\xC9t\xB2\xF9TbL@@\xECT\xD7H\x8C\xB3Z0ԴE\xA1ފ\x9Dv3\xF6bk\x9BZ%9b\xD8`Pb1\x8CC\xD1k\xDC&quot;֊\xA2\xAE\xD1\x95\x8AJ\x8E\xCB8
-\xEC\xC56B(\x8C\x98X\x91X\x8C\xA1b\xAC@c\xA5B\xBB\xAD–nS\x88\x99YT$1bu@㜙B\xB6&quot;\xAC\xA1*\x80P\xB1\x95]\xA7\xA4] -Φʑ\x80\xBA\xF5\x96\xE9\xD1\xE2̥D        R\xAD\xC0X\xE5 ]\xBBЖ#{s^ooo\xA1        l#\xFB]83\xC2ت$\xA2\xC7 M\x8B\xB8=
-\x8D\xBA\xBC.h_v\xE0\x86\x92\xF1\xEFr!\xB6M2\x98\x84\xA0\xEB\xC6x\x86\x81\x89\xC1Ne[\x89\xCAjOggS@Slr2
-\x98\x86\xFF\x80\xFF\x88\xFF|\xFF\x95\xFF\x91\xFF\x85\xFFy\xFF~\xFF\x82\xFF\x81\xFF_\xF7B\xF6k\x98\x81\x95\xEE&amp;\xC1\xF5\xBE\xC6\xE4\x80\x81@tX\xF1\xA2\x80\xB4\x82@ \x80\x88\x808Bx\x8026:E\xB0\x88\xE8X!UU(t \x84&quot;dm%
-\xC30ET\xB1.\x80 :T\xC0T (k\xC0\xE84\x88 U\x85Pl\xFD&quot;\x80G4ш\x93Q\xA4\xE5\xE0'`\x80U'\xDE7\xC4&amp;\x91\x80\xBE!\xD6\x88\xA3wU\x86\x92\x91\xBB2\x99m\xD4s\x9A\x8D\x9A\xDA~w\xB4;/&amp;v\xAAUkĈ\xB1`\x8CZ\x91D\xECj\xB1D[\x87\xA5\xD2sl\x90\xA5X#KKQLF@\xAFUR5ZQU        \xD1x
-\xAD\x93\xE2F\xC8\xB6-&quot;\xD8\x92        H\xB4p\x85ea\xF8\xAA[\xCDp1\x80\xB1%\xE1d:\xF1B\xBB4QH\x8D\x93x\xA1\x89&quot; \xD8.\xA9\xD7\xC5|\x95\x92\x97)B\x80;a5\x80\xA5R҆,5 E a\xA5BL\xA3+\xA1\x89\xC2\xC0\x85\x8E\xD55E5\x9E\xAC\\x8D'\xF0\xCD\xCC\xCCY\xCAc\x8A\xED\x86R`\xC2\x87mT\x99,֠Q\xBB\xB3\xB4\xA8T\xADUt\xA3iwH\xE1J3\xD8ϥ\x90X]P\xCD\x8F\xE6ι\xFC䡌X\xDEJ&amp;bX\x8BX@Е\xA5\xC1\xE8\\x80+\x85(9\x81h\xB0\xC8\x8B@\x80#ɂP - h,F@lTEG;*\x82\x85\x82\xF0&amp;  \x82A\x8CXWE\xC1\xBA!\xA86\x88U\x85 GEfpUA \xA2꡻\xE0@r \xCBp2\x93(=\xE0\x947\xAC?\x80f -^8\x94\xC9#iI`T(\x94\xD1!iI`|g+\x81\x98m\xCC\xFA\xE1sk\xC3j\xDEu\x98s\xA6c;\x8B\xB6(\xAAX \xD3t\x9D\xF6f\x83\xA1\x94H\xEC\xC4\x89ѐճ\xADX\xB1&quot;n\x89U0WRk\xADC\xACxm,\xAC\xD1Pv\x95\xA5\xC3hA\xE1ҀTQPE\x91F@j,臱(\xCA BHC8m\x83\xA1\xDD)\D\xA1        W\xB0\xB2\xDDFdP\xA4\x9AN\xC1u\xA3\xA7&amp;(\xC8\xD4*\xC8lh(pNN\xAA̴\xE8A\xE8FcJ̔9\x816\xD4u4\x85B.\xA8\xAC\xBA\xB1[\\xB4b@\x95$\xBDʂL\x88\x81a\xC9+MG$\xF6T\xCD,\xC48\xB5X)(ǎ2!5\xC8I /0\xABU~\xF2.m\x9Aw\xB2\xAA\xA0&amp;\xA3L\x8D\xCEE        ^\xA2n\xDC%1t\xD7-E@\xAA\xDB!\xAD\xA1L\xB4\xACQZ$A3(\xB6\xC2x\xA0 dm+\xB1\xA4\x84p0\xC3/\xA1\xA2C\xB0\x88u(TuXЫv\xF1^X@\x8Ch -\xAAP\xEA0֩ \xD6hAt
-\xAD\xA0\x80\xAA\xD5lD\xB4`\x9D\xAA\xE1e\xA030[\xE0D&amp;L\x8Fe -\xA2f\xB0V+\xBE(\xF4\xDD\x9E\xC0b1\x9B&lt;\x80ŝ\x99K\xF4\xF7\xE1\xC7?k#Bu8q4\xFDt4\xC4,ީ\x86a\xB1VVC\xEAMM\xD44\x990l\xD3P1M\x9BaG\xE1X5\xD3|\xEC\x90=\xD63b&amp;\xD6e\x93\x80l+**\xAE\xB5\xB6:\xA8'%X)K6 X\xE3\R\xE8F`,\x98&quot;\xB4\x88-\xCC
-i@D\xB2;\xDC\xD0*\x80-\xB4\x904@M@C5\x96\x8BT'o\xA9\x81a\x8D#\x83q*$3\xA2[\x8F\x90Nk\x84\xC6\x87\x80\xAA6\x80\xA8n\xA2\x86\x8C\x812        \xA0\x8Af\xFF6\x87u\xB8j\xA9\x8A+QRΈ
-!\x9DĊ\xB5 \xE1\xE9\xA27[\x8024\xEAm\x85\xECn3M\xE1\xB0 H1\x895\xFC\xCE-\xDB&amp;Ȥ\xCEV\xE98\x8B\xE2\xF6c?7
-\xA7\x95Ǣ\x80h\xD3        \x81 b\xB2\xD1
-\x80l\xE4cT\x88Ah0\xB0@\xD1D'\x88\xD1
-\xA2\xAA\xAE-@\x8C%\x81 -TE0F\xA7FP\xC5e\xA9\x83\xAA^\x81\xD1\x80#\x8C(@#F\xD8(\x90\xB0A(\xD3@\x81@\x81\x80lb\xA0C^\x84\xC0d\xB0
-\xE72X~\xD8\xDA\xEAGĈ\xA8\xCDTs\xF7\xFBL%\xE6\x82\xC0\xC1\xA9W\\x90_\xB69
-\x81\x81\xBE&lt;C\x93f\xB0\x9E\xB5\xF6\xABΞ\xE89\xECVk\x86\xC4\xD2\xDE&gt;Y\xAFa\x97dP!]\x9B\xDAI\xB4Z\x91\xEB0D\x84bBdA\xE0\xB6\xDD\x80A-4! \x8BV\x84\xB0ф\xB2\xECeU/\xA0z\xB4\xD0\xE2
-@\xA8\xC4ؒ\x97\xA5g\xC0G\x93\x8A\x9A\xF4\xBB\xB9G
-\xB9-\xBE*9q \xB1\x80\xD0Z\xC4:\xD4\x84\x88hR\x850\x84\xCBDBu\x93YK-\xE4b\xEA&gt;3g\xD0̘&quot;\xC7fH8cun\xA4Q\x98.`\xA54H\x88\xC6\xF2:I\xD3ٓ\x9A\xA2`z)\xFE5&amp;\xEF\xE3R\xABj\x80ŞhtQ&amp;D\x85J\x94\x83\xE21\xD0`\xB2&quot;\xC7E
-c#-.XAI\x93\xA1\x83\xACS#2ƺI\xD1\xA5\x8CP\xC6@[ \xADHQ\x8C]\xB0\x86 \xAAV-SU3A1, \x80YQ\xA1PE4*\xE8-XC4\x81 \xD6@Q\xB5\xD1@TQ\xEB\xA8\xA2\xC5&quot;\x88\xA8 B\x81\xC1\xA0X\x87\x80*
-\xB4ƹg\x91\x838\xC0P\x8000:
-\x9Ch\x80\x80NU^Ht\xDAA\x8B\x8E\xD7Q\xE1\xD0x\xA8\x80ŝ\x9B0B?\x89m\xF8\xAC\xC3\xFB\xDA5\xCBg7\xBF\xCF\xCDe0\x8B\xBB`E,\x8A)h\x9Cɐ\x85\x84\x98U\x9B\xED\x86\x8Bi\x8D3RK1\xC5b\xF4K3\xAB\xBA\xEA&gt;\xB3\xD6\xC6+\xB5U-h0\x82K\xBA@\xA4pLZ&quot;\xA4\x84z\xC1\xB2\xBDB\xAD\xD3\xD4h\xA8\xC7\xDAi\xA8U\xF1\xDE3\xEC\xEDUf\x9D\xA2\x90ArР\xA0\xB1\xA8\x9C@Z\xCB2#\xC2\xC92\xC0x\xC3 ,c\x83\xA0(0,\xA1\xDB`Wу\x9BH\x89\xADt\xB8\xA9\xC3\xA9\x8E\xBA3Y&amp;M\x8EAPy\xE6\xC2\xC6\xDC\xF1\xA65k\x85\xA2)M2!\x8C\xBE;#\x85U\x87\x99S\x96\xCA=\x95 -\xD4:\x88\xADK\xDD]\xD9'\xC6ͅ\xA2:\x8E}2\xB3W\wE\xB2\xF1\xE4\xC0\xABNC\xCD\xC1\xFCrx\x88\xBA IQK'A\xA92ţ\x85q\xC0[\xDB        \x82\x8C\xB0 -z\x88-\xC0R \x83 V
-j\x80\x8A\x8Bщ\xC0@2\x88؀nۆ=b\xA6 -\x88        \x92Y
-\xA2b\x91\x98\xA0A\xB0\xA9\x88\xD6\xD6`c\xB0\xAE\xA0`b
-0\xA0a                k\xA3r\xCE\xD1@\xF9A@  \xA3^H1\x91 F\x85DP\xC9`tg`ð9q\x94\x8D\xF0\x89vTk&gt;e\xE6\xF46ŻL2\xB1S\xAD\xF6\xAC6\xAA\x88\xD54\x{D92E}\xCE*\xD3\xD1\xC1\xB6\xC1o+*\xD6\xC7\xDEҭ\x9BV4\x97 \xA2\xAB( \xAAV\xD6$^\x8CCA8\x81\xC3V\x81)\x8A\xC5s#\xC5\xAC,\xA8(\xA4\xAB\xC1bf\xA48l\xC15&quot;\x90+\xD2*tP\xCA4\x9Ajp\x8F\x81\xAFŒf\xFA\x8D1\x80\xA1#NujH\x98I\xCAЮ*P\x80t \xAE%\x9A\xB7\xE1^\x9C\x9B\xBAڅ\xDBU\xB4jF\x80\xC6\xA7iO#\xE7\x8DHk\xB2^R        \x99\x8C4*\xB4qӥ\xA4\x93&amp;2\xFDN\xA7H\xD5Mٻ\xB6\xE8\xD6\xC6r\xD3SI Q2
-\xBA\xC7\xD0\xE0$\xF7\xD3\xCD˷\x97\xCD8Jr\xA0\xC3NAP%\xAD\xC7cJMD@\xB8&quot;\xA0A\x8D\xE1hT\ h\xB0\xE8@t\xAA`\xCDR\xAB(촀p\xC8!jXU\xC4\xB5\x86((\x8B\xACCZ \xA0\x80U\xC1\x80ƀ\xB1N\x84\x9B@ƀc\x84!\xC0\xB6!\x92\xC7&amp;αT\x8A%\x80\xD0        &gt;(\xC6=\xC0xP\xC8\*@:z\xD5*\xCAD쾝6gu\x84\xAAU\x8A\x9F\xDBb &amp;v*\xAA֪ZQ\xF1Ƌ\x88\x966\xDBꆽa\xB3\xA5\x8DYmaC-մ\xB4\x9A\xA8cY\xA6\x85[bJ\x9EQ\xD4 -k\xAANR#\xD1\xD14\xB0\xC2i#\x84\xD6\xDA=\xA6        s\x91\x8D\xED\xC0A&amp;\x8E\xE9Y0\x95.laQM\xAD\xA4H0 -,I\xD5\xD5-iw\x8A\xC1\xAA\xADe\x8D'\x84\x9A\xC0\xB4I\xEA(.        j%CZRp{\xA4^ -QkUS\x99\xB1\x8B\x84D+4\x99\x8C;7V\xB2\x85 -\xCEL\xE1s4        R\xE8\xB2hBA\xAA#\xB0\xB1Gq\x82        :ʁ$Cb\x80\xBBv;\xC7\xE4.\xE1\xD5)\xB19]+\xB2Z\xA8c\xAD\xA5\xBFNo\x90\xF7p\xF3A\xBFB\xEC\xC6\xE0 \xA0\x81\xB1\xC0\x84a\x95\xA0\x96\x80\xC12b\xC5\xCE\xC8e\x8B\x9E\xBB\x87\xC0J\x80!\x92P\xB5\x82\xD1P\x83\xAB`A%`r|K\xA8U\xC8RQ\xD1h\xC1b\xEB# U\xD7\x82(\x80: -U#b -\x80 4,`\x91\xC0#p&quot;\xA3\x80\x802\xCA\x80\x80\xC3:0^(\xD4\xD1a5D,
-\x892z\xA0\xAC\xC0\xE8ng`\xB0\xC1\xC46\xDAQ_\xB5\xD1P\x9B\xAE\xA3\xE9h\x9FC\x8CA\xE0\xE0T\xB5\xB7\xB1\xB7U\xB5ت\xB7W\x8BM\xB6l\xBC\xD8ƻ[\xAA\xB4\xD4Pkٖ&amp;\xC9(\xAC,\xBAm\xB4&quot;Fq\xAA-4\x91e\xF1\xDB\x85\xE3@\x92\x96
-C۽HA`\x92\xB2\x84P&amp;Q\x8D\x91 b \xEA\xC2#0\x9A\x95q+\x82\x91`\xAC\xA1\x88\xE1y\xB4f4\xB4\x89vQ\x8B`:\xD3\xA9D7¤\xABP\x8AG4\xC0\xE4\x88\xBB\xC24\xB4B\xA3\x99\x90\xE7\xBC\xFA\xB0U4\xFD\xC7\xD4.O\xFFT\xAD\xCC\xE5\xA5\xC8Q\x9CF\xD5\xA6\xD6[
-\xC9\x82\xBDA$\xDD1\x80;KP\xF4:`\xA0#Q -\xB2H(\x8E\xA3)6\xF4\x80.v歜\xA7r,\x96\x824\xE0\xA0A\x93z\x88 c\xED\x81h\x80\xC5]\x98\xB2`\xC0\x89\xB7Dn\xB0RT1 h@\xC0kc\x8Bh\xB4Ƃ\xB2V5 \xAA,\x8F\xC0\xA0\xBA\xC4X\xB9\x88\xD6\x84,\x81,\xD4D\xBC\xC2V\xA0
-\xACY\x8C\x80x:Q\xC1֊\x84m-6\xD5dq&quot;#\xA3\x870\xE8\xFE\xC4\xC9#\x89\xA4\xB0 \xE2怖@\x96\xAFjj\x80\x8C\xCC\xDCG;\xEA}Eժ\xCET~\xD8\xE7c\x92\x89\x9D\xFAM\x96-b\xB4\x8BT3bX\xC9d=\xB2hd0L[zj\x99)\x939K\xE6\x97\xD1L\x89EF\xC3\xDEN-چQVP\x8DщQ#\xC4#\xB6        d\x85
-e@\xD6Bd\\xD8$\xA0\xA9P\x84SX±)\xA9\x8Cua\x80(        \x91a\xB0\xA6 )\x86p)\xA5P\x98PP0D\x930-%\xC6Rנ\xAA\x90\xD6\xEDF P^U+,n        '\xEB
-BLÀ\x96\x82\xA4$\xB7Gh\xB4\xC1}\xD0M\xC3Jfe\x90\xF6PF\xDAdC\xC2\xC5p\xE1\xF8\xF8t\x95\xF41\xABl\xBB\xA91\xB1 -Pe#\xA8P \xAAs \x9C\xEFron^\xDCzV\xE6\xF2n\x9A\x84֊\x90\xDA*\x90\xA8\x9AD+8\xB5`\xDC -`\x87&amp;\x8E`XĪ
-\x8C -T KPLKAw'F\xD0R6 \x98 \xD6\xB5f (jMT -\xA0\x80\x88 b4\xA5 -\x88F &quot;h \x80\x82 \xC2\xF6eFb&lt;\xA3@``С\xBET\xDD\xAC `\xF17\xE4\xE3\xAC\xC0\xFBx\xCEi$B6,{\xC7\xEA\xEB\xA76Sms\xD7aқO%&amp;b\xA7\x9E-`M3\xA2F\x8Ck\x8AQ\xD9\xD9Xl\xAB\x9AX u\xEDm,\xECF\xC9\xD8&lt;\xCC\xB5pC\xAD\x8DFá\x8C$\xC9!\x80C1\x92$@4ۢ\x88\x83:\x84\xC6TA\xF1\xD1D\x83(\x90@\xCD\xA1\xCBf\x81Ȭ$-\x861        P-\xEC\xA8j$))\x93\xE1*K C̤+\x88&quot;\x99 -3\xBA\xDC%3L\xAF,\xE4 \xA3u\xD4\xFA%\xE1\xE3\xE0w=I\xB9\x97\xACa\x9Ah\xB2Ԕ -=(\xC3![\xE5\xC4\xCE -\x8D\xEA\x91(\xCAj鈩\xC7XS\xEC5p\x96\xED&gt;wwanV˵\x9A\xCBy\x91[\xB6u
-\x8FL\xCFD\x8B\xA7GRS\xC0:X\xCBY -!\x89@\xB4        MkT@\x84\xD1J\xA0\xA4v&quot;\x9DJ\x80         (\xF4xKX\x82gx\xF9 \x82\x8C-^\xA3GTQ\xB0Z\xD5 {^`\x83&quot;\xB4\x86\xD8`a\x98\xA8\x82a -EE&quot;FU\x808\xC4B\x83\xADPT@\x805UD\xA6!\x9A\xC1\xE4#pb̀\xF8&quot;@V\xBA5\x9E(\xD45\x91\x8C\x87\xBAF\xA0\x92        \xC0\xE8\xCE6\x90l$\xDBȚ*\xE64\xABE\xD8tg.0 -f0;\xD5\xC18\xA7\xC5\xCE4RŰ        f\x82\xD5\xD1\xDE.5\xBC\xD5&amp;l\xB11\xED,L7\xACf[Zɜ\xC40K\\xE9\xD6\xD8P\xA9\xE0EDF\xA3j\xAC\x8D\x880\xB2\xDD#\xC0\xA1,(\xC5m\xA1*V \xA4f\x8A\xA1 ri\xA4 p̦jK\x84\xE3\xA6\xD3(C\xA4\x9AY# \x97\xF5y1n' \x84T-\x84\x99B\xC0(\xBAp\x99$\x806D*\xC1\xE4\x86r(̭\xE6-ժ1\xA0\xA1s\xB0\xD0&quot;[\xB8\x97\xE6\xA0\xA3*H\x9C9#E\x82r\xEC\x88N({J{jaR&amp;t8bzr\x89I(1\xCB\xC9\xDC\xBC\x90LA\xCC'\xF3S\xC8OggS@xlr\xF2\x88I%}\xFF\x86\xFF\x88\xFF\x88HKHHFHGVVZWWX[W]XU[VBLD\XS\xFFR\xFFX\x8Dc\xA0ȁ\x85\x94\xE9uH@\xC43:[\xB4+DG\x81Т\xB0 \xB0\x95\xCBzP@0h ݊\x80P\xA0E\xC1\x82\xC0\x88
-\x9A\x9C6\x82b\x83\xAB\xA0@\xAD\xD3,\x80F&quot;\xC6:@P\xB4\xC3 -B\xC0T\xC0\xA0\xA8b\x8D6\xAAV \xA0^\x81c&lt;\xCD\xF3\x9B\x87@N\xD1a \x81A@\xA3\xFE7\xA4\xC6#\x89d b\xCD\xE8oHMD\xE2\x99X\xBD\xEB\x8A)\x85H\x91\x99;;:T4\xA3#\xA26]\xF1S w4\x98        \x98v\xAA56\xA9\xE9QԢ\xAA\xA6!\xCEj_\xD9cV\xA3r\xC4\xEAԦR\xB7ƲV\xD5h\xD1.\xBDFU@\x8F\xADX\xD5!\xB5&quot;[
-BB\xB2\xE2\xD6b-l\x96 K\xB0U\x85qSeI\x9Ap\xCA#:\x8C\x89\xA9\x84b,)\xEA\xA4Ec\xDBjv\xB7\x8Ah\xDCn\x92rf\xBBw\xF7H\x99ԊU\xF7 \xA7a\x89
-8\x92\x8A` -\xEEB\xEBY\x8C@E\x95n1Ѐ\xDA)\xBB\xB5ocǝ\x95a\xA6\xD53\xAA\xB2Ld`\x8A\xC3\xE0\xBA Ww\x98 \xA1-\xA6\xA9\xB1\xA0.\xC8\xF1\xA2S\xB9pZ\x8DbV) -0e&lt;4\xDE/!v\x91X2\xE9J M\xD2\xC4\xEA -\x88.N+\x81\x80\xA0\xD3I\x87k -\x83, \x80!̰\x8A\xBB5Ă'\x8AbB        0h\x94\xA2D\xC4h -\xEE{0\x88ƈ\x8D\xAASl`\x8D\xC4`EA\xAC=\xA6C\x86\xA0\xAC\xB0\xAB\xA0\xD85\x80\xAA \xB0\x82\xC1Z\xA6\xB9N\xE4q\x8E\x9Ec
- H0\xC2\xD0
-!Tt^8t^j@\xC40\x8Bá\x8Bp &quot;\x88\xC7w\xB6&amp;\xE45L\xDF6\xA3\xBEZ\x9BN펶|\x81\x83S\xB3\xA4&amp;B\xA2i1lR\xB5ڃ`J\x9Cio\xAD\xB0 -C\xEDm\x82io\xD5Xe\xB5\xB1U[,\\xD4\xCCuPc\x81\x88\xB2 \xD6&quot;\x8Ae\x91a -h5m\xB7 lHL\x8A&amp;\x94s\xDCa-)$h-%\x8D\x83,CN&quot;Q.S7xl\xA8D#f\x98\x89\xBA@,aIQ\xA5\x94\xB75\xEDgW+H X\x92&amp;4iY\xB3\xB4E\x90\xA5\x84T\xC7`\x98*\xE8t'\xD3\xD1&gt;$\xB2QFl\xE4U&amp;3b@&quot;\x8El*\x83[\x83Ń1T&quot;J\xA21\x90\x9AeL+v\x9F4E\xF7\xF4i#ʕ&amp;\xC5,(F:\xA0\xC5@\x8AЅ\xB1\xC1\x80\xA2\xE9K\xB1b\x8C\xAD -!@\xB2X\x81\x8CDh\x98\x82b@'FQ3+\xA86\xA5\xC8E,\xD4\xB4\xC6*j\xD50\xC0\xC9\xD2B\xC5\xD1j\xC1f\x85\x824\xB22\xCE*\xA0`\x8C# Y\xA2&amp;\x82\x8Ah\xAA\x8A\xCE{\xB4\x8C2\xA0ݡ\x8C`!\xC03\x80\xA2\xD3\xD6\xF6S\xA9A\xD02\xD6E\x9BP\xA1AdJ\xC4:\xFA\xE8\xB5ͮئ\xAF\xA8\xDE\xD7O\xB5\x9Aw&quot;~oS&lt;3Xܫ\x88&amp;\x902٧\xC3GG\x9B&gt;\xAB\xADڸ\xB6ژ֊r\xC4 \xA4\x81\xCB\xF5\x84\x8C\x90m^\xACY\xB3Hԭ\xA8M֬X\xB5\xB7K\xB1\x8CZՊk+k\xCB&quot;\xA2{,J\x93baP\x90\x95\xA86\x98\xD0J         &quot;`Pu\x81\x87\xA5&quot;!Ȁ\x90 \xB4pzM\x98&lt;)k\xE5|\xA2Æ@@\x80V\xDDv\x9B\xE1&quot;\xC9@\x81l\xD1\xC0\x9B1N\x9CX*\x80R8BPт
-A\xA3bd\xC1\xCC\x8708I|\x81\x93\x97\xE9H\xEA\x8D&amp;WC\xB50 \xCEq&lt;\x8CkE\x80\xCCEO\x87`\xC2t -뮘\xF2\xFEmM\x8A\xEC\x87LP\xC19_7\xA6\\x80\xEF\x86N\x98\x84\xF1\x81\x88\x98\x82L1\xE0 -\xBBY b@D\x80 \x85 aH1\xB6n        \xB7@\x80@\xD2Af\xC20@\xE3e\x98\x892)t\xB6hUc[\xD5)`\xAC\x84\x8D;\x98\xD8AրDĊ\x80&quot;Z\xC0\x88N\xC0\xA00\x88\x88\x881\x88\xA8\x9D\xCD\xFC\x8A݂$G\x80ETC@H6yP5\xAD!\xCC}dЀ\xED\xCE\xE8m\x95\xD11\x98\xC3\xFD\xA1\x85\x814\#\xC0g\xFE\xC1\x94\xCF
- U\xC4\xF6X&amp;\x80+\xB1\xB2\x94V\xF4󢢛7\xBB+\xCD\xDDN\x9C\xDEu\xA4\xBDwmӡ Xk\xBC-,7\x83hI\xBBoJ\x91\x91 -\xCE\xB5B\x9C`]aI\x8AP        \x80\x9F\x90\xCB\xF7H\xD5&quot;QG\x87ji\xC9[q\xD2Ks\xF6^7͋\xB5Ѿ\xBB\xCD`\xAF\xDE\xDEV5'\x84\x88 \xC4%\xF5NC
-\x8A/\x89\xC4)=V\xA1p        \xFA\xC1\x97\x98\x94\x92\xE5p\xBC|&gt;\x8FBUҊԨJҒ\x9A\xA2\x9A\xB6հ\xD01T\xAA\x8As\xA2\x85\xA5b\x88땍\xB0\\xFC\xFCuQ\xEC\xE5&gt;?\xFF\xF5N-Ym\x9F\xEA\xCE\x9F\xC2\x90R3\x812\x97\x8E\xF2)q\xE02\xA1\xBB\x8Aqa\x98i\xC8\xEA52\xC6\xC4X\x9B10qr\xE3\xE9
-\xC7\xCFvl8\xFC)!v@\xE4\xEFH\x8E \xD8ۭ\xB7&amp;3%\x9BS2L\x8Aq\x9Ct\xB2\xA1@1Y\xF5ZF\x8E\xB0\xDC,
-[\xF1@&lt;\xD1Q\x8C\xAFnv\x85\x98ʌ(x|F:\x99s\x8D}\x9D\xC4%fd\xE0f\xCFc\xCBS&quot;\xCA\xC6g;&gt;\xAB(K\xEDd+,\x8C\x84\xF2wz\x929\xAA\x85Тu\x86@\xC7;\         \x94\x8B\xF0\xB4qۘ\xBD\xB8Yi\xA6 HK\x90\xF67\xB4\xB4\xBD H\xD9\xEF\xB7\xBDH\xC9 &lt;U\x9C\x88)%\x90\xAC\xCDri\xD5e\x96\x94XŅX\xB9\xD0g&gt;,-\x8B\x90\xB4ҥ1\xB0\xAC\xED\xF6\xB3\x92E4\xC6)I\xEA%\xCC-\xE9, -6\xD0\xD5-\xA9,\xB5H\xF2 /\xB4\x82\xB5~)\x9AK\x834\xAC\x88^\xAD
-\xAAb\xD6͹\xB2\xBBER#y~@\xD1\xDB~[oZG\xE6q\x9Bǔ\x96\x8CV0\xD1R\x88^_\x88 \xACT\x88C\xB0\xD63\xD56\xE45\x99a\x80\x95\x8D=\xF7\x9A\\x91\x906N\xC6\x90\xCE\xDAF\xCDNfB)V7H&lt;\xA3\xEAWO\xC0\x82\xD4\xD6Nš        :T\xADX\x95Cen)\xAC\x9C/EM\xCF5B&amp;V\xE0`\xBD\x86R,\xF4\xEB+\xE8U%\xE7O\xB6\xEE{\xBC\xB5,\x95\xCC\xEA&amp;#X;\xEA\xAB\xD2B\x8AnN\xE4bDa2 -\xF19\x8BQ\xA5\xAD\x95\xA5\xBCv!z\xD7\xCCY\xAE\xE5\xCF\xEA\xEBZ\xCASY\xAA\xA4\xCAH&lt;-\xB7&gt;-y\x97\xA5\xBB\xAC\x9B0 \xF7ZSD\x843\xAFZk\x8C!5\xA9\xC9dX\x86\xD4;\xE0$#\xA6\x8C\xFBۄ\x8D\x84j\x9Bo@E
-\x87a\x8AmH\xAD\x9B}\xD0al\x8D]\xA3\xEDR_,\xCEc\xFAc\xB1z\xFE\xF2WN\xA5H&quot;.L\xAA\xD5p        \x8A브\x8C\xD6\xC0Z\x8300\x96,\x9C\xF5\xC16+F@\x9A\xD1S\x8DCf\xEC\xF8ۜ \xD3p\x83\x80&gt;6'4\xCF\xC5֦\x8AF5+9\xB0\xD4
-\xA8\xF5#5H\x93\xBA\xA8_6\xA6r\xA3\xFBPi!\xB1\xB8b\x9A\xD8FҢ\xAFEA]\xF9\x9EK
-\xAFE\x93k\xC1\xDC!\xC9F\xA0aƜa \xB9Ɓ\xA1.\xD3HW\xC2A\xCAb\x98\xD0ɢ\x9B\x89X\xA3\xF4\xADhm\xE8\xA8vk,\xD69?\xD1'
-YT=!\xDFKk\xA1\xD6%\xD9AI\xFCD\xE3*\x8D\xB9\xCA΂\xAAQ@\xA1\x88)jg\xE4g\xA0k\x9AX\xE4\xB6!Yw&amp;2\xBF-\xAC\x99\x86\x80Hx\xC1`*H\x98\xC40\x92ZG\x861*R'_o{\xBD\x86\xB1\x9A\xE5ڧ\x90\xAC\xBC\xFC\xE7ċ\xC9Ev\xCDT'\xC5ʼn\xED\x8AxQ x,\x91+.\xD3Z\x8AQ\xB5\x8A\xBC1\x85d\x94\x91A\x93vv\xCE\xF8 ǤPM`\xB2&quot;J\xF8B\x8AT\x95R\xBD\xA8\xB6Qs\x89\x96\xCF\xD4\xED(^\xD4\xD5YZ\xBF\xF0Ji        \xCB&amp;HY\x8A\x85\x85\x94\x95TU\xB1\xAAQ\xC1\xA3\xA8\xD6j\xC1X\x82\x8Cu\xDCX\xA4\x9A\xE0-3\xEA\x8C -%H\xE0\xA89LN\xFA\xF2\xE4\xE9;U\xACQ\x81UE\x83[R+˥\xAF\xF9\xF9Ln\xBDfAR\xB9\x8F\xA3\x89.^\xA6P\xB4L\xAC\xB8\x94\xF1\xA1&quot;\xC9Ҧ\xEBӂ\xB3\xC0*\xD9U\xCBdZT -F\xB4!ig\xE0i~ -I;{c\xD0\xF6 \x91q+\xD3\xC8ȴ\xA1E\xECo\xD8&amp;\xB2e+\x9A-\xBCҸ:\xAB\x82\x95S\xAE\xB2|e&gt;\xEC.\x87\x84c\xAD֩壮&gt;R̬\xB8\xC0B: FTk\xA4D\xC4ZE\xD4\xC9\xE1\x83\xA0\xCC\xA9\x82e\x80\x80\xF9\xAE\x885        N\xE0\xE6ɪL\x96\xCBZL\x8A\xC9-\xCElZQѫ\xD5Z\xDD?A\xCFD茩v\x81\xC8J\xADA\x96s}6r=DQ\xAA7\xA9 \xB9\xC2n: -\x90ca\xD5h\xAD\x88\xFD\xDD\xDF6\x85cq\xF49q\x92 \xAD\xEC9qd\x84d\xE5\x90&gt;}\x80͉&amp;Q\x93\x84\xCB\xF8\xC2\x8C|Tր\xA6tEU E
- -\xA9\xB8\xF4\x88TY\x948\xBC\xFA\xC2\xD5w+\xAC^:3n-1U\xC5F;P\xB1Ěi*\xAAh\xB4\xB2\x96pC\xF0\xADz\xD2(\x8Ft\x88t\xE8)P\xC3\xEClD-9\xD6P\xE0H'\x90o\xA9X4\x94\xA3\xD7 -\xAA\xBAW$|\x9C\xBD)\x97ֺV\xA3\xEA\xF2a\xA5\x8Bv\xDFAB\xADh\xF4\xDAJUcU\xC4\xD5\x{1BBBF24}\x95:\xAFq\xF42a\xF6\xB4\xF4 \x82\x90{6o:֭\x89\xCC D\xC5\xC90&amp;\xC5` -F\x83*0v\x90\x95\xD1j\xE0\xAB\x88\xB5\x89\xAC\x81\xD5+\xE4s\xB9m\x88h\xF0\x{DD19}\xD0\x94%\xFD\xCA@\xF0 \xE0\xAC\xE8\x95F\xDBm\xBAu*Y\x94:\x97\xE2
-k\xDF\xED-\ \xAB‚\xBDЎb&amp;\xD7V\x95\xF2=(%\xE9\x88*\x9A\xAC\xAAp҅\xF6\xF4\xD1@,\x98e${e\xB9HE\xC4%ib\xA0P\xE0qHZH`\xCFK\x99\xB0a\x92\x93\xD2P\xF3V@\x90r\x8EE\xA1pH\xC7-!w\x94\xB3,        (\xE8\xDBq\x86\xB1(\x85#5\xF0X\xC1\xEA\xFD&quot;ч\xFC%}3d&quot;\xDD3,\xEC\x84\x80\xB0[\xBF\xCEQH\xB9\xE5(\xAC\xE1\xFA\xD6 -b\xBDjE#(W\xEA\xA2.\xA0hD\xB1\xD3h+j\xB4\x88&lt;\x8E\xCEb\x95Rʢ@xu\xC7h\xAD\x8B\x80ŵ]]Ջ\xC6K\xA1.\x86uY\xBD(grt\xF4A\xAF\xBE+t\xC3|H\x99b\xE6=\xE85o
-\xDDp\x81ҦxN\x95\x85\x8A\xB0t\x9A -\xA1gDV\xC1F10M\xC5
-\xD6+V;\xB4d%\xB23\xF2ф\xD9\xB5.\xEA*B\xB6WFr,F\x8F@\xA6Ů
-\x8A\x82AЪ\xCE\xC0\xE4Ew\xBD+\xBB\xD8\xEC!\xBA\xEBY\xDB*9&lt;\xDCzk\xB3\x90l\xA1B\xAEH7 \xA8:4\xA0\xA8\xA1VIE\xD5RтX\x87U #Ίz\xE80Zb\x87XDՀFE\xAB\xC2\xFA\x9B\xBD7V\xEC\x80\xC0b!:iT\xE8\x9D -\x92R\x99/͓F\x95\x9E0\xC5E+\x8B:\xF1\xFC\xCE\xC8(Uꩧ\xA2̨T\xA2\xDFjm\xDAm:\xA27&amp;\xDEZ\xA5lHs䄘        \xECT\xB5ƠV\xAC\xAA7F\xD4jJ\xBC6\xB6\xE2\xB4D&quot;V;\xFB,\xCC\xCCR\xADff\xDAh\x99        KӪ\x82\xD1P@4\xA2`Q\xF4B\x82\x80шf\xAD\x88F\xA4hG\x82ATU\xD5)o\xD7@ڡ1MEQAK\xB1A' hK T\xB5H+q`\xD1`@l\xDB:,\x96b,9\xB1\xF6(\xCB\x92nl@\x842!\xF9.\x9C\x91\xA8\xA2\x8C M`j\xF0\xE8IAa\xA2q\xBA\x82\x91Z \x84&amp;$\xA0a2\x81\xA2Ylh\xC6ǒ\xF6\xD1\x8E\xC18\x9Eh/\xB5b X\xB8        A\xABQ \x8A5\xAA\x88\xAC\xC8`Er\x82P\xC0\x92\xB7\xB9\xA9Fm\xC8m\x9D(Z\xB1\x8B\x8A\x84\xB0 \xABeY\x97\xE4\x8C&amp;;ѝ04\xE4\xE7;\xCF:&gt;b\xCEh\x82\x9E \x80F,Vi \xD0NX̕\xC6]ᴑ\x850\xC0\xFC -\xBD]\xC49\x90p\xE4\xC8a\x8FZk&quot;\xF1n\xC5 \xA4rc&amp; `\xA7*\x84`5 \xD3b\xA06\xF6\x86a\x83բ6v\xA6\xC5\xD6\xC4\xCEj5!\x9E\x88\x940\xE5q$\x85\xA5Q\xAE$OlUѩ\x82(&quot;k\x8A0VŊhT\x8D(Rبn(\xB6\xA9؈h\x8C&quot;
-x=\x91\xA45֎0(\x8AU\xADU\xD0 &quot;\x8C\x81\xDE\xF6\xC6:\x83b\xC0F+\x8A\x82\xD4\x90C\x8Bn:\xC0\x82 [\xF6\x9B\xDE\x9E\xAE!0m2m(3\x99( c/ $$\x8B\x93n\xDC\x86\x8AŽO+\x8C\xBE\xB7\xC0ā+\xC0ơ\xA4X\xA6\xED\x87\xC8M D4        \x9Ev@\xD3\xCBQ\x89\x8A
-M\x8B\x9EFDF܏fi@\x92Ȁa\x85L-9\x881\x80\xC9(6\xA3\xE4\x81d\xB7\xB3@T\x8D\x88\x8BX\xC5\xC6֊\xB1BNã.\xE9k\x83\xD1R\xB1\x83\xA0\xFE\xAD        l \xC0E 00P\xD0\xA3EOggS@\x92lr(\x9B\x82^/HCUKVNOOQUPUOSUWVSXWUWFSLSSQPZUUXXR\WTVWY]ZW\xFF\x8A\xFF\x94.K^\x98\xD4Վa\xCA\\xCA,yaRW\xBB\xF2\xD0u+E\x81`\x99j2X\xB1֘\x9B\x9B\x9B3\xEAZ\xA8\x89} ؅\xE4e\xB8\xE3 \x95\x80Q+zO庈F\x87\xE0\xF3\x80\xB4: _\x91q\x8A\xB48\xB7: \x9FB~\x96\xCCt\xA3\x8Cja\xA5SI\xB9?[\xC1\x8AVUTE\x95\xD3
-\xAC\xAC9\x8B&amp;\x92m\xF7\xCA&quot;\xDB+A|\xA3\x8C\x96\xA2\x8C\x85|\xE0(\x94&quot;\xC5\xE8\x8C;\x97ʘJ\x91\xE2 -L\xA6;K\xD5O7j\xA3l\xF3\x90\x90\xD8lU\xADXt`\x8DQDU\xAB\xB1\x805Z\xEC\xD1(\xE9zI\xD1Fz\x8E\xAC\xD6\xC4*\x8BX\xAD\x92\x99\x8B ˬ\x84 (\xDAZPe\xAD`5,E!\xD4J=\x93\xC4\x92_\xAB\x95z&amp; -\x88%$\xBF\xD6;}\xE4\xE4        \x8CL\x95\x9A)\xA2b͚\xDA\xD2沢\xC1h4
-\xCD7\xFF\xA5\xFA\xF3\xE5\xE2\xFE\xA8\xFA\xC6aI\x84&gt;\xAA\xD3B5P-:Du\xBA\x99\xFA|\x81\x9CFK^eM\xC7\xCA\xDDF\xA7ђWY\xD31\xA3\xF3\xA3\xD4\xD7CpMxB\xA4\xD8\xD9ؐ\xA0VAѩ\xB1\xAA\xA8\xF2}\xB2R\x8Ch\xB1\xC5\xD1]s\x9C\xBDô3\xABRXVR\x85;4G\x96B\x97\x84Z4VV\x83\xF0\xBC.=O`\xA2Z~\xACez\x9E\xC0D\xB6\xC68w\xCBZeY\xA0        \x91\xA2\xC4&quot;:\x8D\xAAQ\xEB\xC0&quot;
-b\xB3\xA9\xEF@.\xFBl&lt; Ĭ\xF4 \xA9%\xCD&quot;\xD8(@PW\x88XkEX(n'|R\xCB7;\x8C\x88ɚOj\xF9n\x871Y-\xB9\xD9&quot;i&amp; ,a\x8E\x91\x9D\xAA؀\x98\x86\xDAX\xECmlTE\xAD\x9B\x86\xB1\xEB\xBB\xDE\xF9\xA7\xD0A\x86\x84
-\xE28Px\xBD\xF3WdK&amp;\xEF \xC3r \x86\xB0a&quot;\x84F\x8B\xDFm\xB8薍\xC5\xD0hɫFBro+ì \x86\xD5b/*&amp;\xA3\xB1.f\x8B*\xE8F\xAB\x92\xD4:@!a.AkU&lt;\xE8\xA5\jQ\xC3A\xA4`!\xB4\xCD)\xDA\xD8ڵ) M\xB0|&gt;\x8B\xDF=p}A\xF8\xF9,\xFE\xF0\xC0\xF5i\xB7\xB6\x8C\xB2@\xBA\x85@b\xD5`@\xADE\xD5
-b\x895Ӏ% 谬\xB87D\x9E8r\xAA\xA5&amp;볡&quot;\xA5G\xE5*\xC4A\xAC0\xA8\xD5U\xED\xEEZ\xE4 \\xC3\xC0(DN\xAF\xBC&amp;\x88\xC6\xFC\x92&quot;\xA7Wރ(\xCC\xCFZ\xE1@Fn#O \xD4$@\xAB\xB5\xB2\xA0\xCB\xC2dXQEѩU\xA3ϩ\x80\x88\xEE\x95R.\x91\xD6מ\x97EWsm\xED\xE8)M\xB5h\xB8q(1Ut&amp;\xB8\xA4F\x8B?\x80\x9A!\xB8a\x94-~-P\xDD%7Ln\x91Y' 0\x97!\xA3\xA8\x8A\x8Ahu\x88\xA0*W\xA9\xEFB\xB4F\xE8\xCBx\xBC\xBE\x90}\xEAC\xE6ˋ\x9F\xD2AX\xA3*\x88Q 2VP\xB5\xDD\xE2\xE6\xAAN\xD3 \xBC&gt; \xDFe\xBD\xD9ۘ\xA2\xF8\xFA,|\x8D\xAC\xF9\xB3F\xF9\xCC\xDAj\xAD\xEC\xB2&quot;1\xA2\x86a=ױLPK\x9B\xC1\xD0 \x95: \x95ɪ\x8Fh/\xCBa/\x93@
-\xC6Q        \x8D\xA8\x96VUu\xA5\xB5\x8D\xA2Q\xC0+\xA3\xDA\xB4V \x96\xC15\xADՂņ\xA5G\xB9Zrۃ\xF6j\xB9 F6\x86E쭢bk\xB15Ĵ1Kl\x9C
-ZĪF\xB4b\xAD\xA2Q\xB4h\xC6 \xA2^\xEClB)e D\xB1\xF1\x91\xE7 TNw}x\xB2\x99\xF9a%VNw\xBE{J\x99\xF9 k\x9CYSb+'B\x8CZ\xAC`f\xCE4L,T\xB4\xDAZԂ\x88j&lt;\xA3DT\xA3R\xA0 -\xC1\xF7*\xE2\xE9&quot;\x92\xE9\xC2a\xF8ڶ\xC1\x8B$ \xA2\xC1V\xDDܻ\xAD\xE7&lt;\xACF\xFD\xAFJ\xA8\xDC -\x97\xAA\xD9j\xB4\xF0U\xA5\x86:%\x90\xBBܬ7\xB5\xD4\xC2\xE9\x85\xDBZ\x91\xB5\xAA(bQ+* \xE3\xA5cAS\xAE;\xCD|\x91\xFB\xB1h\xCC\xD1è \xC2\xEAU\x81 R\xB8X\x96\x8302a\xB0J_G\xCEm\xD0LJ\xAF\xBE\xD8\xF1S\x9F6\xA2\x93ҫ/\xF6@\xBC\xC2\xC7E\xF0`\xBD\x85\xA8&amp;f5g!E\x83+\xF6\xB6\xF6b`\xB1S\xAC\xA9)\xA82DEA\xAF\x846\xD4kT\x8B\x962Z\xC7
-\xC1j\x90\xD6p\xB1\xAD\x8A\xB5\xB6U\xC5Z$        
-TRw\xBDٕ\xC5.8èTRw\xBDbWy8S,\xDD:Q\xA8\x8BUR !\xA3\xD6\xB1\x82\xAAâT\xADX\xD5\xBB\xB2\xE2\xD0j\x90b        B,ťb]\xD1&gt;\xB7e`e,\x83\xC5\xAD\xD0jl\xC5\xAA\xA2\xAC^ ?\x8D5\x84\x91\x9FUk\xE1k\x8C=7DN\xB5\xB2 \xAA\xB2\xB2ƪ\xB5\xAA\x98bj!\xEA\xA8:5\xAB\xA8[K(\x91\xC2\xD5\[U\U\x9D\xCA\xD8q3l\xB3\xAEʰ\x82\xC0\xAB\xED\xA0y\xA8ZDQ\x9C\x9CJK߁\xC0\x9D\xDCa\xA7\xD2\xD2\xD7pYwCk\xF7\xB6g\xD5\xC6 !{#\x8B\x8D\xA1X\xC3f\xCDR\xAC&quot;F\x87F\xA7\x96AA/\xA5\xAB\x91:pK\xAEF\xB9\xD3\xCE*^V\x88&lt;}\xFA\xE4\xEAΘ\x96\xC1Q,,J\xA9\xEA*A
-#\xEBs\x94J\x8B^\x98ҫq\x96\xC7(\x94N\x8B^\x98ҵ_/O\xF1\x94ܞ$\xA99\x89\xBD\xAD؊        b\xA6\x81h\xB4\x88u\xE8T&lt;8 \xD2V\xEB\xF3\x9E^\x95\x829t\xCEB\xCC\xC4dD\x98\xACYeSX֖\xA2\xB5\xF4\xFC\xDA4 -\x94:\x8B\xDF[\xC9\xD9ʚ\\xEA,~Wl\xC6\xD5\xCAZ \xDFJm)3\xA55\xCDR#\xA81bt\xE8\xB0\x8B\x89Z\xCD$\xD8\xC2AdF-\xEA\x8Av\x82\xE9\xA9 %\xAAnQ\xCB\x94֩E3\x95\x91\xAA\x88u,\xE4Ky\xECN\xF5o@\x90_\xF8\x94\xF2\xEET\xFF\xF9\x86O\xE1\xDE\xC9\xD1j\xB2do\xB1\xD8\xDAXU-\xB0ٺX\xB3&amp;&amp;\xA2Vmi\xA3
- \xBA\xA7\x8D\xB3,\x848NK\x9D\xEA\xD2B\xD7JmZG\xADQC\x87)H\xDF\xEA\xA0X$#\xD6E\x87\xB5Z\x90\x9CBKv\xE26\xE6T\xE3N\xA1%;\xA0\xAF1\xA5\xB9ޞPʒ !\xD3j\xB17UDM\xEB\x86ba\x8AG\xEB\xC0\x9E\xB2X\xF9\xDD\xDC'\xB4\xA7A        K\x8C0\xD86\xB0Ù9 \xA4&gt; \x9E\x9B\xE9=\xB9A\x90\xFA,|c\xA8\xF4\xAAl\xF4\xF62$j1\x8C,f\xA9\x9B@41\xAD\x82U\xB5bD\xA3J\xBD\xA4y\xB1\xA2\xAB^\x8B\xA4R\xAB\xA3\xD2bEaB\xD6^\x8Dm\xA7X\xB4 \xA2\xAB\x95*&quot;\xB8_\xA4\xE9
-\xE4R\xF5@T\xE7\x99\\xAA~\x88\xEC|\xD3ێ%,L\xEEBȰ\xD8[\xEDm\xD40,,m\xB6n\xA3uSA\xC0\x84a\xD8\xEE}
-\x87\xAB        \x8A\xDD\xFBF\xFE&gt;\xD2\xEE\xAD@\x8D\xC3        ɪ-\xA1 \xADV\x8Cdbw\xDD\xEC\xA8v\xBFi8ebw\xDD\xED\xA8v\xBFj8&lt;XOUT!I\xDA)`ጐ\xA3bZD\xD4\xDE40\xB1ؙv\x92}ǥ\xBF\x85\x81\x85\xE90r\xCAK&lt;\xB2@V[\xE1\xB2OP\x94
-\x82\xA4\x92\xC9V\xC1\xC0dB˿Rf^\xC3C&amp;\xB4\xFC\x9B!e\xE6\xB6\\xAA\x81\xB3NF\x96\xC1V\x82\x85\x90֨\x82iKQK U'\xDAF\xA0*\xE3\xA8*\x83\xA2\xA6\xF4\xA2\xE8\xA7\xF5\xA1
-E!\xD1ǧS\xA3\xB5&quot;X\xAC\xC5\xE1\xD8hA tB\x8B\xA3\xB257/H\x9D\xD0\xE2\xA4l\x83\x8B \x94P\xB6a%jPAAA\xCA粪\x8D\xA2(\xA2A\xABŒ\xB0\xE30t!A\xA4\xC6\xC3\xD8FA:tX\x80$!E^\xF4 \xB1\xAC\xC4,\xEC\xB6\xE3 -\xA4V\x8B\xB3\x98uX%\xB5Z\x9C\x8D\xC0\xAC\xC3j딪\x86f        r\xB2\xC2H\xAD(F\xD4boo\xB15\xD5VLU[X\xB7Q\xF8\xEE*\xA2V\xB5\x8Aڻ\xBB\xABq{\x9B\xF7\xDDu\x91\xCB|\xD5\xD6@d\xC7z\xFE|olFw\xBC\xDB3\x95\xAF\xF3\xB4\xCD\xE8\x8E\xD7\xD83\xB5\xAFr)\xD2o        \xDB\xD2iI\xB1Xl\xED\xAD&quot;\x8ANU\xACѢ\xDAzkT\xB4PKdFǰ\xF5يl9\xCA(x\xCA\xEAS\x85f\x9BZc\x80\xCC.-\xF7(&lt;\xD6XV\xB0xa p\xD0\x9C2=\x89\xD0\xDEd\xCC\xF0)\xD3s\x97\xC8\xCA/\xF1s\xF9\xD6[\x84JҪ5\xD6Pt\xA2\xC3*El\xC0\x8A\x88V$@\xAB\x89\xCA\xD4Eg\xA8+\x90\xEB\x8A{\xA8\xB0\խ@\xB1mI&quot;^M\x96@V\x8D\xA0\xBA\xE7!\xDA \x84&gt;˽\xDB\xD2O\xF88)\xF4Y\xEE56\x84\xF2&gt;N\xBA5\xB2L\xACr$ȐXQ\xABU \x8DFQ\x8Dh4:\xF4\xB2BE\x83&quot;\xD6Jt\xEC%Pe]f9 -\xE6\xC9h!\xA51\x80b\xFD\x82uCa\xEB#g\xC5`*#\6w&gt;\xDBQ\xAB\xD9Zg\xE0\xB2Y\xFEٮx&amp;\x87\xCA\xC0\xAD\x89\xAC
-\xB6        '\x90\x905\xB2QYiA\x87\xAATtZ\xD1]\xBB\xDEۮzQ\x8BE\x93\xA6\x95B\xD7k\xBB\xA6\x93\xC0\xA3Qu\x90\x87\xC6\xC4MhD\xAC\xAA\xFA\xA6\x98nj\x89l|6 \x9E \x9B\x9FDu\xBE\\xFEl&lt; \xA3zge\xF8\xAC[DV\x82\xB6\xDAR -K \x93m\xC11 -\xD3X\xB5\xBE\xD4\xD4\x87Z.\xF5\x94R\xE7ȂҤC\xB2ѫ\x91 H\xA9Q\xB5V\xEBU1F՛0t6\x8Bv\x98\xCAL|ng\xB3\xE8a\x87\xA9\xAAb\xE2^\xB5\xB2\xC0j        aD\x8AAEԨX\xB4&quot;\xAB\xB6ZQ\xB0Ewʎ\xE4ASз\xD7Vd$\xFA\xAAXX\xBA؇\xD6\xE2E\xABڶI\xE7&quot;\x87\xE1:n?\x8F\xF7|2 \xC6\xE6\xC6\xCF˵GE\xDC'\xB3\xE0\xD9\xD8\xDC\xF8jU\xDB)\xAE\xB75\xA4\xE5(L\x8Aհ\xB3\xA6\xA8\xA8\xCD&amp;\xA6\x81)\xA6Uں\xAE6\xCA( kT\xAA\xE1\xC0\xE9\xB5\xC2$X\x82        \xE5 _=\x84\xB9\xC1bEKE\xB4h4\xD6,‹A\xB9 R\&quot;w&lt;\x83UC\x8B\x97TE/\x91;\x9E\xC1\xAA\xC1\xC9\xEB\xE4\xA8/\xC0f\xC3@*\x91`%        ! &quot;\x96\x86 -\x8A\xD6h4Pz\xA5\x9C\xEA\xC3bJ\xC1\x9AB/m-\xC1JE\x81
-\xC6^;\xB4\xC1\xB6m\xC7\xEF\xE5yS\xBCZ\xD5\x84. _4\xC2\xF6\x93\xE6\xE14tY\xF8\xA2\xB6?\x86\xE1ܭS*2I\xA4        \x8C\xABVT\xAB\xAA\xAA\xB1(RQQ\xEB1M\x85i}\xB0(k2\x96;\xABJ\xAB m\x98 X
- \x80\xAAQu\xB4:t\xEA\xB2\xE4k\xFB^;t:w\xBEFz\xE1Z\xFEt\x96{\xADT$q\xAC\xBB\x93Ϭ)\x8B\xB6NԈ'\xA8\x8A\x8E\xB14LK\xEC
-\x8B\xA8:\xB5V        \xA5\x9A\xFAz\xAA#R@\xEB\xF2\xF4\xA6d\xA9&gt;\LWCc nNQ4\xB5R\xDF\xDCܤ\xBE\x94&amp; ށ\xB2_\xD1\xEC]W\x9A,\xF8*\xFD\x8Bfu\xF5\xAC\xCD(\xA4\xACU%H!\xC5`1\xC6\xC2\xD24Pú\xB1RjW\x8A\x85'\x88c*\xFD\xD0[Fk\xB5Xe=.*\x87\x86\xD8M\x9C\x96J -b\xF1\x82Ba\x8Cf\x9B|w\xA7j\x85\xE8\Kn
-\xB9\xD5B\x97i,\xBE)\xE4J\x86!\xFA\xD4*\xB0\x86\x98sxI\x96\x8AQ CT-mB\xEBX\xEB\xC0\xA3PG\xDDZK\xDC\xD6K͢\xD1iE\xB8R
-\x946\xA0 f\xA5\x96\xAD\xD7\x81im% \x8354\xCBv\xA5*}o\x98\xE6\x8Be7\xBBTٺ\xB3\xA0\xF7\xB4؆5T#J\xF9\xE2|J1L\xABX\xC7\xC4R-khT\xAA\xAA+ '(2\xF7]\xCB\xE1\x9AeY\xA7#s\x91*&quot;eZ,F\xAC1(\xA8\xBAT\x8Bh\xC5\xE6\xE4b\xD1&lt;6\xAF\xBC(\xA9\x93_\x98(yd^y\xAD\x922~\x82\xA1\xDE\xEC\x87\xB1kp\xDAZ\xD4ނbi]0-EU\x8C\xA2U\x94@\xF2\x9A\xC1\xA0\xD4\xFA \xDC\xEB\xF7\x83]h{\xE3\xB6 rt\xD5\xF6\xB5ЃM/\xD48\xD0#\xAD\xA1\xC3Ј\xE8\xA3\xA5        \xC4\xE8TKoQ7C
-O+\x89\xA5w\x80\xA8\xA3y\xC6\xDF:\xD5\xB44\xC2X\x835V2*\xA2X\xA31:\xC5P\x9B\xC3T\xCAt\x85m{2\x86ֺF\xD3Q)\x83&amp;3f|G\xA5\xAAZo\x8B\x97C`G\xD9w\xD2t\xABi\xB5:\x88܀|\x80\x96W֞\z\xCFʾB\xE4p\xF2BX^Y{s\xE9=+\xFB\xBERff\xCB92\x80w\xE40\xC3\xFB\xB0\xB6\xAA\xD3?\xE9)~03;5\x8D +\x89a\xB1\xDAe\x8B\x82=\xF6\xB5\x88\x9D\xBD\xBD\x81i'\xB6j\x82\x91\x93#rž$\x8D\xCF        \xB5'_B\x8AJXV5X4\xA8&quot;\xE0d4\xD2*(6* H\x9A+\x94V\xA3\xC3b\xC1\x88\xCE^#\x9C1\x99޶U\x9D\xB6\xA2UTĴXBұz\x848\x96\xEE\x8A\xC0U0\xA1\x9BA\xA24\x98f4 \xA0&quot;\xA4\xA5\xBD-Bb1\x84!\x8CK\xB7iZJxݷC\xA0tu\xA2\xB6g(^c\x96Jb:\xBBp\xBA\xACB%\x9C\xD5\xAB\xA9\xC9#\x89G0\x82\x99\x86\x83L*4\xDD\xCAT\x90H\xEC\xB9鶯F\xB5&amp;\xE4C\xEFi\xAE\x8C\xA5t\x88\xC0z̀\x8C
-\x99I\x90\x89\xA50\x80\x80\xC4@\xB3\x96\x90A\xC1`Dc\xB1c\xBC,\xA0\x8AX\x90\xF3\x82\x97PX(\x90\x8D\x88c\x83.,\x88\xAA \xA8Z1\x92 Lh̊Q\x8D\x80\x821\xAB        \xF3\xE3\x90@ω\x8C~\xAC\xCD#\x94\xDE
-:\x80d4~) \xCD\x8CH\xF4\xC5x\xD3\xF6X\xE1\/\x85\xA1\xBE#\xA5Z\xAD/ړ\xB6NJ[o\xFA\xA1`M\x9EwH\xE4\x8E\xA6\xF86bT\xD5f\xA6\xA3\xCDQ*7;w\xAB\x81\xE4jX\xB0uc        q\xAA\xCExԄ\x9AiIM\xA32T,6\xA2\xA6a\xB1XL AD\xD1*h\xAC( \xA2
- :,\xAAj\x9B\xACZ
-\xD60r@Y\x9B O\xAD\xC06\x91/\xC2\xF09{\x8A\xC6\xC6ZTQIE\xA7\x94\x8A&amp;\xC4\x94٭\xC0*l\xDCH3\xA1ӃAC:&quot;GZ\xC0k        f4A\x8DdR8\x90\xA6*r@\x8AB*,bY\xB0\xB4\xA7i4\x90$\xC3\xC4\xCD\xC4\xDE\xCE'܍\x9AvM[\x8F%\xED\xA15K.;=\xAC\xA2⬊\x93P\xADtC\xB6\xA5\xE7\xAC\x82\xBDt\xB1\x8C\xEDOggS@\xC2lr\xC8Ii\xA7\x94\xFFx\xFFb\xFFf\xFFd\xFFm\xFF\x82\xFF~\xFF\\xFF|\xFF\x88\xFF\xA6\xB19\xF7\x868\x94+\xC5\xC30C\x98L#TDp\xB4\xB5
-Ac @TD\xC9U\xB1\xC9\xC81\xC0
-\x96%\x9E\x8C&amp;\xB8\xADD\xC0\xAA\xB4&quot;\xA0U0\xFC6\x82\x88#\xD86E$\xA3UEA
--6\xE8\x83\x85G?O1hAt\x8A\xD4
-\x80т\xB8D\xC8\xC4d#2\xA8Ӊ`\xD0 \x80B\xB20\xA4U\x89t!\x90\x8D\xB8\x80a\xB0A\xD0\xAD
-&gt;)\xE4\xF1Œ\xC8\xC6\xE6O\xE57)\xE4\xF1Œ\xC8\xC6\xE4O\x82\xC8\x{13D4E8}\xD4&amp;Y\x87\x94\xC0\xB6ϭ\x81) \x96ʑ\xF3VS\xF9
-L\xE2\xE9 \xC6\xCC&lt;\xC5]P#\x83!\x8AU1ð\xB5\xD8Z,v\x86\xD8ۂ\xD5\xD6^l1\xC5b
-\x8AV\xAD\xA0j,X+*ZP\xAD*Q\xC5ė\xE3C\x8BVD5\xC2\xCA\xD2\xF4)\xF6\xBE\xEA\xAAF\xC1X\x83\x82ԣ\xB5V\x85'Z쯨Z\xAD0`\x80\xECD\xA3_Ju\xB8\x8E\xBF\xF6E\xB61\xC6P\x84N-c\xED\xB0\x85Ҫk\x8DX]\xE8\xEC)\xEAMw.\x87H$ H&lt;v\xB1\xE42\xA3\xC4        9\xE4*%Q\xB2-\xAF\xA81\x86\xC7M\x8CU`\xC8\xE4\x96[\xCC\xC5\xD0b2\xD0$0W\xE7\xEBHq\xC1P\x88 bU\xABb
-\x88eD]\x85&quot;FС\x80U{\x91\x84`B@\x83\x91)e
-\x80-\xB6\x88\x88 \xE8R@\x87\x88\x88\xA0*\xC0.C\xD1\xD6J\xD6b\xA3\xC5F\xD0P@,\x92\x90/\x92l\xA0$YV3        \\xC4:\xEESDx5I\x90\x83\x8Eph
-@# \x82M\xFE\xF9i\x84\xB0\x97\xF4\xC9H\xF4\xB5\xBD\xCF\x88#4{I\x9F\x8CD_{\x81ѻ\xD1?g{\xC0$2RRI?, U\x9B.\x8B9\xA4\xB03\xB3\x83\xB8[E\xEBm\xD2\xC30l \x8B\x8A6X\xC4P\xB5\xA90+L;;;[\x9Bx\xB1W{SAT\xEBEc\x83\x80\xE8cA1\x88V\xB1E\xA3\x8B\xE5'n \xEB\x8A(&quot;\x81=\x80A\xA0TKJXaQU[t &quot;\xC0\xBFM[\xA0&quot;l\xAC\xB5wu        Eb+TM\xF5\xB2\x80  6V4\x80 bU\xABSUmUK\xE8\xE8E\x9B\xC66k\x8B4`\xF0P\xE9sha4.\xED\xA1\xD0(6\x8B
-\x84.\xEC\x82Nx \xA1\x94\x8A \xEF|\xF5\xB9:
-AC.\x80$\x8D\x96\xB9R;\xA4YC:) \xA95\xBD\x88\xA2A\x84\xAA\xA6QUk\xB5V\xC5`\x81\xDB\x82H;7i\xFC\xBCC\x925ӹ\xD76O
-\x85\xDDE\xAD\x8A\xA86\x82\xBD\xD2\xDA\xC3\xD3n\xD8'/--Ky\xF9\r\xB0j\x87l\xFFMu\x87$\xD76\xA5\xA3\xF0\xCC \xDC\x93(Yh
-&gt;\xD9Sd\x84\xE2\x82&gt;k\xEBdO\x95        \x82 \xFAhT2:\xD6W\xA2\x8C\x90E-)\xCE\xD9 0\xC5\xD5\xE9\x97\xE2]\xBAj\x96O1\xE6!\xE6\xE0\xC0b\xCC\xC4\xE2\xAEjUTԊ1\x8Eؘ\xD6Yi0\xC1\x94:\xAB\xA8\x8A\xA5a\x8AX\xB1j\xC5\xB1\xD0!\x8ChDP-\x82)\xAAPUAd\xB5Xl@\x80$\x99z\xA7\xE4\xB6PQ@\xC0\xD2j\x83AFن\xC0Hc\xF0b\xB5t\x8A\x9D6\xC06HئH\xD1\xC9Jc#uQ\xB5ATC@Hє\xF2F\x85\xF8\xC7 \xA30Th        @\x81\x84`\xA4ٱ\x91\xB8\xDB[j\x8D$BƨC \xC3@$\xD7ؔ\xE3\xB5\xF9\xA02\xA7\x89\xA2T\xB5(\xAD\xC0\xA1@C&amp;`\xB0\xE3жq        \xB6\x8AU-\xA8\x82\x94 \xB7f\xDB\xD1\xEAT\xADAEյF[\xC56\xA43\xFA\x9Cȱ\x83\xF4kd۵i\xFBѻ&lt;P\xDB)@\xB0E@ؖ\x9A\xC9\xCE(\xFB\xA9\x83\xDD3\xC0Y!\xDAٿ\xA4\xCFv\xAAU\x91\xF4eS\x9E_[DhЃ75H\x90 `'\xA0\xD0:\xBE\xC8S\x84\xC154\xA7\xE3\xC1r\xBCE\x9E&quot;5\xAE\xD1\xA7\xE3\xC1z\xBCW\x89\xB2^\xA9Z\xA4/$\x8E\xA4&quot;\xCEh\x87: )\xC4ܜ0;qB\xCCL\xCC\xC4\xE2nT\x85%\x828\xD1ZcB\x96B\xB6Ū\x86a\xD3ز\x8E\xBD\xB9%\xFB\x87'k\xCA0A\x92\x84\xA5|А(\xC1AhB\xC6\xE0Ix1!\x86\x9A6\x92#\xCA\xC6\xF8\xB4\xAB\xD8\x8A\xC1@AQ\xC0\xFA\x97\xD5P\xB0\xAA\xAA5U\x84\x98K\xDA\xDD`Վ%\xAD\x8A\x8A\xA8\xBA\xB0\xF36\xA3H\x8D\xC52^@\xE0\xE0\xDA\xD71E%`@aP`\xCBi'\xA0PrDգBc\x9DULS\x91\xC1jPA͘p\xDC\xB3\x99\x90\xBFN\xB4(bAi\xB1\xAA\xAAhl$DU5
-\x86a\xC5&quot;\xB7\xE6\x86a\xCDB\x8B&quot;eT\xD0Pd\xB6t\xC0
-\x818\xBA9%\xD0.\xB2Xdȵ\x9C2\x8E\xC2L \xF7\xFC\xB9\xB6\xBAʑi\xBA\xE1\xF8\xF9hЯ&amp;\xAD&gt;\xDCe\xD8D$\xB7&gt;W\xD6\xA5\xE0o\xC0\x88\x80\xD0
-\xA0j3\xDE\xC8#\xA9\x83\xD2 -\x8A\xD4\xF1@\x89]\xAC\x8D=\x929(ݠH\x95J\xECb\xDFIn\x93\xD9;\xEF\x89\xA3pzgD[\xADm\xA9\x88S\xC4R\xB1\x981{q\xEC \xC5c#\x8E6V\xEC1\x89LDT\xBCkg\x8DsZ -;{;\xC3bU\xAB\xAD\x98^4b\xD5:RQT`KaX1 - 먀
-\x88`\x92_\xD0 AUa\x80\x94\x80t\x999\x91ܚ
-*\xC0\xA0\xA27*\x98        ,h\x85\xC0\xC8JnЀj\xC4`\xA3j\xADEK@\x98d&quot;K\xD6
-)\xACdr        \x90C\x95B@\xD96Y\x80%y\x89\xADІ0\x93\x86\xD0v\xB9T\x88\x91glK\x80h\xD9)\xEC\xC9MQ\xBEj@\x80
- 
- 2!\x88T-,#-2\xC1
-\xACZX5, -\xCB\xD1*\x86\x8A\xB8+\x8B\xACX\x93`\xB1\xB0@\xEDdL\xB6\x93\xC0`\xAD\xC0B\xED\xA2\x97&gt;\xF5\xA2\xC0\x88\xB08 \x8C\x8D\x93|\xC2        t\xFD\xFC-\xDBƺ2\x98+\xCE3DA@P\xAA\xF8\xC4 @\xC1h
-\x80\xD84(\xFE\xB8#\xA4\x81.\xAA)j\xC37\xEE\xE1aj\x86jt\xB4\xE1\xF0)\x91\xA1\xA8\x94@
-\xA9,j^QD\x90\x886\x87֪jS\xFA\xE9d\x9B\xA9؁\x80\xA7\xB8Ǩ\x92\xB6\xB58&gt;\x8AkQ\xA3\xD6z,6c\xA3\xB5\xE2$5\xAAZ&amp;فw\xE6\xB11D\xEC\xC5a`;\x92M*ni`\xA0\x92c\xF7\xC8j\xD1
-\x800hT\xF2\xD0\x8C@ &quot;\x8C\x96\xB4\xA8*RBP2V\x8CTibT \xA20\xA4d0\xA2]!=\xA2\xA8&quot;\xA3U,X˲X\xC45\xC2b\+\xB4\xDD\x94R&gt;ɽΤF2%&quot; 6`8\x89\x81\xEC\xA7b        p\x94\x80\xCB\x90Ȩ\x93\xB2\x86 \x95b)\xC4a`\xB1\xA6\x87\xE2\xBC8\xD3eK\xDF\xF0\xE2\x95x\x9A+\xE2\xE4&quot;,
-AIX)m\x91R\x87\xE0E\xF4\xB2`@A\xA5\x8E\xEC.+\x880\x80\xD0cPЅ)] z@\xAEE\xA3ǐ\x8A\xA2b@E\xAB\x82\xD8\xE8\xB4\xB0VP\xC0H)b\xD1*`P\xAD \x80V\xAAB\xDE5\x92\xFD\xE5\xE7 H@(\x9CA00l8-D\x8C@T\xADU[f5\xE9\xA3Ƀ\x909\x82\x82LO\xB0F\xEE`r\xA0&quot;G\xD2T\x99\xD2\xA0\xBF9\xF1\x9A\xD2\xE9Ï0\x95S\xB2=}*\xF1e\x81)\xEE\x887\ӰZ4\xD16f#j=5\xADgުM(\xB6\xB49ۚZ\x98\xB0\xC8B\xDBFn\x93X`yH!\x82\xA8Z\xD4R\xAC\xA0\xAE\xC6\xC6I!\xE89r\x95\xCA:\x840\xB4%֡`D1QnJ\xAD\xBA)Ő -\xDBRj,`\xF1\xFFm \x85RdI\xC40`\xA3`\xC9R\xACb0bѩ\xA0UdK\x81e\xE8E\xB6\x83#h\xAD
-&quot;\xB6q\x91 -2\x86\xAC\x95x\xD9M\xD8\xD2be\x91iHk -H\xA9\xC1\x82\x8Di\x89\xF6\x8CV\xB0FR\xC8X\xB6K\x8E褹\x9Dw\xE7 \x80td\x86\xFA\xC5&quot;d-R0\xAC -\xB5\x87\xB3[\x8A( aDE\xA3&quot;Z\xDB4
-\xB0Ҝ\xFCPX'\xF3\xE3\xC7\xBD,\xEEE\x8E!\xA1\xC6\xF6.X\x80\xC0Z\xB0\xB1\xAA
-6X'\x88-(&quot;\x8Ab@&quot;0 \x80\xC0
-\x80\xD1-@\xB7\x83^EP\xB52!\x9E\xEC\xD8 \xC0\x80@\xC1
-\x80\xA8*\x8C\xF3\x81\xC0\xCAH\xC0h - \xA2\x84\xB1\xB3\xAA&gt;\xD9&gt;\xE3`\x9D\xEC\x9F@\x8Ep\x80\xF5\xB2KrΜ/^$\xAF&gt;\xA2V\xEDp\x89=\x9D\xCAA\x8C\x89\x99\x89\xBB\xBD7\xB0XP1 1LU &amp; -6 -6v\x98\x8A\x98\x89u,l0\xAC\xAA5U\xAC\xD9Š\xA1\xA2h-\x8A\xD6V\xB0\xB40\x94\xA2\xE8\xD0&quot;`\xA4\x8B.I4D\xA8        bY\x88 -JB=%\xA0\xC1*0I\xA0\xA5mE#&quot;`DI\x8D\x90H\xC5!mͶ\x89\xA9Ȱ\x8F\xA5Dʁ NT@k\xB2,\xC0\xEB\xA1\xEA|/\xE9r\x86B\xD8\xF1\x82\xB9@MQ\x84\x809\xF2{l\xD3pS(\xB2\x970h+6\x80&lt;HmC|\xCA\xAD\x98Q\xADXR\x8E -,\xDBH\x81@*\xAAP\x81\xD2\xE0\xD0R\xAF\x84\xD6\x84\xB6\xB8x\xDB,*k\xF43\x82|X\x92-\x88\x80_B@$ \xACC@UQAN;\x8C\xACG\x98        E&lt;A&gt;7&gt;%\xD7_N\x96\xF9\xC0q\x86\xF6\xCAH\xF0\xB3L\xF5        \x80S\xA0\xC0#\xEB\xD6\xFE\xE8\xE3d\x83J\xA6\xEF\x80\xE3\xE9#u\x83H\xB6\xEF\x80\xE3\xF5N-`,ڻ?\xBC\x80x\x9F\xD5«y\xD7I*\x81]\xBC3q&quot;\xEEI5\xAD -j
-\xF666V\x8B\x88ث\xA9\xB666\xF6l -\xAD\xAFê K\xABd\x9B\xD60-FD\xD40e4\x83fn*8-C`\xA10\x88u\x8AVU\xC4v\xC4\xEAP\xC9 pucV\xC4
-UD'X\x80\xC1@X\xF6\x980\xCA\xAC\x8Aƣ`UT1@\xEA\x8F\xA3աSS (B
-\xD1=d\x8C\x87\x80\xB1,l\x8C2\xC5*@\x8CGo\xC5iE\xACYҀQt\x82)4Wb;L0*\x81M\xD82\x90\xA8\x84-c!i\xA83\x80 -B\xA0\xB5\x8C=J\x91\x9B \xB0P\x8C\xBD&quot;d\x8CŮ\x8A\xC4H\x83\xE5 -\xA2\xBA\xF8\xA6N\x90A \xE3`\xC5X\xB8\x90ˁd\x81\xA2\xD5Ŷ\xC8\x80\xACX\xC8 -\xCA-\xB6\xC0\xD13IF@+\x82 \xA21\xA6\x95\xBBuj\x8C Z\x8C\xAC)\x8A`i\x82\xA1\x825P\xB0*\x80\xA0\x80        C%\xF9\xB6r\xD4ԩYJ\xAD
-G)(V\xED\xEF
-\x83\xA0\xC24\xAC`\x80\x82 \x825A\xB1al\xAA\xBE\xE8c&amp;\x82\xC8r0њ\xB3.\xFA\x98\x89 \xB2IC\xE6c\xBERl\xF9\x9E_\xAD\xA9yW`:\x99\x8ER\x89\x95\x808\x95\xB8\x86X\xECml K6MSLl4l\xB4\x8E\x8D5v\x99\x89i\xCDf+6bMLԊ\xA5aia\xA3!\x96\xA6+\xA3\xE8\xADت \x82J\xA0X\xBC/ \xF2d\xEF~\xA5%UQ \xA4,
-\xA9Dr\x88\x91IPe
-Ԁ\xB8 \xDCB`\x8A\xC2Be \xB4\x8A\xA8\x8AA`\xFC\xBD\xCD\x84\xDB`^W\xC5\xA0Ya\xA0\xA1-D db0n\xA4 H\x8C\x90\xAB\xB4\x98\x80\xB00H
-
-(\xDB\xC5-\x80\x99C:\xC0t\xBB                %&amp;\xC0Q\x8FE#\xB9\x92\xB6(&amp;\xCC\xEE\xBEm6\xAB\x94\x86ޏ/C\xA8\xAEoo *;\xC748\xC2\xF7P\xA0 \xCEP\xB1ң
-\xA3\xA1\xC0LB\x86L@9\x99\x98\xC1\xA2\0hTcAt)5\x82\x8A&quot;\x85\x86Z`4V\xB1\xADV\xE3\xAA1(\x94\xE8        
-@ J\x8D\x88ƈ`tZ\xC0V51\xE9`\xBDA§%\xB0\xC08@ EAhh`\xD1U\xC0\x97ԪM\x88\xA0\xE9\x93̓\x98\x83H\x9F\xAE\xDC&amp;\x86\xE1\xA2gp\xCD\xF4@\xEE\xCD\xF5kU\x9C\x86\xBA6\xEB(\xD8\xF3}Lb\x8A\xBB=֪XM\xADl\xB4\xDEj\xD8T\xF6\xB6\xD6D\xAD;;S,ͬ\x91f\xD1j\xF6`\x9D,Z\xCD\xD2&quot;\x97\xB20Q\xC70l\xC5\xF4&amp;[Dl+\xB6\xAE̬\xA0\x92A0TB&amp;`\xB1\x962~\x8A'+F\x97\xC0R        *\xBD
-dDل\xF2&gt;\xF3!0\xC8`-\x88\xC2ZlEc|m\x9A&quot;e\x82 \xA0\x86Y&lt;R\x88\x83\xC4C(J\xB4m .\x86@aD\x8A\x97\x96+\xBC&gt;\x96\xAB\x88\xA983߈\x88\x84\x95 - $ -Az\xB00ewa2\xEA\xC1\xC3dh\xE7p\xDE        gPS6\xE5\x88&amp;\xAB\x80\xA2\xB9\xFD_\xDC\xFCnh\xAF\x85 \x80B\x8D\x81 [t b\xB1\x8E\x90\x99&amp;DB
-\x86\xD0)$\x872\x86U`D\xB78\x80\xA8\xB5R[\xAD\xC4\xE2\xAAElPD\xC1
-
-\xBE?4Djl+:\xC5&quot;\x8A-M\xC4P\xC6\xDE^Q\xD3\xDE&quot;\x9A\xEB\xD8        \xA2\x8A@\xD5TSH\xD4j\x93\xD6\xC4rPA Qd\xC0\xBA\x82\x80\xA9\xA2\x82\xB1 -HF\xC22\xB0@E\xC0`4 \x80\xE0$\x81 -\xD1 - -@  \xA2b@\x8CƂ\x88m[\xA2 OggS@\xEAlr\x86\x89R\xFF\x91\xFF\xA6\xFF\xA5\xFF\x9B\xFF\xB2\xFF\x8C\xFF\x97\xFF\x93\xFF\xAE\xFF\x97\x9E\xE8\x93΃0\xA2\x82$\xE6ĝ\xF4\xB0#(wN\x90\x90D8 \xF9\xCC:\xFD\xD0\xF0\xD1\xDAt;\x89\xF79\xC4\xCA\xF4w\x8Bi\xB1\xC74U\xAC1\xC4bb8\xC1Β`\xD8h\x82Ѵ        \xD68P\xB1\x8F+\xC1\xD1j\x8Bg\xB9\xA6\x91M\xD5 -\x85\xB2 \xD8\xE1\xC0:T\xB1n)Pb\x82\xA0\xAAXĠ\x8A\x{16522A}D\x8C -R@[#\x8C )\xF7 -ӊV        \x821&quot;2v`ƂĶ\xC0FD\x83YM\xA3j5T\x87$(e0\x8B\x80UEY
-`ŋ\x8FGy\x95)\xB9\x96E\x80޲\xDBERXUxhT4a'N        fv\x84\xC2Z\xD3(p\x8F\x85\xAA\x81\xE9        qp\xD1D8{\xE0u        .\xB4uh\xB7\x8B5q\xC6U!\x98\xC4R\xBD4\xA8\xC4\x8D\x91T\xFCG:\xC0\xB2\xC9ՠ\xF0\x8AF@]L\xA2H\xC0X\x8F\xED,6\x80d\xD0
-@#k1 \xA2\xC56\xAB`\xA8\xAA\xC0B\xF4mSw\x96\xA6\x81XD\xC0\xBA\x80\x80i) \xB0,\xB8Ѐ\xC1\xB5F\xACQ\x83\xC06H\x82\xB0\x90H$ ,\xC0h\xD1\xB0U\xC1\xD8ZP\xD4\xDE޷\xC2C\xC9\xDC\x83\xBD`J6\xC6.\xDF\xB4\xB7\xBC]\xA3\xB5\xFAP5\x9F\xCAў\xEF\xF96\x9D0\x8Bka`Q\x92\xB1\xB5\xB3$X\xA2\xCAVL\x8B\x9D\x83\x8A\x8Ad``\x86\xEAB\x97
-¤\x91\x84!#Ȗa\xA3\xAAi\xD5T\x84!\x83\xA5\xAC\xAD\xAD\xA3n\xA7\xD8\x8Aj1\xDAJQD`\xD0f0\xC1VM\xA4Q\xB0\xE0P^B\x8B0 \xE5ՙ\x91M\xDAt \x89\xF6\x82 -\x8E\xB0Q\xAC\xA3N#j\xA0\xE1\xA2\xE1Q&amp;
- \xD3B\xABv_(\x94\xB9\x81\x94\x9E\x85\xC0\xB6F\x92\xBCxšF \xB4.\xE0`Ŧ\xA5\xB0H\xD482Ry\xBB\x811IT\xD4\xD0i`\xDCQ\xCAB(\xC6!6%3\xC8 \x9E\xA5jj`\x86ڋ\xA8\xA14-_D\xE2g\x9C\xB1}W:\xE0\xF2\xF89\\x9CG\xFAu+M\xFE\b\xDB\xF2\xB0C;Ԓm@\xE06zR\xAF$!q\x85!Q!\xC5p@͋\xE91A\x87\xCD        \xAA\x99@\xB1YH 0\xE8Hc\xBD\xA8)\x900\xFB\x8C        \x89\xAA\xAEWIT\xD6k\xAA&quot;\xD8e0\xD1t\xF4bA\x80\x8C\x88Bjo[Aa\xBD \x82\xC8Zlї`\x83^\xC0\x80\x84Up($\xC5 \x88&quot;\x83\xA0\x91\x90\xD1Q\xA0\x86&quot;\x80\x8C\xDE\xC83%\x82j
-@\xE3\xCFꀂ\xC1ʝ\x93 \xC56;\x9Cd\xF5mU\xAB&gt;\xD5\xDC\xFC\x9E\xCF\xE1\xC0\xB4\xA3\x85\x81\x81\x8Da\xD3P\xB1VbWLK2&amp;\xF65+6\xAA\x89X\x94\xB6\xCC(V\x8D\xD4&amp;\x8BD1P \xB5EQ,\x8AN\x9D\x8B\x9AX\xA1U\x8CEf\xAD2(\xB6\xA8Q\xC5X \x80\x81L*v!c$\xB9%m \xA0WB q״L&quot;ZRB D\x83{mgZ #`V\xA4\xCBݲ\xA4\xA2\x85[\xB5&amp;k\xAF
- &quot;0M\xB0\x8C1N0\xA8\x88P\x8BTUmi\x80\xAAЉ2+)2\xA4\xC0ݢ\x87L\xC0V -\x8C\x86\x8AJ)[ rNF\xAC -KZ\xA8\x89\x83\xAE@\xF4\xD0 \xCC&lt;\xFF\xD4{\xC4op\x9EF\xA7\xCEsg/\xE7w7\x9F]\xFFX\xD3  \xF0&quot;r
-L\xB7j\x96Q\x82co\xE5b\xB49\xCDB+\\xDB -TU\x88\xA1!$Q+@\xD0\x89\x8A\xC0\xC3t\x94 -TA\xA0TE@\xC1D4s        \xA2\x80ZQ\xA4\x9DX\xC2`\x83ED\x8CTtcD\x8C\xF51\xC50U\xD7\xD7$\xC1N\xD72\x87\xE8\xB0@ň\x85` -\xA2\x9A\xB2^1&quot;(ض\x80.D\\xA0\xBBĀA\xF4 \xC0 \x80LD08(h\x80\xC5Ag\xADj\xFE\xB8+Mf0\x8F\xBB\xD4$ 0 wDnkk\xC0\xDEV|\xBDZayʜ~\xF3\x83Řx. , \xC3N\xAD\xA6\x98V\x8B\xBD\xA1BeU\xCD\xF6v\x89\xF6\x8A\xB5\xC1\xD66!\xF5\xF6\xA0\x98\xF6bX-\x80\x80\x8Az {\x9B,3\x97\x9A\xE1:R\x86UEM\xC5j\xAA\xA8b\x81ZW\xC3\xDARQ\xA5(0\xA3\x90\xD0)d&quot;X\xD5        k\xB6&quot;! !idd\xD1B\xCC&quot;\xC2B(\xB4B !'c\xAEԙ;3\xEC\xD2V\xE3f\xA5R4\xF4&quot;Z\xC2g\x87\xE0 \x85\xD0\xD8*\xD0Э\xC30\xB5 S'\xDF;e\xA9\xB0\xBF\xF5\xADs\xFB\xF1jj:\x93\x95(0\xD5\xC0\xB20\xA9\xCAn\x98pA\xD9\xA5 \xB0XQc\x99\x85Z\x83\xDD\xF4DcD.\x93\xFBgä&amp;„r/        \xE8̮:\xD2\xED+sC\xBA[P\xBDQ\xA5\x8E4`8qzL\x81\xE3e\xA1h\x88\x8FX\xD0NXj\xF8\x81\xC0\xA0Et\x80\xE8@DՂ\xC1:D-\x881 \xB60 \x83
-X
-X\xA8        &amp;X7Ath\xA3\xB5\x82\x81`\xA4\xC5\x88\xC1\xB0V5\xE8@-\xB6l-($\xBF|\xB7X\x99\xC6&amp;\x80\xB9\xEE\xC0$\x8A1̆8 ,U@\xD5k\x9E\xF8\xD3ހ:\x86@\xA2O{ -\xEA\x97K؆o\xE7Y\x87jmv\xEE\xE2\xBA% \xF9\x9E*υ\x81\x81\xBD\xA8\x8D\xAD$\xA8\xDAٛ\xA6\x9D\xD5ɨ\x9A\xA8\x9D\xBD\xA8\x86(\x88\x86\x8DV(\x80`D*VKK\xC3mi\xA1\xA9E\xAD\xA9\xA5\xA5Z\xB5ٰ̠\xD6l\xB6\xD0@UJ+J\xE9ZQѱ8E\x8A\xC6&quot;(Z\xA3 -\x83\x85:\xC1\x80\xABQU\x85D\xD0&amp;t\xE2\xD0,\x822\xDDnC&lt;\xC9bp8M1\xA3R\x80\x8Ch\xA0FhD\xA9\x8AY\x89L0\xD9hD] \x9D \x82F\x84M\xC3\xD2&gt;\xB6\x94X\xE0\x8B -\xD0I\xA0Y\xA6pgf\xA7\x96R5\xCED\xE3R\x84\xA9\x88\x95\xA6\xE3H\xE7\xA6\xEC\xA2&quot;\xA0FS\xFEFok\xB8\xCCi\xB2\xDC6DT\x8C\xD2m7M\xA9\x84\xEE\xC1 \x9E\x86\xEA\xE9`E6\x88|R\xBAYL\xD2h -&amp;\xB5B\xD62\x80b\xC0j\xC1\x80 \xB11`\x80\x88\xC1\xE0\xB56z\xD0(*\xA8bi]L\xB5\x86j&quot;\xD6L\xC1\xBA`\xB0\xFA\x80 X\x80\x85HY3\xD5\xD5j\x83hT(- -\xB0\xB0\x86\xA0\x88XG\xACZ\xC0$W5 SD\xB5\x8E@\x8FXE%\xF8W}40VpE\x87\xF1\x80D\xE9L\x80h\xB0*\x80D\xD1~\xC8\xD3\xC9b}:@s\x98ߥ\xA8VA\x89\xDB4Z4}ۈP\x9BNm\x8E6GSL\x8C\x89\xA7\xB8[\x8B\xB5\xA5\xA2j\x82\xA5[S\xED\xED\xA2z״\xB1h\xB0%eUt\x8C+V-i+U\xB4K\xA9&quot;\xB5\xAB\xA8\x88\x83j0\x86\x94\x8A1nĨRWi(\x94e-.\xF2&quot;\x80\xD5\xFB\xFE\xA6#@) -\x84\xE9;\xDC\xC7\xE8Re@R\x9C!        \xF6\xD0L\xAF豈h\xD5 \x82\x91\xA5f\x8C\xE5 \xD6&quot;\xAA\x8A\xA9\x9D\x90\x8CH\x85A4\x82`4c3dC\x8FИ$\x87\x8E\xA0\x89\x8A3Z,5T&lt;\xA4Q\xB2\xA8\xC1\x8Dk\xE1p\xF1L\xE6z\xE1^\xB12\x86Z\xC5 -n\x89\xD6\xCC\xF3\xEE\xAC\xC9n\xE6:\x90 -\xA0\xA6پ\x8D\xB9{c\xD5*H\xE49\x80\xE5\xCC\xDA3 \x99\x99\x92\xAAE1 (Z\xC0Ȣֶ -\xA8\x80\x81\x80LQ4\xD4 ^#X\xD8&quot;\x89\xAD#\xA8\x80^U-b\xD0id\xAF\xE1\xE0\xB6\xB8t\xD4\xDERP\xAB\xD6@\xEBЀ\x8A.\x83\xC0\xDDm\x99\x80 -\x82\xB0b\x8C\xB4`-`0\x80\xD58 ohx\xC8\xB4\x8A\x89cX8D`t\x80U[
-\x9E\xB8\xD3\xC5&gt;\x82\x84w\xA6:@7 a -J!&quot;\xA1m\xFA\xFB\xF4\xF5\xD6Z\xB41\xEBh\xBF\xCDT\xC4bĎ\xC4]\xA2!E\x8CX\xE9jlL\x8Di\x9Ci:;5\x83m\xBC\xB7\xC0\xDE\xD2\xC2\xDE\xD6LX\xA8\x91\xEE\xF6e\x99\xAA\xCA\xDE\xC2ҐrD\xB1
-@\xEA -H\xA1\xEC\xC6e1!0\xEA4\xD4&quot;\x88\x88\xA6Dg@\x9AI5Pv  \xD6&quot;jԚ\x82pO \xC4uA\xB5|X\xABĔ\xE0`i\xA9\xA9\xA0 -\x85\\x87U         \xC5RcPU@\xC6Q\xA6\xE2\xDC\xE4\xFD\xC7ֲZDdg\xBBg\xDC8\x81:\xD8󽣝`\x98r\xB8v\xB5\xAD\xD8W\xD18}\x9Dc2\xE7PR0Ig\xC6S]\x92x\xB2\x8E\xE2\xD1\xB7g \x9FS\x99\x84\x9C\x9D5\xDC\xF5(5\x82h\xC0\xE8\xF4\x85\x8AD u\xEA@ p\xCA(\x80\xC9%H \xAC`5cZ        \xCF֊\xE0\x8A\x80*VU@\xEB\xA06\xA2\xAC\x85\x9A9\xB0\x80\xE1E aZ1D,\xAD!\xA6\xB0X\xB4&quot;\xD8` -\x96\xD1=\xE25&quot;`\xAC\xC3&quot;@\xAD!\xD5\xDCEJ\xCEq0\x81\x80(\x90J00\xC0!=\xA0\x80\x82 X\xB3I^\xB8\xD3\xC5\xBA\xA0\xB0\xA7\xABt@:\xBD\xAA\x91!!d\xEC\xD3\xC7\xCCQmTk\xD3\xEDt\xB2\x8FT\xE2ibq\xB7\xB5
-^\x93\x90\xBD\xC1~(Cl\xB5\xB7\xB3*mۺ-m\xB0\x92V5\xE3H[7\xC6X\xF1\x95,SɼJcg\xD54-M-+f
-\xA2El1 \xFA&quot;E\xC5m\xE4\xD2ZB\x92\xD1.F\xD2
-\x84wi\xA1#\x8A!\x8Cu\x8B\xB4P\xD2 \x90N\xD6(\xB6\xC8\xF4\x80\xB6{\xC8l\xC8\xBC}\xAF\x81\xD0\x{DEBF}F\x88}㳮\xD8vf]M0\xA1\xADaZ\xEBj\xA04Ck\xA8\xDD\x99\xA0z\xEC\x9F\xC7\xBDNa\xB0\xE9bZ:\xCD \xB0Ģl᧫\xC3N&lt;\xA4\xDEv\xB0z\xFCE\xB5\xA0\x99{\x85\x9F\xEFӒc\xB0w\xAA0\x9E\xDAq3\xB5$\xC6 48\x8F6\x80\x90\x91XԂЉС\x80.@] \xA406&gt;\xFA[ \xB6\x82\xD5\xA0K \x82=k\xA9\xB0\x83\x80a,\xEE\x92 \xD6T\xD4\xD3\xA2\xA0\x99 E\xEB \x80h1&quot;\xC0 \x88\xA5\xC6ZQm\xB0r\x85\xF8&amp;V`\xE0`\x98# \xC0h&gt;\xE8-\x82\xC8
-Pl\xCC&lt;
-
-^\xF8\x8B\x9E\x81\x80\x88q(\xDCE/\xC00\x80Fޥ\xAC\xADD&quot; \x82\b\x9B\xED\xACțET\x9B\xA7\xE4\xBB谀&lt;O\xE5ى#q\xCFb\xB0
-\x8A#\xAAJ\xCDj\x80H\x82\xC5ΰ`\x89!\xDB
-R41Y\x81R\xC3\xD2е\x9D\xD1.\x83ۛ\x8A\x9BY\xA3#t.&quot;\xB2h\xD1Z5\xEAj\xAD\x8A:jf͠S\xB5\x9B)\xC40\xA4s\xB41
--lK6\xA5 4\x82&quot;bDa\xBA\xC4A \xA1\x99\xC6H\xC5\x81 &quot;\x9DH
-\x98^CڲshQ\xE1\x81۶iF`-\xCF \x8C^ &amp;\xC6I\x96br\xD4\xC13H\xB00\xA7@f\x9D\x8Af\xE8\xBF\xB3\x98\x917\xE0\xE2\x92T\xE50\xAAdW\xF6^Q\xFD9\xD23\x89*\x9B\xBA \xB6q`\x9Dc\xCF\xD6j\xA0\x8B\x9A\xC4&amp;I,\xBC\x8F,&lt;\xA8\xDEƘ\xCB.\xA2\x8BL`\x85HU \xC42\xB2\xD8Юu\xCC\xC30\xC4AT\x82X \xA2&lt;\x86\xA2\xADE0EF\xAB\xA8\xC005\x971\xA8 \xBA~\xCBA2\xB5r  \x82\xA9\xC2Z\xD5d\xD5\xA1\xF5\xCE\xC0?\x8C\xD7@\xEF\xD5V`\xDFD@\xF7?\xE3\xEA
- O\x9E\xC0\xFE\x80\w\xA4\x8AX`A\xC5;\xB0@\xB0\xD8P\x80\x86\xBE\xAC \x80Cp\x81\xB5`\xB05 \x806٪\x9E\xC8KEr\xB1w\xA90@  \xDC)H\xD3 \xFBt\xD2\xD9\xE6j\xA3\x9D\xAE\xC3\xE6h˝\xEED&lt;Oq7R[\xABŵ\xA8XQ\x8B\xC5V\xAD\xA25\xD8\xC47غ\xC5Ϋd#cKc\x94\xF5\xD1Fꖉ5\xED\xDCV\xB0\xA8쬣\xEC\x8DEOu\xE9\x965Ҫ׌\xF4`)\xC2,Y\x88\x8Am H٭b\xA9Р2A\xAB
- (\xC0\x88\xC5X        \x84\xD6\x81\xD3 \xD3.\xC1X,\x90\xB4\x88'X\]\xC0@ Ԍ)hu*\x84QfR\x800k%)m\xF6\xA1\x9D㢃\xC6~f\x9Eq\xE9w\x8D \x9C\xC4\xCFB\x91O+vI\xB5tW9\xD5 \xAC\xC9F`\x92\xCC\xACm\x99\x8Aqe\x92Ca\xE3\xD0\xD0Shz\xD7j\xECb\x8C\xAD\x8CYD43\xC9
-\xE9\xB6\xC8\xDB]%\xC6\xD2H \xC4\x81\xA4d\xC0J+\x88\xB1F\xD1\x80 -$\xE4}\xC3b쉐h\x85
-YM\x85\xAC\x8AE\xA3b\x83\xAA
-\xC2)X \x94\xA0@TlDEl@\x94\x95ND\xD5!`@ ( ۣ\x86X\xB1\xA6(`\x9A\xD0\x81p \xB1\x81CƘE@#  @\xB1\xA8B10\x80\x80\x8B`c\xDD
-`\x92\x85\x99
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestpdf"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.pdf (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.pdf        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.pdf        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,154 +0,0 @@
</span><del>-%PDF-1.4
-%äüöß
-2 0 obj
-&lt;&lt;/Length 3 0 R/Filter/FlateDecode&gt;&gt;
-stream
-x\x9C%\x8A\xBB
-A\xF3\xF9\x8A\x8Eי} h`v0` f&gt;\xB2/\xF1\xF7]\x91\x86\xA2\xA0\x9A\x83\xE0Co0xX\x99JH\xE8Y„\xED\x81\xCB뿍m/\x9A\x9DJ -\xAD\xE5q\xF6;'\x81D\xF8\xF3\xAA,V\xBBr4QN\xB6O\xCA٢r\xF9\xA1r\xE3n7?\xD3\xD1i\xA1_\xCE\xED&lt;
-endstream
-endobj
-
-3 0 obj
-111
-endobj
-
-5 0 obj
-&lt;&lt;/Length 6 0 R/Filter/FlateDecode/Length1 8348&gt;&gt;
-stream
-x\x9C\xE5X}P\xE7\x99\xDEݕ\xD0         \x84`\x91aW\xAC\x85!        \x901\xC6&amp;F\x80$\x84\xB1\x830\xE0@2\x88\xDB|X\x92\xEDکϴn\x8Ek_z\xE7$\xB7qo2\x9D\xF6\xDA/v\xAF㴹\x9A\xDC$׹\x99&amp;N\xA7\xCD\xF4r\x8D\xDF4s\xFD#\xE1\xEC\xE6\x92\xCEM\xC3=\xEFJ\xE0\x8F:\xED]\xE7\xFE\xBB\x95v\xF7\xF9~\x9F\xE7\xF7&gt;\xFB\xEEG*q0\xD90,xG\xA6b\xB3|\x8E^? y#\x87R\xE2J\xCBS\xD27\xF3\xD8\xEC\xF8T\x85\xE7\xFF\xC0~\x90\xA5\xDFdl\xF9⛏\xE8&gt;\xC5\xFDs\xF1\xD8h\xD9^\xA9
-\xA0 \x8516M\xA0\xA0k\xF9H\xF2\xDFA~\xFD\xC4T\xEAs\xCC\xFB\xC5ȿI\xF9\xFD3#\xB1o\xE8\xFF]\x8F&lt;\xC6\xF3T\xECs\xB3\xAF\xA9\xE7,4q:6w\xD4j\x9EF\xBEǻ&gt;;\x93L\x8D\xC2\xFA\x80RE?\x9B\x88\xCF~&lt;\xF0 ҥ\xA8g\xE8\x98t\xCBFRMy\x86\xE5T\xEA, -\xFC\xDDT\xA7\xA1\x82\xAA\x87\xC0\xB3\xCA\xF1\x9E\x8D\xFD\xF0\xF4\xBC\xF2\xC1\xBD\xC7\xE5+\xBF\xFB\xBF\xCC&quot;\x83\xFF\xB3\xF0 -\xF8.\x9C\x86\xB7a0\xA3@&amp;\xE1 J\xEE\xDE^\x81\x9F\xA0\x94n!\x80\xBF\x85\xF9\xCF\xFB\xB8\x82\xFA\xB4]\xCE\xC0s\x9Fa\x82g\xE02\xFC\xE8\x9EQB0\x8Fa.o\x93Z\xF8gl\x95\xF8\x90h\xE0 \xF0F\xFDe;\x8A\xC9\xC5ØB\x8E\xDD%\xFD&lt;Ϝ\x82\xED\xCC{\xC8&lt;G5\x8C\x9B1«p\x9E a\xE4\xD6yz\xAD\xE2\xA6\xDF \xFA$\xC3cL\xC0!\xA4\x95M\xF5Ч\xFF
-ڕ\xFFĪ\x8E\xC1v\xF8&quot;\xB4\xC0\xFE\xBB&lt;^&amp;/\xB0:\x9C\xBF^x1}E\x91\xB9W\x95YAv/\xF3=\x86\xB9\xFDd\xFE\xC6q\x8F\xAC\x9D9Ͷ\x80Oe\xF2\xFA\xFB\xC3}\xBD=\xBB\xBAC]\xEF\xDCѹ\xBD#\xD8\xF0\xFB\xDAZ[\xBC\xCD\xDBjں\xA5qsæ\xFA\xDA\xB7\xCBY]\xB1\xA1ܾ^*\xB3        Ef\x93ѐ\x9B\xA3\xD7i5Yj\xC72\xAA\xFDR *\xCA\xE5Q\x99+\x97\x82A'\xE5\xA5
-bw        \xA2\xB2\x88\xA2\xC0\xBD6\xB2U\xCC\xC4{-\xBDh9v\x9F\xA57m\xE9]\xB3$F\xB1        \x9A\x9Cբ_\xE5\xD7}\x92x\x85 t\x87\x91&gt;\xED\x93\xFAEyI\xA1w*4W\xAE09\xC8\xD8l\xE8!\xFA\x8B&amp;|\xA2L\xA2\xA2_\x9A\x98\xF7G}oA\xAFk\x93\xDA\xE2:g5,\xE8\xF4Hꑒ+\xA4\xD9R\xB1\x8D(S\xE1߲\xC0\x80&amp;\x87+\xB3vlTu\x87\xFD&gt;\xAB\xCD\xD6\xEF\xAC\xEE\x90s%\x9F\xA2\x826%\xA4\xACn\x93\xB3\x94\x90\xE2$MN\x89 Ջ\xF3O]1ž\xA8#{T\x8D=\x96\xD9\xFAγ\xFE\xF9\xF9'e\x93C\xAE\x94|r\xE5\xD1\xF7\x8A\xB0\xF2\xB8\-\xF9\xFC\xB2\x83F\xEDܵ6N\xE7\x9D!\x89\xAC\xB2%q\xFEc\xC0r\xA4\xA5\xEE\x95\xC42\xB5\xDD\xF81P2\x80\xF0\xCE\xCF$10\x9D\x8F]Y\x99\xDB#\x89Fi~!;{~֏C(\x8C^WV\xBE\xCA*\x9Eꗍ\xD1        \xB2%Sl`W\xA7\x9C\xDF        ˌ= N\xC4P\x82\xFFfɶ\xD9j3\xF5\xAFڄ&gt;K -\x98\xDAl\xB4\xF0SW\xBC\xB0y\xAE;\x9C\xE6E\xD8c\xBD^\xB7\xA3_f\xA2T\xB3\xB8\xAA)裚\xB9U͚{T\xC2\xD9\xEC\xEC        \xCF˜\xBDcT\xF2#Ƨb\xF2\xDC짽t*$\xA3\x9C\xFB[\xABM\x9A\xCF3\x89\x8D\xEE~\xC5VĬ:F'EYU\x8E\xB0\xA0\xD7\xDD\xD8)\xD4eި0\xB9\xBFM\x9F\x96\xAC8@\xB9)Ol\x940 \x8D\xE3\x97\xFC\xD1\xCC\xFF\xD0D\x9D\xD5rБ\x9E\xFAް\xEC\xF5!\xE1\x8De\xE6ȿP\xE3F\x8FX\xA7hҧL\x9F\xEC\x96fe\xB3Ժ6\x9F4-\xFFdOXqɸ\xC9\xE66\xA2#/\xD9\xED\xF7ёE\xFF|ԗN\x81ƒ\xBA\xC3/\x81g\xE5\xC6\xC2F\xD1z\xD9\xA1\xDFG\x8D-m\xD8W\xE5\xFE\xF9\xF0\xE8\x98,D\xAD\xA3x\xA5\x8D\x89a\xABM\xF6\xF6\xE3\xF7K\xE1x?m4D\xA8\xF2gSF\x94\x99\xB6\xDEpg\x8F\xD4\xD9=ޜI$\xAD\xA0\xE18\xBB\xFF\xBE0Rؚ\x83-'k\xEC1\xCCX\xD9~44\xA2@  !\xB56\xE1Qβkp7&quot;\xE0\x8A\x94\xB6jk\x93&amp;VX\xB5\xC64\xE4J\xD1\xF7e\xEC(OPm\xA7\xB6\xE0j45e1N[\xD0j뷥7g5\x83j130zh(\xA8\xC1UkǕe \x86QD\xCB&quot;\xDA\xF3bX\x8AK\xFD҄({CaZ\x85GA9\x86\x82yf\xAEz\xEF\xE1\xEE a\xAAW
-\xA6pX\xEFWnW\xF856x\x9F\xBAcU-\xCEk\xA4Ξy\\xCA̼C\xDA\xC2\xDE\xCD&amp;\xABr\xF5\xD3\xEBY
-\xC4\xF0&quot;\xC6+Z\xB9\x9E\xE7\xBC^z-O\xD0\xCBv^\xEA\x9D\x97z\xC2M\x8A5\xAE ǬG\xE9Xy\xD0I:{[\x9Dո\x98\xB5.H\xE4d\x{1C25DC}\xEC\xBFd\xC4ǩ\x93\xBD\xE1K aڢ\xAD\xFD \xEBQ~I\xF0*R\x86J\xA9\x902&quot;eh\xA4]\xC8h{\xEBK^\x809E\xCB)\x85\xB9B@\x91iVeF\xAE0i\x99qUƠ\x8CK˼\x8A\x8Cn8KE\x881\xAE\xDF~q\x94\xCE\xCF\xE7\xFB'\xE6\xA3\xFD\xB4\xC7\xC1\x82\x88\xE0\x9F\xC8Dچ\xE8H\xDB\xA3ΖuR\xBCU\xD6K\xADT\xDEL\xE5\xCDi\xB9\x9Aʳ\xB03\x88\x858\xAB\x8F\xCE\xFD\xD2\xC7EN\xE5\xB6 -&gt;&lt;\x8C\xAA\xFA\xF0\xE97 \ \xDCM\x97\xB28\xCDR݂Z\xF5N\xD3%\x96AX*VQ\xF1\xA5,\xB5\xF6ӦK\x84\xCA=&amp;\x9B\xC9n3\xD9|\x8C\xB8\xBC\x9E&lt;\xBB&lt;\xA1\xEA\xFBݷ}\xDC\xEB@\x9FB\xED\xDC+\xF8\xBCUH~\xE3]Q\xE5\xE4\xD8sX\x9D\xA6X\xC3h -&lt;Y6\xF0]\xFC0\x9C?\xC3_\xE5\xDF\xE5Wx\xCD-\x9E\x9C\xE1_\xE0\xAF\xF1\xEC,O \xBC\x80z\xF6\xAAn\xF2\xAC̓x2\xC7\x81w\xA3 &lt;yc\x86\xBF\x88\x9E7y.D\xAD\xDD|3Ϯ\xF0\xE4M\x9E\\xE5\xC9\x9E4\xA3\xFBq\x9Eyr\x83^Ű+\xBC*ʓ.\x9E\xD4P\xF2՛\x8A\xB5\x9B\x9FA\xBB\x8B&lt;g\xA4\x9E\xD70\xE0
-ϝ\xE5/\xF0\xCCq\x9ED\xA9e3\xCFܠ\xF1V\x93U\x89\x8A\xFF&gt;\xCC\xF7\x9A2\xD4\x9E\xDC\xC98-ń\x8710\xAD\x87\xAB\xE1\xBD&lt;\xE3}R\xE0        \xA6\xFD.-C\xE6\x99a\xCA\xD5\xF0\xCCV\xCC\xF9ƪ \xE4 \xCF\xD6P\xE6\x8Bgӑ[\xADip \xB0\xA8\xA01\xCB\xCF\xF1\x8C\x90.\x87\xB2\xE7\xB2\xE5\xEC\xC5l.\x9B֞\xD1^\xD5^\xD3rڂ&amp;\xB4D\xAB5\xB3Q[\xC0 C4/\xD5\xE1\xDF\xE3\xF4\xF7\xED&lt;\x98\xD9\xD0-\xA1lCk\xFC\xEFKָ\xC15\xFDНH\xD7\xD6 o\xABo0Iej\x91\xB0C\xA4 -.\xD6AL\x85d\xEB[\x9E\x97\xEC\xD66\xEE\xBCϚ\xD7&gt;4\xB3\xA5\xF6\xADz+\xF7L\xB6\xE6'd\xEB\xF2k?\xE1\xD4*\xF6\x93}\xD6\xFAt_\x86V&gt;`\xECk @\xA4\xBC\xCE?7\x93g\xF3\x89&gt;\xFFT&gt;c\xB1\x96[m_TY\xF4\\xA7)
-z\xBDP -\xD5d\xDB\\xF5\x85\xEA[\xD5l\xF5\x95\x95\xC5\xCBmۃ\xF4\xEC-\xACr\xED$x\xD2B,\xB2\xDB\xD5b\x887\xAA\xBBM\x84\xA2y)\xAFѽD܃Kuǁ\xA1A\xE3un\xE3\x92Rn\xA4\xC0\\xCAx\xEA\xB61 -\xB9\xACT\xE6b\xEA7n\xF2ԕ2%\x84\x94\xE52\xB6\x8D.\x86p͉\xC1\xD2\xD6\xD6mŅ-\x87\x9D\xBF&gt;Z\xFD\xC6\xD5\xCE{\x97\x9F\xD9\xDC]ϓ\xA7M\x8E y;\xAF\xE3\x89\xF1\x87T\x9Dz\xB3\xC1j\xC9\xF1\xFE\xD9\xF7\x8F\xFC\xF6Ê\xA1\xAF\xDAEλw?\xB6c\xC7c\xBB\x95W\xBD+0?Ś\xEB\xE1\xEB\xDE\xF5\xDB\xEB\xE6\xEB\x98\xCF&lt;U\xC0l\xB1l\xB7\xB5\xCC[8\x95\xA7\xC0c\xF7\xB0M\xC5;\x8A?_\xFCT1\xC7\Y\xF9o\xA16'XZ\xA4\xCDڽƂ\xA0ݞ\x80\xB1\x814\xD0\xE2kJm\xC1\xAE\x86ᆋ -\xAC3\xB0N\xAF_\x97\xEFTU\x85l\xCB}\xE5Ly\xB9\xCDh \xA96\xEA}\xFA\xF5\xAC\xA8'z\xBD
-Q\xC1\xDE4.ѓ\xE1i$nb2\xE88`\xFC\xE5\x92\xC7\x{DA2D}q8A\x81ǜ\xCBPT6\xD4{
-K\x89\xA7nS\xFDF\x97\xBA~\xE36\x84\xCCRX\x80\x93N\xB0B5\xF3\xD3 -\xBD\x8F\xB9#o\xC9q\xD6
-{Z\xE3U\xBEG&quot;\x8F\xF8\xAA\=I\xBF\xEF\x8BM\xEE\xAA\xE2Ow_\x95?\xFCh\xD8_E4͓\x9D\x95z\x83Q\xF5\xEB\xEB*\xBA\xFB\xEAZ\xAAKJ˛ڼ\xA3&gt;)?\xFB\xF5\xA9¢\x90ϵ\xB5\xB2T\xAC\xF4&gt;J13#fN\xEE \xF8\x{1C8DD1}٬195\xB9h%\x8BV\xD2l\xED\xB22\xBA\xDCv6d\x8E\x9A\xB39 X#+\xB2\xAC\x86\xE5\xB2CZ\xAF67\xA8\xCD\xD2
-L\xDD@\xBB\xC1\xD3\xECyñTG\xDCC\x83\xA5\xFA\xBA\xC1\xC1Dm͠CUV^o\x92\xEA\x9B        \xA2_ \x99\xCC,\x96\xF6y8:\xFCرx\xF3\xCF\xBE\xB5\xC6\xDE!j\xB7\xB6\x9A\xE3\xCCW\x9C\xDEz\xAB\xF7\xF6\xF1\x96V\x9D\xBAEg6\xE8\xD2\xFD\xEC\xC0C\x9Ej\xE4C        \x9C\xF7\xF6\xC0v\xBD\xEEyݷu\xEC\xFB\xBAOt̗tDǷ\xEB\xCD3\xD3i\x8E\x98\x9F7b\xE6(\xB7\xD5\xFCm\xF3\xCC\xEF\x9B\xD5F\xB3\xB7\xF1\xA1\xA0Y\xE0\xB3\xC04~$\x90\xB3aB\xC2A\xEE,\x8C@\xBB\xDEYT\xCEEV\xE5\xEC5\xE6\x83\xAAW*1\x98\xF9PaAzh^&quot;\x9C\xC8\xC3\xF4\xF25\xBE\xE3&lt;\x90\xB8\xFD3\xBC\x88\xB1\xFBW'6=\x97\xA5 [X@\xAF\xE7 -\xF56򘩴\xC2b\xD9Pj2\x95n\xB0X*JM\xBA\xAF/\xF3'\xEEݻ\xA5h\xF5I7\xEFt\xD2\xD8I\xE7ۛ\xFD7\xECk        \xBE\xF7hVnx\xAB\xB4\xC6 \xA7!\x83\xFB\xD6`l\xD7\xEB\xDF\xD73\xBD\xFDE;\xE1\xECf\xFB\xAB\xF6\xF7\xEC\\xE3\x8B\xF6\x8F쌝VQ\xE4\xA8        :\xEC\xC4l'\x8Bv,\xDBNf\xEDs\xF6\xB3v\x96*/ eA\xC5șo        Bq\xFB€`D$\xDEnj\x8D \x86$C\xB1Q/\x84rK
-\xF0m߼Ke\xA4n\xC2)_\xAA\xABC&lt;\xE8\xA4\xA0\xABB\x82k\x9AQ9`|g\x88. t9p\x90m,\x85\xA2\xC0\x94\xC6bc\xB9\x84K@\x96\xE92\xBEu;{{\xD7oh\xB1'\x96\xF7\xEB\xEE[\xB7\xAD\xA9&gt;\xEF\xF8\xF2\xDEH65\xAE/\xCD/m\xDD\xDBy\xFBE\x85        \xF7 \xAB5z\xEEv\xFE\x8CX/ط9+&gt;ǶC?9\xED-&lt;\xE2'\xBBk\xC7j\x99ZQ\x93 ֆk'jO\xD6r\xB5\xB4T-J\x98&quot;\x8D&gt;XG\x80\\x8D1\xB8\xBEE\xA8(\xE7
-\xE2\xBB[cZ\xA8\x9F\xB0Y\x93+\xD0&quot;\xAB\xBD\xACΥ\x968\xE8 \xDA˼|        .x(\xB3\x97ً\x9E\xCC%\xB9\x81zoqI\xB0\xBE\xBE3\xE8\xF2 \x98\x81\xD1B\xA47B\xBC\xB21B\xC4\x89б\xF3\xFA\xA3\xC1\xB9IEH4B\xBEy5\xC2(b\xEB\xCE\xDE\xE0\x85\xE1&quot;\xA4\x99\x8B|)\xF2b\x84}u?\x8B\xBC\xE1\xA8\xFErK0\xA8\x9C\xEBJ\x9Fn\xE5\xEC\xCD\xC7jmF\x8C\xD4d\xE2\xB9 \xC5\xC1\xC6m%5E\xA4H-չ\xB9*6,٬7\x85\xA0;\xC8^Г\xA0&gt;\xA8o \x85\xAA\x8Cm\xA1\xFCu\x99\xD5_Rp\xF5z\xBDθd*ĥk\xA7\xD718\x8Cw&amp;\xECv\xBD= -:\xE8\x8D\xCAAoc\xC6_ц\xC7EmiP\xF1t8p\xC5+l\xA4wGzl\xE2\xA0k\x9DZ*+ߐ\x85뜭\xCERp\xD7\xD2\xE0b\xEB\xCAW/\x95†B\xB4a\xB1=l\xB9\xEC\xEA\xED\x83(K#C;\x86\x8Aر\xFC^eϺf6\xB8\x89X\x9E\xFDJ\xFD\xE1ŧ\xF6\x9D\xAA\xE2\x9D\xDB\xD6繫\xD6}\xEDkc_X\xB7\xC5S\xAE\xBD.\x9D*\xB3Uڗ\xFF\xB2@\xE2s \xF7l8\xB1\xBBr\xF9\xF2T\xA4\xC0\xBDcS\xC3\xCEZ\x8B\xA5fs\xE2o\xBE\xA1U\x9F0\x95~)\xD5r,\xB6Uڶ\xABƶ\xB5ac\xB1\xDAZ\xD5Pvi\xFB\xDB]G\xBA+\xD5YZv\xC6q\xB6&lt;\xF9\xE9\xF7\xBDy\xEE\x8D\xF5\xFC\xFA\xADUER\xF3n\xA6\xF1\xD8\xF1\xE6\xC1\xA6\xD2Ҧ\xC1\xE6\xE6\xE1f\xFA\x99\x9E\\xF99o\xE1:\xB5\xC1\xCB\xC39\xD0\xD0u\xB7tl\xE6\xA4\xD1\x9EW\xE5C\xE6\x9AI X\xF6\xFB r$_t\xF2\xC5\xD5b~\xBEX]\xCC;\xC5\xFCG\xF9j[~\xBE\xAD\x9A\xA7 *A\xF9FIT\xA5\xAFh\xFD_Æ\xA6\x8FAH\xFB\x91\xBBdߝO&lt;\xCB|\x82\xEC\xFA\xF1\x8CɈ\xD0/˶\xEC\x87G֌\xC8}_\x92\xB4\xCC\xE0\xE3~v\xF64\x84\xD8\xE8e\xC1\x8C\xBB\x83p\xE3f@\xF9\xC2TMv\x90b\xA2\xCCw\xD9:\xF6U\x95FդD\xD2\xC2^\x8B\xE9ۈ\xEB\xD6&gt;\xC5\xEAՍ(\xA3\xDAud\xF7\xDAx޵\xB1        Zz34\x83Oѡ ͂\xF3L\xD3\xDA$2\xB4
-\xB2\xE1\x8BZ -\xF8r\x86΂\xA3\xF0\xD5 \xAD3)\xCC\xD0Z\xC8%\x8E \xAD\xC7׾\xF0\xBAH_\x86΁\xE3\xE4D\x86\xCE\xC3Ќ9-rs\x8C3C\x99\xBF\xCB\xD0 \xE42\xAFgh61\xBF\xC8\xD0\x88\xAC)C\xAB\xA0\x88\xAD\xCD\xD0j(e;2t|Ďgh -Tp\x91 \xAD\x85u܉ \xAD\x87\xCD\xDC :\xE5~\x9E\xA1s`Y\xE5\xC9й\xB0[]\xEB\x9B\x9FLM\x8D\x8F\x8A\xA3\xB1TL\xFC\x96XWS\xD3 \xB6$G\xE2ӣ\xF1\x84\xD86\x93\x98\x9DI\xC4R\x933\xD3.\xB1e\xFF~119&gt;\x91J\x8A\x89x2\x9E8u\xED\x98\xDCO\xEBŞxbrlW|\xFC\xE0\xFEXb-\x80S\xBC\xDF\xE2~~w&lt;\x91\xA4L\xAD\xAB\xA6\xEE\x8E\xEE~\xD3ɤS\x89\xD8h|*\x96\xD8'Ό\x89\xBB0\xE7`,U-vL\x8F\xB80\xA1\xF1\xC9d*\x9E@\xE1\xE4\xB4\xD8\xE7\xEAq\x89\xA1X*&gt;\x9Dcӣb\xEF\x9Ac\xD7\xD8\xD8\xE4H\\x8E\xC4\xA9Ϥ&amp;0ѽ\x93\xC9\xD1\xC9:Z\xD2\xF5 zR\xF1Cqqg,\x95\x8A'g\xA6'R\xA9\xD9-n\xF7\xE1Ç]\xB1\x8C\xF1ںFf\xA6\xDCH\x97:2\x8D''ǧ\xB1n\xD7Djj_2N\xEBIM`\x8DwU&lt;6\x83\xC9'g\xC6R\x87c\x898\xAD?yp\xCF\xDE\xF8HJL͠m\܏uL\xA3kl&lt;\x8FO\xD1J*\x9E\x98\x99\x8F\xCCc##\xF1\xD9&quot;B\xCD?+\xB2\xEB%\xBB\xCDI\xC9_V'a\xF7\xEEG!\xA3 \xE2C&gt;\x86Էp\xAF\x83\xFC5 \xD5IA\x9Bi\xB4\x88\xE3\xC5'B\xCC\xE0yV9Ɣ3\xA8u)\xB6\xFB\xF1'\xA2\x9CƟ@]R\xE1\xE2x\xA6\xBE\x87\x94\xB1\\xB0\xF5{\xC9z\xC9$\x8C\xC1.\xA4\xC6\xE1 Ɗ\xA1\xE4\xF73p\xE2\xFE\xC7b\xFC1\xFDn\x85J\xAEij1\xAF\xAC\xFBA~,\xEA\xA4R'\xC5.\xA5hh\x9ESJ\xEE\xFBP6\x83~\xA2R\xC59\xA8xV#Ձ\xBE#
-n        \xA5^%\xA5\xC4N[N*\xB1\xFBТG\xB1
-)\x9E\x87\x942ڴb\xD5\xFB\x80\xBBp\xC41\xF4\xA7\xA8ݱQb\xD39NG\x9EAz&quot;\x83\xE8^D;\xA1d0\xAA\xF8\xAD֖đ\xFF\xA7УdwHs\xA7&quot;O)3Ou
-7 [\xF0f\xE0\x86\xC3\xCAυ6\xF7F\xC9\xC4u)\xD4Z\xFE\xA9~)8\x82|\\xD1'\x95n\x9C\xCE̷K\x899\x85\xBDէt\xE5\xEA\xFCP,\xD2\xF3\xF8\xE09S\xCE\xF9\xA4\xE2\x91\xC2Lb\xCA\\xAD\xCE1܃H\xC6\xFChęL\j\xB3?3әQc\x98\xF5\xA6\xF3\xB6:\xA7\xEF\xC2\xF8\xB0\x92\xCFE\xACeu\xD4gD\x891\xAB ;zW\xF4\xFFmή?\xD9\xFD\xE9\xA6\xCA\xFDZ\xD9Vl\xE2ۂ6\xFAC\x92\x85w\xD1f\xE5x\x95p\xDE~r\xE36\xB9v\x9B\x88\xB7\xC9\xF1OH\xE82\xF7\xE1\xD9\x99\xDFܪ.޺z\x8B\xE9\xBA9|\xF3\xE2M\xB6\xE6&amp;1\xDC$X2.\x85\x96\xA2K\xB3K\x96\xD4:\xC3$\xDE'\xA6_\xDD\xD8,\xBC\xEB\xB9\xDE\xF7K\xCF;}p\x9D4\x85\xAE\xCF]\x97\xAF\xB3\xF4x\xE0\xBAF\xB8NؾwX\x8B`\kg\xE7\xDF\\xBC\xB1xkQ3\xF7ó?d\xFE\xE1e\xB7`xYx\x99.w]&gt;~\x99\x8D~\x93\xBE)|\x93        =}\x9E9{\x9E\xCE \xE7\xDD\xE7ٿ~\xCE%&lt;\xD7^*&lt;sn\x83p\xE3ܭs -_.\xC7\xFE+r\xFC\xE93O3\xB3O\xCC=q\xF6        v\xEE\xF1\xB3\x8F3]=\xC4$C\x95\xC2̴C\x98n\xAFxOQ_\x96\x87\xEDS\xB3+\xCAK\xA5o\x8F\xBD&quot;\xF6
-\xC3h\xA8\xDA+\x85|O^\x9F
-\x93\xE5\xD0\xD0\xC0
-l3\xDB\xC5ΰgثl\x96fW\xA8T\xE8\xC6\xFDF\xE8V\x881t        ]\xEE.\x96\xBE\xA6\xC4:mh\xFB\xEC\xF6\xB9\xEDlG\xA0R\xB6o \xEDB\xBB\xBB\xFDZ\xFB\xBB\xED7\xDB\xD5\xC3\xED\xE4\xFC.\xAEXo\xA0\xD2\xF0Jm\x81uAk\x9F\xC5S\xD0g\xF4\xFA}\xC4}nÊ\x811\x86 -\xC7 -\xAC\x9A\x81\x99\xB3\xB9B\xCE.\xF4\xF68\x9DW\xB2VvuʚPD&amp;'e{=z\xBBd\xF5I\xFA&quot;\xE1B\xBE\xDC\xFF\xF8\xE9\xD3\xD0Z\xD2)\xD7\xF5\x84\xE5hI\xA7&lt;\x8A\x84\x97sHK,\xD0ڟL\xA6\x94w|\x81F\xF2 \xC1qECɴ\xABjp$I2        \xC9$qP\x9DB\xA2\x92*\xA6\xEAC\xD0s(        \xF4@\xB5ŊR\xC9d\xD1\xD0J\x91`
-endstream
-endobj
-
-6 0 obj
-5227
-endobj
-
-7 0 obj
-&lt;&lt;/Type/FontDescriptor/FontName/BAAAAA+LiberationSerif
-/Flags 4
-/FontBBox[-176 -303 1005 981]/ItalicAngle 0
-/Ascent 891
-/Descent -216
-/CapHeight 981
-/StemV 80
-/FontFile2 5 0 R&gt;&gt;
-endobj
-
-8 0 obj
-&lt;&lt;/Length 260/Filter/FlateDecode&gt;&gt;
-stream
-x\x9C]\x90Mn\xC3 \x85\xF7\x9C\x82e\xBA\x88\xB0\x9D8N%\xCBR\x95&amp;\x92\xFDQ\xDD\xC3\xD8A\x8Aa\xBC\xF0\xED C\xDAJ]\x80\xBEѼ\xC7\xF0\x86\x9D\xDA\xE7V+\xCFޝx:(-\xCCfqh\xA3\xD2$/\xA8T\xC2\xDF+\xBC\xC5\xC4-a\xC1ۭ\xB3\x87\xA9Ճ\xA9k\xC2&gt;Bo\xF6n\xA5\x9B'izx \xEC\xCDIpJ\x8Ft\xF3u\xEAB\xDD-\xD6\xDE`\xEDiF\x9A\x86J\xC2;/ܾ\xF2        \xBA\xB6\xAD m\xE5\xD7m\xB0\xFC        &gt;W \xB4\xC0:O_F\xC2l\xB9\xC7\xF5\xA4β\x86֗KC@\xCB\xBDcr\xF4\x83\xB8r\x94yPfY\xB9oȇ2\xF2\xB9\xDAE\xDE'FM\x994\x8F\x91\x89ϑ\xAB\xC4U\xE4#rq\xC6\xF9\xF7I\xF1'qU?        \xA9X\x9C \xE9p\x9F+R~Wn\x8D\x8D.&lt;\xDFB4}\xC6
-endstream
-endobj
-
-9 0 obj
-&lt;&lt;/Type/Font/Subtype/TrueType/BaseFont/BAAAAA+LiberationSerif
-/FirstChar 0
-/LastChar 8
-/Widths[365 610 443 389 277 277 500 500 250 ]
-/FontDescriptor 7 0 R
-/ToUnicode 8 0 R
-&gt;&gt;
-endobj
-
-10 0 obj
-&lt;&lt;/F1 9 0 R
-&gt;&gt;
-endobj
-
-11 0 obj
-&lt;&lt;/Font 10 0 R
-/ProcSet[/PDF/Text]
-&gt;&gt;
-endobj
-
-1 0 obj
-&lt;&lt;/Type/Page/Parent 4 0 R/Resources 11 0 R/MediaBox[0 0 595 842]/Group&lt;&lt;/S/Transparency/CS/DeviceRGB/I true&gt;&gt;/Contents 2 0 R&gt;&gt;
-endobj
-
-4 0 obj
-&lt;&lt;/Type/Pages
-/Resources 11 0 R
-/MediaBox[ 0 0 595 842 ]
-/Kids[ 1 0 R ]
-/Count 1&gt;&gt;
-endobj
-
-12 0 obj
-&lt;&lt;/Type/Catalog/Pages 4 0 R
-/OpenAction[1 0 R /XYZ null null 0]
-/Lang(en-GB)
-&gt;&gt;
-endobj
-
-13 0 obj
-&lt;&lt;/Author&lt;FEFF004700750073007400610076006F002000530069006C00760061&gt;
-/Creator&lt;FEFF005700720069007400650072&gt;
-/Producer&lt;FEFF00420072004F00660066006900630065002E006F0072006700200033002E0031&gt;
-/CreationDate(D:20091206182924-02'00')&gt;&gt;
-endobj
-
-xref
-0 14
-0000000000 65535 f 
-0000006354 00000 n 
-0000000019 00000 n 
-0000000201 00000 n 
-0000006497 00000 n 
-0000000221 00000 n 
-0000005532 00000 n 
-0000005553 00000 n 
-0000005747 00000 n 
-0000006076 00000 n 
-0000006267 00000 n 
-0000006299 00000 n 
-0000006596 00000 n 
-0000006693 00000 n 
-trailer
-&lt;&lt;/Size 14/Root 12 0 R
-/Info 13 0 R
-/ID [ &lt;67E4C903A63FBAE2E802F4B0DCBA3205&gt;
-&lt;67E4C903A63FBAE2E802F4B0DCBA3205&gt; ]
-/DocChecksum /6CC0AD95AFE8F558C57AA8885C1B6CAC
-&gt;&gt;
-startxref
-6938
-%%EOF
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesttxt"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.txt (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.txt        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.txt        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-test
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Arno Renevier
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;test_utils.h&quot;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-
-int testutils_relative_chdir(const gchar *targetFilename, const gchar *executablePath)
-{
-    /* user can set location of the webkit repository directory if it differs from build directory */
-    const gchar *repoPath = g_getenv(&quot;WEBKITREPODIR&quot;);
-    if (repoPath) {
-        if (g_chdir(repoPath))
-            return -1;
-    } else if (g_chdir(g_path_get_dirname(executablePath)))
-            return -1;
-
-    while (!g_file_test(targetFilename, G_FILE_TEST_EXISTS)) {
-        gchar *pathName;
-        if (g_chdir(&quot;..&quot;))
-            return -1;
-        g_assert(!g_str_equal((pathName = g_get_current_dir()), &quot;/&quot;));
-        g_free(pathName);
-    }
-
-    gchar *dirName = g_path_get_dirname(targetFilename);
-    if (g_chdir(dirName)) {
-        g_free(dirName);
-        return -1;
-    }
-
-    g_free(dirName);
-    return 0;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-#include &lt;glib.h&gt;
-
-int testutils_relative_chdir(const gchar *targetFilename, const gchar *executablePath);
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestapplicationcachec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testapplicationcache.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testapplicationcache.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testapplicationcache.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Lukasz Slachciak
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;glib/gprintf.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static void test_application_cache_maximum_size()
-{
-    unsigned long long maxSize = 8192;
-    webkit_application_cache_set_maximum_size(maxSize);
-
-    // Creating a WebView - make sure that it didn't change anything
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    g_object_unref(webView);
-
-    g_assert(maxSize == webkit_application_cache_get_maximum_size());
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/application_cache/maximum_size&quot;,
-                    test_application_cache_maximum_size);
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatk.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatk.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatk.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,2210 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Igalia S.L.
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;locale.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static const char* centeredContents = &quot;&lt;html&gt;&lt;body&gt;&lt;p style='text-align: center;'&gt;Short line&lt;/p&gt;&lt;p style='text-align: center;'&gt;Long-size line with some foo bar baz content&lt;/p&gt;&lt;p style='text-align: center;'&gt;Short line&lt;/p&gt;&lt;p style='text-align: center;'&gt;This is a multi-line paragraph&lt;br /&gt;where the first line&lt;br /&gt;is the biggest one&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contents = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test. This is the second sentence. And this the third.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithNewlines = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test. \n\nThis\n is the second sentence. And this the third.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithPreformattedText = &quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;\n\t\n\tfirst line\n\tsecond line\n\t\n&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithSpecialChars = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;&amp;laquo;&amp;nbsp;This is a paragraph with &amp;ldquo;special&amp;rdquo; characters inside.&amp;nbsp;&amp;raquo;&lt;/p&gt;&lt;ul&gt;&lt;li style='max-width:100px;'&gt;List item with some text that wraps across different lines.&lt;/li&gt;&lt;li style='max-width:100px;'&gt;&lt;p&gt;List item with some text that wraps across different lines.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInTextarea = &quot;&lt;html&gt;&lt;body&gt;&lt;textarea cols='80'&gt;This is a test. This is the second sentence. And this the third.&lt;/textarea&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInTextInput = &quot;&lt;html&gt;&lt;body&gt;&lt;input type='text' size='80' value='This is a test. This is the second sentence. And this the third.'/&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInParagraphAndBodySimple = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;Hello world.&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInParagraphAndBodyModerate = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;Hello world.&lt;br /&gt;&lt;font color='#00cc00'&gt;This sentence is green.&lt;/font&gt;&lt;br /&gt;This one is not.&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInTable = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;foo&lt;/td&gt;&lt;td&gt;bar&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsInTableWithHeaders = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;foo&lt;/th&gt;&lt;th&gt;bar&lt;/th&gt;&lt;th colspan='2'&gt;baz&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;qux&lt;/th&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th rowspan='2'&gt;quux&lt;/th&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;corge&lt;/th&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithExtraneousWhiteSpaces = &quot;&lt;html&gt;&lt;head&gt;&lt;body&gt;&lt;p&gt;This\n                          paragraph\n                                                      is\n                                                                                                                                                                                                                                                                                                                                                                            borked!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithWrappedLines = &quot;&lt;html&gt;&lt;body&gt;&lt;p style='max-width:150px;'&gt;This is one line wrapped because of the maximum width of its container.&lt;/p&gt;&lt;p&gt;This is another line wrapped&lt;br&gt;because of one forced&lt;br&gt;line break in the middle.&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* contentsWithEmbeddedObjects = &quot;&lt;html&gt;&lt;body&gt;This is one line containing two &lt;img&gt; embedded objects &lt;img&gt; in the middle.&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* comboBoxSelector = &quot;&lt;html&gt;&lt;body&gt;&lt;select&gt;&lt;option selected value='foo'&gt;foo&lt;/option&gt;&lt;option value='bar'&gt;bar&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* embeddedObjects = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Choose: &lt;input value='foo' type='checkbox'/&gt;foo &lt;input value='bar' type='checkbox'/&gt;bar (pick one)&lt;/p&gt;&lt;p&gt;Choose: &lt;select name='foo'&gt;&lt;option&gt;bar&lt;/option&gt;&lt;option&gt;baz&lt;/option&gt;&lt;/select&gt; (pick one)&lt;/p&gt;&lt;p&gt;&lt;input name='foobarbutton' value='foobar' type='button'/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* formWithTextInputs = &quot;&lt;html&gt;&lt;body&gt;&lt;form&gt;&lt;input type='text' name='entry' /&gt;&lt;input type='password' name='passwordEntry' /&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* hypertextAndHyperlinks = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;A paragraph with no links at all&lt;/p&gt;&lt;p&gt;&lt;a href='http://foo.bar.baz/'&gt;A line&lt;/a&gt; with &lt;a href='http://bar.baz.foo/'&gt;a link in the middle&lt;/a&gt; as well as at the beginning and &lt;a href='http://baz.foo.bar/'&gt;at the end&lt;/a&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;List item with a &lt;span&gt;&lt;a href='http://foo.bar.baz/'&gt;link inside a span node&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* layoutAndDataTables = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;Odd&lt;/th&gt;&lt;th&gt;Even&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;foo&lt;/td&gt;&lt;td&gt;bar&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* linksWithInlineImages = &quot;&lt;html&gt;&lt;head&gt;&lt;style&gt;a.http:before {content: url(no-image.png);}&lt;/style&gt;&lt;body&gt;&lt;p&gt;&lt;a class='http' href='foo'&gt;foo&lt;/a&gt; bar baz&lt;/p&gt;&lt;p&gt;foo &lt;a class='http' href='bar'&gt;bar&lt;/a&gt; baz&lt;/p&gt;&lt;p&gt;foo bar &lt;a class='http' href='baz'&gt;baz&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* listsOfItems = &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;text only&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;link only&lt;/a&gt;&lt;/li&gt;&lt;li&gt;text and a &lt;a href='bar'&gt;link&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;text only&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;link only&lt;/a&gt;&lt;/li&gt;&lt;li&gt;text and a &lt;a href='bar'&gt;link&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* textForCaretBrowsing = &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;A text header&lt;/h1&gt;&lt;p&gt;A paragraph &lt;a href='http://foo.bar.baz/'&gt;with a link&lt;/a&gt; in the middle&lt;/p&gt;&lt;ol&gt;&lt;li&gt;A list item&lt;/li&gt;&lt;li&gt;&lt;span style='display:block;'&gt;Block span in a list item&lt;/span&gt;&lt;span&gt;Inline span in a list item&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a list item&lt;/span&gt;&lt;span&gt;Inline span in a link in a list item&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;select&gt;&lt;option selected value='foo'&gt;An option in a combo box&lt;/option&gt;&lt;/select&gt;&lt;input type='text' name='foo' value='foo bar baz' /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;a table cell&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a table cell&lt;/span&gt;&lt;span&gt;Inline span in a link in a table cell&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;span style='display:block;'&gt;Block span in a table cell&lt;/span&gt;&lt;span&gt;Inline span in a table cell&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;h4&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a heading&lt;/span&gt;&lt;span&gt;Inline span in a link in a heading&lt;/span&gt;&lt;/h4&gt;&lt;h4&gt;&lt;span style='display:block;'&gt;Block span in a heading&lt;/span&gt;&lt;span&gt;Inline span in a heading&lt;/span&gt;&lt;/h4&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* textForSelections = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;A paragraph with plain text&lt;/p&gt;&lt;p&gt;A paragraph with &lt;a href='http://webkit.org'&gt;a link&lt;/a&gt; in the middle&lt;/p&gt;&lt;ol&gt;&lt;li&gt;A list item&lt;/li&gt;&lt;/ol&gt;&lt;select&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* textWithAttributes = &quot;&lt;html&gt;&lt;head&gt;&lt;style&gt;.st1 {font-family: monospace; color:rgb(120,121,122);} .st2 {text-decoration:underline; background-color:rgb(80,81,82);}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;p style=\&quot;font-size:14; text-align:right;\&quot;&gt;This is the &lt;i&gt;first&lt;/i&gt;&lt;b&gt; sentence of this text.&lt;/b&gt;&lt;/p&gt;&lt;p class=\&quot;st1\&quot;&gt;This sentence should have an style applied &lt;span class=\&quot;st2\&quot;&gt;and this part should have another one&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;x&lt;sub&gt;1&lt;/sub&gt;&lt;sup&gt;2&lt;/sup&gt;=x&lt;sub&gt;2&lt;/sub&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;&lt;p style=\&quot;text-align:center;\&quot;&gt;This sentence is the &lt;strike&gt;last&lt;/strike&gt; one.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static AtkObject* getWebAreaObject(WebKitWebView* webView)
-{
-    /* Manually spin the main context to make sure the accessible
-       objects are properly created before continuing. */
-    while (g_main_context_pending(0))
-        g_main_context_iteration(0, TRUE);
-
-    AtkObject* rootObject = gtk_widget_get_accessible(GTK_WIDGET(webView));
-    if (!rootObject)
-        return NULL;
-
-    AtkObject* webAreaObject = atk_object_ref_accessible_child(rootObject, 0);
-    if (!webAreaObject)
-        return NULL;
-
-    /* We don't need the extra ref here. */
-    g_object_unref(webAreaObject);
-
-    return webAreaObject;
-}
-
-typedef gchar* (*AtkGetTextFunction) (AtkText*, gint, AtkTextBoundary, gint*, gint*);
-
-static void testGetTextFunction(AtkText* textObject, AtkGetTextFunction fn, AtkTextBoundary boundary, gint offset, const char* textResult, gint startOffsetResult, gint endOffsetResult)
-{
-    gint startOffset;
-    gint endOffset;
-    char* text = fn(textObject, offset, boundary, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpstr(text, ==, textResult);
-    g_assert_cmpint(startOffset, ==, startOffsetResult);
-    g_assert_cmpint(endOffset, ==, endOffsetResult);
-    g_free(text);
-}
-
-static void runGetTextTests(AtkText* textObject)
-{
-    char* text = atk_text_get_text(textObject, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is a test. This is the second sentence. And this the third.&quot;);
-    g_free(text);
-
-    /* ATK_TEXT_BOUNDARY_CHAR */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR,
-                        0, &quot;T&quot;, 0, 1);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR,
-                        0, &quot;h&quot;, 1, 2);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR,
-                        0, &quot;&quot;, 0, 0);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR,
-                        1, &quot;T&quot;, 0, 1);
-
-    /* ATK_TEXT_BOUNDARY_WORD_START */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        0, &quot;This &quot;, 0, 5);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        4, &quot;This &quot;, 0, 5);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        10, &quot;test. &quot;, 10, 16);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        58, &quot;third.&quot;, 58, 64);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        64, &quot;third.&quot;, 58, 64);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        0, &quot;&quot;, 0, 0);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        5, &quot;This &quot;, 0, 5);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        7, &quot;This &quot;, 0, 5);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        64, &quot;the &quot;, 54, 58);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        0, &quot;is &quot;, 5, 8);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        4, &quot;is &quot;, 5, 8);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        3, &quot;is &quot;, 5, 8);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
-                        64, &quot;&quot;, 64, 64);
-
-    /* ATK_TEXT_BOUNDARY_WORD_END */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        0, &quot;This&quot;, 0, 4);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        4, &quot; is&quot;, 4, 7);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        5, &quot; is&quot;, 4, 7);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        9, &quot; test&quot;, 9, 14);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        58, &quot; third&quot;, 57, 63);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        64, &quot;.&quot;, 63, 64);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        0, &quot;&quot;, 0, 0);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        5, &quot;This&quot;, 0, 4);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        4, &quot;This&quot;, 0, 4);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        7, &quot; is&quot;, 4, 7);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        64, &quot; third&quot;, 57, 63);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        0, &quot; is&quot;, 4, 7);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        5, &quot; a&quot;, 7, 9);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        4, &quot; a&quot;, 7, 9);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
-                        64, &quot;&quot;, 64, 64);
-
-    /* ATK_TEXT_BOUNDARY_SENTENCE_START */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        0, &quot;This is a test. &quot;, 0, 16);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        15, &quot;This is a test. &quot;, 0, 16);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        0, &quot;This is the second sentence. &quot;, 16, 45);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        15, &quot;This is the second sentence. &quot;, 16, 45);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        16, &quot;This is a test. &quot;, 0, 16);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        44, &quot;This is a test. &quot;, 0, 16);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
-                        15, &quot;&quot;, 0, 0);
-
-    /* ATK_TEXT_BOUNDARY_SENTENCE_END */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        0, &quot;This is a test.&quot;, 0, 15);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        15, &quot; This is the second sentence.&quot;, 15, 44);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        16, &quot; This is the second sentence.&quot;, 15, 44);
-
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        17, &quot; This is the second sentence.&quot;, 15, 44);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        0, &quot; This is the second sentence.&quot;, 15, 44);
-
-    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        15, &quot; And this the third.&quot;, 44, 64);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        16, &quot;This is a test.&quot;, 0, 15);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        15, &quot;This is a test.&quot;, 0, 15);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        14, &quot;&quot;, 0, 0);
-
-    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
-                        44, &quot; This is the second sentence.&quot;, 15, 44);
-
-    /* It's tricky to test these properly right now, since our a11y
-       implementation splits different lines in different a11y items. */
-    /* ATK_TEXT_BOUNDARY_LINE_START */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START,
-                        0, &quot;This is a test. This is the second sentence. And this the third.&quot;, 0, 64);
-
-    /* ATK_TEXT_BOUNDARY_LINE_END */
-    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END,
-                        0, &quot;This is a test. This is the second sentence. And this the third.&quot;, 0, 64);
-
-    /* For objects implementing AtkEditableText, try to change the
-       exposed text and retrieve it again as a full line.
-       (see https://bugs.webkit.org/show_bug.cgi?id=72830) */
-    if (ATK_IS_EDITABLE_TEXT(textObject)) {
-        atk_editable_text_set_text_contents(ATK_EDITABLE_TEXT(textObject), &quot;foo bar baz&quot;);
-        testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, &quot;foo bar baz&quot;, 0, 11);
-        testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;foo bar baz&quot;, 0, 11);
-    }
-}
-
-static gchar* textCaretMovedResult = 0;
-
-static void textCaretMovedCallback(AtkText* text, gint pos, gpointer data)
-{
-    g_assert(ATK_IS_TEXT(text));
-
-    g_free(textCaretMovedResult);
-    AtkRole role = atk_object_get_role(ATK_OBJECT(text));
-    textCaretMovedResult = g_strdup_printf(&quot;|%s|%d|&quot;, atk_role_get_name(role), pos);
-}
-
-static void testWebkitAtkCaretOffsets()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, textForCaretBrowsing, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* header = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_TEXT(header));
-    g_signal_connect(header, &quot;text-caret-moved&quot;, G_CALLBACK(textCaretMovedCallback), 0);
-
-    gchar* text = atk_text_get_text(ATK_TEXT(header), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;A text header&quot;);
-    g_free (text);
-
-    /* It should be possible to place the caret inside a header. */
-    gboolean result = atk_text_set_caret_offset(ATK_TEXT(header), 5);
-    g_assert_cmpint(result, ==, TRUE);
-    gint offset = atk_text_get_caret_offset(ATK_TEXT(header));
-    g_assert_cmpint(offset, ==, 5);
-    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|heading|5|&quot;);
-
-    AtkObject* paragraph = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_IS_TEXT(paragraph));
-    g_signal_connect(paragraph, &quot;text-caret-moved&quot;, G_CALLBACK(textCaretMovedCallback), 0);
-
-    text = atk_text_get_text(ATK_TEXT(paragraph), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;A paragraph with a link in the middle&quot;);
-    g_free (text);
-
-    /* It should be possible to place the caret inside a paragraph and a link. */
-    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 5);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
-    g_assert_cmpint(offset, ==, 5);
-    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|5|&quot;);
-
-    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 20);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
-    g_assert_cmpint(offset, ==, 20);
-    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|20|&quot;);
-
-    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 30);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
-    g_assert_cmpint(offset, ==, 30);
-    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|30|&quot;);
-
-    AtkObject* link = atk_object_ref_accessible_child(paragraph, 0);
-    g_assert(ATK_IS_TEXT(link));
-    text = atk_text_get_text(ATK_TEXT(link), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;with a link&quot;);
-    g_free (text);
-
-    result = atk_text_set_caret_offset(ATK_TEXT(link), 5);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(link));
-    g_assert_cmpint(offset, ==, 5);
-    /* Positions inside links are reported relative to the paragraph. */
-    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|17|&quot;);
-
-    AtkObject* list = atk_object_ref_accessible_child(object, 2);
-    g_assert(ATK_OBJECT(list));
-    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
-    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 3);
-
-    AtkObject* listItem = atk_object_ref_accessible_child(list, 0);
-    g_assert(ATK_IS_TEXT(listItem));
-    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;1. A list item&quot;);
-    g_free (text);
-
-    listItem = atk_object_ref_accessible_child(list, 1);
-    g_assert(ATK_IS_TEXT(listItem));
-    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;2. Block span in a list item\nInline span in a list item&quot;);
-    g_free (text);
-
-    listItem = atk_object_ref_accessible_child(list, 2);
-    g_assert(ATK_IS_TEXT(listItem));
-    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;3. Block span in a link in a list item\nInline span in a link in a list item&quot;);
-    g_free (text);
-
-    /* It's not possible to place the caret inside an item's marker. */
-    result = atk_text_set_caret_offset(ATK_TEXT(listItem), 1);
-    g_assert_cmpint(result, ==, FALSE);
-
-    /* It should be possible to place the caret inside an item's text. */
-    result = atk_text_set_caret_offset(ATK_TEXT(listItem), 5);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(listItem));
-    g_assert_cmpint(offset, ==, 5);
-
-    AtkObject* panel = atk_object_ref_accessible_child(object, 3);
-    g_assert(ATK_IS_OBJECT(panel));
-    g_assert(atk_object_get_role(panel) == ATK_ROLE_PANEL);
-
-    AtkObject* comboBox = atk_object_ref_accessible_child(panel, 0);
-    g_assert(ATK_IS_OBJECT(comboBox));
-    g_assert(!ATK_IS_TEXT(comboBox));
-    g_assert(atk_object_get_role(comboBox) == ATK_ROLE_COMBO_BOX);
-
-    AtkObject* menuPopup = atk_object_ref_accessible_child(comboBox, 0);
-    g_assert(ATK_IS_OBJECT(menuPopup));
-    g_assert(!ATK_IS_TEXT(menuPopup));
-    g_assert(atk_object_get_role(menuPopup) == ATK_ROLE_MENU);
-
-    AtkObject* comboBoxOption = atk_object_ref_accessible_child(menuPopup, 0);
-    g_assert(ATK_IS_OBJECT(comboBoxOption));
-    g_assert(atk_object_get_role(comboBoxOption) == ATK_ROLE_MENU_ITEM);
-    g_assert(ATK_IS_TEXT(comboBoxOption));
-    text = atk_text_get_text(ATK_TEXT(comboBoxOption), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;An option in a combo box&quot;);
-    g_free(text);
-
-    /* It's not possible to place the caret inside an option for a combobox. */
-    result = atk_text_set_caret_offset(ATK_TEXT(comboBoxOption), 1);
-    g_assert_cmpint(result, ==, FALSE);
-
-    AtkObject* textEntry = atk_object_ref_accessible_child(panel, 1);
-    g_assert(ATK_IS_OBJECT(textEntry));
-    g_assert(atk_object_get_role(textEntry) == ATK_ROLE_ENTRY);
-    g_assert(ATK_IS_TEXT(textEntry));
-    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
-    g_free(text);
-
-    result = atk_text_set_caret_offset(ATK_TEXT(textEntry), 5);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(textEntry));
-    g_assert_cmpint(offset, ==, 5);
-
-    AtkObject* table = atk_object_ref_accessible_child(object, 4);
-    g_assert(ATK_IS_OBJECT(table));
-    g_assert(!ATK_IS_TEXT(table));
-    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
-    g_assert_cmpint(atk_object_get_n_accessible_children(table), ==, 4);
-
-    AtkObject* tableCell = atk_object_ref_accessible_child(table, 0);
-    g_assert(ATK_IS_TEXT(tableCell));
-    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
-    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;a table cell&quot;);
-    g_free(text);
-
-    result = atk_text_set_caret_offset(ATK_TEXT(tableCell), 2);
-    g_assert_cmpint(result, ==, TRUE);
-    offset = atk_text_get_caret_offset(ATK_TEXT(tableCell));
-    g_assert_cmpint(offset, ==, 2);
-
-    /* Even empty table cells should implement AtkText, but report an empty string */
-    tableCell = atk_object_ref_accessible_child(table, 1);
-    g_assert(ATK_IS_TEXT(tableCell));
-    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
-    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;&quot;);
-    g_free(text);
-
-    tableCell = atk_object_ref_accessible_child(table, 2);
-    g_assert(ATK_IS_TEXT(tableCell));
-    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
-    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;Block span in a link in a table cell\nInline span in a link in a table cell&quot;);
-    g_free(text);
-
-    tableCell = atk_object_ref_accessible_child(table, 3);
-    g_assert(ATK_IS_TEXT(tableCell));
-    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
-    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;Block span in a table cell\nInline span in a table cell&quot;);
-    g_free(text);
-
-    header = atk_object_ref_accessible_child(object, 5);
-    g_assert(ATK_IS_TEXT(header));
-    g_assert(atk_object_get_role(header) == ATK_ROLE_HEADING);
-    text = atk_text_get_text(ATK_TEXT(header), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;Block span in a link in a heading\nInline span in a link in a heading&quot;);
-    g_free(text);
-
-    header = atk_object_ref_accessible_child(object, 6);
-    g_assert(ATK_IS_TEXT(header));
-    g_assert(atk_object_get_role(header) == ATK_ROLE_HEADING);
-    text = atk_text_get_text(ATK_TEXT(header), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;Block span in a heading\nInline span in a heading&quot;);
-    g_free(text);
-
-    g_free(textCaretMovedResult);
-
-    g_object_unref(header);
-    g_object_unref(paragraph);
-    g_object_unref(link);
-    g_object_unref(list);
-    g_object_unref(listItem);
-    g_object_unref(panel);
-    g_object_unref(comboBox);
-    g_object_unref(menuPopup);
-    g_object_unref(comboBoxOption);
-    g_object_unref(textEntry);
-    g_object_unref(table);
-    g_object_unref(tableCell);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithExtraneousWhiteSpaces, 0, 0, 0);
-
-    /* Enable caret browsing. */
-    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
-    g_object_set(G_OBJECT(settings), &quot;enable-caret-browsing&quot;, TRUE, NULL);
-    webkit_web_view_set_settings(webView, settings);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    AtkText* textObject = ATK_TEXT(object);
-    g_assert(ATK_IS_TEXT(textObject));
-
-    gchar* text = atk_text_get_text(textObject, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This paragraph is borked!&quot;);
-    g_free(text);
-
-    gint characterCount = atk_text_get_character_count(textObject);
-    g_assert_cmpint(characterCount, ==, 25);
-
-    gboolean result = atk_text_set_caret_offset(textObject, characterCount - 1);
-    g_assert_cmpint(result, ==, TRUE);
-
-    gint caretOffset = atk_text_get_caret_offset(textObject);
-    g_assert_cmpint(caretOffset, ==, characterCount - 1);
-
-    result = atk_text_set_caret_offset(textObject, characterCount);
-    g_assert_cmpint(result, ==, TRUE);
-
-    caretOffset = atk_text_get_caret_offset(textObject);
-    g_assert_cmpint(caretOffset, ==, characterCount);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkComboBox()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, comboBoxSelector, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* formObject = atk_object_ref_accessible_child(object, 0);
-    g_assert(formObject);
-
-    AtkObject* comboBox = atk_object_ref_accessible_child(formObject, 0);
-    g_assert(ATK_IS_OBJECT(comboBox));
-
-    AtkObject* menuPopup = atk_object_ref_accessible_child(comboBox, 0);
-    g_assert(ATK_IS_OBJECT(menuPopup));
-
-    AtkObject* item1 = atk_object_ref_accessible_child(menuPopup, 0);
-    g_assert(ATK_IS_OBJECT(item1));
-
-    AtkObject* item2 = atk_object_ref_accessible_child(menuPopup, 1);
-    g_assert(ATK_IS_OBJECT(item2));
-
-    /* Check roles. */
-    g_assert(atk_object_get_role(comboBox) == ATK_ROLE_COMBO_BOX);
-    g_assert(atk_object_get_role(menuPopup) == ATK_ROLE_MENU);
-    g_assert(atk_object_get_role(item1) == ATK_ROLE_MENU_ITEM);
-    g_assert(atk_object_get_role(item2) == ATK_ROLE_MENU_ITEM);
-
-    /* Check the implementation of the AtkSelection interface. */
-    g_assert(ATK_IS_SELECTION(comboBox));
-    AtkSelection* atkSelection = ATK_SELECTION(comboBox);
-    g_assert_cmpint(atk_selection_get_selection_count(atkSelection), ==, 1);
-    g_assert(atk_selection_is_child_selected(atkSelection, 0));
-    g_assert(!atk_selection_is_child_selected(atkSelection, 1));
-    AtkObject* selectedItem = atk_selection_ref_selection(atkSelection, 0);
-    g_assert(selectedItem == item1);
-    g_object_unref(selectedItem);
-
-    /* Check that the menu popup has 0 links and doesn't crash from checking. */
-    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(menuPopup));
-    g_assert_cmpint(nLinks, ==, 0);
-
-    /* Check the implementations of the AtkAction interface. */
-    g_assert(ATK_IS_ACTION(comboBox));
-    AtkAction* atkAction = ATK_ACTION(comboBox);
-    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
-    g_assert(atk_action_do_action(atkAction, 0));
-
-    g_assert(ATK_IS_ACTION(menuPopup));
-    atkAction = ATK_ACTION(menuPopup);
-    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
-    g_assert(atk_action_do_action(atkAction, 0));
-
-    g_assert(ATK_IS_ACTION(item1));
-    atkAction = ATK_ACTION(item1);
-    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
-    g_assert(atk_action_do_action(atkAction, 0));
-
-    g_assert(ATK_IS_ACTION(item2));
-    atkAction = ATK_ACTION(item2);
-    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
-    g_assert(atk_action_do_action(atkAction, 0));
-
-    /* After selecting the second item, selection should have changed. */
-    g_assert_cmpint(atk_selection_get_selection_count(atkSelection), ==, 1);
-    g_assert(!atk_selection_is_child_selected(atkSelection, 0));
-    g_assert(atk_selection_is_child_selected(atkSelection, 1));
-    selectedItem = atk_selection_ref_selection(atkSelection, 0);
-    g_assert(selectedItem == item2);
-    g_object_unref(selectedItem);
-
-    /* Check the implementation of the AtkText interface. */
-    g_assert(ATK_IS_TEXT(item1));
-    AtkText* atkText = ATK_TEXT(item1);
-    char *text = atk_text_get_text(atkText, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;foo&quot;);
-    g_free(text);
-    text = atk_text_get_text(atkText, 0, 2);
-    g_assert_cmpstr(text, ==, &quot;fo&quot;);
-    g_free(text);
-
-    g_assert(ATK_IS_TEXT(item2));
-    atkText = ATK_TEXT(item2);
-    text = atk_text_get_text(atkText, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;bar&quot;);
-    g_free(text);
-    text = atk_text_get_text(atkText, 1, 3);
-    g_assert_cmpstr(text, ==, &quot;ar&quot;);
-    g_free(text);
-
-    g_object_unref(formObject);
-    g_object_unref(comboBox);
-    g_object_unref(menuPopup);
-    g_object_unref(item1);
-    g_object_unref(item2);
-    g_object_unref(webView);
-}
-
-static gchar* loadingEventsResult = 0;
-
-static void updateLoadingEventsResult(const gchar* signalName)
-{
-    g_assert(signalName);
-
-    gchar* previousResult = loadingEventsResult;
-    loadingEventsResult = g_strdup_printf(&quot;%s|%s&quot;, previousResult, signalName);
-    g_free(previousResult);
-}
-
-static gboolean documentLoadingEventCallback(GSignalInvocationHint *signalHint, guint numParamValues, const GValue *paramValues, gpointer data)
-{
-    // At least we should receive the instance emitting the signal.
-    if (numParamValues &lt; 1)
-        return TRUE;
-
-    GSignalQuery signal_query;
-    g_signal_query(signalHint-&gt;signal_id, &amp;signal_query);
-
-    updateLoadingEventsResult(signal_query.signal_name);
-    return TRUE;
-}
-
-static void testWebkitAtkDocumentLoadingEvents()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-
-    /* Connect globally to see those events during a future load. */
-    guint loadCompleteListenerId = atk_add_global_event_listener(documentLoadingEventCallback, &quot;ATK:AtkDocument:load-complete&quot;);
-
-    /* Do the load, so we can see those events happening. */
-    loadingEventsResult = g_strdup(&quot;&quot;);
-    webkit_web_view_load_string(webView, contents, 0, 0, 0);
-
-    /* Trigger the creation of the full accessibility hierarchy by
-       asking for the webArea object, so we can listen to events. */
-    getWebAreaObject(webView);
-
-    atk_remove_global_event_listener(loadCompleteListenerId);
-
-    g_assert_cmpstr(loadingEventsResult, ==, &quot;|load-complete&quot;);
-
-    g_free(loadingEventsResult);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkEmbeddedObjects()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, embeddedObjects, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
-    g_assert(ATK_IS_TEXT(paragraph1));
-    g_assert(ATK_IS_HYPERTEXT(paragraph1));
-
-    const gchar* expectedText = &quot;Choose: \357\277\274foo \357\277\274bar (pick one)&quot;;
-    char* text = atk_text_get_text(paragraph1, 0, -1);
-    g_assert_cmpstr(text, ==, expectedText);
-    g_free(text);
-
-    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph1));
-    g_assert_cmpint(nLinks, ==, 2);
-
-    AtkHyperlink* hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph1), 0);
-    g_assert(ATK_HYPERLINK(hLink));
-    AtkObject* hLinkObject = atk_hyperlink_get_object(hLink, 0);
-    g_assert(ATK_OBJECT(hLinkObject));
-    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_CHECK_BOX);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
-
-    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
-    g_assert(ATK_IS_TEXT(paragraph2));
-    g_assert(ATK_IS_HYPERTEXT(paragraph2));
-
-    expectedText = &quot;Choose: \357\277\274 (pick one)&quot;;
-    text = atk_text_get_text(paragraph2, 0, -1);
-    g_assert_cmpstr(text, ==, expectedText);
-    g_free(text);
-
-    nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph2));
-    g_assert_cmpint(nLinks, ==, 1);
-
-    hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 0);
-    g_assert(ATK_HYPERLINK(hLink));
-    hLinkObject = atk_hyperlink_get_object(hLink, 0);
-    g_assert(ATK_OBJECT(hLinkObject));
-    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_COMBO_BOX);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
-
-    AtkText* paragraph3 = ATK_TEXT(atk_object_ref_accessible_child(object, 2));
-    g_assert(ATK_IS_TEXT(paragraph3));
-    g_assert(ATK_IS_HYPERTEXT(paragraph3));
-
-    expectedText = &quot;\357\277\274&quot;;
-    text = atk_text_get_text(paragraph3, 0, -1);
-    g_assert_cmpstr(text, ==, expectedText);
-    g_free(text);
-
-    nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph3));
-    g_assert_cmpint(nLinks, ==, 1);
-
-    hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph3), 0);
-    g_assert(ATK_HYPERLINK(hLink));
-    hLinkObject = atk_hyperlink_get_object(hLink, 0);
-    g_assert(ATK_OBJECT(hLinkObject));
-    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_PUSH_BUTTON);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 0);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 1);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
-
-    g_object_unref(paragraph1);
-    g_object_unref(paragraph2);
-    g_object_unref(paragraph3);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffset()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contents, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    AtkText* textObject = ATK_TEXT(object);
-    g_assert(ATK_IS_TEXT(textObject));
-
-    runGetTextTests(textObject);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetNewlines()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithNewlines, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    AtkText* textObject = ATK_TEXT(object);
-    g_assert(ATK_IS_TEXT(textObject));
-
-    runGetTextTests(textObject);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetTextarea()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInTextarea, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    AtkText* textObject = ATK_TEXT(object);
-    g_assert(ATK_IS_TEXT(textObject));
-
-    runGetTextTests(textObject);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetTextInput()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInTextInput, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    AtkText* textObject = ATK_TEXT(object);
-    g_assert(ATK_IS_TEXT(textObject));
-
-    runGetTextTests(textObject);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetWithPreformattedText()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithPreformattedText, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* preformattedText = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_OBJECT(preformattedText));
-    g_assert(atk_object_get_role(preformattedText) == ATK_ROLE_PANEL);
-    g_assert(ATK_IS_TEXT(preformattedText));
-    char* text = atk_text_get_text(ATK_TEXT(preformattedText), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\t\n\tfirst line\n\tsecond line\n\t\n&quot;);
-    g_free(text);
-
-    /* Try retrieving all the lines indicating the position of the offsets at the beginning of each of them. */
-    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, &quot;\t\n&quot;, 0, 2);
-    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 2, &quot;\tfirst line\n&quot;, 2, 14);
-    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 14, &quot;\tsecond line\n&quot;, 14, 27);
-
-    g_object_unref(preformattedText);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetWithSpecialCharacters()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithSpecialChars, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* paragraph = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_TEXT(paragraph));
-
-    gchar* expectedText = g_strdup(&quot;\302\253\302\240This is a paragraph with \342\200\234special\342\200\235 characters inside.\302\240\302\273&quot;);
-    char* text = atk_text_get_text(ATK_TEXT(paragraph), 0, -1);
-    g_assert_cmpstr(text, ==, expectedText);
-    g_free(text);
-
-    /* Check that getting the text with ATK_TEXT_BOUNDARY_LINE_START
-       and ATK_TEXT_BOUNDARY_LINE_END does not crash because of not
-       properly handling characters inside the UTF-8 string. */
-    testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, expectedText, 0, 57);
-    testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, expectedText, 0, 57);
-    g_free(expectedText);
-
-    AtkObject* list = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_OBJECT(list));
-
-    AtkText* listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 0));
-    g_assert(ATK_IS_TEXT(listItem));
-
-    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\342\200\242 List item with some text that wraps across different lines.&quot;);
-    g_free(text);
-
-    /* Check that getting the text with ATK_TEXT_BOUNDARY_LINE_START
-       and ATK_TEXT_BOUNDARY_LINE_END for line items with bullets
-       (special character) and wrapped text always return the right
-       piece of text for each line. */
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, &quot;\342\200\242 List item &quot;, 0, 12);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, &quot;with some &quot;, 12, 22);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;\342\200\242 List item&quot;, 0, 11);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, &quot; with some&quot;, 11, 21);
-
-    g_object_unref(listItem);
-
-    listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 1));
-    g_assert(ATK_IS_TEXT(listItem));
-
-    /* Check that placing the same text in a paragraph doesn't break things. */
-    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\342\200\242 List item with some text that wraps across different lines.&quot;);
-    g_free(text);
-
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, &quot;\342\200\242 List item &quot;, 0, 12);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, &quot;with some &quot;, 12, 22);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;\342\200\242 List item&quot;, 0, 11);
-    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, &quot; with some&quot;, 11, 21);
-
-    g_object_unref(list);
-    g_object_unref(listItem);
-    g_object_unref(paragraph);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetWithWrappedLines()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithWrappedLines, 0, 0, 0);
-
-    /* Enable caret browsing. */
-    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
-    g_object_set(settings, &quot;enable-caret-browsing&quot;, TRUE, NULL);
-    webkit_web_view_set_settings(webView, settings);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    /* Check the paragraph with the text wrapped because of max-width. */
-    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
-    g_assert(ATK_IS_TEXT(paragraph1));
-
-    gchar* text = atk_text_get_text(paragraph1, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is one line wrapped because of the maximum width of its container.&quot;);
-    g_free(text);
-
-    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot;e&quot;, 15, 16);
-    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot; &quot;, 16, 17);
-    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot;w&quot;, 17, 18);
-
-    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;one &quot;, 8, 12);
-    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;line &quot;, 12, 17);
-    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;wrapped &quot;, 17, 25);
-
-    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; line&quot;, 11, 16);
-    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; wrapped&quot;, 16, 24);
-    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; because&quot;, 24, 32);
-
-    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;This is one line &quot;, 0, 17);
-    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;wrapped because &quot;, 17, 33);
-    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;of the maximum &quot;, 33, 48);
-
-    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot;This is one line&quot;, 0, 16);
-    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot; wrapped because&quot;, 16, 32);
-    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot; of the maximum&quot;, 32, 47);
-
-    g_object_unref(paragraph1);
-
-    /* Check the paragraph with the text wrapped because of &lt;br&gt; elements. */
-    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
-    g_assert(ATK_IS_TEXT(paragraph2));
-
-    text = atk_text_get_text(paragraph2, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is another line wrapped\nbecause of one forced\nline break in the middle.&quot;);
-    g_free(text);
-
-    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;d&quot;, 27, 28);
-    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;\n&quot;, 28, 29);
-    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;b&quot;, 29, 30);
-
-    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;line &quot;, 16, 21);
-    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;wrapped\n&quot;, 21, 29);
-    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;because &quot;, 29, 37);
-
-    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot; wrapped&quot;, 20, 28);
-    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot;\nbecause&quot;, 28, 36);
-    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot; of&quot;, 36, 39);
-
-    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;This is another line wrapped\n&quot;, 0, 29);
-    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;because of one forced\n&quot;, 29, 51);
-    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;line break in the middle.&quot;, 51, 76);
-
-    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;This is another line wrapped&quot;, 0, 28);
-    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;\nbecause of one forced&quot;, 28, 50);
-    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;\nline break in the middle.&quot;, 50, 76);
-
-    g_object_unref(paragraph2);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextAtOffsetWithEmbeddedObjects()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsWithEmbeddedObjects, 0, 0, 0);
-
-    /* Enable caret browsing. */
-    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
-    g_object_set(settings, &quot;enable-caret-browsing&quot;, TRUE, NULL);
-    webkit_web_view_set_settings(webView, settings);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    /* Check the paragraph with the text wrapped because of max-width. */
-    AtkText* paragraph = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
-    g_assert(ATK_IS_TEXT(paragraph));
-
-    gchar* text = atk_text_get_text(paragraph, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is one line containing two \357\277\274 embedded objects \357\277\274 in the middle.&quot;);
-    g_free(text);
-
-    /* Check right before the first embedded object */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 32, &quot;\357\277\274&quot;, 32, 33);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 32, &quot;two \357\277\274 &quot;, 28, 34);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 32, &quot; \357\277\274 embedded&quot;, 31, 42);
-
-    /* Check right after the first embedded object (and before the first word after it) */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 33, &quot; &quot;, 33, 34);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 33, &quot;two \357\277\274 &quot;, 28, 34);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 33, &quot; \357\277\274 embedded&quot;, 31, 42);
-
-    /* Check at the beginning of the first word between the two embedded objects */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 34, &quot;e&quot;, 34, 35);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 34, &quot;embedded &quot;, 34, 43);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 34, &quot; \357\277\274 embedded&quot;, 31, 42);
-
-    /* Check at the end of the first word between the two embedded objects */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 42, &quot; &quot;, 42, 43);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 42, &quot;embedded &quot;, 34, 43);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 42, &quot; objects&quot;, 42, 50);
-
-    /* Check right before the second embedded object */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 51, &quot;\357\277\274&quot;, 51, 52);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 51, &quot;objects \357\277\274 &quot;, 43, 53);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 51, &quot; \357\277\274 in&quot;, 50, 55);
-
-    /* Check right after the second embedded object (and before the first word after it) */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 52, &quot; &quot;, 52, 53);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 52, &quot;objects \357\277\274 &quot;, 43, 53);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 52, &quot; \357\277\274 in&quot;, 50, 55);
-
-    /* Check at the beginning of the first word after the two embedded objects */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 53, &quot;i&quot;, 53, 54);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 53, &quot;in &quot;, 53, 56);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 53, &quot; \357\277\274 in&quot;, 50, 55);
-
-    /* Check at the end of the first word after the two embedded objects */
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 55, &quot; &quot;, 55, 56);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 55, &quot;in &quot;, 53, 56);
-    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 55, &quot; the&quot;, 55, 59);
-
-    g_object_unref(paragraph);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextInParagraphAndBodySimple()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInParagraphAndBodySimple, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    AtkObject* object1 = atk_object_ref_accessible_child(object, 0);
-    g_assert(object1);
-    AtkObject* object2 = atk_object_ref_accessible_child(object, 1);
-    g_assert(object2);
-
-    AtkText* textObject1 = ATK_TEXT(object1);
-    g_assert(ATK_IS_TEXT(textObject1));
-    AtkText* textObject2 = ATK_TEXT(object2);
-    g_assert(ATK_IS_TEXT(textObject2));
-
-    char *text = atk_text_get_text(textObject1, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is a test.&quot;);
-
-    text = atk_text_get_text(textObject2, 0, 12);
-    g_assert_cmpstr(text, ==, &quot;Hello world.&quot;);
-
-    g_object_unref(object1);
-    g_object_unref(object2);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextInParagraphAndBodyModerate()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInParagraphAndBodyModerate, 0, 0, 0);
-
-    /* Get to the inner AtkText object. */
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    AtkObject* object1 = atk_object_ref_accessible_child(object, 0);
-    g_assert(object1);
-    AtkObject* object2 = atk_object_ref_accessible_child(object, 1);
-    g_assert(object2);
-
-    AtkText* textObject1 = ATK_TEXT(object1);
-    g_assert(ATK_IS_TEXT(textObject1));
-    AtkText* textObject2 = ATK_TEXT(object2);
-    g_assert(ATK_IS_TEXT(textObject2));
-
-    char *text = atk_text_get_text(textObject1, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;This is a test.&quot;);
-
-    text = atk_text_get_text(textObject2, 0, 53);
-    g_assert_cmpstr(text, ==, &quot;Hello world.\nThis sentence is green.\nThis one is not.&quot;);
-
-    g_object_unref(object1);
-    g_object_unref(object2);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetTextInTable()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInTable, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-    object = atk_object_ref_accessible_child(object, 0);
-    g_assert(object);
-
-    /* Tables should not implement AtkText. */
-    g_assert(!G_TYPE_INSTANCE_GET_INTERFACE(object, ATK_TYPE_TEXT, AtkTextIface));
-
-    g_object_unref(object);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetHeadersInTable()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contentsInTableWithHeaders, 0, 0, 0);
-
-    AtkObject* axWebView = getWebAreaObject(webView);
-    g_assert(axWebView);
-
-    /* Check table with both column and row headers. */
-    AtkObject* table = atk_object_ref_accessible_child(axWebView, 0);
-    g_assert(table);
-    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
-
-    AtkObject* colHeader = atk_table_get_column_header(ATK_TABLE(table), 0);
-    g_assert(colHeader);
-    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(colHeader) == 0);
-
-    colHeader = atk_table_get_column_header(ATK_TABLE(table), 1);
-    g_assert(colHeader);
-    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(colHeader) == 1);
-
-    colHeader = atk_table_get_column_header(ATK_TABLE(table), 2);
-    g_assert(colHeader);
-    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(colHeader) == 2);
-
-    colHeader = atk_table_get_column_header(ATK_TABLE(table), 3);
-    g_assert(colHeader);
-    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(colHeader) == 2);
-
-    AtkObject* rowHeader = atk_table_get_row_header(ATK_TABLE(table), 0);
-    g_assert(rowHeader);
-    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(rowHeader) == 0);
-
-    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 1);
-    g_assert(rowHeader);
-    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(rowHeader) == 3);
-
-    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 2);
-    g_assert(rowHeader);
-    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(rowHeader) == 7);
-
-    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 3);
-    g_assert(rowHeader);
-    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
-    g_assert(atk_object_get_index_in_parent(rowHeader) == 7);
-
-    g_object_unref(table);
-
-    /* Check table with no headers at all. */
-    table = atk_object_ref_accessible_child(axWebView, 1);
-    g_assert(table);
-    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
-
-    colHeader = atk_table_get_column_header(ATK_TABLE(table), 0);
-    g_assert(colHeader == 0);
-
-    colHeader = atk_table_get_column_header(ATK_TABLE(table), 1);
-    g_assert(colHeader == 0);
-
-    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 0);
-    g_assert(rowHeader == 0);
-
-    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 1);
-    g_assert(rowHeader == 0);
-
-    g_object_unref(table);
-    g_object_unref(webView);
-}
-
-static gint compAtkAttribute(AtkAttribute* a1, AtkAttribute* a2)
-{
-    gint strcmpVal = g_strcmp0(a1-&gt;name, a2-&gt;name);
-    if (strcmpVal)
-        return strcmpVal;
-    return g_strcmp0(a1-&gt;value, a2-&gt;value);
-}
-
-static gint compAtkAttributeName(AtkAttribute* a1, AtkAttribute* a2)
-{
-    return g_strcmp0(a1-&gt;name, a2-&gt;name);
-}
-
-static gboolean atkAttributeSetAttributeNameHasValue(AtkAttributeSet* set, const gchar* attributeName, const gchar* value)
-{
-    AtkAttribute at;
-    at.name = (gchar*)attributeName;
-    GSList* element = g_slist_find_custom(set, &amp;at, (GCompareFunc)compAtkAttributeName);
-    return element &amp;&amp; !g_strcmp0(((AtkAttribute*)(element-&gt;data))-&gt;value, value);
-}
-
-static gboolean atkAttributeSetContainsAttributeName(AtkAttributeSet* set, const gchar* attributeName)
-{
-    AtkAttribute at;
-    at.name = (gchar*)attributeName;
-    return g_slist_find_custom(set, &amp;at, (GCompareFunc)compAtkAttributeName) ? true : false;
-}
-
-static gboolean atkAttributeSetAttributeHasValue(AtkAttributeSet* set, AtkTextAttribute attribute, const gchar* value)
-{
-    return atkAttributeSetAttributeNameHasValue(set, atk_text_attribute_get_name(attribute), value);
-}
-
-static gboolean atkAttributeSetAreEqual(AtkAttributeSet* set1, AtkAttributeSet* set2)
-{
-    if (!set1)
-        return !set2;
-
-    set1 = g_slist_sort(set1, (GCompareFunc)compAtkAttribute);
-    set2 = g_slist_sort(set2, (GCompareFunc)compAtkAttribute);
-
-    while (set1) {
-        if (!set2 || compAtkAttribute(set1-&gt;data, set2-&gt;data))
-            return FALSE;
-
-        set1 = set1-&gt;next;
-        set2 = set2-&gt;next;
-    }
-
-    return (!set2);
-}
-
-static void testWebkitAtkTextAttributes()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, textWithAttributes, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* child = atk_object_ref_accessible_child(object, 0);
-    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
-    AtkText* childText = ATK_TEXT(child);
-
-    gint startOffset;
-    gint endOffset;
-    AtkAttributeSet* set1 = atk_text_get_run_attributes(childText, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 12);
-    g_assert(atkAttributeSetAreEqual(set1, 0));
-
-    AtkAttributeSet* set2 = atk_text_get_run_attributes(childText, 15, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 12);
-    g_assert_cmpint(endOffset, ==, 17);
-    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_STYLE, &quot;italic&quot;));
-
-    AtkAttributeSet* set3 = atk_text_get_run_attributes(childText, 17, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 17);
-    g_assert_cmpint(endOffset, ==, 40);
-    g_assert(atkAttributeSetAttributeHasValue(set3, ATK_TEXT_ATTR_WEIGHT, &quot;700&quot;));
-
-    AtkAttributeSet* set4 = atk_text_get_default_attributes(childText);
-    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_STYLE, &quot;normal&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_JUSTIFICATION, &quot;right&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_SIZE, &quot;14&quot;));
-    atk_attribute_set_free(set1);
-    atk_attribute_set_free(set2);
-    atk_attribute_set_free(set3);
-    atk_attribute_set_free(set4);
-
-    child = atk_object_ref_accessible_child(object, 1);
-    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
-    childText = ATK_TEXT(child);
-
-    set1 = atk_text_get_default_attributes(childText);
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_FAMILY_NAME, &quot;monospace&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STYLE, &quot;normal&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STRIKETHROUGH, &quot;false&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_WEIGHT, &quot;400&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_FG_COLOR, &quot;120,121,122&quot;));
-
-    set2 = atk_text_get_run_attributes(childText, 43, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 43);
-    g_assert_cmpint(endOffset, ==, 80);
-    /* Checks that default attributes of text are not returned when called to atk_text_get_run_attributes. */
-    g_assert(!atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_FG_COLOR, &quot;120,121,122&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_UNDERLINE, &quot;single&quot;));
-    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_BG_COLOR, &quot;80,81,82&quot;));
-    atk_attribute_set_free(set1);
-    atk_attribute_set_free(set2);
-
-    child = atk_object_ref_accessible_child(object, 2);
-    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
-    childText = ATK_TEXT(child);
-
-    set1 = atk_text_get_run_attributes(childText, 0, &amp;startOffset, &amp;endOffset);
-    set2 = atk_text_get_run_attributes(childText, 3, &amp;startOffset, &amp;endOffset);
-    g_assert(atkAttributeSetAreEqual(set1, set2));
-    atk_attribute_set_free(set2);
-
-    set2 = atk_text_get_run_attributes(childText, 1, &amp;startOffset, &amp;endOffset);
-    set3 = atk_text_get_run_attributes(childText, 5, &amp;startOffset, &amp;endOffset);
-    g_assert(atkAttributeSetAreEqual(set2, set3));
-    g_assert(!atkAttributeSetAreEqual(set1, set2));
-    atk_attribute_set_free(set3);
-
-    set3 = atk_text_get_run_attributes(childText, 2, &amp;startOffset, &amp;endOffset);
-    set4 = atk_text_get_run_attributes(childText, 6, &amp;startOffset, &amp;endOffset);
-    g_assert(atkAttributeSetAreEqual(set3, set4));
-    g_assert(!atkAttributeSetAreEqual(set1, set3));
-    g_assert(!atkAttributeSetAreEqual(set2, set3));
-    atk_attribute_set_free(set1);
-    atk_attribute_set_free(set2);
-    atk_attribute_set_free(set3);
-    atk_attribute_set_free(set4);
-
-    child = atk_object_ref_accessible_child(object, 3);
-    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
-    childText = ATK_TEXT(child);
-    set1 = atk_text_get_run_attributes(childText, 24, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 21);
-    g_assert_cmpint(endOffset, ==, 25);
-    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STRIKETHROUGH, &quot;true&quot;));
-
-    set2 = atk_text_get_run_attributes(childText, 25, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 25);
-    g_assert_cmpint(endOffset, ==, 30);
-    g_assert(atkAttributeSetAreEqual(set2, 0));
-
-    set3 = atk_text_get_default_attributes(childText);
-    g_assert(atkAttributeSetAttributeHasValue(set3, ATK_TEXT_ATTR_JUSTIFICATION, &quot;center&quot;));
-    atk_attribute_set_free(set1);
-    atk_attribute_set_free(set2);
-    atk_attribute_set_free(set3);
-}
-
-static gchar* textSelectionChangedResult = 0;
-
-static void textSelectionChangedCallback(AtkText* text, gpointer data)
-{
-    g_assert(ATK_IS_TEXT(text));
-
-    g_free(textSelectionChangedResult);
-    AtkRole role = atk_object_get_role(ATK_OBJECT(text));
-    int startOffset = 0;
-    int endOffset = 0;
-    atk_text_get_selection(ATK_TEXT(text), 0, &amp;startOffset, &amp;endOffset);
-    textSelectionChangedResult = g_strdup_printf(&quot;|%s|%d|%d|&quot;, atk_role_get_name(role), startOffset, endOffset);
-}
-
-static void testWebkitAtkTextSelections()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, textForSelections, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
-    g_assert(ATK_IS_TEXT(paragraph1));
-    g_signal_connect(paragraph1, &quot;text-selection-changed&quot;, G_CALLBACK(textSelectionChangedCallback), 0);
-
-    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
-    g_assert(ATK_IS_TEXT(paragraph2));
-    g_signal_connect(paragraph2, &quot;text-selection-changed&quot;, G_CALLBACK(textSelectionChangedCallback), 0);
-
-    AtkText* link = ATK_TEXT(atk_object_ref_accessible_child(ATK_OBJECT(paragraph2), 0));
-    g_assert(ATK_IS_TEXT(link));
-
-    AtkObject* list = atk_object_ref_accessible_child(object, 2);
-    g_assert(ATK_OBJECT(list));
-
-    AtkText* listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 0));
-    g_assert(ATK_IS_TEXT(listItem));
-
-    /* First paragraph (simple text). */
-
-    /* Basic initial checks. */
-    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 0);
-
-    gint startOffset;
-    gint endOffset;
-    gchar* selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 0);
-    g_assert_cmpstr(selectedText, ==, 0);
-    g_free (selectedText);
-
-    /* Try removing a non existing (yet) selection. */
-    gboolean result = atk_text_remove_selection(paragraph1, 0);
-    g_assert(!result);
-
-    /* Try setting a 0-char selection. */
-    result = atk_text_set_selection(paragraph1, 0, 5, 5);
-    g_assert(result);
-
-    /* Make a selection and test it. */
-    result = atk_text_set_selection(paragraph1, 0, 5, 25);
-    g_assert(result);
-    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 1);
-    g_assert_cmpstr(textSelectionChangedResult, ==, &quot;|paragraph|5|25|&quot;);
-    selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 5);
-    g_assert_cmpint(endOffset, ==, 25);
-    g_assert_cmpstr(selectedText, ==, &quot;agraph with plain te&quot;);
-    g_free (selectedText);
-
-    /* Try removing the selection from other AtkText object (should fail). */
-    result = atk_text_remove_selection(paragraph2, 0);
-    g_assert(!result);
-
-    /* Remove the selection and test everything again. */
-    result = atk_text_remove_selection(paragraph1, 0);
-    g_assert(result);
-    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 0);
-    selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
-    /* Now offsets should be the same, set to the last position of the caret. */
-    g_assert_cmpint(startOffset, ==, endOffset);
-    g_assert_cmpint(startOffset, ==, 25);
-    g_assert_cmpint(endOffset, ==, 25);
-    g_assert_cmpstr(selectedText, ==, 0);
-    g_free (selectedText);
-
-    /* Second paragraph (text + link + text). */
-
-    /* Set a selection partially covering the link and test it. */
-    result = atk_text_set_selection(paragraph2, 0, 7, 21);
-    g_assert(result);
-
-    /* Test the paragraph first. */
-    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 1);
-    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 7);
-    g_assert_cmpint(endOffset, ==, 21);
-    g_assert_cmpstr(selectedText, ==, &quot;raph with a li&quot;);
-    g_free (selectedText);
-
-    /* Now test just the link. */
-    g_assert_cmpint(atk_text_get_n_selections(link), ==, 1);
-    selectedText = atk_text_get_selection(link, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 4);
-    g_assert_cmpstr(selectedText, ==, &quot;a li&quot;);
-    g_free (selectedText);
-
-    /* Make a selection after the link and check selection for the whole paragraph. */
-    result = atk_text_set_selection(paragraph2, 0, 27, 37);
-    g_assert(result);
-    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 1);
-    g_assert_cmpstr(textSelectionChangedResult, ==, &quot;|paragraph|27|37|&quot;);
-    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 27);
-    g_assert_cmpint(endOffset, ==, 37);
-    g_assert_cmpstr(selectedText, ==, &quot;the middle&quot;);
-    g_free (selectedText);
-
-    /* Remove selections and text everything again. */
-    result = atk_text_remove_selection(paragraph2, 0);
-    g_assert(result);
-    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 0);
-    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
-    /* Now offsets should be the same (no selection). */
-    g_assert_cmpint(startOffset, ==, endOffset);
-    g_assert_cmpstr(selectedText, ==, 0);
-    g_free (selectedText);
-
-    g_assert_cmpint(atk_text_get_n_selections(link), ==, 0);
-    selectedText = atk_text_get_selection(link, 0, &amp;startOffset, &amp;endOffset);
-    /* Now offsets should be the same (no selection). */
-    g_assert_cmpint(startOffset, ==, endOffset);
-    g_assert_cmpstr(selectedText, ==, 0);
-    g_free (selectedText);
-
-    /* List item */
-
-    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
-    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 1);
-
-    gchar* text = atk_text_get_text(listItem, 0, -1);
-    g_assert_cmpstr(text, ==, &quot;1. A list item&quot;);
-    g_free (text);
-
-    /* It's not possible to select text inside an item's marker. */
-    result = atk_text_set_selection (listItem, 0, 0, 9);
-    g_assert(!result);
-    result = atk_text_set_selection (listItem, 0, 9, 1);
-    g_assert(!result);
-
-    /* It should be possible to select text inside an item's text. */
-    result = atk_text_set_selection (listItem, 0, 3, 9);
-    g_assert(result);
-
-    g_assert_cmpint(atk_text_get_n_selections(listItem), ==, 1);
-    selectedText = atk_text_get_selection(listItem, 0, &amp;startOffset, &amp;endOffset);
-    g_assert_cmpint(startOffset, ==, 3);
-    g_assert_cmpint(endOffset, ==, 9);
-    g_assert_cmpstr(selectedText, ==, &quot;A list&quot;);
-    g_free (selectedText);
-
-    g_free(textSelectionChangedResult);
-
-    g_object_unref(paragraph1);
-    g_object_unref(paragraph2);
-    g_object_unref(list);
-    g_object_unref(listItem);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkGetExtents()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, centeredContents, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkText* shortText1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
-    g_assert(ATK_IS_TEXT(shortText1));
-    AtkText* longText = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
-    g_assert(ATK_IS_TEXT(longText));
-    AtkText* shortText2 = ATK_TEXT(atk_object_ref_accessible_child(object, 2));
-    g_assert(ATK_IS_TEXT(shortText2));
-    AtkText* multilineText = ATK_TEXT(atk_object_ref_accessible_child(object, 3));
-    g_assert(ATK_IS_TEXT(multilineText));
-
-    /* Start with window extents. */
-    AtkTextRectangle sline_window1, sline_window2, lline_window, mline_window;
-    atk_text_get_range_extents(shortText1, 0, 10, ATK_XY_WINDOW, &amp;sline_window1);
-    atk_text_get_range_extents(longText, 0, 44, ATK_XY_WINDOW, &amp;lline_window);
-    atk_text_get_range_extents(shortText2, 0, 10, ATK_XY_WINDOW, &amp;sline_window2);
-    atk_text_get_range_extents(multilineText, 0, 60, ATK_XY_WINDOW, &amp;mline_window);
-
-    /* Check vertical line position. */
-    g_assert_cmpint(sline_window1.y + sline_window1.height, &lt;=, lline_window.y);
-    g_assert_cmpint(lline_window.y + lline_window.height + sline_window2.height, &lt;=, mline_window.y);
-
-    /* Paragraphs 1 and 3 have identical text and alignment. */
-    g_assert_cmpint(sline_window1.x, ==, sline_window2.x);
-    g_assert_cmpint(sline_window1.width, ==, sline_window2.width);
-    g_assert_cmpint(sline_window1.height, ==, sline_window2.height);
-
-    /* All lines should be the same height; line 2 is the widest line. */
-    g_assert_cmpint(sline_window1.height, ==, lline_window.height);
-    g_assert_cmpint(sline_window1.width, &lt;, lline_window.width);
-
-    /* Make sure the character extents jive with the range extents. */
-    gint x;
-    gint y;
-    gint width;
-    gint height;
-
-    /* First paragraph (short text). */
-    atk_text_get_character_extents(shortText1, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, sline_window1.x);
-    g_assert_cmpint(y, ==, sline_window1.y);
-    g_assert_cmpint(height, ==, sline_window1.height);
-
-    atk_text_get_character_extents(shortText1, 9, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, sline_window1.x + sline_window1.width - width);
-    g_assert_cmpint(y, ==, sline_window1.y);
-    g_assert_cmpint(height, ==, sline_window1.height);
-
-    /* Second paragraph (long text). */
-    atk_text_get_character_extents(longText, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, lline_window.x);
-    g_assert_cmpint(y, ==, lline_window.y);
-    g_assert_cmpint(height, ==, lline_window.height);
-
-    atk_text_get_character_extents(longText, 43, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, lline_window.x + lline_window.width - width);
-    g_assert_cmpint(y, ==, lline_window.y);
-    g_assert_cmpint(height, ==, lline_window.height);
-
-    /* Third paragraph (short text). */
-    atk_text_get_character_extents(shortText2, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, sline_window2.x);
-    g_assert_cmpint(y, ==, sline_window2.y);
-    g_assert_cmpint(height, ==, sline_window2.height);
-
-    atk_text_get_character_extents(shortText2, 9, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, sline_window2.x + sline_window2.width - width);
-    g_assert_cmpint(y, ==, sline_window2.y);
-    g_assert_cmpint(height, ==, sline_window2.height);
-
-    /* Four paragraph (3 lines multi-line text). */
-    atk_text_get_character_extents(multilineText, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    g_assert_cmpint(x, ==, mline_window.x);
-    g_assert_cmpint(y, ==, mline_window.y);
-    g_assert_cmpint(3 * height, ==, mline_window.height);
-
-    atk_text_get_character_extents(multilineText, 59, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
-    /* Last line won't fill the whole width of the rectangle. */
-    g_assert_cmpint(x, &lt;=, mline_window.x + mline_window.width - width);
-    g_assert_cmpint(y, ==, mline_window.y + mline_window.height - height);
-    g_assert_cmpint(height, &lt;=, mline_window.height);
-
-    /* Check that extent for a full line are the same height than for
-       a partial section of the same line */
-    gint startOffset;
-    gint endOffset;
-    gchar* text = atk_text_get_text_at_offset(multilineText, 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
-    g_free(text);
-
-    AtkTextRectangle fline_window;
-    AtkTextRectangle afline_window;
-    atk_text_get_range_extents(multilineText, startOffset, endOffset, ATK_XY_WINDOW, &amp;fline_window);
-    atk_text_get_range_extents(multilineText, startOffset, endOffset - 1, ATK_XY_WINDOW, &amp;afline_window);
-    g_assert_cmpint(fline_window.x, ==, afline_window.x);
-    g_assert_cmpint(fline_window.y, ==, afline_window.y);
-    g_assert_cmpint(fline_window.height, ==, afline_window.height);
-
-    g_object_unref(shortText1);
-    g_object_unref(shortText2);
-    g_object_unref(longText);
-    g_object_unref(multilineText);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkLayoutAndDataTables()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, layoutAndDataTables, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    /* Check the non-layout table (data table). */
-
-    AtkObject* table1 = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_TABLE(table1));
-    AtkAttributeSet* set1 = atk_object_get_attributes(table1);
-    g_assert(set1);
-    g_assert(!atkAttributeSetContainsAttributeName(set1, &quot;layout-guess&quot;));
-    atk_attribute_set_free(set1);
-
-    /* Check the layout table. */
-
-    AtkObject* table2 = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_IS_TABLE(table2));
-    AtkAttributeSet* set2 = atk_object_get_attributes(table2);
-    g_assert(set2);
-    g_assert(atkAttributeSetContainsAttributeName(set2, &quot;layout-guess&quot;));
-    g_assert(atkAttributeSetAttributeNameHasValue(set2, &quot;layout-guess&quot;, &quot;true&quot;));
-    atk_attribute_set_free(set2);
-
-    g_object_unref(table1);
-    g_object_unref(table2);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkLinksWithInlineImages()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, linksWithInlineImages, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    /* First paragraph (link at the beginning). */
-    AtkObject* paragraph = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_TEXT(paragraph));
-    gint startOffset;
-    gint endOffset;
-    gchar* text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
-    g_assert(text);
-    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 11);
-    g_free(text);
-    g_object_unref(paragraph);
-
-    /* Second paragraph (link in the middle). */
-    paragraph = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_IS_TEXT(paragraph));
-    text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
-    g_assert(text);
-    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 11);
-    g_free(text);
-    g_object_unref(paragraph);
-
-    /* Third paragraph (link at the end). */
-    paragraph = atk_object_ref_accessible_child(object, 2);
-    g_assert(ATK_IS_TEXT(paragraph));
-    text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
-    g_assert(text);
-    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
-    g_assert_cmpint(startOffset, ==, 0);
-    g_assert_cmpint(endOffset, ==, 11);
-    g_free(text);
-    g_object_unref(paragraph);
-
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkHypertextAndHyperlinks()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, hypertextAndHyperlinks, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* paragraph1 = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_OBJECT(paragraph1));
-    g_assert(atk_object_get_role(paragraph1) == ATK_ROLE_PARAGRAPH);
-    g_assert(ATK_IS_HYPERTEXT(paragraph1));
-
-    /* No links in the first paragraph. */
-    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph1));
-    g_assert_cmpint(nLinks, ==, 0);
-
-    AtkObject* paragraph2 = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_OBJECT(paragraph2));
-    g_assert(atk_object_get_role(paragraph2) == ATK_ROLE_PARAGRAPH);
-    g_assert(ATK_IS_HYPERTEXT(paragraph2));
-
-    /* Check links in the second paragraph.
-       nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph2));
-       g_assert_cmpint(nLinks, ==, 3); */
-
-    AtkHyperlink* hLink1 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 0);
-    g_assert(ATK_HYPERLINK(hLink1));
-    AtkObject* hLinkObject1 = atk_hyperlink_get_object(hLink1, 0);
-    g_assert(ATK_OBJECT(hLinkObject1));
-    g_assert(atk_object_get_role(hLinkObject1) == ATK_ROLE_LINK);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink1), ==, 0);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink1), ==, 6);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink1), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink1, 0), ==, &quot;http://foo.bar.baz/&quot;);
-
-    AtkHyperlink* hLink2 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 1);
-    g_assert(ATK_HYPERLINK(hLink2));
-    AtkObject* hLinkObject2 = atk_hyperlink_get_object(hLink2, 0);
-    g_assert(ATK_OBJECT(hLinkObject2));
-    g_assert(atk_object_get_role(hLinkObject2) == ATK_ROLE_LINK);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink2), ==, 12);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink2), ==, 32);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink2), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink2, 0), ==, &quot;http://bar.baz.foo/&quot;);
-
-    AtkHyperlink* hLink3 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 2);
-    g_assert(ATK_HYPERLINK(hLink3));
-    AtkObject* hLinkObject3 = atk_hyperlink_get_object(hLink3, 0);
-    g_assert(ATK_OBJECT(hLinkObject3));
-    g_assert(atk_object_get_role(hLinkObject3) == ATK_ROLE_LINK);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLink3), ==, 65);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLink3), ==, 75);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink3), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLink3, 0), ==, &quot;http://baz.foo.bar/&quot;);
-
-    AtkObject* list = atk_object_ref_accessible_child(object, 2);
-    g_assert(ATK_OBJECT(list));
-    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
-    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 1);
-
-    AtkObject* listItem = atk_object_ref_accessible_child(list, 0);
-    g_assert(ATK_IS_TEXT(listItem));
-    g_assert(ATK_IS_HYPERTEXT(listItem));
-
-    AtkHyperlink* hLinkInListItem = atk_hypertext_get_link(ATK_HYPERTEXT(listItem), 0);
-    g_assert(ATK_HYPERLINK(hLinkInListItem));
-    AtkObject* hLinkObject = atk_hyperlink_get_object(hLinkInListItem, 0);
-    g_assert(ATK_OBJECT(hLinkObject));
-    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_LINK);
-    g_assert_cmpint(atk_hyperlink_get_start_index(hLinkInListItem), ==, 20);
-    g_assert_cmpint(atk_hyperlink_get_end_index(hLinkInListItem), ==, 43);
-    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLinkInListItem), ==, 1);
-    g_assert_cmpstr(atk_hyperlink_get_uri(hLinkInListItem, 0), ==, &quot;http://foo.bar.baz/&quot;);
-
-    /* Finally check the AtkAction interface for a given AtkHyperlink. */
-    g_assert(ATK_IS_ACTION(hLink1));
-    g_assert_cmpint(atk_action_get_n_actions(ATK_ACTION(hLink1)), ==, 1);
-    g_assert_cmpstr(atk_action_get_keybinding(ATK_ACTION(hLink1), 0), ==, &quot;&quot;);
-    g_assert_cmpstr(atk_action_get_name(ATK_ACTION(hLink1), 0), ==, &quot;jump&quot;);
-    g_assert(atk_action_do_action(ATK_ACTION(hLink1), 0));
-
-    g_object_unref(paragraph1);
-    g_object_unref(paragraph2);
-    g_object_unref(list);
-    g_object_unref(listItem);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkListsOfItems()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, listsOfItems, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    /* Unordered list. */
-
-    AtkObject* uList = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_OBJECT(uList));
-    g_assert(atk_object_get_role(uList) == ATK_ROLE_LIST);
-    g_assert_cmpint(atk_object_get_n_accessible_children(uList), ==, 3);
-
-    AtkObject* item1 = atk_object_ref_accessible_child(uList, 0);
-    g_assert(ATK_IS_TEXT(item1));
-    AtkObject* item2 = atk_object_ref_accessible_child(uList, 1);
-    g_assert(ATK_IS_TEXT(item2));
-    AtkObject* item3 = atk_object_ref_accessible_child(uList, 2);
-    g_assert(ATK_IS_TEXT(item3));
-
-    g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0);
-    g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1);
-    g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1);
-
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, &quot;\342\200\242 text only&quot;);
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, &quot;\342\200\242 link only&quot;);
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, &quot;\342\200\242 text and a link&quot;);
-
-    g_object_unref(item1);
-    g_object_unref(item2);
-    g_object_unref(item3);
-
-    /* Ordered list. */
-
-    AtkObject* oList = atk_object_ref_accessible_child(object, 1);
-    g_assert(ATK_OBJECT(oList));
-    g_assert(atk_object_get_role(oList) == ATK_ROLE_LIST);
-    g_assert_cmpint(atk_object_get_n_accessible_children(oList), ==, 3);
-
-    item1 = atk_object_ref_accessible_child(oList, 0);
-    g_assert(ATK_IS_TEXT(item1));
-    item2 = atk_object_ref_accessible_child(oList, 1);
-    g_assert(ATK_IS_TEXT(item2));
-    item3 = atk_object_ref_accessible_child(oList, 2);
-    g_assert(ATK_IS_TEXT(item3));
-
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, &quot;1. text only&quot;);
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, &quot;2. link only&quot;);
-    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, &quot;3. text and a link&quot;);
-
-    g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0);
-    g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1);
-    g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1);
-
-    g_object_unref(item1);
-    g_object_unref(item2);
-    g_object_unref(item3);
-
-    g_object_unref(uList);
-    g_object_unref(oList);
-    g_object_unref(webView);
-}
-
-typedef enum {
-  TEXT_CHANGE_INSERT = 1,
-  TEXT_CHANGE_REMOVE = 2
-} TextChangeType;
-
-static gchar* textChangedResult = 0;
-
-static void textChangedCb(AtkText* text, gint pos, gint len, gchar* modifiedText, gpointer data)
-{
-    g_assert(text &amp;&amp; ATK_IS_OBJECT(text));
-
-    TextChangeType type = GPOINTER_TO_INT(data);
-    g_free(textChangedResult);
-    textChangedResult = g_strdup_printf(&quot;|%d|%d|%d|'%s'|&quot;, type, pos, len, modifiedText);
-}
-
-static void testWebkitAtkTextChangedNotifications()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, formWithTextInputs, 0, 0, 0);
-
-    AtkObject* object = getWebAreaObject(webView);
-    g_assert(object);
-
-    AtkObject* form = atk_object_ref_accessible_child(object, 0);
-    g_assert(ATK_IS_OBJECT(form));
-
-    /* First check normal text entries. */
-    AtkObject* textEntry = atk_object_ref_accessible_child(form, 0);
-    g_assert(ATK_IS_EDITABLE_TEXT(textEntry));
-    g_assert(atk_object_get_role(ATK_OBJECT(textEntry)) == ATK_ROLE_ENTRY);
-
-    g_signal_connect(textEntry, &quot;text-insert&quot;,
-                     G_CALLBACK(textChangedCb),
-                     GINT_TO_POINTER(TEXT_CHANGE_INSERT));
-    g_signal_connect(textEntry, &quot;text-remove&quot;,
-                     G_CALLBACK(textChangedCb),
-                     GINT_TO_POINTER(TEXT_CHANGE_REMOVE));
-
-    gint pos = 0;
-    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(textEntry), &quot;foo bar baz&quot;, 11, &amp;pos);
-    char* text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|1|0|11|'foo bar baz'|&quot;);
-    g_free(text);
-
-    atk_editable_text_delete_text(ATK_EDITABLE_TEXT(textEntry), 4, 7);
-    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;foo  baz&quot;);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|2|4|3|'bar'|&quot;);
-    g_free(text);
-
-    pos = 4;
-    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(textEntry), &quot;qux quux tobeignored&quot;, 8, &amp;pos);
-    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;foo qux quux baz&quot;);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|1|4|8|'qux quux'|&quot;);
-    g_free(text);
-
-    /* Now check for password entries. */
-    AtkObject* passwordEntry = atk_object_ref_accessible_child(form, 1);
-    g_assert(ATK_IS_EDITABLE_TEXT(passwordEntry));
-    g_assert(atk_object_get_role(ATK_OBJECT(passwordEntry)) == ATK_ROLE_PASSWORD_TEXT);
-
-    g_signal_connect(passwordEntry, &quot;text-insert&quot;,
-                     G_CALLBACK(textChangedCb),
-                     GINT_TO_POINTER(TEXT_CHANGE_INSERT));
-    g_signal_connect(passwordEntry, &quot;text-remove&quot;,
-                     G_CALLBACK(textChangedCb),
-                     GINT_TO_POINTER(TEXT_CHANGE_REMOVE));
-
-    pos = 0;
-    /* A single bullet character is '\342\200\242' */
-    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(passwordEntry), &quot;foobar&quot;, 6, &amp;pos);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|1|0|6|'\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242'|&quot;);
-    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
-    g_free(text);
-
-    atk_editable_text_delete_text(ATK_EDITABLE_TEXT(passwordEntry), 2, 4);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|2|2|2|'\342\200\242\342\200\242'|&quot;);
-
-    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
-    g_free(text);
-
-    pos = 3;
-    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(passwordEntry), &quot;qux tobeignored&quot;, 3, &amp;pos);
-    g_assert_cmpstr(textChangedResult, ==, &quot;|1|3|3|'\342\200\242\342\200\242\342\200\242'|&quot;);
-
-    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
-    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
-    g_free(text);
-
-    g_free(textChangedResult);
-
-    g_object_unref(form);
-    g_object_unref(textEntry);
-    g_object_unref(passwordEntry);
-    g_object_unref(webView);
-}
-
-static void testWebkitAtkParentForRootObject()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contents, 0, 0, 0);
-
-    /* We need a parent container widget for the webview. */
-    GtkWidget* parentContainer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    g_object_ref_sink(parentContainer);
-    gtk_container_add(GTK_CONTAINER(parentContainer), GTK_WIDGET(webView));
-
-    AtkObject* axParent = gtk_widget_get_accessible(parentContainer);
-    g_assert(ATK_IS_OBJECT(axParent));
-
-    AtkObject* axRoot = gtk_widget_get_accessible(GTK_WIDGET(webView));
-    g_assert(ATK_IS_OBJECT(axRoot));
-
-    /* The child for the parent container's accessibility object
-       should be the accessibility object for the WebView's root. */
-    AtkObject* axParentChild = atk_object_ref_accessible_child(axParent, 0);
-    g_assert(axParentChild == axRoot);
-
-    /* Bottom-up navigation should match top-down one. */
-    g_assert(atk_object_get_parent(axParentChild) == axParent);
-
-    g_object_unref(axParentChild);
-    g_object_unref(parentContainer);
-}
-
-static void testWebkitAtkSetParentForObject()
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GtkAllocation allocation = { 0, 0, 800, 600 };
-    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
-    webkit_web_view_load_string(webView, contents, 0, 0, 0);
-
-    /* Put the webview in a parent container widget to check that the
-       normal behaviour keeps working as expected by default. */
-    GtkWidget* parentContainer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    g_object_ref_sink(parentContainer);
-    gtk_container_add(GTK_CONTAINER(parentContainer), GTK_WIDGET(webView));
-
-    AtkObject* axRoot = gtk_widget_get_accessible(GTK_WIDGET(webView));
-    g_assert(ATK_IS_OBJECT(axRoot));
-
-    AtkObject* axParent = gtk_widget_get_accessible(parentContainer);
-    g_assert(ATK_IS_OBJECT(axParent));
-
-    /* The parent of the root object is the parent container's a11y object. */
-    g_assert(atk_object_get_parent(axRoot) == axParent);
-
-    /* We now need to use something as a an alternative parent for
-       the a11y object associated with the root of the DOM tree. */
-    GtkWidget* alternativeParent = gtk_button_new();
-    g_object_ref_sink(alternativeParent);
-
-    AtkObject* axAlternativeParent = gtk_widget_get_accessible(alternativeParent);
-    g_assert(ATK_IS_OBJECT(axAlternativeParent));
-
-    /* Manually set the alternative parent's accessibility object as
-       the parent for the WebKit accessibility root object and check. */
-    atk_object_set_parent(axRoot, axAlternativeParent);
-    g_assert(atk_object_get_parent(axRoot) == axAlternativeParent);
-
-    g_object_unref(alternativeParent);
-    g_object_unref(parentContainer);
-}
-
-#ifdef GTK_API_VERSION_2
-static void initializeTestingFramework(int argc, char** argv)
-{
-    /* Ensure GAIL is the only module loaded. */
-    g_setenv(&quot;GTK_MODULES&quot;, &quot;gail&quot;, TRUE);
-
-    /* Following lines were taken from gtk_test_init(). */
-    g_test_init(&amp;argc, &amp;argv, 0);
-    gtk_disable_setlocale();
-    setlocale(LC_ALL, &quot;C&quot;);
-
-    gtk_init(&amp;argc, &amp;argv);
-}
-#endif
-
-int main(int argc, char** argv)
-{
-#ifdef GTK_API_VERSION_2
-    /* We can't just call to gtk_test_init() in this case because its
-       implementation makes sure that no GTK+ module will be loaded, and
-       we will need to load GAIL for tests that need to use AtkObjects
-       from non-WebKit GtkWidgets (e.g parentForRootObject).*/
-    initializeTestingFramework(argc, argv);
-#else
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-#endif
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/atk/caretOffsets&quot;, testWebkitAtkCaretOffsets);
-    g_test_add_func(&quot;/webkit/atk/caretOffsetsAndExtranousWhiteSpaces&quot;, testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces);
-    g_test_add_func(&quot;/webkit/atk/comboBox&quot;, testWebkitAtkComboBox);
-    g_test_add_func(&quot;/webkit/atk/documentLoadingEvents&quot;, testWebkitAtkDocumentLoadingEvents);
-    g_test_add_func(&quot;/webkit/atk/embeddedObjects&quot;, testWebkitAtkEmbeddedObjects);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffset&quot;, testWebkitAtkGetTextAtOffset);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetNewlines&quot;, testWebkitAtkGetTextAtOffsetNewlines);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetTextarea&quot;, testWebkitAtkGetTextAtOffsetTextarea);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetTextInput&quot;, testWebkitAtkGetTextAtOffsetTextInput);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithPreformattedText&quot;, testWebkitAtkGetTextAtOffsetWithPreformattedText);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithSpecialCharacters&quot;, testWebkitAtkGetTextAtOffsetWithSpecialCharacters);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithWrappedLines&quot;, testWebkitAtkGetTextAtOffsetWithWrappedLines);
-    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithEmbeddedObjects&quot;, testWebkitAtkGetTextAtOffsetWithEmbeddedObjects);
-    g_test_add_func(&quot;/webkit/atk/getTextInParagraphAndBodySimple&quot;, testWebkitAtkGetTextInParagraphAndBodySimple);
-    g_test_add_func(&quot;/webkit/atk/getTextInParagraphAndBodyModerate&quot;, testWebkitAtkGetTextInParagraphAndBodyModerate);
-    g_test_add_func(&quot;/webkit/atk/getTextInTable&quot;, testWebkitAtkGetTextInTable);
-    g_test_add_func(&quot;/webkit/atk/getHeadersInTable&quot;, testWebkitAtkGetHeadersInTable);
-    g_test_add_func(&quot;/webkit/atk/textAttributes&quot;, testWebkitAtkTextAttributes);
-    g_test_add_func(&quot;/webkit/atk/textSelections&quot;, testWebkitAtkTextSelections);
-    g_test_add_func(&quot;/webkit/atk/getExtents&quot;, testWebkitAtkGetExtents);
-    g_test_add_func(&quot;/webkit/atk/hypertextAndHyperlinks&quot;, testWebkitAtkHypertextAndHyperlinks);
-    g_test_add_func(&quot;/webkit/atk/layoutAndDataTables&quot;, testWebkitAtkLayoutAndDataTables);
-    g_test_add_func(&quot;/webkit/atk/linksWithInlineImages&quot;, testWebkitAtkLinksWithInlineImages);
-    g_test_add_func(&quot;/webkit/atk/listsOfItems&quot;, testWebkitAtkListsOfItems);
-    g_test_add_func(&quot;/webkit/atk/textChangedNotifications&quot;, testWebkitAtkTextChangedNotifications);
-    g_test_add_func(&quot;/webkit/atk/parentForRootObject&quot;, testWebkitAtkParentForRootObject);
-    g_test_add_func(&quot;/webkit/atk/setParentForObject&quot;, testWebkitAtkSetParentForObject);
-    return g_test_run ();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkrolesc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatkroles.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatkroles.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatkroles.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,426 +0,0 @@
</span><del>-/*
- * Copyright © 2010 Joanmarie Diggs
- * Copyright © 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-/* Non form roles */
-#define HTML_DOCUMENT_FRAME &quot;&lt;html&gt;&lt;body&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_HEADING &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;1&lt;/h1&gt;&lt;h2&gt;2&lt;/h2&gt;&lt;h3&gt;3&lt;/h3&gt;&lt;h4&gt;4&lt;/h4&gt;&lt;h5&gt;5&lt;/h5&gt;&lt;h6&gt;6&lt;/h6&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_IMAGE &quot;&lt;html&gt;&lt;body&gt;&lt;img src='foobar.png' alt='This is a test.'/&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_LINK_TEXT &quot;&lt;html&gt;&lt;body&gt;&lt;a href='foobar.html'&gt;This is a test.&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_LIST &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_PARAGRAPH &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_SECTION &quot;&lt;html&gt;&lt;body&gt;&lt;div&gt;This is a test.&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_TABLE &quot;&lt;html&gt;&lt;body&gt;&lt;table border='1'&gt;&lt;tr&gt;&lt;td&gt;This is&lt;/td&gt;&lt;td&gt;a test.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_SEPARATOR &quot;&lt;html&gt;&lt;body&gt;&lt;hr/&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_COMBOBOX &quot;&lt;html&gt;&lt;body&gt;&lt;select size='1'&gt;&lt;option&gt;one&lt;/option&gt;&lt;option&gt;two&lt;/option&gt;&lt;option&gt;three&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-/* Form roles */
-#define HTML_FORM &quot;&lt;html&gt;&lt;body&gt;&lt;form&gt;This is a test.&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_CHECK_BOX &quot;&lt;html&gt;&lt;body&gt;&lt;input type='checkbox' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_LABELED_ENTRY &quot;&lt;html&gt;&lt;body&gt;&lt;label for='foo'&gt;Name:&lt;/label&gt;&lt;input type='text' id='foo' /&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_LISTBOX &quot;&lt;html&gt;&lt;body&gt;&lt;select size='3'&gt;&lt;option&gt;one&lt;/option&gt;&lt;option&gt;two&lt;/option&gt;&lt;option&gt;three&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_PASSWORD_TEXT &quot;&lt;html&gt;&lt;body&gt;&lt;input type='password' /&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_PUSH_BUTTON &quot;&lt;html&gt;&lt;body&gt;&lt;input type='submit' value='ok' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_RADIO_BUTTON &quot;&lt;html&gt;&lt;body&gt;&lt;input type='radio' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
-
-typedef struct {
-    AtkObject* document;
-    AtkObject* obj;
-    AtkRole role;
-    GtkWidget* webView;
-    GtkAllocation alloc;
-    GMainLoop* loop;
-} AtkRolesFixture;
-
-static gboolean finish_loading(AtkRolesFixture* fixture)
-{
-    if (g_main_loop_is_running(fixture-&gt;loop))
-        g_main_loop_quit(fixture-&gt;loop);
-
-    // With the change to support WK2 accessibility, the root object
-    // has changed and it's no longer the document frame, but a scroll
-    // pane containing the document frame as its only child. See the
-    // bug 72390 for more details on this change.
-    // https://bugs.webkit.org/show_bug.cgi?id=72390
-    AtkObject* rootObject = gtk_widget_get_accessible(fixture-&gt;webView);
-    fixture-&gt;document = atk_object_ref_accessible_child(rootObject, 0);
-    g_assert(fixture-&gt;document);
-
-    // Remove the reference added by ref_accessible_child() and
-    // return, since we don't need to keep that extra ref at all.
-    g_object_unref(fixture-&gt;document);
-    return FALSE;
-}
-
-static void atk_roles_fixture_setup(AtkRolesFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;alloc = (GtkAllocation) { 0, 0, 800, 600 };
-    fixture-&gt;webView = webkit_web_view_new();
-    g_object_ref_sink(fixture-&gt;webView);
-
-    gtk_widget_size_allocate(fixture-&gt;webView, &amp;fixture-&gt;alloc);
-
-    if (data != NULL)
-        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
-
-    g_idle_add((GSourceFunc) finish_loading, fixture);
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void atk_roles_fixture_teardown(AtkRolesFixture* fixture, gconstpointer data)
-{
-    g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static void get_child_and_test_role(AtkObject* obj, gint pos, AtkRole role)
-{
-    AtkObject* child;
-    AtkRole child_role;
-
-    child = atk_object_ref_accessible_child(obj, pos);
-    g_assert(child);
-    child_role = atk_object_get_role(child);
-    g_assert(child_role == role);
-
-    g_object_unref(child);
-}
-
-static void test_webkit_atk_get_role_document_frame(AtkRolesFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;role = atk_object_get_role(fixture-&gt;document);
-    g_assert(fixture-&gt;role == ATK_ROLE_DOCUMENT_WEB);
-}
-
-static void test_webkit_atk_get_role_heading(AtkRolesFixture* fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_HEADING);
-    get_child_and_test_role(fixture-&gt;document, 1, ATK_ROLE_HEADING);
-    get_child_and_test_role(fixture-&gt;document, 2, ATK_ROLE_HEADING);
-    get_child_and_test_role(fixture-&gt;document, 3, ATK_ROLE_HEADING);
-    get_child_and_test_role(fixture-&gt;document, 4, ATK_ROLE_HEADING);
-    get_child_and_test_role(fixture-&gt;document, 5, ATK_ROLE_HEADING);
-}
-
-static void test_webkit_atk_get_role_image(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_IMAGE);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_link(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_LINK);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_list_and_item(AtkRolesFixture* fixture, gconstpointer data)
-{
-    AtkObject* listObj;
-
-    listObj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(listObj);
-    fixture-&gt;role = atk_object_get_role(listObj);
-    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
-
-    get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM);
-    get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM);
-    g_object_unref(listObj);
-
-    listObj = atk_object_ref_accessible_child(fixture-&gt;document, 1);
-    g_assert(listObj);
-    fixture-&gt;role = atk_object_get_role(listObj);
-    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
-
-    get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM);
-    get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM);
-    g_object_unref(listObj);
-}
-
-static void test_webkit_atk_get_role_paragraph(AtkRolesFixture* fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_PARAGRAPH);
-}
-
-static void test_webkit_atk_get_role_section(AtkRolesFixture* fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_SECTION);
-}
-
-// Does not yet test table cells because of bug 30895.
-static void test_webkit_atk_get_role_table(AtkRolesFixture* fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_TABLE);
-}
-
-static void test_webkit_atk_get_role_separator(AtkRolesFixture *fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_SEPARATOR);
-}
-
-static void test_webkit_atk_get_role_combobox(AtkRolesFixture *fixture, gconstpointer data)
-{
-    AtkObject* comboboxMenu;
-
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
-    g_assert(fixture-&gt;obj);
-    fixture-&gt;role = atk_object_get_role(fixture-&gt;obj);
-    g_assert(fixture-&gt;role == ATK_ROLE_COMBO_BOX);
-
-    comboboxMenu = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
-    g_assert(comboboxMenu);
-    fixture-&gt;role = atk_object_get_role(comboboxMenu);
-    g_assert(fixture-&gt;role == ATK_ROLE_MENU);
-
-    get_child_and_test_role(comboboxMenu, 0, ATK_ROLE_MENU_ITEM);
-    get_child_and_test_role(comboboxMenu, 1, ATK_ROLE_MENU_ITEM);
-    get_child_and_test_role(comboboxMenu, 2, ATK_ROLE_MENU_ITEM);
-
-    g_object_unref(fixture-&gt;obj);
-    g_object_unref(comboboxMenu);
-}
-
-/* Form roles */
-static void test_webkit_atk_get_role_form(AtkRolesFixture *fixture, gconstpointer data)
-{
-    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_FORM);
-}
-
-static void test_webkit_atk_get_role_check_box(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_CHECK_BOX);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_entry(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 1, ATK_ROLE_ENTRY);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_label(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_LABEL);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_listbox(AtkRolesFixture* fixture, gconstpointer data)
-{
-    AtkObject* listboxObj;
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    listboxObj = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
-    g_assert(listboxObj);
-    fixture-&gt;role = atk_object_get_role(listboxObj);
-    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
-
-    get_child_and_test_role(listboxObj, 0, ATK_ROLE_LIST_ITEM);
-    get_child_and_test_role(listboxObj, 1, ATK_ROLE_LIST_ITEM);
-    get_child_and_test_role(listboxObj, 2, ATK_ROLE_LIST_ITEM);
-
-    g_object_unref(fixture-&gt;obj);
-    g_object_unref(listboxObj);
-}
-
-static void test_webkit_atk_get_role_password_text(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_PASSWORD_TEXT);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_push_button(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_PUSH_BUTTON);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-static void test_webkit_atk_get_role_radio_button(AtkRolesFixture* fixture, gconstpointer data)
-{
-    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
-    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
-    g_assert(fixture-&gt;obj);
-
-    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_RADIO_BUTTON);
-
-    g_object_unref(fixture-&gt;obj);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_document_frame&quot;,
-               AtkRolesFixture, HTML_DOCUMENT_FRAME,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_document_frame,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_heading&quot;,
-               AtkRolesFixture, HTML_HEADING,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_heading,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_image&quot;,
-               AtkRolesFixture, HTML_IMAGE,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_image,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_link&quot;,
-               AtkRolesFixture, HTML_LINK_TEXT,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_link,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_list_and_item&quot;,
-               AtkRolesFixture, HTML_LIST,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_list_and_item,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_paragraph&quot;,
-               AtkRolesFixture, HTML_PARAGRAPH,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_paragraph,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_section&quot;,
-               AtkRolesFixture, HTML_SECTION,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_section,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_table&quot;,
-               AtkRolesFixture, HTML_TABLE,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_table,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_separator&quot;,
-               AtkRolesFixture, HTML_SEPARATOR,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_separator,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_combobox&quot;,
-               AtkRolesFixture, HTML_COMBOBOX,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_combobox,
-               atk_roles_fixture_teardown);
-
-    /* Form roles */
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_form&quot;,
-               AtkRolesFixture, HTML_FORM,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_form,
-               atk_roles_fixture_teardown);
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_check_box&quot;,
-               AtkRolesFixture, HTML_CHECK_BOX,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_check_box,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_entry&quot;,
-               AtkRolesFixture, HTML_LABELED_ENTRY,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_entry,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_label&quot;,
-               AtkRolesFixture, HTML_LABELED_ENTRY,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_label,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_listbox&quot;,
-               AtkRolesFixture, HTML_LISTBOX,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_listbox,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_password_text&quot;,
-               AtkRolesFixture, HTML_PASSWORD_TEXT,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_password_text,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_push_button&quot;,
-               AtkRolesFixture, HTML_PUSH_BUTTON,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_push_button,
-               atk_roles_fixture_teardown);
-
-    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_radio_button&quot;,
-               AtkRolesFixture, HTML_RADIO_BUTTON,
-               atk_roles_fixture_setup,
-               test_webkit_atk_get_role_radio_button,
-               atk_roles_fixture_teardown);
-
-    return g_test_run();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestcontextmenuc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcontextmenu.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcontextmenu.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcontextmenu.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,314 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;webkit/webkit.h&gt;
-
-typedef struct {
-    char *data;
-    guint flag;
-} TestInfo;
-
-static GMainLoop *loop;
-
-typedef struct {
-    WebKitWebView *webView;
-    TestInfo *info;
-} ContextMenuFixture;
-
-static TestInfo *testInfoNew(const char *data, guint flag)
-{
-    TestInfo *info = g_slice_new(TestInfo);
-    info-&gt;data = g_strdup(data);
-    info-&gt;flag = flag;
-
-    return info;
-}
-
-static void testInfoDestroy(TestInfo *info)
-{
-    g_free(info-&gt;data);
-    g_slice_free(TestInfo, info);
-}
-
-static void contextMenuFixtureSetup(ContextMenuFixture *fixture, gconstpointer data)
-{
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;info = (TestInfo *)data;
-}
-
-static void contextMenuFixtureTeardown(ContextMenuFixture *fixture, gconstpointer data)
-{
-    g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(loop);
-    testInfoDestroy(fixture-&gt;info);
-}
-
-static GList *checkAction(GList *iter, WebKitContextMenuAction action)
-{
-    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
-
-    g_assert(GTK_IS_MENU_ITEM(item));
-    g_assert(webkit_context_menu_item_get_action(item) == action);
-
-    return iter-&gt;next;
-}
-
-static GList *checkActionWithSubmenu(GList *iter, WebKitContextMenuAction action)
-{
-    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
-
-    g_assert(GTK_IS_MENU_ITEM(item));
-    g_assert(webkit_context_menu_item_get_action(item) == action);
-    g_assert(GTK_IS_MENU(gtk_menu_item_get_submenu(item)));
-
-    return iter-&gt;next;
-}
-
-static GList *checkSeparator(GList *iter)
-{
-    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
-
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item));
-
-    return iter-&gt;next;
-}
-
-static gboolean contextMenuCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
-{
-    TestInfo *info = (TestInfo *)userData;
-    guint context;
-    GList *items;
-    GList *iter;
-
-    /* Check signal parameters */
-    g_assert(WEBKIT_IS_WEB_VIEW(webView));
-    g_assert(GTK_IS_MENU(defaultMenu));
-    g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
-    g_assert(!keyboardMode);
-
-    g_object_get(hitTestResult, &quot;context&quot;, &amp;context, NULL);
-    g_assert(context &amp; info-&gt;flag);
-
-    items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
-    switch (info-&gt;flag) {
-    case WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT:
-        iter = items;
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
-        g_assert(!iter);
-
-        break;
-    case WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE:
-        iter = items;
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD);
-        g_assert(!iter);
-
-        break;
-    case WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE:
-        iter = items;
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_CUT);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_PASTE);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DELETE);
-        iter = checkSeparator(iter);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL);
-        iter = checkSeparator(iter);
-        iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS);
-        iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_UNICODE);
-        g_assert(!iter);
-
-        break;
-    case WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK:
-        iter = items;
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK);
-        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD);
-        g_assert(!iter);
-
-        break;
-    default:
-        g_assert_not_reached();
-    }
-
-    g_list_free(items);
-    g_main_loop_quit(loop);
-
-    return TRUE;
-}
-
-static void pushEvent(WebKitWebView *webView)
-{
-    GdkEvent *event = gdk_event_new(GDK_BUTTON_PRESS);
-#if GTK_CHECK_VERSION(3, 0, 0)
-    GdkDeviceManager *deviceManager;
-#endif
-
-    event-&gt;any.window = g_object_ref(gtk_widget_get_window(GTK_WIDGET(webView)));
-    event-&gt;any.send_event = FALSE;
-    event-&gt;button.time = GDK_CURRENT_TIME;
-    event-&gt;button.button = 3;
-    event-&gt;button.x = event-&gt;button.y = 5;
-    event-&gt;button.x_root = event-&gt;button.x;
-    event-&gt;button.y_root = event-&gt;button.y;
-#if GTK_CHECK_VERSION(3, 0, 0)
-    deviceManager = gdk_display_get_device_manager(gdk_display_get_default());
-    event-&gt;button.device = gdk_device_manager_get_client_pointer(deviceManager);
-#endif
-
-    gdk_event_put(event);
-    gdk_event_free(event);
-}
-
-static void loadStatusCallback(WebKitWebView *webView, GParamSpec *spec, gpointer data)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    TestInfo *info = (TestInfo *)data;
-
-    g_assert(status != WEBKIT_LOAD_FAILED);
-
-    if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    g_signal_connect(webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCallback), info);
-    pushEvent(webView);
-}
-
-static gboolean mapEventCallback(GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-    gtk_widget_grab_focus(widget);
-    ContextMenuFixture *fixture = (ContextMenuFixture *)data;
-    webkit_web_view_load_string(fixture-&gt;webView,
-                                fixture-&gt;info-&gt;data,
-                                &quot;text/html&quot;,
-                                &quot;utf-8&quot;,
-                                &quot;file://&quot;);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(loadStatusCallback), fixture-&gt;info);
-    return FALSE;
-}
-
-static void testContextMenu(ContextMenuFixture *fixture, gconstpointer data)
-{
-    GtkAllocation allocation = { 0, 0, 50, 50 };
-    GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
-
-    gtk_window_resize(GTK_WINDOW(window), 50, 50);
-    gtk_window_move(GTK_WINDOW(window), 0, 0);
-    gtk_widget_size_allocate(GTK_WIDGET(fixture-&gt;webView), &amp;allocation);
-    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture-&gt;webView));
-    g_signal_connect(window, &quot;map-event&quot;, G_CALLBACK(mapEventCallback), fixture);
-    gtk_widget_show_all(window);
-
-    g_main_loop_run(loop);
-}
-
-static gboolean contextMenuCustomItemCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
-{
-    TestInfo *info = (TestInfo *)userData;
-    guint context;
-    GList *items;
-    GList *iter;
-    GtkWidget *menuItem;
-    GtkAction *action;
-
-    /* Check signal parameters */
-    g_assert(WEBKIT_IS_WEB_VIEW(webView));
-    g_assert(GTK_IS_MENU(defaultMenu));
-    g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
-    g_assert(!keyboardMode);
-
-    g_object_get(hitTestResult, &quot;context&quot;, &amp;context, NULL);
-    g_assert(context &amp; info-&gt;flag);
-
-    action = gtk_action_new(&quot;TestAction&quot;, &quot;Custom Action&quot;, &quot;Custom Action Tooltip&quot;, NULL);
-    menuItem = gtk_action_create_menu_item(action);
-    g_object_unref(action);
-
-    gtk_menu_shell_append(GTK_MENU_SHELL(defaultMenu), menuItem);
-    gtk_widget_show(menuItem);
-
-    items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
-    iter = items;
-    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
-    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
-    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
-    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
-    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
-    g_assert(!iter);
-
-    g_list_free(items);
-    g_main_loop_quit(loop);
-
-    return TRUE;
-}
-
-static void testContextMenuCustomItem(ContextMenuFixture *fixture, gconstpointer data)
-{
-    GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
-    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture-&gt;webView));
-    gtk_widget_show_all(window);
-    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
-
-    webkit_web_view_load_string(fixture-&gt;webView,
-                                fixture-&gt;info-&gt;data,
-                                &quot;text/html&quot;,
-                                &quot;utf-8&quot;,
-                                &quot;file://&quot;);
-    g_signal_connect(fixture-&gt;webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCustomItemCallback), fixture-&gt;info);
-    pushEvent(fixture-&gt;webView);
-}
-
-int main(int argc, char **argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/testcontextmenu/document&quot;, ContextMenuFixture,
-               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                           WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
-               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
-    /* We hardcode all elements to be at 0,0 so that we know where to generate the button events */
-    g_test_add(&quot;/webkit/testcontextmenu/image&quot;, ContextMenuFixture,
-               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;img style='position:absolute; left:0; top:0' src='0xdeadbeef' width=50 height=50&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                           WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
-               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
-    g_test_add(&quot;/webkit/testcontextmenu/editable&quot;, ContextMenuFixture,
-               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute; left:0; top:0' size='35'&gt;&lt;/input&gt;&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                           WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
-               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
-    g_test_add(&quot;/webkit/testcontextmenu/link&quot;, ContextMenuFixture,
-               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;a style='position:absolute; left:0; top:0' href='http://www.example.com'&gt;HELLO WORLD&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                           WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
-               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
-    g_test_add(&quot;/webkit/testcontextmenu/customitem&quot;, ContextMenuFixture,
-               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                           WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
-               contextMenuFixtureSetup, testContextMenuCustomItem, contextMenuFixtureTeardown);
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestcopyandpastec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcopyandpaste.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcopyandpaste.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcopyandpaste.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,266 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;string.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;webkit/webkit.h&gt;
-#include &lt;JavaScriptCore/JSStringRef.h&gt;
-#include &lt;JavaScriptCore/JSContextRef.h&gt;
-
-typedef struct {
-    char* page;
-    char* expectedContent;
-} TestInfo;
-
-typedef struct {
-    GtkWidget* window;
-    WebKitWebView* webView;
-    GMainLoop* loop;
-    TestInfo* info;
-} CopyAndPasteFixture;
-
-TestInfo*
-test_info_new(const char* page, const char* expectedContent)
-{
-    TestInfo* info;
-    info = g_slice_new0(TestInfo);
-    info-&gt;page = g_strdup(page);
-    if (expectedContent)
-        info-&gt;expectedContent = g_strdup(expectedContent);
-    return info;
-}
-
-void
-test_info_destroy(TestInfo* info)
-{
-    g_free(info-&gt;page);
-    g_free(info-&gt;expectedContent);
-    g_slice_free(TestInfo, info);
-}
-
-static void copy_and_paste_fixture_setup(CopyAndPasteFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-
-    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-
-    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
-}
-
-static void copy_and_paste_fixture_teardown(CopyAndPasteFixture* fixture, gconstpointer data)
-{
-    gtk_widget_destroy(fixture-&gt;window);
-    g_main_loop_unref(fixture-&gt;loop);
-    test_info_destroy(fixture-&gt;info);
-}
-
-static void load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
-{
-    CopyAndPasteFixture* fixture = (CopyAndPasteFixture*)data;
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
-    gtk_clipboard_clear(clipboard);
-
-    webkit_web_view_copy_clipboard(webView);
-
-    gchar* text = gtk_clipboard_wait_for_text(clipboard);
-    g_assert(text || !fixture-&gt;info-&gt;expectedContent);
-    g_assert(!text || !strcmp(text, fixture-&gt;info-&gt;expectedContent));
-    g_free(text);
-
-    // Verify that the markup starts with the proper content-type meta tag prefix.
-    GtkSelectionData* selectionData = gtk_clipboard_wait_for_contents(clipboard, gdk_atom_intern(&quot;text/html&quot;, FALSE));
-    if (selectionData) {
-        static const char* markupPrefix = &quot;&lt;meta http-equiv=\&quot;content-type\&quot; content=\&quot;text/html; charset=utf-8\&quot;&gt;&quot;;
-        char* markup = g_strndup((const char*) gtk_selection_data_get_data(selectionData),
-            gtk_selection_data_get_length(selectionData));
-        g_assert(strlen(markupPrefix) &lt;= strlen(markup));
-        g_assert(!strncmp(markupPrefix, markup, strlen(markupPrefix)));
-        g_free(markup);
-    }
-
-    g_assert(!gtk_clipboard_wait_is_uris_available(clipboard));
-    g_assert(!gtk_clipboard_wait_is_image_available(clipboard));
-
-    g_main_loop_quit(fixture-&gt;loop);
-}
-
-gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
-{
-    CopyAndPasteFixture* fixture = (CopyAndPasteFixture*)data;
-    webkit_web_view_load_string(fixture-&gt;webView, fixture-&gt;info-&gt;page,
-                                &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
-    return FALSE;
-}
-
-static void test_copy_and_paste(CopyAndPasteFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;info = (TestInfo*)data;
-    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), fixture);
-
-    gtk_widget_show(fixture-&gt;window);
-    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
-    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
-    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
-
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;,
-                     G_CALLBACK(load_status_cb), fixture);
-
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static CopyAndPasteFixture* currentFixture;
-static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    gtk_widget_grab_focus(GTK_WIDGET(currentFixture-&gt;webView));
-
-    // Simulate a paste keyboard sequence.
-    GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
-    event-&gt;key.keyval = gdk_unicode_to_keyval('v');
-    event-&gt;key.state = GDK_CONTROL_MASK;
-    event-&gt;key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture-&gt;webView));
-    g_object_ref(event-&gt;key.window);
-#ifndef GTK_API_VERSION_2
-    GdkDeviceManager* manager =  gdk_display_get_device_manager(gdk_window_get_display(event-&gt;key.window));
-    gdk_event_set_device(event, gdk_device_manager_get_client_pointer(manager));
-#endif
-
-    GdkKeymapKey* keys;
-    gint n_keys;
-    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event-&gt;key.keyval, &amp;keys, &amp;n_keys)) {
-        event-&gt;key.hardware_keycode = keys[0].keycode;
-        g_free(keys);
-    }
-
-    gtk_main_do_event(event);
-    event-&gt;key.type = GDK_KEY_RELEASE;
-    gtk_main_do_event(event);
-    gdk_event_free(event);
-
-    JSStringRef scriptString = JSStringCreateWithUTF8CString(&quot;document.body.innerHTML;&quot;);
-    JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
-    JSStringRelease(scriptString);
-
-    g_assert(JSValueIsString(context, value));
-    JSStringRef actual = JSValueToStringCopy(context, value, exception);
-    g_assert(!exception || !*exception);
-    g_assert(currentFixture-&gt;info-&gt;expectedContent);
-    JSStringRef expected = JSStringCreateWithUTF8CString(currentFixture-&gt;info-&gt;expectedContent);
-    g_assert(JSStringIsEqual(expected, actual));
-
-    JSStringRelease(expected);
-    JSStringRelease(actual);
-    g_main_loop_quit(currentFixture-&gt;loop);
-    return JSValueMakeUndefined(context);
-}
-
-static void window_object_cleared_callback(WebKitWebView* web_view, WebKitWebFrame* web_frame, JSGlobalContextRef context, JSObjectRef window_object, gpointer data)
-{
-    JSStringRef name = JSStringCreateWithUTF8CString(&quot;runTest&quot;);
-    JSObjectRef testComplete = JSObjectMakeFunctionWithCallback(context, name, runPasteTestCallback);
-    JSObjectSetProperty(context, window_object, name, testComplete, kJSPropertyAttributeNone, 0);
-    JSStringRelease(name);
-}
-
-static void pasting_test_get_data_callback(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data)
-{
-    gtk_selection_data_set(selection_data, gdk_atom_intern(&quot;text/html&quot;, FALSE), 8, (const guchar*) data, strlen((char*)data) + 1);
-}
-
-static void pasting_test_clear_data_callback(GtkClipboard* clipboard, gpointer data)
-{
-    g_free(data);
-}
-
-static void test_pasting_markup(CopyAndPasteFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;info = (TestInfo*)data;
-    currentFixture = fixture;
-
-    GtkTargetList* targetList = gtk_target_list_new(0, 0);
-    gtk_target_list_add(targetList, gdk_atom_intern(&quot;text/html&quot;, FALSE), 0, 0);
-
-    int numberOfTargets = 1;
-    GtkTargetEntry* targetTable = gtk_target_table_new_from_list(targetList, &amp;numberOfTargets);
-    gtk_clipboard_set_with_data(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD),
-                                targetTable, numberOfTargets,
-                                pasting_test_get_data_callback,
-                                pasting_test_clear_data_callback,
-                                g_strdup(fixture-&gt;info-&gt;expectedContent));
-    gtk_target_list_unref(targetList);
-    gtk_target_table_free(targetTable, numberOfTargets);
-
-    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), fixture);
-    g_signal_connect(fixture-&gt;webView, &quot;window-object-cleared&quot;,
-                     G_CALLBACK(window_object_cleared_callback), fixture);
-
-    gtk_widget_show(fixture-&gt;window);
-    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
-    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
-
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    const char* selected_span_html = &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;document.getSelection().selectAllChildren(document.getElementById('mainspan'));\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    const char* no_selection_html = &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    g_test_add(&quot;/webkit/copyandpaste/selection&quot;, CopyAndPasteFixture,
-               test_info_new(selected_span_html, &quot;All work and no play make Jack a dull boy.&quot;),
-               copy_and_paste_fixture_setup,
-               test_copy_and_paste,
-               copy_and_paste_fixture_teardown);
-    g_test_add(&quot;/webkit/copyandpaste/no-selection&quot;, CopyAndPasteFixture,
-               test_info_new(no_selection_html, 0),
-               copy_and_paste_fixture_setup,
-               test_copy_and_paste,
-               copy_and_paste_fixture_teardown);
-
-    const char* paste_test_html = &quot;&lt;html&gt;&quot;
-        &quot;&lt;body onLoad=\&quot;document.body.focus(); runTest();\&quot; contentEditable=\&quot;true\&quot;&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-    g_test_add(&quot;/webkit/copyandpaste/paste-markup&quot;, CopyAndPasteFixture,
-               test_info_new(paste_test_html, &quot;bobby&quot;),
-               copy_and_paste_fixture_setup,
-               test_pasting_markup,
-               copy_and_paste_fixture_teardown);
-
-    return g_test_run();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdocumentc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdocument.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdocument.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdocument.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,428 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-#define HTML_DOCUMENT_TITLE &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_ELEMENTS &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;li&gt;3&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_ELEMENTS_CLASS &quot;&lt;html&gt;&lt;body&gt;&lt;div class=\&quot;test\&quot;&gt;&lt;/div&gt;&lt;div class=\&quot;strange\&quot;&gt;&lt;/div&gt;&lt;div class=\&quot;test\&quot;&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_ELEMENTS_ID &quot;&lt;html&gt;&lt;body&gt;&lt;div id=\&quot;testok\&quot;&gt;&lt;/div&gt;&lt;div id=\&quot;testbad\&quot;&gt;first&lt;/div&gt;&lt;div id=\&quot;testbad\&quot;&gt;second&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_LINKS &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;a href=\&quot;about:blank\&quot;&gt;blank&lt;/a&gt;&lt;a href=\&quot;http://www.google.com\&quot;&gt;google&lt;/a&gt;&lt;a href=\&quot;http://www.webkit.org\&quot;&gt;webkit&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_IFRAME &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;IFrame&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;iframe id='iframe'&gt;&lt;/iframe&gt;&lt;div id='test'&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_TABLE &quot;&lt;html&gt;&lt;body&gt;&lt;table id=\&quot;table\&quot;&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_EVALUATE &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;div&gt;First div&lt;/div&gt;&lt;div&gt;Second div&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-
-typedef struct {
-    GtkWidget* webView;
-    GMainLoop* loop;
-} DomDocumentFixture;
-
-static gboolean finish_loading(DomDocumentFixture* fixture)
-{
-    if (g_main_loop_is_running(fixture-&gt;loop))
-        g_main_loop_quit(fixture-&gt;loop);
-
-    return FALSE;
-}
-
-static void dom_document_fixture_setup(DomDocumentFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;webView = webkit_web_view_new();
-    g_object_ref_sink(fixture-&gt;webView);
-
-    if (data != NULL)
-        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
-
-    g_idle_add((GSourceFunc)finish_loading, fixture);
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void dom_document_fixture_teardown(DomDocumentFixture* fixture, gconstpointer data)
-{
-    if (fixture-&gt;webView)
-        g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static void test_dom_document_title(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    gchar* title = webkit_dom_document_get_title(document);
-    g_assert(title);
-    g_assert_cmpstr(title, ==, &quot;This is the title&quot;);
-    g_free(title);
-    webkit_dom_document_set_title(document, &quot;This is the second title&quot;);
-    title = webkit_dom_document_get_title(document);
-    g_assert(title);
-    g_assert_cmpstr(title, ==, &quot;This is the second title&quot;);
-    g_free(title);
-}
-
-static void test_dom_document_get_elements_by_tag_name(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;li&quot;);
-    g_assert(list);
-    gulong length = webkit_dom_node_list_get_length(list);
-    g_assert_cmpint(length, ==, 3);
-
-    guint i;
-
-    for (i = 0; i &lt; length; i++) {
-        WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
-        g_assert(item);
-        WebKitDOMElement* element = (WebKitDOMElement*)item;
-        g_assert(element);
-        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;LI&quot;);
-        WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
-        char* n = g_strdup_printf(&quot;%d&quot;, i+1);
-        g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, n);
-        g_free(n);
-    }
-
-    g_object_unref(list);
-}
-
-static void test_dom_document_get_elements_by_class_name(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_class_name(document, &quot;test&quot;);
-    g_assert(list);
-    gulong length = webkit_dom_node_list_get_length(list);
-    g_assert_cmpint(length, ==, 2);
-
-    guint i;
-
-    for (i = 0; i &lt; length; i++) {
-        WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
-        g_assert(item);
-        WebKitDOMElement* element = (WebKitDOMElement*)item;
-        g_assert(element);
-        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;DIV&quot;);
-    }
-
-    g_object_unref(list);
-}
-
-static void test_dom_document_get_element_by_id(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, &quot;testok&quot;);
-    g_assert(element);
-    element = webkit_dom_document_get_element_by_id(document, &quot;this-id-does-not-exist&quot;);
-    g_assert(element == 0);
-    /* The DOM spec says the return value is undefined when there's
-     * more than one element with the same id; in our case the first
-     * one will be returned */
-    element = webkit_dom_document_get_element_by_id(document, &quot;testbad&quot;);
-    g_assert(element);
-    WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
-    g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, &quot;first&quot;);
-}
-
-static void test_dom_document_get_links(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    WebKitDOMHTMLCollection *collection = webkit_dom_document_get_links(document);
-    g_assert(collection);
-    gulong length = webkit_dom_html_collection_get_length(collection);
-    g_assert_cmpint(length, ==, 3);
-
-    guint i;
-
-    for (i = 0; i &lt; length; i++) {
-        static const char* names[] = { &quot;blank&quot;, &quot;google&quot;, &quot;webkit&quot; };
-        static const char* uris[] = { &quot;about:blank&quot;, &quot;http://www.google.com/&quot;, &quot;http://www.webkit.org/&quot; };
-        WebKitDOMNode *node = webkit_dom_html_collection_item(collection, i);
-        g_assert(node);
-        WebKitDOMElement* element = (WebKitDOMElement*)node;
-        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;A&quot;);
-        WebKitDOMHTMLElement *htmlElement = (WebKitDOMHTMLElement*)element;
-        g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, names[i]);
-        WebKitDOMHTMLAnchorElement *anchor = (WebKitDOMHTMLAnchorElement*)element;
-        g_assert_cmpstr(webkit_dom_html_anchor_element_get_href(anchor), ==, uris[i]);
-    }
-    g_object_unref(collection);
-}
-
-static void test_dom_document_insert_row(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-    WebKitDOMElement* table = webkit_dom_document_get_element_by_id(document, &quot;table&quot;);
-    g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(table));
-    WebKitDOMHTMLCollection* rows = webkit_dom_html_table_element_get_rows(WEBKIT_DOM_HTML_TABLE_ELEMENT(table));
-    g_assert(WEBKIT_DOM_IS_HTML_COLLECTION(rows));
-
-    // Table is initially empty.
-    g_assert_cmpint(webkit_dom_html_collection_get_length(rows), ==, 0);
-    WebKitDOMHTMLElement* row = webkit_dom_html_table_element_insert_row(WEBKIT_DOM_HTML_TABLE_ELEMENT(table), -1, NULL);
-    g_assert(WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT(row));
-    rows = webkit_dom_html_table_element_get_rows(WEBKIT_DOM_HTML_TABLE_ELEMENT(table));
-    g_assert(WEBKIT_DOM_IS_HTML_COLLECTION(rows));
-    g_assert_cmpint(webkit_dom_html_collection_get_length(rows), ==, 1);
-}
-
-static void test_dom_document_evaluate(DomDocumentFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;html&quot;);
-    g_assert(list);
-    gulong length = webkit_dom_node_list_get_length(list);
-    g_assert_cmpint(length, ==, 1);
-    WebKitDOMNode* html = webkit_dom_node_list_item(list, 0);
-    g_assert(WEBKIT_DOM_IS_NODE(html));
-
-    WebKitDOMXPathResult* result = webkit_dom_document_evaluate(document, &quot;//div&quot;, html, NULL, 0, NULL, NULL);
-    g_assert(WEBKIT_DOM_IS_XPATH_RESULT(result));
-
-    int i = 0;
-    WebKitDOMNode* node;
-    while ( (node = webkit_dom_xpath_result_iterate_next(result, NULL)) != NULL) {
-        g_assert(node);
-        WebKitDOMElement* element = (WebKitDOMElement*)node;
-        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;DIV&quot;);
-        i++;
-    }
-    g_assert_cmpint(i, ==, 2);
-
-    g_object_unref(list);
-}
-
-static void weak_notify(gpointer data, GObject* zombie)
-{
-    guint* count = (guint*)data;
-    (*count)++;
-}
-
-static void test_dom_document_garbage_collection(DomDocumentFixture* fixture, gconstpointer data)
-{
-    guint count = 0;
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
-    WebKitDOMHTMLHeadElement* head = webkit_dom_document_get_head(document);
-    g_assert(head);
-    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
-    WebKitDOMHTMLElement* body = webkit_dom_document_get_body(document);
-    g_assert(body);
-    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
-    WebKitDOMHTMLCollection *collection = webkit_dom_document_get_links(document);
-    g_assert(collection);
-    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_LINKS, NULL, NULL, NULL);
-
-    while (g_main_context_pending(NULL))
-        g_main_context_iteration(NULL, FALSE);
-
-    g_assert_cmpuint(count, ==, 3);
-
-    g_object_unref(collection);
-    g_assert_cmpuint(count, ==, 4);
-
-    count = 0;
-
-    document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
-    head = webkit_dom_document_get_head(document);
-    g_assert(head);
-    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
-    body = webkit_dom_document_get_body(document);
-    g_assert(body);
-    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
-    collection = webkit_dom_document_get_links(document);
-    g_assert(collection);
-    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
-    /* Ask twice for the same object */
-    WebKitDOMHTMLCollection* collection2 = webkit_dom_document_get_links(document);
-    g_assert(collection2);
-    g_object_weak_ref(G_OBJECT(collection2), (GWeakNotify)weak_notify, &amp;count);
-
-    g_object_unref(document);
-    g_object_unref(head);
-    g_object_unref(body);
-    g_object_unref(collection);
-    g_object_unref(collection2);
-
-    g_assert_cmpuint(count, ==, 5);
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_IFRAME, NULL, NULL, NULL);
-
-    while (g_main_context_pending(NULL))
-        g_main_context_iteration(NULL, FALSE);
-
-    count = 0;
-
-    document = webkit_web_view_get_dom_document(view);
-    WebKitDOMElement* div = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
-    g_assert(div);
-    g_object_weak_ref(G_OBJECT(div), (GWeakNotify)weak_notify, &amp;count);
-    WebKitDOMElement* iframe = webkit_dom_document_get_element_by_id(document, &quot;iframe&quot;);
-    g_assert(iframe);
-
-    webkit_dom_element_set_attribute(iframe, &quot;src&quot;, &quot;data:&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;/html&gt;&quot;, NULL);
-
-    while (g_main_context_pending(NULL))
-        g_main_context_iteration(NULL, FALSE);
-
-    WebKitDOMDocument* iframeDocument = webkit_dom_html_iframe_element_get_content_document(WEBKIT_DOM_HTML_IFRAME_ELEMENT(iframe));
-    g_assert(iframeDocument);
-    head = webkit_dom_document_get_head(iframeDocument);
-    g_assert(head);
-    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
-
-    webkit_dom_element_set_attribute(iframe, &quot;src&quot;, &quot;about:blank&quot;, NULL);
-
-    while (g_main_context_pending(NULL))
-        g_main_context_iteration(NULL, FALSE);
-
-    g_assert_cmpuint(count, ==, 1);
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_LINKS, NULL, NULL, NULL);
-
-    while (g_main_context_pending(NULL))
-        g_main_context_iteration(NULL, FALSE);
-
-    g_assert_cmpuint(count, ==, 2);
-
-    count = 0;
-
-    document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
-    /* Ask twice for the Document */
-    WebKitDOMDocument* document2 = webkit_web_view_get_dom_document(view);
-    g_assert(document2);
-    g_object_weak_ref(G_OBJECT(document2), (GWeakNotify)weak_notify, &amp;count);
-    head = webkit_dom_document_get_head(document);
-    g_assert(head);
-    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
-    body = webkit_dom_document_get_body(document);
-    g_assert(body);
-    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
-    collection = webkit_dom_document_get_links(document);
-    g_assert(collection);
-    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
-
-    gtk_widget_destroy(fixture-&gt;webView);
-    fixture-&gt;webView = NULL;
-
-    g_assert_cmpuint(count, ==, 4);
-
-    g_object_unref(collection);
-
-    g_assert_cmpuint(count, ==, 5);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/domdocument/test_title&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_TITLE,
-               dom_document_fixture_setup,
-               test_dom_document_title,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_get_elements_by_tag_name&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS,
-               dom_document_fixture_setup,
-               test_dom_document_get_elements_by_tag_name,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_get_elements_by_class_name&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_CLASS,
-               dom_document_fixture_setup,
-               test_dom_document_get_elements_by_class_name,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_get_element_by_id&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_ID,
-               dom_document_fixture_setup,
-               test_dom_document_get_element_by_id,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_get_links&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_LINKS,
-               dom_document_fixture_setup,
-               test_dom_document_get_links,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_table_insert_row&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_TABLE,
-               dom_document_fixture_setup,
-               test_dom_document_insert_row,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_document_evaluate&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_EVALUATE,
-               dom_document_fixture_setup,
-               test_dom_document_evaluate,
-               dom_document_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdocument/test_garbage_collection&quot;,
-               DomDocumentFixture, HTML_DOCUMENT_LINKS,
-               dom_document_fixture_setup,
-               test_dom_document_garbage_collection,
-               dom_document_fixture_teardown);
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdomwindowc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdomwindow.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdomwindow.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdomwindow.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,258 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-#define HTML_DOCUMENT &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;style type='text/css'&gt;#test { font-size: 16px; }&lt;/style&gt;&lt;body&gt;&lt;p id='test'&gt;test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-
-typedef struct {
-    GtkWidget* webView;
-    GtkWidget* window;
-    WebKitDOMDOMWindow* domWindow;
-    GMainLoop* loop;
-
-    gboolean loaded;
-    gboolean clicked;
-    gconstpointer data;
-} DomDomviewFixture;
-
-static gboolean finish_loading(DomDomviewFixture* fixture)
-{
-    if (g_main_loop_is_running(fixture-&gt;loop))
-        g_main_loop_quit(fixture-&gt;loop);
-
-    return FALSE;
-}
-
-static void dom_domview_fixture_setup(DomDomviewFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    fixture-&gt;webView = webkit_web_view_new();
-    fixture-&gt;data = data;
-
-    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
-}
-
-static void dom_domview_fixture_teardown(DomDomviewFixture* fixture, gconstpointer data)
-{
-    gtk_widget_destroy(fixture-&gt;window);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static void dom_dom_window_fixture_setup(DomDomviewFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;webView = webkit_web_view_new();
-    g_object_ref_sink(fixture-&gt;webView);
-
-    if (data != NULL)
-        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
-
-    g_idle_add((GSourceFunc)finish_loading, fixture);
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void dom_dom_window_fixture_teardown(DomDomviewFixture* fixture, gconstpointer data)
-{
-    if (fixture-&gt;webView)
-        g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static gboolean loadedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, DomDomviewFixture* fixture)
-{
-    g_assert(fixture-&gt;loaded == FALSE);
-    fixture-&gt;loaded = TRUE;
-
-    return FALSE;
-}
-
-static gboolean clickedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, DomDomviewFixture* fixture)
-{
-    WebKitDOMEventTarget* target;
-    gushort phase;
-
-    g_assert(event);
-    g_assert(WEBKIT_DOM_IS_EVENT(event));
-
-    // We should catch this in the bubbling up phase, since we are connecting to the toplevel object
-    phase = webkit_dom_event_get_event_phase(event);
-    g_assert_cmpint(phase, ==, 3);
-
-    target = webkit_dom_event_get_current_target(event);
-    g_assert(target == WEBKIT_DOM_EVENT_TARGET(view));
-
-    g_assert(fixture-&gt;clicked == FALSE);
-    fixture-&gt;clicked = TRUE;
-
-    finish_loading(fixture);
-
-    return FALSE;
-}
-
-gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, DomDomviewFixture* fixture)
-{
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*)fixture-&gt;data, NULL, NULL, NULL);
-
-    return FALSE;
-}
-
-static void load_event_callback(WebKitWebView* webView, GParamSpec* spec, DomDomviewFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status == WEBKIT_LOAD_FINISHED) {
-        webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(fixture-&gt;domWindow), &quot;click&quot;, G_CALLBACK(clickedCallback), false, fixture);
-
-        g_assert(fixture-&gt;clicked == FALSE);
-        gtk_test_widget_click(GTK_WIDGET(fixture-&gt;webView), 1, 0);
-    }
-
-}
-
-static void test_dom_domview_signals(DomDomviewFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture);
-    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
-    g_assert(view);
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
-    g_assert(document);
-    WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
-    g_assert(domWindow);
-
-    fixture-&gt;domWindow = domWindow;
-
-    webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(fixture-&gt;domWindow), &quot;load&quot;, G_CALLBACK(loadedCallback), false, fixture);
-    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;, G_CALLBACK(map_event_cb), fixture);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_event_callback), fixture);
-
-    gtk_widget_show_all(fixture-&gt;window);
-    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
-
-    g_main_loop_run(fixture-&gt;loop);
-
-    g_assert(fixture-&gt;loaded);
-    g_assert(fixture-&gt;clicked);
-}
-
-static gboolean
-clicked_cb(WebKitDOMEventTarget* target, WebKitDOMEvent* event, DomDomviewFixture* fixture)
-{
-    g_assert(fixture-&gt;clicked == FALSE);
-    fixture-&gt;clicked = TRUE;
-    finish_loading(fixture);
-    return FALSE;
-}
-
-static void load_status_callback(WebKitWebView* webView, GParamSpec* spec, DomDomviewFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status == WEBKIT_LOAD_FINISHED) {
-        WebKitDOMDocument* document;
-        WebKitDOMDOMWindow* domWindow;
-        WebKitDOMElement* element;
-        WebKitDOMEvent* event;
-        glong clientX, clientY;
-
-        document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
-        g_assert(document);
-        domWindow = webkit_dom_document_get_default_view(document);
-        g_assert(domWindow);
-        fixture-&gt;domWindow = domWindow;
-
-        element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
-        g_assert(element);
-        event = webkit_dom_document_create_event(document, &quot;MouseEvent&quot;, NULL);
-        g_assert(event);
-        g_assert(WEBKIT_DOM_IS_EVENT(event));
-        g_assert(WEBKIT_DOM_IS_MOUSE_EVENT(event));
-        clientX = webkit_dom_element_get_client_left(element);
-        clientY = webkit_dom_element_get_client_top(element);
-        webkit_dom_mouse_event_init_mouse_event(WEBKIT_DOM_MOUSE_EVENT(event),
-                                                &quot;click&quot;, TRUE, TRUE,
-                                                fixture-&gt;domWindow, 0, 0, 0, clientX, clientY,
-                                                FALSE, FALSE, FALSE, FALSE,
-                                                1, WEBKIT_DOM_EVENT_TARGET(element));
-        webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(element), &quot;click&quot;, G_CALLBACK(clicked_cb), false, fixture);
-        g_assert(fixture-&gt;clicked == FALSE);
-        webkit_dom_event_target_dispatch_event(WEBKIT_DOM_EVENT_TARGET(element), event, NULL);
-    }
-
-}
-
-static void test_dom_domview_dispatch_event(DomDomviewFixture* fixture, gconstpointer data)
-{
-    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;, G_CALLBACK(map_event_cb), fixture);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_status_callback), fixture);
-
-    gtk_widget_show_all(fixture-&gt;window);
-    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
-
-    g_main_loop_run (fixture-&gt;loop);
-    g_assert(fixture-&gt;clicked);
-}
-
-static void test_dom_dom_window_get_computed_style(DomDomviewFixture* fixture, gconstpointer data)
-{
-    WebKitDOMDocument* document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
-    g_assert(document);
-    WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
-    g_assert(domWindow);
-
-    WebKitDOMElement*  element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
-    g_assert(element);
-    g_assert(WEBKIT_DOM_IS_ELEMENT(element));
-    WebKitDOMCSSStyleDeclaration* cssStyle = webkit_dom_dom_window_get_computed_style(domWindow, element, NULL);
-    gchar* fontSize = webkit_dom_css_style_declaration_get_property_value(cssStyle, &quot;font-size&quot;);
-    g_assert_cmpstr(fontSize, ==, &quot;16px&quot;);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/domdomview/signals&quot;,
-               DomDomviewFixture, HTML_DOCUMENT,
-               dom_domview_fixture_setup,
-               test_dom_domview_signals,
-               dom_domview_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdomview/dispatch_event&quot;,
-               DomDomviewFixture, HTML_DOCUMENT,
-               dom_domview_fixture_setup,
-               test_dom_domview_dispatch_event,
-               dom_domview_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domdomwindow/get_computed_style&quot;,
-               DomDomviewFixture, HTML_DOCUMENT,
-               dom_dom_window_fixture_setup,
-               test_dom_dom_window_get_computed_style,
-               dom_dom_window_fixture_teardown);
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomnodec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomnode.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomnode.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomnode.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,219 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-#define HTML_DOCUMENT_HIERARCHY_NAVIGATION &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;1&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;&lt;p&gt;3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-#define HTML_DOCUMENT_NODE_INSERTION &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;
-
-typedef struct {
-    GtkWidget* webView;
-    GMainLoop* loop;
-} DomNodeFixture;
-
-static gboolean finish_loading(DomNodeFixture* fixture)
-{
-    if (g_main_loop_is_running(fixture-&gt;loop))
-        g_main_loop_quit(fixture-&gt;loop);
-
-    return FALSE;
-}
-
-static void dom_node_fixture_setup(DomNodeFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;webView = webkit_web_view_new();
-    g_object_ref_sink(fixture-&gt;webView);
-
-    if (data != NULL)
-        webkit_web_view_load_string(WEBKIT_WEB_VIEW(fixture-&gt;webView), (const char*)data, NULL, NULL, NULL);
-
-    g_idle_add((GSourceFunc)finish_loading, fixture);
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void dom_node_fixture_teardown(DomNodeFixture* fixture, gconstpointer data)
-{
-    g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static void test_dom_node_hierarchy_navigation(DomNodeFixture* fixture, gconstpointer data)
-{
-    WebKitDOMDocument* document;
-    WebKitDOMHTMLHeadElement* head;
-    WebKitDOMHTMLBodyElement* body;
-    WebKitDOMNodeList* list;
-    WebKitDOMNode* ptr;
-    gulong i, length;
-
-    document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
-    g_assert(document);
-    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-    head = webkit_dom_document_get_head(document);
-    g_assert(head);
-    g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head));
-
-    /* Title, head's child */
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(head));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
-    ptr = webkit_dom_node_list_item(list, 0);
-    g_assert(ptr);
-    g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(ptr));
-    g_object_unref(list);
-
-    /* Body, Head sibling */
-    ptr = webkit_dom_node_get_next_sibling(WEBKIT_DOM_NODE(head));
-    g_assert(ptr);
-    body = WEBKIT_DOM_HTML_BODY_ELEMENT(ptr);
-    g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(body));
-
-    /* There is no third sibling */
-    ptr = webkit_dom_node_get_next_sibling(ptr);
-    g_assert(ptr == NULL);
-
-    /* Body's previous sibling is Head */
-    ptr = webkit_dom_node_get_previous_sibling(WEBKIT_DOM_NODE(body));
-    g_assert(ptr);
-    g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(ptr));
-
-    /* Body has 3 children */
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    length = webkit_dom_node_list_get_length(list);
-    g_assert_cmpint(length, ==, 3);
-
-    /* The three of them are P tags */
-    for (i = 0; i &lt; length; i++) {
-        ptr = webkit_dom_node_list_item(list, i);
-        g_assert(ptr);
-        g_assert(WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT(ptr));
-    }
-
-    /* Go backwards */
-    for (i = 0; ptr; ptr = webkit_dom_node_get_previous_sibling(ptr), i++)
-        /* Nothing */;
-
-    g_assert_cmpint(i, ==, 3);
-    g_object_unref(list);
-}
-
-static void test_dom_node_insertion(DomNodeFixture* fixture, gconstpointer data)
-{
-    WebKitDOMDocument* document;
-    WebKitDOMHTMLElement* body;
-    WebKitDOMElement* p, *div;
-    WebKitDOMNodeList* list;
-    WebKitDOMNode* node;
-
-    document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
-    g_assert(document);
-    body = webkit_dom_document_get_body(document);
-    g_assert(body);
-    g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(body));
-
-    /* Body shouldn't have any children at this point */
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)) == FALSE);
-
-    /* Insert one P element */
-    p = webkit_dom_document_create_element(document, &quot;P&quot;, NULL);
-    webkit_dom_node_append_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), NULL);
-
-    /* Now it should have one, the same that we inserted */
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
-    node = webkit_dom_node_list_item(list, 0);
-    g_assert(node);
-    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
-    g_object_unref(list);
-
-    /* Replace the P tag with a DIV tag */
-    div = webkit_dom_document_create_element(document, &quot;DIV&quot;, NULL);
-    webkit_dom_node_replace_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), WEBKIT_DOM_NODE(p), NULL);
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
-    node = webkit_dom_node_list_item(list, 0);
-    g_assert(node);
-    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-    g_object_unref(list);
-
-    /* Now remove the tag */
-    webkit_dom_node_remove_child(WEBKIT_DOM_NODE(body), node, NULL);
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 0);
-    g_object_unref(list);
-
-    /* Test insert_before */
-
-    /* If refChild is null, insert newChild as last element of parent */
-    div = webkit_dom_document_create_element(document, &quot;DIV&quot;, NULL);
-    webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), NULL, NULL);
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
-    node = webkit_dom_node_list_item(list, 0);
-    g_assert(node);
-    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-    g_object_unref(list);
-
-    /* Now insert a 'p' before 'div' */
-    p = webkit_dom_document_create_element(document, &quot;P&quot;, NULL);
-    webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), WEBKIT_DOM_NODE(div), NULL);
-    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
-    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 2);
-    node = webkit_dom_node_list_item(list, 0);
-    g_assert(node);
-    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
-    node = webkit_dom_node_list_item(list, 1);
-    g_assert(node);
-    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-    g_object_unref(list);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/domnode/test_hierarchy_navigation&quot;,
-               DomNodeFixture, HTML_DOCUMENT_HIERARCHY_NAVIGATION,
-               dom_node_fixture_setup,
-               test_dom_node_hierarchy_navigation,
-               dom_node_fixture_teardown);
-
-    g_test_add(&quot;/webkit/domnode/test_insertion&quot;,
-               DomNodeFixture, HTML_DOCUMENT_NODE_INSERTION,
-               dom_node_fixture_setup,
-               test_dom_node_insertion,
-               dom_node_fixture_teardown);
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestdownloadc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdownload.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdownload.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdownload.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,322 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Christian Dywan &lt;christian@twotoasts.de&gt;
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-GMainLoop* loop;
-char* temporaryFilename = NULL;
-WebKitDownload* theDownload = NULL;
-
-static void
-test_webkit_download_create(void)
-{
-    WebKitNetworkRequest* request;
-    WebKitDownload* download;
-    const gchar* uri = &quot;http://example.com&quot;;
-    gchar* tmpDir;
-
-    request = webkit_network_request_new(uri);
-    download = webkit_download_new(request);
-    g_object_unref(request);
-    g_assert_cmpstr(webkit_download_get_uri(download), ==, uri);
-    g_assert(webkit_download_get_network_request(download) == request);
-    g_assert(g_strrstr(uri, webkit_download_get_suggested_filename(download)));
-    g_assert(webkit_download_get_status(download) == WEBKIT_DOWNLOAD_STATUS_CREATED);
-    g_assert(!webkit_download_get_total_size(download));
-    g_assert(!webkit_download_get_current_size(download));
-    g_assert(!webkit_download_get_progress(download));
-    g_assert(!webkit_download_get_elapsed_time(download));
-    tmpDir = g_filename_to_uri(g_get_tmp_dir(), NULL, NULL);
-    webkit_download_set_destination_uri(download, tmpDir);
-    g_assert_cmpstr(tmpDir, ==, webkit_download_get_destination_uri(download));;
-    g_free(tmpDir);
-    g_object_unref(download);
-}
-
-static gboolean
-navigation_policy_decision_requested_cb(WebKitWebView* web_view,
-                                        WebKitWebFrame* web_frame,
-                                        WebKitNetworkRequest* request,
-                                        WebKitWebNavigationAction* action,
-                                        WebKitWebPolicyDecision* decision,
-                                        gpointer data)
-{
-    webkit_web_policy_decision_download(decision);
-    return TRUE;
-}
-
-static void
-notify_status_cb(GObject* object, GParamSpec* pspec, gpointer data)
-{
-    WebKitDownload* download = WEBKIT_DOWNLOAD(object);
-    switch (webkit_download_get_status(download)) {
-    case WEBKIT_DOWNLOAD_STATUS_FINISHED:
-    case WEBKIT_DOWNLOAD_STATUS_ERROR:
-        g_main_loop_quit(loop);
-        break;
-    case WEBKIT_DOWNLOAD_STATUS_CANCELLED:
-        g_assert_not_reached();
-        break;
-    default:
-        break;
-    }
-}
-
-static gboolean
-set_filename(gchar* filename)
-{
-    gchar *uri = g_filename_to_uri(filename, NULL, NULL);
-
-    webkit_download_set_destination_uri(theDownload, uri);
-    g_free(uri);
-
-    webkit_download_start(theDownload);
-    return FALSE;
-}
-
-static void
-handle_download_requested_cb(WebKitDownload* download,
-                             gboolean* beenThere,
-                             gboolean asynch)
-{
-    theDownload = download;
-    *beenThere = TRUE;
-
-    if (temporaryFilename) {
-        if (asynch) {
-            g_idle_add((GSourceFunc)set_filename, temporaryFilename);
-        } else {
-            gchar *uri = g_filename_to_uri(temporaryFilename, NULL, NULL);
-            if (uri)
-                webkit_download_set_destination_uri(download, uri);
-            g_free(uri);
-        }
-    }
-
-    g_signal_connect(download, &quot;notify::status&quot;,
-                     G_CALLBACK(notify_status_cb), NULL);
-}
-
-static gboolean
-download_requested_cb(WebKitWebView* web_view,
-                      WebKitDownload* download,
-                      gboolean* beenThere)
-{
-    handle_download_requested_cb(download, beenThere, FALSE);
-    return TRUE;
-}
-
-static gboolean
-download_requested_asynch_cb(WebKitWebView* web_view,
-                             WebKitDownload* download,
-                             gboolean* beenThere)
-{
-    handle_download_requested_cb(download, beenThere, TRUE);
-    return TRUE;
-}
-
-static void
-test_webkit_download_perform(gboolean asynch)
-{
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GCallback downloadRequestCallback = NULL;
-
-    g_object_ref_sink(G_OBJECT(webView));
-
-    g_signal_connect(webView, &quot;navigation-policy-decision-requested&quot;,
-                     G_CALLBACK(navigation_policy_decision_requested_cb),
-                     NULL);
-
-    if (asynch)
-        downloadRequestCallback = G_CALLBACK(download_requested_asynch_cb);
-    else
-        downloadRequestCallback = G_CALLBACK(download_requested_cb);
-
-    gboolean beenThere = FALSE;
-    g_signal_connect(webView, &quot;download-requested&quot;,
-                     downloadRequestCallback, &amp;beenThere);
-
-    /* Preparation; FIXME: we should move this code to a test
-     * utilities file, because we have a very similar one in
-     * testwebframe.c */
-    GError *error = NULL;
-    gchar* filename;
-    int fd = g_file_open_tmp(&quot;webkit-testwebdownload-XXXXXX&quot;, &amp;filename, &amp;error);
-    close(fd);
-
-    if (error)
-        g_critical(&quot;Failed to open a temporary file for writing: %s.&quot;, error-&gt;message);
-
-    if (g_unlink(filename) == -1)
-        g_critical(&quot;Failed to delete the temporary file: %s.&quot;, g_strerror(errno));
-
-    theDownload = NULL;
-    temporaryFilename = filename;
-
-    loop = g_main_loop_new(NULL, TRUE);
-    webkit_web_view_load_uri(webView, &quot;http://gnome.org/&quot;);
-    g_main_loop_run(loop);
-
-    g_assert_cmpint(beenThere, ==, TRUE);
-
-    g_assert_cmpint(g_file_test(temporaryFilename, G_FILE_TEST_IS_REGULAR), ==, TRUE);
-
-    g_unlink(temporaryFilename);
-    g_free(temporaryFilename);
-    temporaryFilename = NULL;
-
-    g_main_loop_unref(loop);
-    g_object_unref(webView);
-}
-
-static void
-test_webkit_download_synch(void)
-{
-    test_webkit_download_perform(FALSE);
-}
-
-static void
-test_webkit_download_asynch(void)
-{
-    test_webkit_download_perform(TRUE);
-}
-
-static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame,
-                                                       WebKitNetworkRequest* request, const char* mime_type,
-                                                       WebKitWebPolicyDecision* decision, gpointer data)
-{
-    webkit_web_policy_decision_download(decision);
-    return TRUE;
-}
-
-static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
-        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
-        g_main_loop_quit(loop);
-}
-
-static void
-test_webkit_download_data(void)
-{
-    gboolean beenThere = FALSE;
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-
-    g_signal_connect(webView, &quot;download-requested&quot;,
-                     G_CALLBACK(download_requested_cb),
-                     &amp;beenThere);
-
-    g_signal_connect(webView, &quot;notify::load-status&quot;,
-                     G_CALLBACK(idle_quit_loop_cb),
-                     NULL);
-
-    g_signal_connect(webView, &quot;mime-type-policy-decision-requested&quot;,
-                     G_CALLBACK(mime_type_policy_decision_requested_cb),
-                     NULL);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    /* We're testing for a crash, so just not crashing is a pass */
-    webkit_web_view_load_uri(webView, &quot;data:application/octect-stream,&quot;);
-    g_main_loop_run(loop);
-
-    g_assert_cmpint(beenThere, ==, TRUE);
-
-    g_main_loop_unref(loop);
-    g_object_unref(webView);
-}
-
-static void notifyDownloadStatusCallback(GObject *object, GParamSpec *pspec, gpointer data)
-{
-    WebKitDownload *download = WEBKIT_DOWNLOAD(object);
-    WebKitNetworkResponse *response = webkit_download_get_network_response(download);
-    SoupMessage *message = webkit_network_response_get_message(response);
-
-    switch (webkit_download_get_status(download)) {
-    case WEBKIT_DOWNLOAD_STATUS_ERROR:
-        g_assert_cmpint(message-&gt;status_code, ==, 404);
-        g_main_loop_quit(loop);
-        break;
-    case WEBKIT_DOWNLOAD_STATUS_FINISHED:
-    case WEBKIT_DOWNLOAD_STATUS_CANCELLED:
-        g_assert_not_reached();
-        break;
-    default:
-        break;
-    }
-}
-
-static void serverCallback(SoupServer *server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *context, gpointer userData)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-static void test_webkit_download_not_found(void)
-{
-    SoupServer *server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-    soup_server_add_handler(server, NULL, serverCallback, NULL, NULL);
-    SoupURI *baseURI = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(baseURI, soup_server_get_port(server));
-
-    SoupURI *uri = soup_uri_new_with_base(baseURI, &quot;/foo&quot;);
-    char *uriString = soup_uri_to_string(uri, FALSE);
-    soup_uri_free(uri);
-
-    loop = g_main_loop_new(NULL, TRUE);
-    WebKitNetworkRequest *request = webkit_network_request_new(uriString);
-    g_free (uriString);
-    WebKitDownload *download = webkit_download_new(request);
-    g_object_unref(request);
-
-    webkit_download_set_destination_uri(download, &quot;file:///tmp/foo&quot;);
-    g_signal_connect(download, &quot;notify::status&quot;, G_CALLBACK(notifyDownloadStatusCallback), NULL);
-
-    webkit_download_start(download);
-    g_main_loop_run(loop);
-
-    g_object_unref(download);
-    g_main_loop_unref(loop);
-    soup_uri_free(baseURI);
-    g_object_unref(server);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/download/create&quot;, test_webkit_download_create);
-    g_test_add_func(&quot;/webkit/download/synch&quot;, test_webkit_download_synch);
-    g_test_add_func(&quot;/webkit/download/asynch&quot;, test_webkit_download_asynch);
-    g_test_add_func(&quot;/webkit/download/data&quot;, test_webkit_download_data);
-    g_test_add_func(&quot;/webkit/download/not-found&quot;, test_webkit_download_not_found);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestfavicondatabasec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testfavicondatabase.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testfavicondatabase.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testfavicondatabase.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,276 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-const int gIconSize = 16;
-
-GMainLoop *loop;
-char *baseURI;
-
-static void
-serverCallback(SoupServer *server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *context, void *data)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    char *contents;
-    gsize length;
-    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
-        GError *error = NULL;
-
-        g_file_get_contents(&quot;blank.ico&quot;, &amp;contents, &amp;length, &amp;error);
-        g_assert(!error);
-    } else {
-        contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;);
-        length = strlen(contents);
-    }
-
-    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-static void deleteDatabaseFileIfExists(const char *databasePath)
-{
-    if (!g_file_test(databasePath, G_FILE_TEST_IS_DIR))
-        return;
-
-    char *databaseFilename = g_build_filename(databasePath, &quot;WebpageIcons.db&quot;, NULL);
-    if (g_unlink(databaseFilename) == -1) {
-        g_free(databaseFilename);
-        return;
-    }
-
-    g_free(databaseFilename);
-    g_rmdir(databasePath);
-}
-
-static void testWebKitFaviconDatabaseSetPath()
-{
-    char *databasePath = g_build_filename(g_get_tmp_dir(), &quot;webkit-testfavicondatabase&quot;, NULL);
-    deleteDatabaseFileIfExists(databasePath);
-
-    WebKitFaviconDatabase *database = webkit_get_favicon_database();
-    webkit_favicon_database_set_path(database, databasePath);
-
-    g_assert_cmpstr(databasePath, ==, webkit_favicon_database_get_path(database));
-
-    g_free(databasePath);
-}
-
-// See the comment in main() function that goes with this same guard.
-#ifdef NDEBUG
-
-static void faviconDatabaseGetValidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
-{
-    gboolean *beenHere = (gboolean*)userData;
-    GError *error = NULL;
-    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
-    g_assert(icon);
-    g_object_unref(icon);
-
-    *beenHere = TRUE;
-
-    g_main_loop_quit(loop);
-}
-
-static void faviconDatabaseGetInvalidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
-{
-    gboolean *beenHere = (gboolean*)userData;
-    GError *error = NULL;
-    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
-    g_assert(!icon);
-
-    *beenHere = TRUE;
-
-    g_main_loop_quit(loop);
-}
-
-static void faviconDatabaseGetFaviconCancelledCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
-{
-    gboolean *beenHere = (gboolean*)userData;
-    GError *error = NULL;
-    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
-    g_assert(!icon);
-    g_assert(error &amp;&amp; g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED));
-
-    *beenHere = TRUE;
-
-    g_main_loop_quit(loop);
-}
-
-static inline void quitMainLoopIfLoadCompleted(gboolean *iconOrPageLoaded)
-{
-    if (*iconOrPageLoaded)
-        g_main_loop_quit(loop);
-    else
-        *iconOrPageLoaded = TRUE;
-}
-
-static void idleQuitLoopCallback(WebKitWebView *webView, GParamSpec *paramSpec, gboolean *iconOrPageLoaded)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-
-    if (status == WEBKIT_LOAD_FINISHED || status == WEBKIT_LOAD_FAILED)
-        quitMainLoopIfLoadCompleted(iconOrPageLoaded);
-}
-
-static void webkitWebViewIconLoaded(WebKitFaviconDatabase *database, const char *frameURI, gboolean *iconOrPageLoaded)
-{
-    quitMainLoopIfLoadCompleted(iconOrPageLoaded);
-}
-
-static void loadURI(const char *uri)
-{
-    WebKitWebView *view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    gboolean iconOrPageLoaded = FALSE;
-
-    webkit_web_view_load_uri(view, uri);
-
-    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(idleQuitLoopCallback), &amp;iconOrPageLoaded);
-    g_signal_connect(view, &quot;icon-loaded&quot;, G_CALLBACK(webkitWebViewIconLoaded), &amp;iconOrPageLoaded);
-
-    g_main_loop_run(loop);
-
-    g_signal_handlers_disconnect_matched(view, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, &amp;iconOrPageLoaded);
-}
-
-static gboolean faviconDatabaseGetValidFaviconIdle(void *userData)
-{
-    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
-                                               gIconSize, gIconSize, NULL,
-                                               faviconDatabaseGetValidFaviconCallback, userData);
-    return FALSE;
-}
-
-static gboolean faviconDatabaseGetInvalidFaviconIdle(void *userData)
-{
-    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), &quot;http://www.webkitgtk.org/&quot;,
-                                               gIconSize, gIconSize, NULL,
-                                               faviconDatabaseGetInvalidFaviconCallback, userData);
-    return FALSE;
-}
-
-static gboolean faviconDatabaseGetFaviconCancelledIdle(void *userData)
-{
-    GCancellable *cancellable = g_cancellable_new();
-    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
-                                               gIconSize, gIconSize, cancellable,
-                                               faviconDatabaseGetFaviconCancelledCallback, userData);
-    g_cancellable_cancel(cancellable);
-    g_object_unref(cancellable);
-    return FALSE;
-}
-
-static void testWebKitFaviconDatabaseGetFavicon()
-{
-    gboolean beenToIconCallback;
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    /* Load uri to make sure favicon is added to database. */
-    loadURI(baseURI);
-
-    beenToIconCallback = FALSE;
-    g_idle_add((GSourceFunc)faviconDatabaseGetValidFaviconIdle, &amp;beenToIconCallback);
-    g_main_loop_run(loop);
-    g_assert(beenToIconCallback);
-
-    beenToIconCallback = FALSE;
-    g_idle_add((GSourceFunc)faviconDatabaseGetInvalidFaviconIdle, &amp;beenToIconCallback);
-    g_main_loop_run(loop);
-    g_assert(beenToIconCallback);
-
-    beenToIconCallback = FALSE;
-    g_idle_add((GSourceFunc)faviconDatabaseGetFaviconCancelledIdle, &amp;beenToIconCallback);
-    g_main_loop_run(loop);
-    g_assert(beenToIconCallback);
-}
-
-static void testWebKitFaviconDatabaseGetFaviconURI()
-{
-    char *iconURI = webkit_favicon_database_get_favicon_uri(webkit_get_favicon_database(), baseURI);
-    char *expectedURI = g_strdup_printf(&quot;%sfavicon.ico&quot;, baseURI);
-    g_assert_cmpstr(iconURI, ==, expectedURI);
-    g_free(expectedURI);
-    g_free(iconURI);
-}
-
-#endif
-
-static void testWebKitFaviconDatabaseRemoveAll(void)
-{
-    WebKitFaviconDatabase *database = webkit_get_favicon_database();
-    webkit_favicon_database_clear(database);
-    char *iconURI = webkit_favicon_database_get_favicon_uri(database, baseURI);
-    g_assert(!iconURI);
-    g_free(iconURI);
-}
-
-static void testWebKitFaviconDatabaseCloseDatabase(void)
-{
-    WebKitFaviconDatabase *database = webkit_get_favicon_database();
-    char *databasePath = g_strdup(webkit_favicon_database_get_path(database));
-    webkit_favicon_database_set_path(database, 0);
-    deleteDatabaseFileIfExists(databasePath);
-    g_free(databasePath);
-}
-
-int main(int argc, char **argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    /* This hopefully makes the test independent of the path it's called from. */
-    testutils_relative_chdir(&quot;Source/WebKit/gtk/tests/resources/test.html&quot;, argv[0]);
-
-    SoupServer *server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-
-    soup_server_add_handler(server, NULL, serverCallback, NULL, NULL);
-
-    SoupURI *soupURI = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(soupURI, soup_server_get_port(server));
-
-    baseURI = soup_uri_to_string(soupURI, FALSE);
-    soup_uri_free(soupURI);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/favicondatabase/set-path&quot;, testWebKitFaviconDatabaseSetPath);
-
-    // These two tests will trigger an ASSERTION on debug builds due
-    // to http://webkit.org/b/67582. Remove the guards once the bug is fixed.
-#ifdef NDEBUG
-    g_test_add_func(&quot;/webkit/favicondatabase/get-favicon&quot;, testWebKitFaviconDatabaseGetFavicon);
-    g_test_add_func(&quot;/webkit/favicondatabase/get-favicon-uri&quot;, testWebKitFaviconDatabaseGetFaviconURI);
-#endif
-
-    g_test_add_func(&quot;/webkit/favicondatabase/remove-all&quot;, testWebKitFaviconDatabaseRemoveAll);
-    g_test_add_func(&quot;/webkit/favicondatabase/close-db&quot;, testWebKitFaviconDatabaseCloseDatabase);
-
-    return g_test_run();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestglobalsc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testglobals.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testglobals.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testglobals.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,110 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-// Make sure the session is initialized properly when webkit_get_default_session() is called.
-static void test_globals_default_session()
-{
-    g_test_bug(&quot;36754&quot;);
-
-    SoupSession* session = webkit_get_default_session();
-    soup_session_remove_feature_by_type(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG);
-
-    // This makes sure our initialization ran.
-    g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL);
-
-    // Creating a WebView should make sure the session is
-    // initialized, and not mess with our changes.
-    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(web_view);
-    g_object_unref(web_view);
-
-    // These makes sure our modification was kept.
-    g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL);
-    g_assert(soup_session_get_feature(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG) == NULL);
-}
-
-static void test_globals_security_policy()
-{
-    // Check default policy for well known schemes.
-    WebKitSecurityPolicy policy = webkit_get_security_policy_for_uri_scheme(&quot;http&quot;);
-    guint mask = WEBKIT_SECURITY_POLICY_CORS_ENABLED;
-    g_assert_cmpuint(policy &amp; mask, ==, mask);
-
-    policy = webkit_get_security_policy_for_uri_scheme(&quot;https&quot;);
-    mask = WEBKIT_SECURITY_POLICY_SECURE | WEBKIT_SECURITY_POLICY_CORS_ENABLED;
-    g_assert_cmpuint(policy &amp; mask, ==, mask);
-
-    policy = webkit_get_security_policy_for_uri_scheme(&quot;file&quot;);
-    mask = WEBKIT_SECURITY_POLICY_LOCAL;
-    g_assert_cmpuint(policy &amp; mask, ==, mask);
-
-    policy = webkit_get_security_policy_for_uri_scheme(&quot;data&quot;);
-    mask = WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME | WEBKIT_SECURITY_POLICY_SECURE;
-    g_assert_cmpuint(policy &amp; mask, ==, mask);
-
-    policy = webkit_get_security_policy_for_uri_scheme(&quot;about&quot;);
-    mask = WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME | WEBKIT_SECURITY_POLICY_SECURE | WEBKIT_SECURITY_POLICY_EMPTY_DOCUMENT;
-    g_assert_cmpuint(policy &amp; mask, ==, mask);
-
-    // Custom scheme.
-    policy = webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;);
-    g_assert(!policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_LOCAL;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_DISPLAY_ISOLATED;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_SECURE;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_CORS_ENABLED;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-
-    policy |= WEBKIT_SECURITY_POLICY_EMPTY_DOCUMENT;
-    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
-    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/globals/default_session&quot;,
-                    test_globals_default_session);
-    g_test_add_func(&quot;/webkit/globals/security-policy&quot;,
-                    test_globals_security_policy);
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststesthittestresultc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhittestresult.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhittestresult.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhittestresult.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,169 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-typedef struct {
-  char* data;
-  guint flag;
-} TestInfo;
-
-static GMainLoop* loop;
-
-typedef struct {
-    WebKitWebView* webView;
-    TestInfo* info;
-} HitTestResultFixture;
-
-TestInfo*
-test_info_new(const char* data, guint flag)
-{
-    TestInfo* info;
-
-    info = g_slice_new(TestInfo);
-    info-&gt;data = g_strdup(data);
-    info-&gt;flag = flag;
-
-    return info;
-}
-
-void
-test_info_destroy(TestInfo* info)
-{
-    g_free(info-&gt;data);
-    g_slice_free(TestInfo, info);
-}
-
-static void hit_test_result_fixture_setup(HitTestResultFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(fixture-&gt;webView);
-    loop = g_main_loop_new(NULL, TRUE);
-    fixture-&gt;info = (TestInfo*)data;
-}
-
-static void hit_test_result_fixture_teardown(HitTestResultFixture* fixture, gconstpointer data)
-{
-    g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(loop);
-    test_info_destroy(fixture-&gt;info);
-}
-
-static void
-load_status_cb(WebKitWebView* webView,
-               GParamSpec* spec,
-               gpointer data)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    TestInfo* info = (TestInfo*)data;
-
-    if (status == WEBKIT_LOAD_FINISHED) {
-        WebKitHitTestResult* result;
-        guint context;
-        GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
-        WebKitDOMNode* node;
-        gint x, y;
-
-        /* Close enough to 0,0 */
-        event-&gt;button.x = 5;
-        event-&gt;button.y = 5;
-
-        result = webkit_web_view_get_hit_test_result(webView, (GdkEventButton*) event);
-        gdk_event_free(event);
-        g_assert(result);
-
-        g_object_get(result, &quot;context&quot;, &amp;context, NULL);
-        g_assert(context &amp; info-&gt;flag);
-
-        g_object_get(result, &quot;inner-node&quot;, &amp;node, NULL);
-        g_assert(node);
-        g_assert(WEBKIT_DOM_IS_NODE(node));
-
-        g_object_get(result, &quot;x&quot;, &amp;x, &quot;y&quot;, &amp;y, NULL);
-        g_assert_cmpint(x, ==, 5);
-        g_assert_cmpint(y, ==, 5);
-
-        /* We can only test these node types at the moment. In the
-         * input case there seems to be an extra layer with a DIV on
-         * top of the input, which gets assigned to the inner-node.
-         * tag */
-        if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT)
-            g_assert(WEBKIT_DOM_IS_HTML_HTML_ELEMENT(node));
-        else if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)
-            g_assert(WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT(node));
-        else if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
-            /* The hit test will give us the inner text node, we want
-             * the A tag */
-            WebKitDOMNode* parent = webkit_dom_node_get_parent_node(node);
-            g_assert(WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT(parent));
-        }
-
-        g_object_unref(result);
-        g_main_loop_quit(loop);
-    }
-}
-
-static void
-test_webkit_hit_test_result(HitTestResultFixture* fixture, gconstpointer data)
-{
-    TestInfo* info = (TestInfo*)data;
-    GtkAllocation allocation = { 0, 0, 50, 50 };
-
-    webkit_web_view_load_string(fixture-&gt;webView,
-                                info-&gt;data,
-                                &quot;text/html&quot;,
-                                &quot;utf-8&quot;,
-                                &quot;file://&quot;);
-    gtk_widget_size_allocate(GTK_WIDGET(fixture-&gt;webView), &amp;allocation);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_status_cb), info);
-    g_main_loop_run(loop);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    g_test_add(&quot;/webkit/hittestresult/document&quot;, HitTestResultFixture, 
-               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                             WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
-               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-    /* We hardcode all elements to be at 0,0 so that we know where to
-     * generate the button events */
-    g_test_add(&quot;/webkit/hittestresult/image&quot;, HitTestResultFixture,
-               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;img style='position:absolute; left:0; top:0'src='0xdeadbeef' width=50 height=50&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                             WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
-               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-    g_test_add(&quot;/webkit/hittestresult/editable&quot;, HitTestResultFixture,
-               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute; left:0; top:0' size='35'&gt;&lt;/input&gt;&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                             WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
-               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-    g_test_add(&quot;/webkit/hittestresult/link&quot;, HitTestResultFixture,
-               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;a style='position:absolute; left:0; top:0' href='http://www.example.com'&gt;HELLO WORLD&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                             WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
-               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
-               
-    return g_test_run ();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststesthttpbackendc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhttpbackend.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhttpbackend.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhttpbackend.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,75 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Gustavo Noronha Silva
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-// Not yet public API
-SoupMessage* webkit_network_request_get_message(WebKitNetworkRequest* request);
-
-static gboolean navigation_policy_decision_requested_cb(WebKitWebView* web_view,
-                                                        WebKitWebFrame* web_frame,
-                                                        WebKitNetworkRequest* request,
-                                                        WebKitWebNavigationAction* action,
-                                                        WebKitWebPolicyDecision* decision,
-                                                        gpointer data)
-{
-    SoupMessage* message = webkit_network_request_get_message(request);
-
-    /* 1 -&gt; webkit_network_request_with_core_request
-     *
-     * The SoupMessage is created exclusively for the emission of this
-     * signal.
-     */
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
-
-    return FALSE;
-}
-
-static void test_soup_message_lifetime()
-{
-    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-
-    g_object_ref_sink(web_view);
-
-    g_signal_connect(web_view, &quot;navigation-policy-decision-requested&quot;,
-                     G_CALLBACK(navigation_policy_decision_requested_cb),
-                     NULL);
-
-    /* load_uri will trigger the navigation-policy-decision-requested
-     * signal emission;
-     */
-    webkit_web_view_load_uri(web_view, &quot;http://127.0.0.1/&quot;);
-
-    g_object_unref(web_view);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/soupmessage/lifetime&quot;, test_soup_message_lifetime);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestkeyeventsc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testkeyevents.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testkeyevents.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testkeyevents.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,390 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2010 Martin Robinson &lt;mrobinson@webkit.org&gt;
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;string.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;webkit/webkit.h&gt;
-#include &lt;JavaScriptCore/JSStringRef.h&gt;
-#include &lt;JavaScriptCore/JSContextRef.h&gt;
-
-typedef struct {
-    char* page;
-    char* text;
-    gboolean shouldBeHandled;
-} TestInfo;
-
-typedef struct {
-    GtkWidget* window;
-    WebKitWebView* webView;
-    GMainLoop* loop;
-    TestInfo* info;
-} KeyEventFixture;
-
-TestInfo*
-test_info_new(const char* page, gboolean shouldBeHandled)
-{
-    TestInfo* info;
-
-    info = g_slice_new(TestInfo);
-    info-&gt;page = g_strdup(page);
-    info-&gt;shouldBeHandled = shouldBeHandled;
-    info-&gt;text = 0;
-
-    return info;
-}
-
-void
-test_info_destroy(TestInfo* info)
-{
-    g_free(info-&gt;page);
-    g_free(info-&gt;text);
-    g_slice_free(TestInfo, info);
-}
-
-static void key_event_fixture_setup(KeyEventFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-
-    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-
-    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
-}
-
-static void key_event_fixture_teardown(KeyEventFixture* fixture, gconstpointer data)
-{
-    gtk_widget_destroy(fixture-&gt;window);
-    g_main_loop_unref(fixture-&gt;loop);
-    test_info_destroy(fixture-&gt;info);
-}
-
-static gboolean key_press_event_cb(WebKitWebView* webView, GdkEvent* event, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    gboolean handled = GTK_WIDGET_GET_CLASS(fixture-&gt;webView)-&gt;key_press_event(GTK_WIDGET(fixture-&gt;webView), &amp;event-&gt;key);
-    g_assert_cmpint(handled, ==, fixture-&gt;info-&gt;shouldBeHandled);
-
-    return FALSE;
-}
-
-static gboolean key_release_event_cb(WebKitWebView* webView, GdkEvent* event, gpointer data)
-{
-    // WebCore never seems to mark keyup events as handled.
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    gboolean handled = GTK_WIDGET_GET_CLASS(fixture-&gt;webView)-&gt;key_press_event(GTK_WIDGET(fixture-&gt;webView), &amp;event-&gt;key);
-    g_assert(!handled);
-
-    g_main_loop_quit(fixture-&gt;loop);
-
-    return FALSE;
-}
-
-static void test_keypress_events_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status == WEBKIT_LOAD_FINISHED) {
-        g_signal_connect(fixture-&gt;webView, &quot;key-press-event&quot;,
-                         G_CALLBACK(key_press_event_cb), fixture);
-        g_signal_connect(fixture-&gt;webView, &quot;key-release-event&quot;,
-                         G_CALLBACK(key_release_event_cb), fixture);
-        if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                                      gdk_unicode_to_keyval('a'), 0))
-            g_assert_not_reached();
-    }
-
-}
-
-gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    webkit_web_view_load_string(fixture-&gt;webView, fixture-&gt;info-&gt;page,
-                                &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
-    return FALSE;
-}
-
-static void setup_keyevent_test(KeyEventFixture* fixture, gconstpointer data, GCallback load_event_callback)
-{
-    fixture-&gt;info = (TestInfo*)data;
-    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), fixture);
-
-    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
-    gtk_widget_show(fixture-&gt;window);
-    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
-    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
-
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;,
-                     load_event_callback, fixture);
-
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void test_keypress_events(KeyEventFixture* fixture, gconstpointer data)
-{
-    setup_keyevent_test(fixture, data, G_CALLBACK(test_keypress_events_load_status_cb));
-}
-
-static gboolean element_text_equal_to(JSContextRef context, const gchar* text)
-{
-    JSStringRef scriptString = JSStringCreateWithUTF8CString(
-      &quot;window.document.getElementById(\&quot;in\&quot;).value;&quot;);
-    JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
-    JSStringRelease(scriptString);
-
-    // If the value isn't a string, the element is probably a div
-    // so grab the innerText instead.
-    if (!JSValueIsString(context, value)) {
-        JSStringRef scriptString = JSStringCreateWithUTF8CString(
-          &quot;window.document.getElementById(\&quot;in\&quot;).innerText;&quot;);
-        value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
-        JSStringRelease(scriptString);
-    }
-
-    g_assert(JSValueIsString(context, value));
-    JSStringRef inputString = JSValueToStringCopy(context, value, 0);
-    g_assert(inputString);
-
-    gint size = JSStringGetMaximumUTF8CStringSize(inputString);
-    gchar* cString = g_malloc(size);
-    JSStringGetUTF8CString(inputString, cString, size);
-    JSStringRelease(inputString);
-
-    gboolean result = g_utf8_collate(cString, text) == 0;
-    g_free(cString);
-    return result;
-}
-
-static void test_ime_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    JSGlobalContextRef context = webkit_web_frame_get_global_context(
-        webkit_web_view_get_main_frame(webView));
-    g_assert(context);
-
-    GtkIMContext* imContext = 0;
-    g_object_get(webView, &quot;im-context&quot;, &amp;imContext, NULL);
-    g_assert(imContext);
-
-    // Test that commits that happen outside of key events
-    // change the text field immediately. This closely replicates
-    // the behavior of SCIM.
-    g_assert(element_text_equal_to(context, &quot;&quot;));
-    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;a&quot;);
-    g_assert(element_text_equal_to(context, &quot;a&quot;));
-    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;b&quot;);
-    g_assert(element_text_equal_to(context, &quot;ab&quot;));
-    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;c&quot;);
-    g_assert(element_text_equal_to(context, &quot;abc&quot;));
-
-    g_object_unref(imContext);
-    g_main_loop_quit(fixture-&gt;loop);
-}
-
-static void test_ime(KeyEventFixture* fixture, gconstpointer data)
-{
-    setup_keyevent_test(fixture, data, G_CALLBACK(test_ime_load_status_cb));
-}
-
-static gboolean verify_contents(gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    JSGlobalContextRef context = webkit_web_frame_get_global_context(
-        webkit_web_view_get_main_frame(fixture-&gt;webView));
-    g_assert(context);
-
-    g_assert(element_text_equal_to(context, fixture-&gt;info-&gt;text));
-    g_main_loop_quit(fixture-&gt;loop);
-    return FALSE;
-}
-
-static void test_blocking_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    // The first keypress event should not modify the field.
-    fixture-&gt;info-&gt;text = g_strdup(&quot;bc&quot;);
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                                 gdk_unicode_to_keyval('a'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                                  gdk_unicode_to_keyval('b'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                                  gdk_unicode_to_keyval('c'), 0))
-        g_assert_not_reached();
-
-    g_idle_add(verify_contents, fixture);
-}
-
-static void test_blocking(KeyEventFixture* fixture, gconstpointer data)
-{
-    setup_keyevent_test(fixture, data, G_CALLBACK(test_blocking_load_status_cb));
-}
-
-#if defined(GDK_WINDOWING_X11)
-static void test_xim_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
-{
-    KeyEventFixture* fixture = (KeyEventFixture*)data;
-    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
-    if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    GtkIMContext* imContext = 0;
-    g_object_get(webView, &quot;im-context&quot;, &amp;imContext, NULL);
-    g_assert(imContext);
-
-    gchar* originalId = g_strdup(gtk_im_multicontext_get_context_id(GTK_IM_MULTICONTEXT(imContext)));
-    gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), &quot;xim&quot;);
-
-    // Test that commits that happen outside of key events
-    // change the text field immediately. This closely replicates
-    // the behavior of SCIM.
-    fixture-&gt;info-&gt;text = g_strdup(&quot;debian&quot;);
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                                 gdk_unicode_to_keyval('d'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                             gdk_unicode_to_keyval('e'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                             gdk_unicode_to_keyval('b'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                             gdk_unicode_to_keyval('i'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                             gdk_unicode_to_keyval('a'), 0))
-        g_assert_not_reached();
-    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
-                             gdk_unicode_to_keyval('n'), 0))
-        g_assert_not_reached();
-
-    gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), originalId);
-    g_free(originalId);
-    g_object_unref(imContext);
-
-    g_idle_add(verify_contents, fixture);
-}
-
-static void test_xim(KeyEventFixture* fixture, gconstpointer data)
-{
-    setup_keyevent_test(fixture, data, G_CALLBACK(test_xim_load_status_cb));
-}
-#endif
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-
-    // We'll test input on a slew of different node types. Key events to
-    // text inputs and editable divs should be marked as handled. Key events
-    // to buttons and links should not.
-    const char* textinput_html = &quot;&lt;html&gt;&lt;body&gt;&lt;input id=\&quot;in\&quot; type=\&quot;text\&quot;&gt;&quot;
-        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    const char* button_html = &quot;&lt;html&gt;&lt;body&gt;&lt;input id=\&quot;in\&quot; type=\&quot;button\&quot;&gt;&quot;
-        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    const char* link_html = &quot;&lt;html&gt;&lt;body&gt;&lt;a href=\&quot;http://www.gnome.org\&quot; id=\&quot;in\&quot;&gt;&quot;
-        &quot;LINKY MCLINKERSON&lt;/a&gt;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-    const char* div_html = &quot;&lt;html&gt;&lt;body&gt;&lt;div id=\&quot;in\&quot; contenteditable=\&quot;true\&quot;&gt;&quot;
-        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    // These are similar to the blocks above, but they should block the first
-    // keypress modifying the editable node.
-    const char* textinput_html_blocking = &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;&lt;input id=\&quot;in\&quot; type=\&quot;text\&quot; &quot;
-        &quot;onkeypress=\&quot;if (first) {event.preventDefault();first=false;}\&quot;&gt;&quot;
-        &quot;&lt;script&gt;first = true;\ndocument.getElementById('in').focus();&lt;/script&gt;\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    const char* div_html_blocking = &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;&lt;div id=\&quot;in\&quot; contenteditable=\&quot;true\&quot; &quot;
-        &quot;onkeypress=\&quot;if (first) {event.preventDefault();first=false;}\&quot;&gt;&quot;
-        &quot;&lt;script&gt;first = true; document.getElementById('in').focus();&lt;/script&gt;\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    g_test_add(&quot;/webkit/keyevents/event-textinput&quot;, KeyEventFixture,
-               test_info_new(textinput_html, TRUE),
-               key_event_fixture_setup,
-               test_keypress_events,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevents/event-buttons&quot;, KeyEventFixture,
-               test_info_new(button_html, FALSE),
-               key_event_fixture_setup,
-               test_keypress_events,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevents/event-link&quot;, KeyEventFixture,
-               test_info_new(link_html, FALSE),
-               key_event_fixture_setup,
-               test_keypress_events,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/event-div&quot;, KeyEventFixture,
-               test_info_new(div_html, TRUE),
-               key_event_fixture_setup,
-               test_keypress_events,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/ime-textinput&quot;, KeyEventFixture,
-               test_info_new(textinput_html, TRUE),
-               key_event_fixture_setup,
-               test_ime,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/ime-div&quot;, KeyEventFixture,
-               test_info_new(div_html, TRUE),
-               key_event_fixture_setup,
-               test_ime,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/block-textinput&quot;, KeyEventFixture,
-               test_info_new(textinput_html_blocking, TRUE),
-               key_event_fixture_setup,
-               test_blocking,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/block-div&quot;, KeyEventFixture,
-               test_info_new(div_html_blocking, TRUE),
-               key_event_fixture_setup,
-               test_blocking,
-               key_event_fixture_teardown);
-#if defined(GDK_WINDOWING_X11)
-    g_test_add(&quot;/webkit/keyevent/xim-textinput&quot;, KeyEventFixture,
-               test_info_new(textinput_html, TRUE),
-               key_event_fixture_setup,
-               test_xim,
-               key_event_fixture_teardown);
-    g_test_add(&quot;/webkit/keyevent/xim-div&quot;, KeyEventFixture,
-               test_info_new(div_html, TRUE),
-               key_event_fixture_setup,
-               test_xim,
-               key_event_fixture_teardown);
-#endif
-
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestloadingc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testloading.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testloading.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testloading.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,435 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2010 Gustavo Noronha Silva
- * Copyright (C) 2009 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-/* This string has to be rather big because of the cancelled test - it
- * looks like soup refuses to send or receive a too small chunk */
-#define HTML_STRING &quot;&lt;html&gt;&lt;body&gt;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&lt;/body&gt;&lt;/html&gt;&quot;
-
-SoupURI* base_uri;
-
-/* For real request testing */
-static void
-server_callback(SoupServer* server, SoupMessage* msg,
-                const char* path, GHashTable* query,
-                SoupClientContext* context, gpointer data)
-{
-    if (msg-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(msg, SOUP_STATUS_OK);
-
-    if (g_str_equal(path, &quot;/test_loading_status&quot;) || g_str_equal(path, &quot;/test_loading_status2&quot;))
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
-    else if (g_str_equal(path, &quot;/test_load_error&quot;)) {
-        soup_message_set_status(msg, SOUP_STATUS_CANT_CONNECT);
-    } else if (g_str_equal(path, &quot;/test_loading_cancelled&quot;)) {
-        soup_message_headers_set_encoding(msg-&gt;response_headers, SOUP_ENCODING_CHUNKED);
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
-        soup_server_unpause_message(server, msg);
-        return;
-    }
-
-    soup_message_body_complete(msg-&gt;response_body);
-}
-
-typedef struct {
-    WebKitWebView* webView;
-    GMainLoop *loop;
-    gboolean has_been_provisional;
-    gboolean has_been_committed;
-    gboolean has_been_first_visually_non_empty_layout;
-    gboolean has_been_finished;
-    gboolean has_been_failed;
-    gboolean has_been_load_error;
-} WebLoadingFixture;
-
-static void web_loading_fixture_setup(WebLoadingFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
-    g_object_ref_sink(fixture-&gt;webView);
-    fixture-&gt;has_been_provisional = FALSE;
-    fixture-&gt;has_been_committed = FALSE;
-    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
-    fixture-&gt;has_been_finished = FALSE;
-    fixture-&gt;has_been_failed = FALSE;
-    fixture-&gt;has_been_load_error = FALSE;
-}
-
-static void web_loading_fixture_teardown(WebLoadingFixture* fixture, gconstpointer data)
-{
-    g_object_unref(fixture-&gt;webView);
-    g_main_loop_unref(fixture-&gt;loop);
-}
-
-static char* get_uri_for_path(const char* path)
-{
-    SoupURI* uri;
-    char* uri_string;
-
-    uri = soup_uri_new_with_base(base_uri, path);
-    uri_string = soup_uri_to_string(uri, FALSE);
-    soup_uri_free (uri);
-
-    return uri_string;
-}
-
-static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebLoadingFixture* fixture)
-{
-    g_assert(fixture-&gt;has_been_provisional);
-    g_assert(fixture-&gt;has_been_committed);
-    g_assert(fixture-&gt;has_been_first_visually_non_empty_layout);
-
-    g_main_loop_quit(fixture-&gt;loop);
-}
-
-
-static void status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
-
-    switch (status) {
-    case WEBKIT_LOAD_PROVISIONAL:
-        g_assert(!fixture-&gt;has_been_provisional);
-        g_assert(!fixture-&gt;has_been_committed);
-        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
-        fixture-&gt;has_been_provisional = TRUE;
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(!fixture-&gt;has_been_committed);
-        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
-        fixture-&gt;has_been_committed = TRUE;
-        break;
-    case WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(fixture-&gt;has_been_committed);
-        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
-        fixture-&gt;has_been_first_visually_non_empty_layout = TRUE;
-        break;
-    case WEBKIT_LOAD_FINISHED:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(fixture-&gt;has_been_committed);
-        g_assert(fixture-&gt;has_been_first_visually_non_empty_layout);
-        break;
-    default:
-        g_assert_not_reached();
-    }
-}
-
-static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data)
-{
-    char* uri_string;
-
-    g_assert_cmpint(webkit_web_view_get_load_status(fixture-&gt;webView), ==, WEBKIT_LOAD_PROVISIONAL);
-
-    g_object_connect(G_OBJECT(fixture-&gt;webView),
-                     &quot;signal::notify::load-status&quot;, G_CALLBACK(status_changed_cb), fixture,
-                     &quot;signal::load-finished&quot;, G_CALLBACK(load_finished_cb), fixture,
-                     NULL);
-
-    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
-
-    /* load_uri will trigger the navigation-policy-decision-requested
-     * signal emission;
-     */
-    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
-    g_free(uri_string);
-
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
-
-    switch(status) {
-    case WEBKIT_LOAD_PROVISIONAL:
-        g_assert(!fixture-&gt;has_been_provisional);
-        fixture-&gt;has_been_provisional = TRUE;
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_assert(!fixture-&gt;has_been_committed);
-        fixture-&gt;has_been_committed = TRUE;
-        break;
-    case WEBKIT_LOAD_FINISHED:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(fixture-&gt;has_been_load_error);
-        g_assert(fixture-&gt;has_been_failed);
-        g_assert(!fixture-&gt;has_been_finished);
-        fixture-&gt;has_been_finished = TRUE;
-        break;
-    case WEBKIT_LOAD_FAILED:
-        g_assert(!fixture-&gt;has_been_failed);
-        fixture-&gt;has_been_failed = TRUE;
-        g_main_loop_quit(fixture-&gt;loop);
-        break;
-    default:
-        break;
-    }
-}
-
-static gboolean load_error_cb(WebKitWebView* webView, WebKitWebFrame* frame, const char* uri, GError *error, WebLoadingFixture* fixture)
-{
-    g_assert(fixture-&gt;has_been_provisional);
-    g_assert(!fixture-&gt;has_been_load_error);
-    fixture-&gt;has_been_load_error = TRUE;
-
-    return FALSE;
-}
-
-static void test_loading_error(WebLoadingFixture* fixture, gconstpointer data)
-{
-    char* uri_string;
-
-    g_test_bug(&quot;28842&quot;);
-
-    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_error_cb), fixture);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_error_status_changed_cb), fixture);
-
-    uri_string = get_uri_for_path(&quot;/test_load_error&quot;);
-    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
-    g_free(uri_string);
-
-    g_main_loop_run(fixture-&gt;loop);
-
-    g_assert(fixture-&gt;has_been_provisional);
-    g_assert(!fixture-&gt;has_been_committed);
-    g_assert(fixture-&gt;has_been_load_error);
-    g_assert(fixture-&gt;has_been_failed);
-    g_assert(!fixture-&gt;has_been_finished);
-}
-
-/* Cancelled load */
-
-static gboolean load_cancelled_cb(WebKitWebView* webView, WebKitWebFrame* frame, const char* uri, GError *error, WebLoadingFixture* fixture)
-{
-    g_assert(fixture-&gt;has_been_provisional);
-    g_assert(fixture-&gt;has_been_failed);
-    g_assert(!fixture-&gt;has_been_load_error);
-    g_assert(error-&gt;code == WEBKIT_NETWORK_ERROR_CANCELLED);
-    fixture-&gt;has_been_load_error = TRUE;
-
-    return TRUE;
-}
-
-static gboolean stop_load (gpointer data)
-{
-    webkit_web_view_stop_loading(WEBKIT_WEB_VIEW(data));
-    return FALSE;
-}
-
-static void load_cancelled_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
-
-    switch(status) {
-    case WEBKIT_LOAD_PROVISIONAL:
-        g_assert(!fixture-&gt;has_been_provisional);
-        g_assert(!fixture-&gt;has_been_failed);
-        fixture-&gt;has_been_provisional = TRUE;
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_idle_add (stop_load, object);
-        break;
-    case WEBKIT_LOAD_FAILED:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(!fixture-&gt;has_been_failed);
-        g_assert(!fixture-&gt;has_been_load_error);
-        fixture-&gt;has_been_failed = TRUE;
-        g_main_loop_quit(fixture-&gt;loop);
-        break;
-    case WEBKIT_LOAD_FINISHED:
-        g_assert_not_reached();
-        break;
-    default:
-        break;
-    }
-}
-
-static void test_loading_cancelled(WebLoadingFixture* fixture, gconstpointer data)
-{
-    char* uri_string;
-
-    g_test_bug(&quot;29644&quot;);
-
-    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_cancelled_cb), fixture);
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_cancelled_status_changed_cb), fixture);
-
-    uri_string = get_uri_for_path(&quot;/test_loading_cancelled&quot;);
-    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
-    g_free(uri_string);
-
-    g_main_loop_run(fixture-&gt;loop);
-}
-
-static void load_goback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
-
-    switch(status) {
-    case WEBKIT_LOAD_PROVISIONAL:
-        g_assert(!fixture-&gt;has_been_provisional);
-        fixture-&gt;has_been_provisional = TRUE;
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_assert(fixture-&gt;has_been_provisional);
-        fixture-&gt;has_been_committed = TRUE;
-        break;
-    case WEBKIT_LOAD_FAILED:
-        g_assert_not_reached();
-        break;
-    case WEBKIT_LOAD_FINISHED:
-        g_assert(fixture-&gt;has_been_provisional);
-        g_assert(fixture-&gt;has_been_committed);
-        fixture-&gt;has_been_finished = TRUE;
-        g_main_loop_quit(fixture-&gt;loop);
-        break;
-    default:
-        break;
-    }
-}
-
-static void load_wentback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
-    char* uri_string;
-    char* uri_string2;
-
-    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
-    uri_string2 = get_uri_for_path(&quot;/test_loading_status2&quot;);
-
-    switch(status) {
-    case WEBKIT_LOAD_PROVISIONAL:
-        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string2);
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string);
-        break;
-    case WEBKIT_LOAD_FAILED:
-        g_assert_not_reached();
-        break;
-    case WEBKIT_LOAD_FINISHED:
-        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string);
-        g_main_loop_quit(fixture-&gt;loop);
-        break;
-    default:
-        break;
-    }
-
-    g_free(uri_string);
-    g_free(uri_string2);
-}
-
-static void load_error_test(WebKitWebView* webview, WebKitWebFrame* frame, const char* uri, GError* error)
-{
-    g_debug(&quot;Error: %s&quot;, error-&gt;message);
-}
-
-static void test_loading_goback(WebLoadingFixture* fixture, gconstpointer data)
-{
-    char* uri_string;
-
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_goback_status_changed_cb), fixture);
-
-    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_error_test), fixture);
-
-    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
-    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
-    g_free(uri_string);
-
-    g_main_loop_run(fixture-&gt;loop);
-
-    fixture-&gt;has_been_provisional = FALSE;
-    fixture-&gt;has_been_committed = FALSE;
-    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
-    fixture-&gt;has_been_finished = FALSE;
-    fixture-&gt;has_been_failed = FALSE;
-    fixture-&gt;has_been_load_error = FALSE;
-
-    uri_string = get_uri_for_path(&quot;/test_loading_status2&quot;);
-    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
-    g_free(uri_string);
-
-    g_main_loop_run(fixture-&gt;loop);
-
-    g_signal_handlers_disconnect_by_func(fixture-&gt;webView, load_goback_status_changed_cb, fixture);
-
-    fixture-&gt;has_been_provisional = FALSE;
-    fixture-&gt;has_been_committed = FALSE;
-    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
-    fixture-&gt;has_been_finished = FALSE;
-    fixture-&gt;has_been_failed = FALSE;
-    fixture-&gt;has_been_load_error = FALSE;
-
-    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_wentback_status_changed_cb), fixture);
-    webkit_web_view_go_back(fixture-&gt;webView);
-
-    g_main_loop_run(fixture-&gt;loop);
-
-    g_signal_handlers_disconnect_by_func(fixture-&gt;webView, load_wentback_status_changed_cb, fixture);
-}
-
-int main(int argc, char** argv)
-{
-    SoupServer* server;
-
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-
-    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
-
-    base_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(base_uri, soup_server_get_port(server));
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add(&quot;/webkit/loading/status&quot;,
-               WebLoadingFixture, NULL,
-               web_loading_fixture_setup,
-               test_loading_status,
-               web_loading_fixture_teardown);
-    g_test_add(&quot;/webkit/loading/error&quot;,
-               WebLoadingFixture, NULL,
-               web_loading_fixture_setup,
-               test_loading_error,
-               web_loading_fixture_teardown);
-    g_test_add(&quot;/webkit/loading/cancelled&quot;,
-               WebLoadingFixture, NULL,
-               web_loading_fixture_setup,
-               test_loading_cancelled,
-               web_loading_fixture_teardown);
-    g_test_add(&quot;/webkit/loading/goback&quot;,
-               WebLoadingFixture, NULL,
-               web_loading_fixture_setup,
-               test_loading_goback,
-               web_loading_fixture_teardown);
-    return g_test_run();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestmimehandlingc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testmimehandling.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testmimehandling.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testmimehandling.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,203 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Jan Michael Alonzo
- * Copyright (C) 2009 Gustavo Noronha Silva
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit/webkit.h&gt;
-#include &lt;unistd.h&gt;
-
-GMainLoop* loop;
-SoupSession *session;
-char* base_uri;
-
-/* For real request testing */
-static void
-server_callback(SoupServer *server, SoupMessage *msg,
-                 const char *path, GHashTable *query,
-                 SoupClientContext *context, gpointer data)
-{
-    if (msg-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(msg, SOUP_STATUS_OK);
-
-    /* PDF */
-    if (g_str_equal(path, &quot;/pdf&quot;)) {
-        char* contents;
-        gsize length;
-        GError* error = NULL;
-
-        g_file_get_contents(&quot;test.pdf&quot;, &amp;contents, &amp;length, &amp;error);
-        g_assert(!error);
-
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    } else if (g_str_equal(path, &quot;/html&quot;)) {
-        char* contents;
-        gsize length;
-        GError* error = NULL;
-
-        g_file_get_contents(&quot;test.html&quot;, &amp;contents, &amp;length, &amp;error);
-        g_assert(!error);
-
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    } else if (g_str_equal(path, &quot;/text&quot;)) {
-        char* contents;
-        gsize length;
-        GError* error = NULL;
-
-        soup_message_headers_append(msg-&gt;response_headers, &quot;Content-Disposition&quot;, &quot;attachment; filename=test.txt&quot;);
-
-        g_file_get_contents(&quot;test.txt&quot;, &amp;contents, &amp;length, &amp;error);
-        g_assert(!error);
-
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    }
-
-    soup_message_body_complete(msg-&gt;response_body);
-}
-
-static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
-        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
-        g_main_loop_quit(loop);
-}
-
-static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame,
-                                                       WebKitNetworkRequest* request, const char* mime_type,
-                                                       WebKitWebPolicyDecision* decision, gpointer data)
-{
-    char* type = (char*)data;
-
-    if (g_str_equal(type, &quot;pdf&quot;)) {
-        g_assert_cmpstr(mime_type, ==, &quot;application/pdf&quot;);
-        g_assert(!webkit_web_view_can_show_mime_type(view, mime_type));
-    } else if (g_str_equal(type, &quot;html&quot;)) {
-        g_assert_cmpstr(mime_type, ==, &quot;text/html&quot;);
-        g_assert(webkit_web_view_can_show_mime_type(view, mime_type));
-    } else if (g_str_equal(type, &quot;text&quot;)) {
-        WebKitNetworkResponse* response = webkit_web_frame_get_network_response(frame);
-        SoupMessage* message = webkit_network_response_get_message(response);
-        char* disposition;
-
-        g_assert(message);
-        soup_message_headers_get_content_disposition(message-&gt;response_headers,
-                                                     &amp;disposition, NULL);
-        g_object_unref(response);
-
-        g_assert_cmpstr(disposition, ==, &quot;attachment&quot;);
-        g_free(disposition);
-
-        g_assert_cmpstr(mime_type, ==, &quot;text/plain&quot;);
-        g_assert(webkit_web_view_can_show_mime_type(view, mime_type));
-    }
-
-    g_free(type);
-
-    return FALSE;
-}
-
-static void testRemoteMimeType(const void* data)
-{
-    const char* name = (const char*) data;
-    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(G_OBJECT(view));
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_object_connect(G_OBJECT(view),
-                     &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
-                     &quot;signal::mime-type-policy-decision-requested&quot;, mime_type_policy_decision_requested_cb, g_strdup(name),
-                     NULL);
-
-    char* effective_uri = g_strdup_printf(&quot;%s%s&quot;, base_uri, name);
-    webkit_web_view_load_uri(view, effective_uri);
-    g_free(effective_uri);
-
-    g_main_loop_run(loop);
-
-    g_object_unref(view);
-}
-
-static void testLocalMimeType(const void* data)
-{
-     const char* typeName = (const char*) data;
-     WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-     g_object_ref_sink(G_OBJECT(view));
-
-     loop = g_main_loop_new(NULL, TRUE);
-
-     g_object_connect(G_OBJECT(view),
-                      &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
-                      &quot;signal::mime-type-policy-decision-requested&quot;, mime_type_policy_decision_requested_cb, g_strdup(typeName),
-                      NULL);
-
-     gchar* filename = g_strdup_printf(&quot;test.%s&quot;, typeName);
-     GFile* file = g_file_new_for_path(filename);
-     g_free(filename);
-
-     gchar* fileURI = g_file_get_uri(file);
-     g_object_unref(file);
-
-     webkit_web_view_load_uri(view, fileURI);
-     g_free(fileURI);

-     g_main_loop_run(loop);
-     g_object_unref(view);
-}
-
-int main(int argc, char** argv)
-{
-    SoupServer* server;
-    SoupURI* soup_uri;
-
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    /* Hopefully make test independent of the path it's called from. */
-    testutils_relative_chdir(&quot;Source/WebKit/gtk/tests/resources/test.html&quot;, argv[0]);
-
-    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-
-    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
-
-    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(soup_uri, soup_server_get_port(server));
-
-    base_uri = soup_uri_to_string(soup_uri, FALSE);
-    soup_uri_free(soup_uri);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_data_func(&quot;/webkit/mime/remote-PDF&quot;, &quot;pdf&quot;, testRemoteMimeType);
-    g_test_add_data_func(&quot;/webkit/mime/remote-HTML&quot;, &quot;html&quot;, testRemoteMimeType);
-    g_test_add_data_func(&quot;/webkit/mime/remote-TEXT&quot;, &quot;text&quot;, testRemoteMimeType);
-    g_test_add_data_func(&quot;/webkit/mime/local-PDF&quot;, &quot;pdf&quot;, testLocalMimeType);
-    g_test_add_data_func(&quot;/webkit/mime/local-HTML&quot;, &quot;html&quot;, testLocalMimeType);
-    g_test_add_data_func(&quot;/webkit/mime/local-TEXT&quot;, &quot;text&quot;, testLocalMimeType);
-
-    return g_test_run();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkrequestc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkrequest.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkrequest.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkrequest.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,96 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Gustavo Noronha Silva
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static void test_network_request_create_destroy()
-{
-    WebKitNetworkRequest* request;
-    SoupMessage* message;
-
-    /* Test creation with URI */
-    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;uri&quot;, &quot;http://debian.org/&quot;, NULL));
-    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
-    message = webkit_network_request_get_message(request);
-    g_assert(!message);
-    g_object_unref(request);
-
-    /* Test creation with SoupMessage */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, NULL));
-    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
-    g_object_unref(request);
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
-    g_object_unref(message);
-
-    /* Test creation with both SoupMessage and URI */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, &quot;uri&quot;, &quot;http://gnome.org/&quot;, NULL));
-    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
-    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://gnome.org/&quot;);
-    g_object_unref(request);
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
-    g_object_unref(message);
-}
-
-static void test_network_request_properties()
-{
-    WebKitNetworkRequest* request;
-    SoupMessage* message;
-    gchar* soupURI;
-
-    /* Test URI is set correctly when creating with URI */
-    request = webkit_network_request_new(&quot;http://debian.org/&quot;);
-    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
-    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://debian.org/&quot;);
-    g_object_unref(request);
-
-    /* Test URI is set correctly when creating with Message */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, NULL));
-    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
-    g_object_unref(message);
-
-    message = webkit_network_request_get_message(request);
-    soupURI = soup_uri_to_string(soup_message_get_uri(message), FALSE);
-    g_assert_cmpstr(soupURI, ==, &quot;http://debian.org/&quot;);
-    g_free(soupURI);
-
-    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://debian.org/&quot;);
-    g_object_unref(request);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/networkrequest/createdestroy&quot;, test_network_request_create_destroy);
-    g_test_add_func(&quot;/webkit/networkrequest/properties&quot;, test_network_request_properties);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkresponsec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkresponse.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkresponse.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkresponse.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,97 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Gustavo Noronha Silva
- * Copyright (C) 2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static void test_network_response_create_destroy()
-{
-    WebKitNetworkResponse* response;
-    SoupMessage* message;
-
-    /* Test creation with URI */
-    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;uri&quot;, &quot;http://debian.org/&quot;, NULL));
-    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
-    message = webkit_network_response_get_message(response);
-    g_assert(!message);
-    g_object_unref(response);
-
-    /* Test creation with SoupMessage */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, NULL));
-    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
-    g_object_unref(response);
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
-    g_object_unref(message);
-
-    /* Test creation with both SoupMessage and URI */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, &quot;uri&quot;, &quot;http://gnome.org/&quot;, NULL));
-    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
-    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://gnome.org/&quot;);
-    g_object_unref(response);
-    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
-    g_object_unref(message);
-}
-
-static void test_network_response_properties()
-{
-    WebKitNetworkResponse* response;
-    SoupMessage* message;
-    gchar* soupURI;
-
-    /* Test URI is set correctly when creating with URI */
-    response = webkit_network_response_new(&quot;http://debian.org/&quot;);
-    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
-    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://debian.org/&quot;);
-    g_object_unref(response);
-
-    /* Test URI is set correctly when creating with Message */
-    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
-    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, NULL));
-    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
-    g_object_unref(message);
-
-    message = webkit_network_response_get_message(response);
-    soupURI = soup_uri_to_string(soup_message_get_uri(message), FALSE);
-    g_assert_cmpstr(soupURI, ==, &quot;http://debian.org/&quot;);
-    g_free(soupURI);
-
-    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://debian.org/&quot;);
-    g_object_unref(response);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/networkresponse/createdestroy&quot;, test_network_response_create_destroy);
-    g_test_add_func(&quot;/webkit/networkresponse/properties&quot;, test_network_response_properties);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebbackforwardlistc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebbackforwardlist.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebbackforwardlist.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebbackforwardlist.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,326 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Holger Hans Peter Freyther
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static void test_webkit_web_history_item_lifetime(void)
-{
-    WebKitWebView* webView;
-    WebKitWebBackForwardList* backForwardList;
-    WebKitWebHistoryItem* currentItem;
-    WebKitWebHistoryItem* forwardItem;
-    WebKitWebHistoryItem* backItem;
-    WebKitWebHistoryItem* nthItem;
-    WebKitWebHistoryItem* item1;
-    WebKitWebHistoryItem* item2;
-    WebKitWebHistoryItem* item3;
-    WebKitWebHistoryItem* item4;
-    GList* backList = NULL;
-    GList* forwardList = NULL;
-    g_test_bug(&quot;19898&quot;);
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    backForwardList = webkit_web_view_get_back_forward_list(webView);
-    g_assert_cmpint(G_OBJECT(backForwardList)-&gt;ref_count, ==, 1);
-
-    /* add test items */
-    item1 = webkit_web_history_item_new_with_data(&quot;http://example.com/1/&quot;, &quot;Site 1&quot;);
-    webkit_web_back_forward_list_add_item(backForwardList, item1);
-    g_object_unref(item1);
-
-    item2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Site 2&quot;);
-    webkit_web_back_forward_list_add_item(backForwardList, item2);
-    g_object_unref(item2);
-
-    item3 = webkit_web_history_item_new_with_data(&quot;http://example.com/3/&quot;, &quot;Site 3&quot;);
-    webkit_web_back_forward_list_add_item(backForwardList, item3);
-    g_object_unref(item3);
-
-    item4 = webkit_web_history_item_new_with_data(&quot;http://example.com/4/&quot;, &quot;Site 4&quot;);
-    webkit_web_back_forward_list_add_item(backForwardList, item4);
-    g_object_unref(item4);
-
-    /* make sure these functions don't add unnecessary ref to the history item */
-    backItem = webkit_web_back_forward_list_get_back_item(backForwardList);
-    g_object_ref(backItem);
-    g_assert_cmpint(G_OBJECT(backItem)-&gt;ref_count, ==, 2);
-    g_object_unref(backItem);
-    g_assert_cmpint(G_OBJECT(backItem)-&gt;ref_count, ==, 1);
-
-    currentItem = webkit_web_back_forward_list_get_current_item(backForwardList);
-    g_object_ref(currentItem);
-    g_assert_cmpint(G_OBJECT(currentItem)-&gt;ref_count, ==, 2);
-    g_object_unref(currentItem);
-    g_assert_cmpint(G_OBJECT(currentItem)-&gt;ref_count, ==, 1);
-
-    webkit_web_back_forward_list_go_to_item(backForwardList, item2);
-    forwardItem = webkit_web_back_forward_list_get_forward_item(backForwardList);
-    g_object_ref(forwardItem);
-    g_assert_cmpint(G_OBJECT(forwardItem)-&gt;ref_count, ==, 2);
-    g_object_unref(forwardItem);
-    g_assert_cmpint(G_OBJECT(forwardItem)-&gt;ref_count, ==, 1);
-
-    nthItem = webkit_web_back_forward_list_get_nth_item(backForwardList, 1);
-    g_object_ref(nthItem);
-    g_assert_cmpint(G_OBJECT(nthItem)-&gt;ref_count, ==, 2);
-    g_object_unref(nthItem);
-    g_assert_cmpint(G_OBJECT(nthItem)-&gt;ref_count, ==, 1);
-
-    backList = webkit_web_back_forward_list_get_back_list_with_limit(backForwardList, 5);
-    for (; backList; backList = backList-&gt;next)
-        g_assert_cmpint(G_OBJECT(backList-&gt;data)-&gt;ref_count, ==, 1);
-
-    forwardList = webkit_web_back_forward_list_get_forward_list_with_limit(backForwardList, 5);
-    for (; forwardList; forwardList = forwardList-&gt;next)
-        g_assert_cmpint(G_OBJECT(forwardList-&gt;data)-&gt;ref_count, ==, 1);
-
-    g_list_free(forwardList);
-    g_list_free(backList);
-    g_assert_cmpint(G_OBJECT(item1)-&gt;ref_count, ==, 1);
-    g_assert_cmpint(G_OBJECT(item2)-&gt;ref_count, ==, 1);
-    g_assert_cmpint(G_OBJECT(item3)-&gt;ref_count, ==, 1);
-    g_assert_cmpint(G_OBJECT(item4)-&gt;ref_count, ==, 1);
-    g_assert_cmpint(G_OBJECT(backForwardList)-&gt;ref_count, ==, 1);
-    g_object_unref(webView);
-}
-
-static void test_webkit_web_back_forward_list_order(void)
-{
-    WebKitWebView* webView;
-    WebKitWebBackForwardList* webBackForwardList;
-    WebKitWebHistoryItem* item1;
-    WebKitWebHistoryItem* item2;
-    WebKitWebHistoryItem* item3;
-    WebKitWebHistoryItem* item4;
-    WebKitWebHistoryItem* currentItem;
-    GList* backList = NULL;
-    GList* forwardList = NULL;
-    g_test_bug(&quot;22694&quot;);
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-
-    webkit_web_view_set_maintains_back_forward_list(webView, TRUE);
-    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
-    g_assert(webBackForwardList);
-
-    // Check that there is no item.
-    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    // Add a new items
-    item1 = webkit_web_history_item_new_with_data(&quot;http://example.com/1/&quot;, &quot;Site 1&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, item1);
-    g_object_unref(item1);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item1));
-
-    item2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Site 2&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, item2);
-    g_object_unref(item2);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item2));
-
-    item3 = webkit_web_history_item_new_with_data(&quot;http://example.com/3/&quot;, &quot;Site 3&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, item3);
-    g_object_unref(item3);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item3));
-
-    item4 = webkit_web_history_item_new_with_data(&quot;http://example.com/4/&quot;, &quot;Site 4&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, item4);
-    g_object_unref(item4);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item4));
-
-    // check the back list order
-    backList = webkit_web_back_forward_list_get_back_list_with_limit(webBackForwardList, 5);
-    g_assert(backList);
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/3/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 3&quot;);
-    backList = backList-&gt;next;
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 2&quot;);
-    backList = backList-&gt;next;
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/1/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 1&quot;);
-    g_list_free(backList);
-
-    // check the forward list order
-    g_assert(webkit_web_view_go_to_back_forward_item(webView, item1));
-    forwardList = webkit_web_back_forward_list_get_forward_list_with_limit(webBackForwardList,5);
-    g_assert(forwardList);
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/4/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 4&quot;);
-    forwardList = forwardList-&gt;next;
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/3/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 3&quot;);
-    forwardList = forwardList-&gt;next;
-
-    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 2&quot;);
-
-    g_list_free(forwardList);
-    g_object_unref(webView);
-}
-
-static void test_webkit_web_back_forward_list_add_item(void)
-{
-    WebKitWebView* webView;
-    WebKitWebBackForwardList* webBackForwardList;
-    WebKitWebHistoryItem* addItem1;
-    WebKitWebHistoryItem* addItem2;
-    WebKitWebHistoryItem* backItem;
-    WebKitWebHistoryItem* currentItem;
-    g_test_bug(&quot;22988&quot;);
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-
-    webkit_web_view_set_maintains_back_forward_list(webView, TRUE);
-    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
-    g_assert(webBackForwardList);
-
-    // Check that there is no item.
-    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    // Add a new item
-    addItem1 = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Added site&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, addItem1);
-    g_object_unref(addItem1);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem1));
-
-    // Check that the added item is the current item.
-    currentItem = webkit_web_back_forward_list_get_current_item(webBackForwardList);
-    g_assert(currentItem);
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Added site&quot;);
-
-    // Add another item.
-    addItem2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Added site 2&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, addItem2);
-    g_object_unref(addItem2);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem2));
-
-    // Check that the added item is new current item.
-    currentItem = webkit_web_back_forward_list_get_current_item(webBackForwardList);
-    g_assert(currentItem);
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 1);
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(webkit_web_view_can_go_back(webView));
-    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Added site 2&quot;);
-
-    backItem = webkit_web_back_forward_list_get_back_item(webBackForwardList);
-    g_assert(backItem);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(backItem), ==, &quot;http://example.com/&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_title(backItem), ==, &quot;Added site&quot;);
-
-    // Go to the first added item.
-    g_assert(webkit_web_view_go_to_back_forward_item(webView, addItem1));
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 1);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    g_object_unref(webView);
-}
-
-static void test_webkit_web_back_forward_list_clear(void)
-{
-    WebKitWebView* webView;
-    WebKitWebBackForwardList* webBackForwardList;
-    WebKitWebHistoryItem* addItem;
-    g_test_bug(&quot;36173&quot;);
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-
-    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
-    g_assert(webBackForwardList);
-
-    // Check that there is no item.
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    // Check that clearing the empty list does not modify counters
-    webkit_web_back_forward_list_clear(webBackForwardList);
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    // Add a new item
-    addItem = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Added site&quot;);
-    webkit_web_back_forward_list_add_item(webBackForwardList, addItem);
-    g_object_unref(addItem);
-    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem));
-
-    // Check that after clearing the list the added item is no longer in the list
-    webkit_web_back_forward_list_clear(webBackForwardList);
-    g_assert(!webkit_web_back_forward_list_contains_item(webBackForwardList, addItem));
-
-    // Check that after clearing it, the list is empty
-    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
-    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
-    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
-    g_assert(!webkit_web_view_can_go_forward(webView));
-    g_assert(!webkit_web_view_can_go_back(webView));
-
-    g_object_unref(webView);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/webbackforwardlist/add_item&quot;, test_webkit_web_back_forward_list_add_item);
-    g_test_add_func(&quot;/webkit/webbackforwardlist/list_order&quot;, test_webkit_web_back_forward_list_order);
-    g_test_add_func(&quot;/webkit/webhistoryitem/lifetime&quot;, test_webkit_web_history_item_lifetime);
-    g_test_add_func(&quot;/webkit/webbackforwardlist/clear&quot;, test_webkit_web_back_forward_list_clear);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebdatasourcec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebdatasource.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebdatasource.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebdatasource.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,242 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Jan Michael Alonzo
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static const gshort defaultTimeout = 10;
-guint waitTimer;
-gboolean shouldWait;
-
-typedef struct {
-    WebKitWebView* webView;
-    WebKitWebFrame* mainFrame;
-} WebDataSourceFixture;
-
-static void test_webkit_web_data_source_get_initial_request()
-{
-    WebKitWebView* view;
-    WebKitWebFrame* frame;
-    WebKitWebDataSource* dataSource;
-    WebKitNetworkRequest* initialRequest;
-
-    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(view);
-    frame = webkit_web_view_get_main_frame(view);
-
-    WebKitNetworkRequest* request = webkit_network_request_new(&quot;http://www.google.com&quot;);
-    webkit_web_frame_load_request(frame, request);
-    g_object_unref(request);
-
-    dataSource = webkit_web_frame_get_provisional_data_source(frame);
-    g_assert(dataSource);
-    initialRequest = webkit_web_data_source_get_initial_request(dataSource);
-    g_assert_cmpstr(webkit_network_request_get_uri(initialRequest), ==, &quot;http://www.google.com/&quot;);
-
-    g_object_unref(view);
-}
-
-static void notify_load_status_unreachable_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
-    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
-
-    g_assert(status != WEBKIT_LOAD_FINISHED);
-
-    if (status != WEBKIT_LOAD_FAILED)
-        return;
-
-    WebKitWebDataSource* datasource = webkit_web_frame_get_data_source(frame);
-
-    g_assert_cmpstr(&quot;http://this.host.does.not.exist/doireallyexist.html&quot;, ==,
-                    webkit_web_data_source_get_unreachable_uri(datasource));
-
-    g_main_loop_quit(loop);
-}
-
-static void notify_load_status_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
-    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
-    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
-
-    if (status == WEBKIT_LOAD_COMMITTED) {
-        g_assert(webkit_web_data_source_is_loading(dataSource));
-        return;
-    }
-    else if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    /* Test get_request */
-    g_test_message(&quot;Testing webkit_web_data_source_get_request&quot;);
-    WebKitNetworkRequest* request = webkit_web_data_source_get_request(dataSource);
-    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://www.webkit.org/&quot;);
-
-    /* Test get_main_resource */
-    g_test_message(&quot;Testing webkit_web_data_source_get_main_resource&quot;);
-    WebKitWebResource* resource = webkit_web_data_source_get_main_resource(dataSource);
-    g_assert_cmpstr(&quot;text/html&quot;, ==, webkit_web_resource_get_mime_type(resource));
-    g_assert_cmpstr(&quot;http://www.webkit.org/&quot;, ==, webkit_web_resource_get_uri(resource));
-
-    /* Test get_data. We just test if data has certain size for the mean time */
-    g_test_message(&quot;Testing webkit_web_data_source_get_data has certain size&quot;);
-    GString* data = webkit_web_data_source_get_data(dataSource);
-    g_assert(data-&gt;len &gt; 100);
-
-    /* FIXME: Add test for get_encoding */
-
-    g_main_loop_quit(loop);
-}
-
-static gboolean wait_timer_fired(GMainLoop* loop)
-{
-    waitTimer = 0;
-    g_main_loop_quit(loop);
-
-    return FALSE;
-}
-
-static void test_webkit_web_data_source()
-{
-    WebKitWebView* view;
-    GMainLoop* loop;
-
-    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(view);
-    loop = g_main_loop_new(NULL, TRUE);
-    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_cb), loop);
-    webkit_web_view_load_uri(view, &quot;http://www.webkit.org&quot;);
-
-    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
-
-    g_main_loop_run(loop);
-
-    if (waitTimer)
-        g_source_remove(waitTimer);
-
-    waitTimer = 0;
-
-    g_main_loop_unref(loop);
-    g_object_unref(view);
-}
-
-static void notify_load_status_lifetime_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
-{
-    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
-    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
-    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
-
-    if (status == WEBKIT_LOAD_COMMITTED) {
-        g_assert(webkit_web_data_source_is_loading(dataSource));
-        return;
-    } else if (status != WEBKIT_LOAD_FINISHED)
-        return;
-
-    g_main_loop_quit(loop);
-}
-
-static void test_webkit_web_data_source_lifetime()
-{
-    WebKitWebView* view;
-    GMainLoop* loop;
-
-    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(view);
-    loop = g_main_loop_new(NULL, TRUE);
-    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_lifetime_cb), loop);
-    webkit_web_view_load_uri(view, &quot;http://www.webkit.org&quot;);
-
-    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
-
-    g_main_loop_run(loop);
-
-    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(webkit_web_view_get_main_frame(view));
-    GList* subResources = webkit_web_data_source_get_subresources(dataSource);
-    gint numberOfResources = g_list_length(subResources);
-    g_list_free(subResources);
-
-    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_FINISHED);
-
-    webkit_web_view_load_uri(view, &quot;http://gnome.org&quot;);
-
-    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_PROVISIONAL);
-
-    webkit_web_view_stop_loading(view);
-
-    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_FAILED);
-
-    subResources = webkit_web_data_source_get_subresources(dataSource);
-    g_assert_cmpint(numberOfResources, ==, g_list_length(subResources));
-    g_list_free(subResources);
-
-    if (waitTimer)
-        g_source_remove(waitTimer);
-
-    waitTimer = 0;
-
-    g_main_loop_unref(loop);
-    g_object_unref(view);
-}
-
-static void test_webkit_web_data_source_unreachable_uri()
-{
-    /* FIXME: this test fails currently. */
-    return;
-
-    WebKitWebView* view;
-    GMainLoop* loop;
-
-    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(view);
-    loop = g_main_loop_new(NULL, TRUE);
-    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_unreachable_cb), loop);
-    webkit_web_view_load_uri(view, &quot;http://this.host.does.not.exist/doireallyexist.html&quot;);
-
-    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
-
-    g_main_loop_run(loop);
-
-    if (waitTimer)
-        g_source_remove(waitTimer);
-
-    waitTimer = 0;
-
-    g_main_loop_unref(loop);
-    g_object_unref(view);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_bug(&quot;24758&quot;);
-    g_test_add_func(&quot;/webkit/webdatasource/get_initial_request&quot;,
-                    test_webkit_web_data_source_get_initial_request);
-    g_test_add_func(&quot;/webkit/webdatasource/api&quot;,
-                    test_webkit_web_data_source);
-    g_test_add_func(&quot;/webkit/webdatasource/unreachable_uri&quot;,
-                    test_webkit_web_data_source_unreachable_uri);
-    g_test_add_func(&quot;/webkit/webdatasource/lifetime&quot;,
-                    test_webkit_web_data_source_lifetime);
-
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebframec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebframe.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebframe.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebframe.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,220 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Holger Hans Peter Freyther
- * Copyright (C) 2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static int numberOfFramesCreated = 0;
-
-static void createFrameSignalTestFrameCreatedCallback(WebKitWebView* webView, WebKitWebFrame* frame, gpointer data)
-{
-    numberOfFramesCreated++;
-}
-
-static gboolean createFrameSignalTestTimeout(gpointer data)
-{
-    g_assert_cmpint(numberOfFramesCreated, ==, 2);
-    g_main_loop_quit((GMainLoop*) data);
-    return FALSE;
-}
-
-static void test_webkit_web_frame_created_signal(void)
-{
-    GtkWidget* webView;
-    GtkWidget* window;
-    GMainLoop* loop = g_main_loop_new(NULL, TRUE);
-
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-
-    webView = webkit_web_view_new();
-    g_signal_connect(webView, &quot;frame-created&quot;, G_CALLBACK(createFrameSignalTestFrameCreatedCallback), loop);
-
-    // We want to ensure that exactly two create-frame signals are
-    // fired and no more, so we set a timeout here. There does not appear
-    // to be a simple way via the API to figure out when all frames have
-    // loaded.
-    g_timeout_add(500, createFrameSignalTestTimeout, loop);
-
-    gtk_container_add(GTK_CONTAINER(window), webView);
-    gtk_widget_show(window);
-    gtk_widget_show(webView);
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView),
-        &quot;&lt;html&gt;&lt;body&gt;Frames!&quot;
-        &quot;&lt;iframe&gt;&lt;/iframe&gt;&quot;
-        &quot;&lt;iframe&gt;&lt;/iframe&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;,
-        &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
-    g_main_loop_run(loop);
-}
-
-static void test_webkit_web_frame_create_destroy(void)
-{
-    GtkWidget *webView;
-    GtkWidget *window;
-
-    g_test_bug(&quot;21837&quot;);
-    webView = webkit_web_view_new();
-    g_object_ref_sink(webView);
-    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
-    // This crashed with the original version
-    g_object_unref(webView);
-
-    g_test_bug(&quot;25042&quot;);
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    webView = webkit_web_view_new();
-    gtk_container_add(GTK_CONTAINER(window), webView);
-    gtk_widget_show(window);
-    gtk_widget_show(webView);
-    gtk_widget_destroy(webView);
-}
-
-static void test_webkit_web_frame_lifetime(void)
-{
-    WebKitWebView* webView;
-    WebKitWebFrame* webFrame;
-    g_test_bug(&quot;21837&quot;);
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
-    webFrame = webkit_web_view_get_main_frame(webView);
-    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 1);
-
-    // Add dummy reference on the WebKitWebFrame to keep it alive
-    g_object_ref(webFrame);
-    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 2);
-
-    // This crashed with the original version
-    g_object_unref(webView);
-
-    // Make sure that the frame got deleted as well. We did this
-    // by adding an extra ref on the WebKitWebFrame and we should
-    // be the one holding the last reference.
-    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 1);
-    g_object_unref(webFrame);
-}
-
-static gboolean print_requested_cb(WebKitWebView* webView, WebKitWebFrame* webFrame, GMainLoop* loop)
-{
-    g_object_set_data(G_OBJECT(webView), &quot;signal-handled&quot;, GINT_TO_POINTER(TRUE));
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-static void print_timeout(GMainLoop* loop)
-{
-    if (g_main_loop_is_running(loop))
-        g_main_loop_quit(loop);
-}
-
-static void test_webkit_web_frame_printing(void)
-{
-    WebKitWebView* webView;
-
-    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(webView);
-    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
-
-    webkit_web_view_load_string(webView,
-                                &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                                &quot;text/html&quot;,
-                                &quot;utf-8&quot;,
-                                &quot;file://&quot;);
-
-    GMainLoop* loop = g_main_loop_new(NULL, TRUE);
-
-    // Does javascript print() work correctly?
-    g_signal_connect(webView, &quot;print-requested&quot;,
-                     G_CALLBACK(print_requested_cb),
-                     loop);
-
-    g_object_set_data(G_OBJECT(webView), &quot;signal-handled&quot;, GINT_TO_POINTER(FALSE));
-    webkit_web_view_execute_script (webView, &quot;print();&quot;);
-
-    // Give javascriptcore some time to process the print request, but
-    // prepare a timeout to avoid it running forever in case the signal is
-    // never emitted.
-    g_timeout_add(1000, (GSourceFunc)print_timeout, loop);
-    g_main_loop_run(loop);
-
-    g_assert_cmpint(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(webView), &quot;signal-handled&quot;)), ==, TRUE);
-
-    // Does printing directly to a file?
-    GError *error = NULL;
-    gchar* temporaryFilename = NULL;
-    gint fd = g_file_open_tmp (&quot;webkit-testwebframe-XXXXXX&quot;, &amp;temporaryFilename, &amp;error);
-    close(fd);
-
-    if (error) {
-        g_critical(&quot;Failed to open a temporary file for writing: %s.&quot;, error-&gt;message);
-        g_error_free(error);
-        goto cleanup;
-    }
-
-    // We delete the file, so that we can easily figure out that the
-    // file got printed;
-    if (g_unlink(temporaryFilename) == -1) {
-        g_warning(&quot;Failed to delete the temporary file: %s.\nThis may cause the test to be bogus.&quot;, g_strerror(errno));
-    }
-
-    WebKitWebFrame* webFrame = webkit_web_view_get_main_frame(webView);
-    GtkPrintOperation* operation = gtk_print_operation_new();
-    GtkPrintOperationAction action = GTK_PRINT_OPERATION_ACTION_EXPORT;
-    GtkPrintOperationResult result;
-
-    gtk_print_operation_set_export_filename(operation, temporaryFilename);
-    result = webkit_web_frame_print_full (webFrame, operation, action, NULL);
-
-    g_assert_cmpint(result, ==, GTK_PRINT_OPERATION_RESULT_APPLY);
-    g_assert_cmpint(g_file_test(temporaryFilename, G_FILE_TEST_IS_REGULAR), ==, TRUE);
-
-    g_unlink(temporaryFilename);
-    g_object_unref(operation);
-cleanup:
-    g_object_unref(webView);
-    g_free(temporaryFilename);
-}
-
-static void test_webkit_web_frame_response()
-{
-    WebKitWebFrame* frame = g_object_new(WEBKIT_TYPE_WEB_FRAME, NULL);
-    WebKitNetworkResponse* response = webkit_web_frame_get_network_response(frame);
-    g_assert(!response);
-    g_object_unref(frame);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/webview/create_destroy&quot;, test_webkit_web_frame_create_destroy);
-    g_test_add_func(&quot;/webkit/webview/frame-created_signal&quot;, test_webkit_web_frame_created_signal);
-    g_test_add_func(&quot;/webkit/webframe/lifetime&quot;, test_webkit_web_frame_lifetime);
-    g_test_add_func(&quot;/webkit/webview/printing&quot;, test_webkit_web_frame_printing);
-    g_test_add_func(&quot;/webkit/webview/response&quot;, test_webkit_web_frame_response);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebhistoryitemc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebhistoryitem.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebhistoryitem.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebhistoryitem.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,70 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Jan Michael Alonzo
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-typedef struct {
-    WebKitWebHistoryItem* item;
-} WebHistoryItemFixture;
-
-static void web_history_item_fixture_setup(WebHistoryItemFixture* fixture,
-                                           gconstpointer data)
-{
-    fixture-&gt;item = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Example1&quot;);
-    g_assert_cmpint(G_OBJECT(fixture-&gt;item)-&gt;ref_count, == , 1);
-    g_assert(fixture-&gt;item != NULL);
-}
-
-static void web_history_item_fixture_teardown(WebHistoryItemFixture* fixture,
-                                              gconstpointer data)
-{
-    g_assert(fixture-&gt;item != NULL);
-    g_assert_cmpint(G_OBJECT(fixture-&gt;item)-&gt;ref_count, ==, 1);
-}
-
-static void test_webkit_web_history_item_get_data(WebHistoryItemFixture* fixture,
-                                                  gconstpointer data)
-{
-    g_assert_cmpstr(webkit_web_history_item_get_title(fixture-&gt;item), ==, &quot;Example1&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_uri(fixture-&gt;item), ==, &quot;http://example.com/&quot;);
-}
-
-static void test_webkit_web_history_item_alternate_title(WebHistoryItemFixture* fixture,
-                                                         gconstpointer data)
-{
-    webkit_web_history_item_set_alternate_title(fixture-&gt;item, &quot;Alternate title&quot;);
-    g_assert_cmpstr(webkit_web_history_item_get_alternate_title(fixture-&gt;item), ==, &quot;Alternate title&quot;);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add(&quot;/webkit/webhistoryitem/get_data&quot;,
-               WebHistoryItemFixture, 0, web_history_item_fixture_setup,
-               test_webkit_web_history_item_get_data, web_history_item_fixture_teardown);
-    g_test_add(&quot;/webkit/webhistoryitem/alternate_title&quot;,
-               WebHistoryItemFixture, 0, web_history_item_fixture_setup,
-               test_webkit_web_history_item_alternate_title, web_history_item_fixture_teardown);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebinspectorc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebinspector.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebinspector.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebinspector.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,173 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Gustavo Noronha Silva &lt;gns@gnome.org&gt;
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;string.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-GMainLoop *loop;
-GtkWidget *window;
-
-static gboolean quitLoop(gpointer data)
-{
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-/* Ignore simple translation-related messages and upgrade other
- * messages to warnings.
- */
-static gboolean consoleMessageCallback(WebKitWebView* webView, const char* message, unsigned int line, const char* sourceId)
-{
-    if (strstr(message, &quot;Localized string&quot;) || strstr(message, &quot;Protocol Error: the message is for non-existing domain 'Profiler'&quot;) ||
-        strstr(message, &quot;Didn't find a TreeElement for a representedObject&quot;))
-        return TRUE;
-
-    g_warning(&quot;Console: %s @%d: %s\n&quot;, sourceId, line, message);
-    return TRUE;
-}
-
-static WebKitWebView* inspectElementCallback(WebKitWebInspector *inspector, WebKitWebView *inspectedWebView, int *timesElementInspected)
-{
-    *timesElementInspected = *timesElementInspected + 1;
-
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-
-    GtkWidget *newWebView = webkit_web_view_new();
-    gtk_container_add(GTK_CONTAINER(window), newWebView);
-
-    g_signal_connect(newWebView, &quot;console-message&quot;,
-                     G_CALLBACK(consoleMessageCallback), NULL);
-
-    return WEBKIT_WEB_VIEW(newWebView);
-}
-
-static gboolean closeInspector(WebKitWebInspector *inspector, int *timesClosed)
-{
-    *timesClosed = *timesClosed + 1;
-
-    gtk_widget_destroy(window);
-    return TRUE;
-}
-
-static gboolean showInspector(WebKitWebInspector *inspector, gpointer data)
-{
-    g_idle_add(quitLoop, NULL);
-    return TRUE;
-}
-
-static void loadFinished(WebKitWebView *webView, WebKitWebFrame *frame, gboolean *isLoadFinished)
-{
-    *isLoadFinished = TRUE;
-    if (g_main_loop_is_running(loop))
-        g_main_loop_quit(loop);
-}
-
-static void test_webkit_web_inspector_close_and_inspect()
-{
-    WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    loop = g_main_loop_new(NULL, TRUE);
-
-    gboolean isLoadFinished = FALSE;
-    g_signal_connect(webView, &quot;load-finished&quot;, G_CALLBACK(loadFinished), &amp;isLoadFinished);
-    webkit_web_view_load_string(webView,
-                                &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;woohoo&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                                &quot;text/html&quot;, &quot;UTF-8&quot;, &quot;file://&quot;);
-    if (!isLoadFinished)
-        g_main_loop_run(loop);
-
-    g_object_set(webkit_web_view_get_settings(webView), &quot;enable-developer-extras&quot;, TRUE, NULL);
-    WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
-
-    int timesElementInspected = 0;
-    int timesClosed = 0;
-    g_object_connect(inspector,
-                     &quot;signal::inspect-web-view&quot;, G_CALLBACK(inspectElementCallback), &amp;timesElementInspected,
-                     &quot;signal::show-window&quot;, G_CALLBACK(showInspector), NULL,
-                     &quot;signal::close-window&quot;, G_CALLBACK(closeInspector), &amp;timesClosed,
-                     NULL);
-
-    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
-    g_assert_cmpint(timesElementInspected, ==, 1);
-
-    g_main_loop_run(loop);
-
-    webkit_web_inspector_close(inspector);
-    g_assert_cmpint(timesClosed, ==, 1);
-
-    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
-    g_assert_cmpint(timesElementInspected, ==, 2);
-
-    g_main_loop_run(loop);
-
-    gtk_widget_destroy(GTK_WIDGET(webView));
-    g_assert_cmpint(timesClosed, ==, 2);
-
-    g_main_loop_unref(loop);
-}
-
-static void test_webkit_web_inspector_destroy_inspected_web_view()
-{
-    WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    loop = g_main_loop_new(NULL, TRUE);
-
-    gboolean isLoadFinished = FALSE;
-    g_signal_connect(webView, &quot;load-finished&quot;, G_CALLBACK(loadFinished), &amp;isLoadFinished);
-    webkit_web_view_load_string(webView,
-                                &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;woohoo&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-                                &quot;text/html&quot;, &quot;UTF-8&quot;, &quot;file://&quot;);
-    if (!isLoadFinished)
-        g_main_loop_run(loop);
-
-    g_object_set(webkit_web_view_get_settings(webView), &quot;enable-developer-extras&quot;, TRUE, NULL);
-    WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
-
-    int timesElementInspected = 0;
-    int timesClosed = 0;
-    g_object_connect(inspector,
-                     &quot;signal::inspect-web-view&quot;, G_CALLBACK(inspectElementCallback), &amp;timesElementInspected,
-                     &quot;signal::show-window&quot;, G_CALLBACK(showInspector), NULL,
-                     &quot;signal::close-window&quot;, G_CALLBACK(closeInspector), &amp;timesClosed,
-                     NULL);
-
-    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
-    g_assert_cmpint(timesElementInspected, ==, 1);
-
-    g_main_loop_run(loop);
-
-    gtk_widget_destroy(GTK_WIDGET(webView));
-    g_assert_cmpint(timesClosed, ==, 1);
-
-    g_main_loop_unref(loop);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/webinspector/destroy-inspected-web-view&quot;, test_webkit_web_inspector_destroy_inspected_web_view);
-    g_test_add_func(&quot;/webkit/webinspector/close-and-inspect&quot;, test_webkit_web_inspector_close_and_inspect);
-
-    return g_test_run();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebplugindatabasec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebplugindatabase.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebplugindatabase.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebplugindatabase.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,78 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;errno.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-/* This function is not public, so we need an extern declaration */
-extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
-
-static void test_webkit_web_plugin_database_get_plugins()
-{
-    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    WebKitWebPluginDatabase* database;
-    GSList* pluginList, *p;
-    gboolean found = FALSE;
-    gboolean enabled = FALSE;
-
-    webkit_web_settings_add_extra_plugin_directory(view, TEST_PLUGIN_DIR);
-    g_object_ref_sink(G_OBJECT(view));
-
-    database = webkit_get_web_plugin_database();
-    pluginList = webkit_web_plugin_database_get_plugins(database);
-    for (p = pluginList; p; p = p-&gt;next) {
-        WebKitWebPlugin* plugin = (WebKitWebPlugin*)p-&gt;data;
-        if (!g_strcmp0(webkit_web_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;) &amp;&amp;
-            !g_strcmp0(webkit_web_plugin_get_description(plugin), &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;)) {
-            found = TRUE;
-            enabled = webkit_web_plugin_get_enabled(plugin);
-            webkit_web_plugin_set_enabled(plugin, FALSE);
-        }
-    }
-    webkit_web_plugin_database_plugins_list_free(pluginList);
-    g_assert(found);
-    g_assert(enabled);
-
-    webkit_web_plugin_database_refresh(database);
-    pluginList = webkit_web_plugin_database_get_plugins(database);
-
-    for (p = pluginList; p; p = p-&gt;next) {
-        WebKitWebPlugin* plugin = (WebKitWebPlugin*)p-&gt;data;
-        if (!g_strcmp0(webkit_web_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;) &amp;&amp;
-            !g_strcmp0(webkit_web_plugin_get_description(plugin), &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;))
-            enabled = webkit_web_plugin_get_enabled(plugin);
-    }
-    webkit_web_plugin_database_plugins_list_free(pluginList);
-    g_assert(!enabled);
-
-    g_object_unref(view);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/webplugindatabase/getplugins&quot;, test_webkit_web_plugin_database_get_plugins);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebresourcec"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebresource.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebresource.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebresource.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,331 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Jan Michael Alonzo
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-#define INDEX_HTML &quot;&lt;html&gt;&lt;/html&gt;&quot;
-#define MAIN_HTML &quot;&lt;html&gt;&lt;head&gt;&lt;script language=\&quot;javascript\&quot; src=\&quot;/javascript.js\&quot;&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;hah&lt;/h1&gt;&lt;/html&gt;&quot;
-#define JAVASCRIPT &quot;function blah () { var a = 1; }&quot;
-
-GMainLoop* loop;
-SoupSession *session;
-char *base_uri;
-WebKitWebResource* main_resource;
-WebKitWebResource* sub_resource;
-
-typedef struct {
-    WebKitWebResource* webResource;
-    WebKitWebView* webView;
-} WebResourceFixture;
-
-/* For real request testing */
-static void
-server_callback (SoupServer *server, SoupMessage *msg,
-                 const char *path, GHashTable *query,
-                 SoupClientContext *context, gpointer data)
-{
-    if (msg-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status (msg, SOUP_STATUS_OK);
-
-    /* Redirect */
-    if (g_str_equal (path, &quot;/&quot;)) {
-        soup_message_set_status (msg, SOUP_STATUS_MOVED_PERMANENTLY);
-
-        soup_message_headers_append (msg-&gt;response_headers,
-                                     &quot;Location&quot;, &quot;/index.html&quot;);
-    } else if (g_str_equal (path, &quot;/index.html&quot;)) {
-        soup_message_body_append (msg-&gt;response_body,
-                                  SOUP_MEMORY_COPY,
-                                  INDEX_HTML,
-                                  strlen (INDEX_HTML));
-    } else if (g_str_equal (path, &quot;/main.html&quot;)) {
-        soup_message_body_append (msg-&gt;response_body,
-                                  SOUP_MEMORY_COPY,
-                                  MAIN_HTML,
-                                  strlen (MAIN_HTML));
-    } else if (g_str_equal (path, &quot;/javascript.js&quot;)) {
-        soup_message_body_append (msg-&gt;response_body,
-                                  SOUP_MEMORY_COPY,
-                                  JAVASCRIPT,
-                                  strlen (JAVASCRIPT));
-    }
-
-
-    soup_message_body_complete (msg-&gt;response_body);
-}
-
-static void web_resource_fixture_setup(WebResourceFixture* fixture, gconstpointer data)
-{
-    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(fixture-&gt;webView);
-    const gchar* webData = &quot;&lt;html&gt;&lt;/html&gt;&quot;;
-    fixture-&gt;webResource = webkit_web_resource_new(webData, strlen(webData), &quot;http://example.com/&quot;, &quot;text/html&quot;, &quot;utf8&quot;, &quot;Example.com&quot;);
-    g_assert(fixture-&gt;webResource);
-}
-
-static void web_resource_fixture_teardown(WebResourceFixture* fixture, gconstpointer data)
-{
-    g_assert(fixture-&gt;webResource);
-    g_object_unref(fixture-&gt;webResource);
-    g_object_unref(fixture-&gt;webView);
-}
-
-static void test_webkit_web_resource_get_url(WebResourceFixture* fixture, gconstpointer data)
-{
-    gchar* url;
-    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;uri&quot;, &amp;url, NULL);
-    g_assert_cmpstr(url, ==, &quot;http://example.com/&quot;);
-    g_assert_cmpstr(webkit_web_resource_get_uri(fixture-&gt;webResource) ,==,&quot;http://example.com/&quot;);
-    g_free(url);
-}
-
-static void test_webkit_web_resource_get_data(WebResourceFixture* fixture, gconstpointer data)
-{
-    GString* charData = webkit_web_resource_get_data(fixture-&gt;webResource);
-    g_assert_cmpstr(charData-&gt;str, ==, &quot;&lt;html&gt;&lt;/html&gt;&quot;);
-}
-
-static void test_webkit_web_resource_get_mime_type(WebResourceFixture* fixture, gconstpointer data)
-{
-    gchar* mime_type;
-    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;mime-type&quot;, &amp;mime_type, NULL);
-    g_assert_cmpstr(mime_type, ==, &quot;text/html&quot;);
-    g_assert_cmpstr(webkit_web_resource_get_mime_type(fixture-&gt;webResource),==,&quot;text/html&quot;);
-    g_free(mime_type);
-}
-
-static void test_webkit_web_resource_get_encoding(WebResourceFixture* fixture, gconstpointer data)
-{
-    gchar* text_encoding;
-    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;encoding&quot;, &amp;text_encoding, NULL);
-    g_assert_cmpstr(text_encoding, ==, &quot;utf8&quot;);
-    g_assert_cmpstr(webkit_web_resource_get_encoding(fixture-&gt;webResource),==,&quot;utf8&quot;);
-    g_free(text_encoding);
-}
-
-static void test_webkit_web_resource_get_frame_name(WebResourceFixture* fixture, gconstpointer data)
-{
-    gchar* frame_name;
-    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;frame-name&quot;, &amp;frame_name, NULL);
-    g_assert_cmpstr(frame_name, ==, &quot;Example.com&quot;);
-    g_assert_cmpstr(webkit_web_resource_get_frame_name(fixture-&gt;webResource),==,&quot;Example.com&quot;);
-    g_free(frame_name);
-}
-
-static void resource_request_starting_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebKitWebResource* web_resource, WebKitNetworkRequest* request, WebKitNetworkResponse* response, gpointer data)
-{
-    gint* been_there = data;
-    *been_there = *been_there + 1;
-
-    if (*been_there == 1) {
-        g_assert(!main_resource);
-        main_resource = g_object_ref(web_resource);
-
-        g_assert_cmpstr(webkit_web_resource_get_uri(web_resource), ==, base_uri);
-
-        /* This should be a redirect, so the response must be NULL */
-        g_assert(!response);
-    } else if (*been_there == 2) {
-        char* uri = g_strdup_printf(&quot;%sindex.html&quot;, base_uri);
-
-        g_assert_cmpstr(webkit_web_resource_get_uri(web_resource), ==, uri);
-
-        /* Cancel the request. */
-        webkit_network_request_set_uri(request, &quot;about:blank&quot;);
-
-        g_free(uri);
-    }
-}
-
-static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
-        gboolean* been_there = data;
-        *been_there = TRUE;
-
-        g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, &quot;about:blank&quot;);
-
-        g_main_loop_quit(loop);
-    }
-}
-
-static void test_web_resource_loading()
-{
-    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    gint been_to_resource_request_starting = 0;
-    gboolean been_to_load_finished = FALSE;
-    WebKitWebFrame* web_frame;
-    WebKitWebDataSource* data_source;
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_object_ref_sink(web_view);
-
-    g_signal_connect(web_view, &quot;resource-request-starting&quot;,
-                     G_CALLBACK(resource_request_starting_cb),
-                     &amp;been_to_resource_request_starting);
-
-    g_signal_connect(web_view, &quot;notify::load-status&quot;,
-                     G_CALLBACK(notify_load_status_cb),
-                     &amp;been_to_load_finished);
-
-    webkit_web_view_load_uri(web_view, base_uri);
-
-    /* We won't get finished immediately, because of the redirect */
-    g_main_loop_run(loop);
-    
-    web_frame = webkit_web_view_get_main_frame(web_view);
-    data_source = webkit_web_frame_get_data_source(web_frame);
-
-    g_assert(main_resource);
-    g_assert(webkit_web_data_source_get_main_resource(data_source) == main_resource);
-    g_object_unref(main_resource);
-    
-    g_assert_cmpint(been_to_resource_request_starting, ==, 2);
-    g_assert_cmpint(been_to_load_finished, ==, TRUE);
-
-    g_object_unref(web_view);
-    g_main_loop_unref(loop);
-}
-
-static void resource_request_starting_sub_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebKitWebResource* web_resource, WebKitNetworkRequest* request, WebKitNetworkResponse* response, gpointer data)
-{
-    if (!main_resource)
-        main_resource = g_object_ref(web_resource);
-    else if (!sub_resource)
-      sub_resource = g_object_ref(web_resource);
-}
-
-static void notify_load_status_sub_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED)
-        g_main_loop_quit(loop);
-}
-
-static gboolean idle_quit_loop_cb(gpointer data)
-{
-    g_main_loop_quit(loop);
-    return FALSE;
-}
-
-static void test_web_resource_sub_resource_loading()
-{
-    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    WebKitWebFrame* web_frame;
-    WebKitWebDataSource* data_source;
-    GList* sub_resources;
-    char* uri = g_strdup_printf(&quot;%smain.html&quot;, base_uri);
-
-    main_resource = NULL;
-    
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_object_ref_sink(web_view);
-
-    g_signal_connect(web_view, &quot;resource-request-starting&quot;,
-                     G_CALLBACK(resource_request_starting_sub_cb),
-                     NULL);
-
-    g_signal_connect(web_view, &quot;notify::load-status&quot;,
-                     G_CALLBACK(notify_load_status_sub_cb),
-                     NULL);
-
-    webkit_web_view_load_uri(web_view, uri);
-
-    g_main_loop_run(loop);
-
-    /* The main resource should be loaded; now let's wait for the sub-resource to load */
-    g_idle_add(idle_quit_loop_cb, NULL);
-    g_main_loop_run(loop);
-    
-    g_assert(main_resource &amp;&amp; sub_resource);
-    g_assert(main_resource != sub_resource);
-
-    web_frame = webkit_web_view_get_main_frame(web_view);
-    data_source = webkit_web_frame_get_data_source(web_frame);
-
-    g_assert(webkit_web_data_source_get_main_resource(data_source) == main_resource);
-    g_object_unref(main_resource);
-
-    sub_resources = webkit_web_data_source_get_subresources(data_source);
-    // Expected resources: javascripts.js, favicon.ico
-    g_assert(sub_resources);
-    g_assert(sub_resources-&gt;next);
-    g_assert(!sub_resources-&gt;next-&gt;next);
-
-    // Test that the object we got from the data source is the same
-    // that went through resource-request-starting. Note that the order is
-    // not important (and not guaranteed since the resources are stored in a
-    // hashtable).
-    g_assert(WEBKIT_WEB_RESOURCE(sub_resources-&gt;data) == sub_resource
-             || WEBKIT_WEB_RESOURCE(sub_resources-&gt;next-&gt;data) == sub_resource);
-
-    g_object_unref(web_view);
-    g_main_loop_unref(loop);
-}
-
-int main(int argc, char** argv)
-{
-    SoupServer* server;
-    SoupURI* soup_uri;
-
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-
-    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
-
-    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(soup_uri, soup_server_get_port(server));
-
-    base_uri = soup_uri_to_string(soup_uri, FALSE);
-    soup_uri_free(soup_uri);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add(&quot;/webkit/webresource/get_url&quot;,
-               WebResourceFixture, 0, web_resource_fixture_setup,
-               test_webkit_web_resource_get_url, web_resource_fixture_teardown);
-    g_test_add(&quot;/webkit/webresource/get_mime_type&quot;,
-               WebResourceFixture, 0, web_resource_fixture_setup,
-               test_webkit_web_resource_get_mime_type, web_resource_fixture_teardown);
-    g_test_add(&quot;/webkit/webresource/get_text_encoding_name&quot;,
-               WebResourceFixture, 0, web_resource_fixture_setup,
-               test_webkit_web_resource_get_encoding, web_resource_fixture_teardown);
-    g_test_add(&quot;/webkit/webresource/get_frame_name&quot;,
-               WebResourceFixture, 0, web_resource_fixture_setup,
-               test_webkit_web_resource_get_frame_name, web_resource_fixture_teardown);
-    g_test_add(&quot;/webkit/webresource/get_data&quot;,
-               WebResourceFixture, 0, web_resource_fixture_setup,
-               test_webkit_web_resource_get_data, web_resource_fixture_teardown);
-
-    g_test_add_func(&quot;/webkit/webresource/loading&quot;, test_web_resource_loading);
-    g_test_add_func(&quot;/webkit/webresource/sub_resource_loading&quot;, test_web_resource_sub_resource_loading);
-
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebsettingsc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebsettings.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebsettings.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebsettings.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,153 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Jan Michael Alonzo
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;glib.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-/* Private API */
-char* webkitWebSettingsUserAgentForURI(WebKitWebSettings *settings, const char *uri);
-
-static void test_webkit_web_settings_copy(void)
-{
-    WebKitWebSettings *settings = webkit_web_settings_new();
-
-    // Set some non-default settings to verify that settings are properly copied.
-    g_object_set(settings,
-                 &quot;enable-webgl&quot;, TRUE,
-                 &quot;enable-fullscreen&quot;, TRUE,
-                 &quot;auto-load-images&quot;, FALSE,
-                 &quot;default-encoding&quot;, &quot;utf-8&quot;, NULL);
-
-    WebKitWebSettings *copy = webkit_web_settings_copy(settings);
-
-    gboolean enableWebGL = FALSE;
-    gboolean enableFullscreen = FALSE;
-    gboolean autoLoadImages = FALSE;
-    char *defaultEncoding = 0;
-    g_object_get(copy,
-                 &quot;enable-fullscreen&quot;, &amp;enableFullscreen,
-                 &quot;enable-webgl&quot;, &amp;enableWebGL,
-                 &quot;auto-load-images&quot;, &amp;autoLoadImages,
-                 &quot;default-encoding&quot;, &amp;defaultEncoding, NULL);
-
-    g_assert(enableWebGL);
-    g_assert(enableFullscreen);
-    g_assert(!autoLoadImages);
-    g_assert_cmpstr(defaultEncoding, ==, &quot;utf-8&quot;);
-    g_free(defaultEncoding);
-}
-
-static void test_non_quirky_user_agents(WebKitWebSettings *settings, const char *defaultUserAgent)
-{
-    char *userAgent = 0;
-
-    // test a custom UA string
-    userAgent = 0;
-    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
-    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    // setting it to NULL or an empty value should give us the default UA string
-    userAgent = 0;
-    g_object_set(settings, &quot;user-agent&quot;, 0, NULL);
-    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
-    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
-    g_free(userAgent);
-
-    userAgent = 0;
-    g_object_set(settings, &quot;user-agent&quot;, &quot;&quot;, NULL);
-    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
-    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
-    g_free(userAgent);
-}
-
-static void test_webkit_web_settings_user_agent(void)
-{
-    WebKitWebSettings *settings;
-    GtkWidget *webView;
-    char *defaultUserAgent;
-    char *userAgent = 0;
-    g_test_bug(&quot;17375&quot;);
-
-    webView = webkit_web_view_new();
-    g_object_ref_sink(webView);
-
-    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView));
-    defaultUserAgent = g_strdup(webkit_web_settings_get_user_agent(settings));
-
-    test_non_quirky_user_agents(settings, defaultUserAgent);
-
-    /* Test quirky google domains */
-    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com/&quot;);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://gmail.com/&quot;);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com.br/&quot;);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://calendar.google.com/&quot;);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    /* Now enable quirks handling */
-    g_object_set(settings, &quot;enable-site-specific-quirks&quot;, TRUE, NULL);
-
-    test_non_quirky_user_agents(settings, defaultUserAgent);
-
-    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com/&quot;);
-    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://gmail.com/&quot;);
-    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com.br/&quot;);
-    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
-    g_free(userAgent);
-
-    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.uk.not.com.br/&quot;);
-    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
-    g_free(userAgent);
-
-    g_free(defaultUserAgent);
-    g_object_unref(webView);
-}
-
-int main(int argc, char **argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/websettings/user_agent&quot;, test_webkit_web_settings_user_agent);
-    g_test_add_func(&quot;/webkit/websettings/copy&quot;, test_webkit_web_settings_copy);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebviewc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebview.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebview.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebview.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,746 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Holger Hans Peter Freyther
- * Copyright (C) 2009, 2010 Collabora Ltd.
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &quot;test_utils.h&quot;
-
-#include &lt;errno.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;string.h&gt;
-
-#include &lt;glib.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gdk/gdk.h&gt;
-#include &lt;gdk/gdkkeysyms.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-GMainLoop* loop;
-SoupSession *session;
-char* base_uri;
-
-/* For real request testing */
-static void
-server_callback(SoupServer* server, SoupMessage* msg,
-                 const char* path, GHashTable* query,
-                 SoupClientContext* context, gpointer data)
-{
-    if (msg-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(msg, SOUP_STATUS_OK);
-
-    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
-        char* contents;
-        gsize length;
-        GError* error = NULL;
-
-        g_file_get_contents(&quot;blank.ico&quot;, &amp;contents, &amp;length, &amp;error);
-        g_assert(!error);
-
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    } else if (g_str_equal(path, &quot;/bigdiv.html&quot;)) {
-        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;&lt;a id=\&quot;link\&quot; href=\&quot;http://abc.def\&quot;&gt;test&lt;/a&gt;&lt;div style=\&quot;background-color: green; height: 1200px;\&quot;&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
-    } else if (g_str_equal(path, &quot;/iframe.html&quot;)) {
-        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body id=\&quot;some-content\&quot;&gt;&lt;div style=\&quot;background-color: green; height: 50px;\&quot;&gt;&lt;/div&gt;&lt;iframe src=\&quot;bigdiv.html\&quot;&gt;&lt;/iframe&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
-    } else {
-        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;);
-        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
-    }
-
-    soup_message_body_complete(msg-&gt;response_body);
-}
-
-static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
-        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
-        g_main_loop_quit(loop);
-}
-
-static gboolean timeout_cb(gpointer data)
-{
-    g_error(&quot;Didn't get icon-uri before timing out.&quot;);
-    return FALSE;
-}
-
-static void icon_uri_changed_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    char* expected_uri;
-
-    g_assert_cmpstr(g_param_spec_get_name(pspec), ==, &quot;icon-uri&quot;);
-
-    expected_uri = g_strdup_printf(&quot;%sfavicon.ico&quot;, base_uri);
-    g_assert_cmpstr(webkit_web_view_get_icon_uri(web_view), ==, expected_uri);
-    g_free(expected_uri);
-
-    g_main_loop_quit(loop);
-}
-
-static void icon_loaded_cb(WebKitWebView* web_view, char* icon_uri, gpointer data)
-{
-    gboolean* been_here = (gboolean*)data;
-    char* expected_uri = g_strdup_printf(&quot;%sfavicon.ico&quot;, base_uri);
-    g_assert_cmpstr(icon_uri, ==, expected_uri);
-    g_free(expected_uri);
-
-    g_assert_cmpstr(icon_uri, ==, webkit_web_view_get_icon_uri(web_view));
-
-    *been_here = TRUE;
-}
-
-static void test_webkit_web_view_icon_uri()
-{
-    gboolean been_to_icon_loaded = FALSE;
-    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_object_ref_sink(G_OBJECT(view));
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_object_connect(G_OBJECT(view),
-                     &quot;signal::notify::icon-uri&quot;, icon_uri_changed_cb, NULL,
-                     &quot;signal::icon-loaded&quot;, icon_loaded_cb, &amp;been_to_icon_loaded,
-                     NULL);
-
-    webkit_web_view_load_uri(view, base_uri);
-
-    guint timeout_id = g_timeout_add(500, timeout_cb, 0);
-
-    g_main_loop_run(loop);
-
-    g_source_remove(timeout_id);
-
-    g_assert(been_to_icon_loaded);
-
-    g_object_unref(view);
-}
-
-static gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
-{
-    GMainLoop* loop = (GMainLoop*)data;
-    g_main_loop_quit(loop);
-
-    return FALSE;
-}
-
-static gboolean quit_after_short_delay_cb(gpointer data)
-{
-    g_main_loop_quit((GMainLoop*)data);
-    return FALSE;
-}
-
-static void test_webkit_web_view_grab_focus()
-{
-    char* uri = g_strconcat(base_uri, &quot;iframe.html&quot;, NULL);
-    GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
-    GtkWidget* scrolled_window = gtk_scrolled_window_new(NULL, NULL);
-    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GtkAdjustment* adjustment;
-
-    gtk_window_set_default_size(GTK_WINDOW(window), 400, 200);
-
-    gtk_container_add(GTK_CONTAINER(window), scrolled_window);
-    gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(view));
-
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
-                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
-
-    /* Wait for window to show up */
-    gtk_widget_show_all(window);
-    g_signal_connect(window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), loop);
-    g_main_loop_run(loop);
-
-    /* Load a page with a big div that will cause scrollbars to appear */
-    webkit_web_view_load_uri(view, uri);
-    g_main_loop_run(loop);
-
-    adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
-
-    /* Since webkit_web_view_execute_script does not return a value,
-       it is impossible to know if an inner document has focus after
-       a node of it was focused via .focus() method.
-       The code below is an workaround: if the node has focus, a scroll
-       action is performed and afterward it is checked if the adjustment
-       has to be different from 0.
-    */
-    char script[] = &quot;var innerDoc = document.defaultView.frames[0].document; \
-                     innerDoc.getElementById(\&quot;link\&quot;).focus();              \
-                     if (innerDoc.hasFocus())                                \
-                        window.scrollBy(0, 100);&quot;;
-
-    /* Focus an element using JavaScript */
-    webkit_web_view_execute_script(view, script);
-
-    /* Adjustments update asynchronously, so we must wait a bit. */
-    g_timeout_add(100, quit_after_short_delay_cb, loop);
-    g_main_loop_run(loop);
-
-    /* Make sure the ScrolledWindow noticed the scroll */
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), !=, 0.0);
-
-    g_free(uri);
-    gtk_widget_destroy(window);
-}
-
-static void do_test_webkit_web_view_adjustments(gboolean with_page_cache)
-{
-    char* effective_uri = g_strconcat(base_uri, &quot;bigdiv.html&quot;, NULL);
-    char* second_uri = g_strconcat(base_uri, &quot;iframe.html&quot;, NULL);
-    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    GtkWidget* scrolled_window = gtk_scrolled_window_new(NULL, NULL);
-    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GtkAdjustment* adjustment;
-    double lower;
-    double upper;
-
-    if (with_page_cache) {
-        WebKitWebSettings* settings = webkit_web_view_get_settings(view);
-        g_object_set(settings, &quot;enable-page-cache&quot;, TRUE, NULL);
-    }
-
-    gtk_window_set_default_size(GTK_WINDOW(window), 400, 200);
-
-    gtk_container_add(GTK_CONTAINER(window), scrolled_window);
-    gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(view));
-
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
-                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_object_connect(G_OBJECT(view),
-                     &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
-                     NULL);
-
-    /* Wait for window to show up */
-    gtk_widget_show_all(window);
-    g_signal_connect(window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), loop);
-    g_main_loop_run(loop);
-
-    /* Load a page with a big div that will cause scrollbars to appear */
-    webkit_web_view_load_uri(view, effective_uri);
-    g_main_loop_run(loop);
-
-    /* Adjustments update asynchronously, so we must wait a bit. */
-    g_timeout_add(100, quit_after_short_delay_cb, loop);
-    g_main_loop_run(loop);
-
-    adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
-
-    lower = gtk_adjustment_get_lower(adjustment);
-    upper = gtk_adjustment_get_upper(adjustment);
-
-    /* Scroll the view using JavaScript */
-    webkit_web_view_execute_script(view, &quot;window.scrollBy(0, 100)&quot;);
-
-    /* Adjustments update asynchronously, so we must wait a bit. */
-    g_timeout_add(100, quit_after_short_delay_cb, loop);
-    g_main_loop_run(loop);
-
-    /* Make sure the ScrolledWindow noticed the scroll */
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
-
-    /* Load a second URI */
-    webkit_web_view_load_uri(view, second_uri);
-    g_main_loop_run(loop);
-
-    /* The page loaded but the adjustments may not be updated yet. Wait a bit. */
-    g_timeout_add(100, quit_after_short_delay_cb, loop);
-    g_main_loop_run(loop);
-
-    /* Make sure the scrollbar has been reset */
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
-
-    /* Go back */
-    webkit_web_view_go_back(view);
-
-    /* When using page cache, go_back will return syncronously */
-    if (!with_page_cache)
-        g_main_loop_run(loop);
-
-    /* Make sure GTK+ has time to process the changes in size, for the adjusments */
-    while (gtk_events_pending())
-        gtk_main_iteration();
-
-    /* Make sure upper and lower bounds have been restored correctly */
-    g_assert_cmpfloat(lower, ==, gtk_adjustment_get_lower(adjustment));
-    g_assert_cmpfloat(upper, ==, gtk_adjustment_get_upper(adjustment));
-    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
-
-    g_free(effective_uri);
-    g_free(second_uri);
-
-    gtk_widget_destroy(window);
-}
-
-static void test_webkit_web_view_adjustments()
-{
-    /* Test this with page cache disabled, and enabled. */
-    do_test_webkit_web_view_adjustments(FALSE);
-    do_test_webkit_web_view_adjustments(TRUE);
-}
-
-gboolean delayed_destroy(gpointer data)
-{
-    gtk_widget_destroy(GTK_WIDGET(data));
-    g_main_loop_quit(loop);
-    return FALSE;
-}
-
-static void test_webkit_web_view_destroy()
-{
-    GtkWidget* window;
-    GtkWidget* web_view;
-
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    web_view = webkit_web_view_new();
-
-    gtk_container_add(GTK_CONTAINER(window), web_view);
-
-    gtk_widget_show_all(window);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_signal_connect(window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), loop);
-    g_main_loop_run(loop);
-
-    g_idle_add(delayed_destroy, web_view);
-    g_main_loop_run(loop);
-
-    gtk_widget_destroy(window);
-}
-
-static void test_webkit_web_view_window_features()
-{
-    GtkWidget* window;
-    GtkWidget* web_view;
-    
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    web_view = webkit_web_view_new();
-    
-    gtk_container_add(GTK_CONTAINER(window), web_view);
-    
-    gtk_widget_show_all(window);
-    
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_signal_connect(window, &quot;map-event&quot;,
-                     G_CALLBACK(map_event_cb), loop);
-    g_main_loop_run(loop);
-    
-    /* Bug #36144 */
-    g_object_set(G_OBJECT(web_view), &quot;window-features&quot;, NULL, NULL);
-    
-    gtk_widget_destroy(window);
-}    
-
-static void test_webkit_web_view_in_offscreen_window_does_not_crash()
-{
-    loop = g_main_loop_new(NULL, TRUE);
-
-    GtkWidget *window = gtk_offscreen_window_new();
-    GtkWidget *web_view = webkit_web_view_new();
-
-    gtk_container_add(GTK_CONTAINER(window), web_view);
-    gtk_widget_show_all(window);
-    g_signal_connect(web_view, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
-    webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), base_uri);
-
-    g_main_loop_run(loop);
-
-    gtk_widget_destroy(window);
-    g_main_loop_unref(loop);
-}
-
-static void test_webkit_web_view_does_not_steal_focus()
-{
-    loop = g_main_loop_new(NULL, TRUE);
-
-    GtkWidget *window = gtk_offscreen_window_new();
-    GtkWidget *webView = webkit_web_view_new();
-    GtkWidget *entry = gtk_entry_new();
-
-#ifdef GTK_API_VERSION_2
-    GtkWidget *box = gtk_hbox_new(FALSE, 0);
-#else
-    GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-#endif
-
-    gtk_container_add(GTK_CONTAINER(box), webView);
-    gtk_container_add(GTK_CONTAINER(box), entry);
-    gtk_container_add(GTK_CONTAINER(window), box);
-    gtk_widget_show_all(window);
-
-    gtk_widget_grab_focus(entry);
-    g_assert(gtk_widget_is_focus(entry));
-
-    g_signal_connect(webView, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
-    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
-        &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;    &lt;input id=\&quot;entry\&quot; type=\&quot;text\&quot;/&gt;&quot;
-        &quot;    &lt;script&gt;&quot;
-        &quot;        document.getElementById(\&quot;entry\&quot;).focus();&quot;
-        &quot;    &lt;/script&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file://&quot;);
-
-    g_main_loop_run(loop);
-
-    g_assert(gtk_widget_is_focus(entry));
-
-    gtk_widget_destroy(window);
-    g_main_loop_unref(loop);
-}
-
-static gboolean emitKeyStroke(WebKitWebView* webView)
-{
-    GdkEvent* pressEvent = gdk_event_new(GDK_KEY_PRESS);
-    pressEvent-&gt;key.keyval = GDK_KEY_f;
-    GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(webView));
-    pressEvent-&gt;key.window = window;
-    g_object_ref(pressEvent-&gt;key.window);
-
-#ifndef GTK_API_VERSION_2
-    GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(window));
-    gdk_event_set_device(pressEvent, gdk_device_manager_get_client_pointer(manager));
-#endif
-
-    // When synthesizing an event, an invalid hardware_keycode value
-    // can cause it to be badly processed by Gtk+.
-    GdkKeymapKey* keys;
-    gint n_keys;
-    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), GDK_KEY_f, &amp;keys, &amp;n_keys)) {
-        pressEvent-&gt;key.hardware_keycode = keys[0].keycode;
-        g_free(keys);
-    }
-
-    GdkEvent* releaseEvent = gdk_event_copy(pressEvent);
-    gtk_main_do_event(pressEvent);
-    gdk_event_free(pressEvent);
-    releaseEvent-&gt;key.type = GDK_KEY_RELEASE;
-    gtk_main_do_event(releaseEvent);
-    gdk_event_free(releaseEvent);
-
-    return FALSE;
-}
-
-static gboolean entering_fullscreen_cb(WebKitWebView* webView, GObject* element, gboolean blocked)
-{
-    if (blocked)
-        g_main_loop_quit(loop);
-    else
-        g_timeout_add(200, (GSourceFunc) emitKeyStroke, webView);
-    return blocked;
-}
-
-static gboolean leaving_fullscreen_cb(WebKitWebView* webView, GObject* element, gpointer data)
-{
-    g_main_loop_quit(loop);
-    return FALSE;
-}
-
-static void test_webkit_web_view_fullscreen(gconstpointer blocked)
-{
-    GtkWidget* window;
-    GtkWidget* web_view;
-    WebKitWebSettings *settings;
-
-    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    web_view = webkit_web_view_new();
-
-    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(web_view));
-    g_object_set(settings, &quot;enable-fullscreen&quot;, TRUE, NULL);
-    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(web_view), settings);
-
-    gtk_container_add(GTK_CONTAINER(window), web_view);
-
-    gtk_widget_show_all(window);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    g_signal_connect(web_view, &quot;entering-fullscreen&quot;, G_CALLBACK(entering_fullscreen_cb), (gpointer) blocked);
-    g_signal_connect(web_view, &quot;leaving-fullscreen&quot;, G_CALLBACK(leaving_fullscreen_cb), NULL);
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(web_view), &quot;&lt;html&gt;&lt;body&gt;&quot;
-                   &quot;&lt;script&gt;&quot;
-                   &quot;var eventName = 'keypress';&quot;
-                   &quot;document.addEventListener(eventName, function () {&quot;
-                   &quot;    document.documentElement.webkitRequestFullScreen();&quot;
-                   &quot;}, false);&quot;
-                   &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;, NULL, NULL, NULL);
-
-    g_timeout_add(100, (GSourceFunc) emitKeyStroke, WEBKIT_WEB_VIEW(web_view));
-    g_main_loop_run(loop);
-
-    gtk_widget_destroy(window);
-}
-
-static gboolean checkMimeTypeForFilter(GtkFileFilter* filter, const gchar* mimeType)
-{
-    GtkFileFilterInfo filter_info;
-    filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
-    filter_info.mime_type = mimeType;
-    return gtk_file_filter_filter(filter, &amp;filter_info);
-}
-
-static gboolean runFileChooserCbNoMultiselNoMime(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
-{
-    g_assert(!webkit_file_chooser_request_get_select_multiple(request));
-
-    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
-    g_assert(!mimeTypes);
-    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
-    g_assert(!filter);
-
-    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
-    g_assert(!selectedFiles);
-
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-static gboolean runFileChooserCbMultiselNoMime(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
-{
-    g_assert(webkit_file_chooser_request_get_select_multiple(request));
-
-    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
-    g_assert(!mimeTypes);
-    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
-    g_assert(!filter);
-    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
-    g_assert(!selectedFiles);
-
-    // Select some files.
-    const gchar* filesToSelect[4] = { &quot;/foo&quot;, &quot;/foo/bar&quot;, &quot;/foo/bar/baz&quot;, 0 };
-    webkit_file_chooser_request_select_files(request, filesToSelect);
-
-    // Check the files that have been just selected.
-    selectedFiles = webkit_file_chooser_request_get_selected_files(request);
-    g_assert(selectedFiles);
-    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
-    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
-    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
-    g_assert(!selectedFiles[3]);
-
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-static gboolean runFileChooserCbSelectionRetained(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
-{
-    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
-    g_assert(selectedFiles);
-    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
-    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
-    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
-    g_assert(!selectedFiles[3]);
-
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-static gboolean runFileChooserCbNoMultiselAcceptTypes(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
-{
-    g_assert(!webkit_file_chooser_request_get_select_multiple(request));
-
-    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
-    g_assert(mimeTypes);
-    g_assert_cmpstr(mimeTypes[0], ==, &quot;audio/*&quot;);
-    g_assert_cmpstr(mimeTypes[1], ==, &quot;video/*&quot;);
-    g_assert_cmpstr(mimeTypes[2], ==, &quot;image/*&quot;);
-    g_assert(!mimeTypes[3]);
-
-    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
-    g_assert(GTK_IS_FILE_FILTER(filter));
-    g_assert(checkMimeTypeForFilter(filter, &quot;audio/*&quot;));
-    g_assert(checkMimeTypeForFilter(filter, &quot;video/*&quot;));
-    g_assert(checkMimeTypeForFilter(filter, &quot;image/*&quot;));
-
-    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
-    g_assert(!selectedFiles);
-
-    g_main_loop_quit(loop);
-    return TRUE;
-}
-
-void doMouseButtonEvent(GtkWidget* widget, GdkEventType eventType, int x, int y, unsigned int button, unsigned int modifiers)
-{
-    g_assert(gtk_widget_get_realized(widget));
-
-    GdkEvent* event = gdk_event_new(eventType);
-    event-&gt;button.window = gtk_widget_get_window(widget);
-    g_object_ref(event-&gt;button.window);
-
-    event-&gt;button.time = GDK_CURRENT_TIME;
-    event-&gt;button.x = x;
-    event-&gt;button.y = y;
-    event-&gt;button.axes = 0;
-    event-&gt;button.state = modifiers;
-    event-&gt;button.button = button;
-
-#ifndef GTK_API_VERSION_2
-    event-&gt;button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(widget)));
-#endif
-
-    int xRoot, yRoot;
-    gdk_window_get_root_coords(gtk_widget_get_window(widget), x, y, &amp;xRoot, &amp;yRoot);
-    event-&gt;button.x_root = xRoot;
-    event-&gt;button.y_root = yRoot;
-    gtk_main_do_event(event);
-}
-
-static void clickMouseButton(GtkWidget* widget, int x, int y, unsigned int button, unsigned int modifiers)
-{
-    doMouseButtonEvent(widget, GDK_BUTTON_PRESS, x, y, button, modifiers);
-    doMouseButtonEvent(widget, GDK_BUTTON_RELEASE, x, y, button, modifiers);
-}
-
-static gboolean clickMouseButtonAndWaitForFileChooserRequest(WebKitWebView* webView)
-{
-    clickMouseButton(GTK_WIDGET(webView), 5, 5, 1, 0);
-    return TRUE;
-}
-
-static void test_webkit_web_view_file_chooser()
-{
-    const gchar* htmlFormatBase = &quot;&lt;html&gt;&lt;body&gt;&quot;
-            &quot;&lt;input style='position:absolute;left:0;top:0;margin:0;padding:0' type='file' %s/&gt;&quot;
-            &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    GtkWidget* webView = webkit_web_view_new();
-    gtk_container_add(GTK_CONTAINER(window), webView);
-    gtk_widget_show_all(window);
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    // Multiple selections not allowed, no MIME filtering.
-    gulong handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbNoMultiselNoMime), NULL);
-    gchar* htmlFormat = g_strdup_printf(htmlFormatBase, &quot;&quot;);
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
-    g_free(htmlFormat);
-
-    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
-    g_main_loop_run(loop);
-
-    g_signal_handler_disconnect(webView, handler);
-
-    // Multiple selections allowed, no MIME filtering, some pre-selected files.
-    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbMultiselNoMime), NULL);
-    htmlFormat = g_strdup_printf(htmlFormatBase, &quot;multiple&quot;);
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
-    g_free(htmlFormat);
-
-    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
-    g_main_loop_run(loop);
-
-    g_signal_handler_disconnect(webView, handler);
-
-    // Perform another request to check if the list of files selected
-    // in the previous step appears now as part of the new request.
-    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbSelectionRetained), NULL);
-    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
-    g_main_loop_run(loop);
-
-    g_signal_handler_disconnect(webView, handler);
-
-    // Multiple selections not allowed, only accept images, audio and video files.
-    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbNoMultiselAcceptTypes), NULL);
-    htmlFormat = g_strdup_printf(htmlFormatBase, &quot;accept='audio/*,video/*,image/*'&quot;);
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
-    g_free(htmlFormat);
-
-    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
-    g_main_loop_run(loop);
-
-    g_signal_handler_disconnect(webView, handler);
-    gtk_widget_destroy(window);
-}
-
-static void test_webkit_web_view_source_mode()
-{
-    GtkWidget* web_view;
-
-    web_view = webkit_web_view_new();
-
-    webkit_web_view_load_string(WEBKIT_WEB_VIEW(web_view), &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, NULL, NULL, NULL);
-
-    g_assert(!webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
-
-    webkit_web_view_set_view_source_mode(WEBKIT_WEB_VIEW(web_view), TRUE);
-
-    g_assert(webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
-
-    webkit_web_view_set_view_source_mode(WEBKIT_WEB_VIEW(web_view), FALSE);
-
-    g_assert(!webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
-
-    gtk_widget_destroy(web_view);
-}
-
-int main(int argc, char** argv)
-{
-    SoupServer* server;
-    SoupURI* soup_uri;
-
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    /* Hopefully make test independent of the path it's called from. */
-    testutils_relative_chdir(&quot;Source/WebKit/gtk/tests/resources/test.html&quot;, argv[0]);
-
-    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
-    soup_server_run_async(server);
-
-    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
-
-    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(soup_uri, soup_server_get_port(server));
-
-    base_uri = soup_uri_to_string(soup_uri, FALSE);
-    soup_uri_free(soup_uri);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/webview/icon-uri&quot;, test_webkit_web_view_icon_uri);
-    g_test_add_func(&quot;/webkit/webview/adjustments&quot;, test_webkit_web_view_adjustments);
-    g_test_add_func(&quot;/webkit/webview/destroy&quot;, test_webkit_web_view_destroy);
-    g_test_add_func(&quot;/webkit/webview/grab_focus&quot;, test_webkit_web_view_grab_focus);
-    g_test_add_func(&quot;/webkit/webview/window-features&quot;, test_webkit_web_view_window_features);
-    g_test_add_func(&quot;/webkit/webview/webview-in-offscreen-window-does-not-crash&quot;, test_webkit_web_view_in_offscreen_window_does_not_crash);
-    g_test_add_func(&quot;/webkit/webview/webview-does-not-steal-focus&quot;, test_webkit_web_view_does_not_steal_focus);
-    g_test_add_data_func(&quot;/webkit/webview/fullscreen&quot;, GINT_TO_POINTER(FALSE), test_webkit_web_view_fullscreen);
-    g_test_add_data_func(&quot;/webkit/webview/fullscreen-blocked&quot;, GINT_TO_POINTER(TRUE), test_webkit_web_view_fullscreen);
-    g_test_add_func(&quot;/webkit/webview/file-chooser&quot;, test_webkit_web_view_file_chooser);
-    g_test_add_func(&quot;/webkit/webview/source-mode&quot;, test_webkit_web_view_source_mode);
-
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKitgtkteststestwindowc"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwindow.c (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwindow.c        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwindow.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,119 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;autotoolsconfig.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit/webkit.h&gt;
-
-static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
-{
-    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
-        GMainLoop* loop = (GMainLoop*)data;
-
-        g_main_loop_quit(loop);
-    }
-}
-
-static void test_webkit_window_scrollbar_policy(void)
-{
-    GMainLoop* loop;
-    GtkWidget* scrolledWindow;
-    GtkWidget* webView;
-    WebKitWebFrame* mainFrame;
-    GtkPolicyType horizontalPolicy;
-    GtkPolicyType verticalPolicy;
-
-    loop = g_main_loop_new(NULL, TRUE);
-
-    scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
-                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
-    webView = webkit_web_view_new();
-    g_object_ref_sink(webView);
-
-    g_signal_connect(webView, &quot;notify::load-status&quot;,
-                     G_CALLBACK(notify_load_status_cb), loop);
-
-    gtk_container_add(GTK_CONTAINER(scrolledWindow), webView);
-
-    mainFrame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(webView));
-
-    /* Test we correctly apply policy for not having scrollbars; This
-     * case is special, because we turn the policy from NEVER to
-     * AUTOMATIC, since we cannot easily represent the same thing
-     * using GtkScrolledWindow */
-    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
-                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'hidden';&lt;/script&gt;&lt;/html&gt;&quot;,
-                                     &quot;file://&quot;);
-
-    g_main_loop_run(loop);
-
-    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
-                                   &amp;horizontalPolicy, &amp;verticalPolicy);
-
-    g_assert(horizontalPolicy == GTK_POLICY_AUTOMATIC);
-    g_assert(verticalPolicy == GTK_POLICY_AUTOMATIC);
-
-    g_assert(GTK_POLICY_NEVER == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
-    g_assert(GTK_POLICY_NEVER == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
-
-    /* Test we correctly apply policy for always having scrollbars */
-    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
-                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'scroll';&lt;/script&gt;&lt;/html&gt;&quot;,
-                                     &quot;file://&quot;);
-
-    g_main_loop_run(loop);
-
-    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
-                                   &amp;horizontalPolicy, &amp;verticalPolicy);
-
-    g_assert(horizontalPolicy == GTK_POLICY_ALWAYS);
-    g_assert(verticalPolicy == GTK_POLICY_ALWAYS);
-
-    g_assert(horizontalPolicy == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
-    g_assert(verticalPolicy == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
-
-    /* Test we correctly apply policy for having scrollbars when needed */
-    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
-                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'auto';&lt;/script&gt;&lt;/html&gt;&quot;,
-                                     &quot;file://&quot;);
-
-    g_main_loop_run(loop);
-
-    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
-                                   &amp;horizontalPolicy, &amp;verticalPolicy);
-
-    g_assert(horizontalPolicy == GTK_POLICY_AUTOMATIC);
-    g_assert(verticalPolicy == GTK_POLICY_AUTOMATIC);
-
-    g_assert(horizontalPolicy == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
-    g_assert(verticalPolicy == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
-
-    g_object_unref(webView);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_test_init(&amp;argc, &amp;argv, NULL);
-
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-    g_test_add_func(&quot;/webkit/window/scrollbar_policy&quot;, test_webkit_window_scrollbar_policy);
-    return g_test_run ();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-01-04  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=126342
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * UIProcess/API/gtk/tests/CMakeLists.txt: Removed.
+        * UIProcess/API/gtk/tests/GNUmakefile.am: Removed.
+
</ins><span class="cx"> 2013-12-07  Gustavo Noronha Silva  &lt;gns@gnome.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix API test expectation following 160220.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsAccessibilityTestServercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-static void loadChangedCallback(WebKitWebView*, WebKitLoadEvent loadEvent, gpointer)
-{
-    // Send a message to the parent process when we're ready.
-    if (loadEvent == WEBKIT_LOAD_FINISHED)
-        g_print(&quot;OK&quot;);
-}
-
-int main(int argc, char** argv)
-{
-    // Make sure that the ATK bridge is loaded.
-    g_setenv(&quot;GTK_MODULES&quot;, &quot;atk-bridge&quot;, TRUE);
-
-    gtk_init(&amp;argc, &amp;argv);
-
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    webkit_web_view_load_html(webView,
-                              &quot;&lt;html&gt;&quot;
-                              &quot;  &lt;body&gt;&quot;
-                              &quot;   &lt;h1&gt;This is a test&lt;/h1&gt;&quot;
-                              &quot;   &lt;p&gt;This is a paragraph with some plain text.&lt;/p&gt;&quot;
-                              &quot;   &lt;p&gt;This paragraph contains &lt;a href=\&quot;http://www.webkitgtk.org\&quot;&gt;a link&lt;/a&gt; in the middle.&lt;/p&gt;&quot;
-                              &quot;  &lt;/body&gt;&quot;
-                              &quot;&lt;/html&gt;&quot;,
-                              0);
-
-    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView));
-    gtk_widget_show_all(window);
-
-    g_signal_connect(window, &quot;delete-event&quot;, G_CALLBACK(gtk_main_quit), 0);
-    g_signal_connect(webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), 0);
-
-    gtk_main();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsDOMNodeTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,216 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebProcessTest.h&quot;
-#include &lt;gio/gio.h&gt;
-#include &lt;webkit2/webkit-web-extension.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-class WebKitDOMNodeTest : public WebProcessTest {
-public:
-    static PassOwnPtr&lt;WebProcessTest&gt; create() { return adoptPtr(new WebKitDOMNodeTest()); }
-
-private:
-    guint64 webPageFromArgs(GVariant* args)
-    {
-        GVariantIter iter;
-        g_variant_iter_init(&amp;iter, args);
-
-        const char* key;
-        GVariant* value;
-        while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value)) {
-            if (!strcmp(key, &quot;pageID&quot;) &amp;&amp; g_variant_classify(value) == G_VARIANT_CLASS_UINT64)
-                return g_variant_get_uint64(value);
-        }
-
-        g_assert_not_reached();
-        return 0;
-    }
-
-    bool testHierarchyNavigation(WebKitWebExtension* extension, GVariant* args)
-    {
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
-        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-
-        WebKitDOMHTMLHeadElement* head = webkit_dom_document_get_head(document);
-        g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head));
-
-        // Title, head's child.
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head)));
-        GRefPtr&lt;WebKitDOMNodeList&gt; list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(head)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
-        WebKitDOMNode* node = webkit_dom_node_list_item(list.get(), 0);
-        g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(node));
-
-        // Body, Head sibling.
-        node = webkit_dom_node_get_next_sibling(WEBKIT_DOM_NODE(head));
-        g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(node));
-        WebKitDOMHTMLBodyElement* body = WEBKIT_DOM_HTML_BODY_ELEMENT(node);
-
-        // There is no third sibling
-        g_assert(!webkit_dom_node_get_next_sibling(node));
-
-        // Body's previous sibling is Head.
-        node = webkit_dom_node_get_previous_sibling(WEBKIT_DOM_NODE(body));
-        g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(node));
-
-        // Body has 3 children.
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        unsigned long length = webkit_dom_node_list_get_length(list.get());
-        g_assert_cmpint(length, ==, 3);
-
-        // The three of them are P tags.
-        for (unsigned long i = 0; i &lt; length; i++) {
-            node = webkit_dom_node_list_item(list.get(), i);
-            g_assert(WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT(node));
-        }
-
-        // Go backwards
-        unsigned i;
-        for (i = 0; node; node = webkit_dom_node_get_previous_sibling(node), i++) { }
-        g_assert_cmpint(i, ==, 3);
-
-        return true;
-    }
-
-    bool testInsertion(WebKitWebExtension* extension, GVariant* args)
-    {
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
-        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-
-        WebKitDOMHTMLElement* body = webkit_dom_document_get_body(document);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(body));
-
-        // Body shouldn't have any children at this point.
-        g_assert(!webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-
-        // Insert one P element.
-        WebKitDOMElement* p = webkit_dom_document_create_element(document, &quot;P&quot;, 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(p));
-        webkit_dom_node_append_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), 0);
-
-        // Now it should have one, the same that we inserted.
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-        GRefPtr&lt;WebKitDOMNodeList&gt; list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
-        WebKitDOMNode* node = webkit_dom_node_list_item(list.get(), 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
-        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
-
-        // Replace the P tag with a DIV tag.
-        WebKitDOMElement* div = webkit_dom_document_create_element(document, &quot;DIV&quot;, 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
-        webkit_dom_node_replace_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), WEBKIT_DOM_NODE(p), 0);
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
-        node = webkit_dom_node_list_item(list.get(), 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
-        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-
-        // Now remove the tag.
-        webkit_dom_node_remove_child(WEBKIT_DOM_NODE(body), node, 0);
-        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 0);
-
-        // Test insert before. If refChild is null, insert newChild as last element of parent.
-        div = webkit_dom_document_create_element(document, &quot;DIV&quot;, 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
-        webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), 0, 0);
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
-        node = webkit_dom_node_list_item(list.get(), 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
-        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-
-        // Now insert a 'p' before 'div'.
-        p = webkit_dom_document_create_element(document, &quot;P&quot;, 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(p));
-        webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), WEBKIT_DOM_NODE(div), 0);
-        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
-        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
-        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
-        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 2);
-        node = webkit_dom_node_list_item(list.get(), 0);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
-        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
-        node = webkit_dom_node_list_item(list.get(), 1);
-        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
-        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
-
-        return true;
-    }
-
-    bool testTagNames(WebKitWebExtension* extension, GVariant* args)
-    {
-        static const char* expectedTagNames[] = { &quot;HTML&quot;, &quot;HEAD&quot;, &quot;BODY&quot;, &quot;VIDEO&quot;, &quot;SOURCE&quot;, &quot;VIDEO&quot;, &quot;SOURCE&quot;, &quot;INPUT&quot; };
-
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
-        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
-
-        WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;*&quot;);
-        gulong nodeCount = webkit_dom_node_list_get_length(list);
-        g_assert_cmpuint(nodeCount, ==, G_N_ELEMENTS(expectedTagNames));
-        for (unsigned i = 0; i &lt; nodeCount; i++) {
-            WebKitDOMNode* node = webkit_dom_node_list_item(list, i);
-            g_assert(WEBKIT_DOM_IS_NODE(node));
-            GOwnPtr&lt;char&gt; tagName(webkit_dom_node_get_node_name(node));
-            g_assert_cmpstr(tagName.get(), ==, expectedTagNames[i]);
-        }
-
-        return true;
-    }
-
-    virtual bool runTest(const char* testName, WebKitWebExtension* extension, GVariant* args)
-    {
-        if (!strcmp(testName, &quot;hierarchy-navigation&quot;))
-            return testHierarchyNavigation(extension, args);
-        if (!strcmp(testName, &quot;insertion&quot;))
-            return testInsertion(extension, args);
-        if (!strcmp(testName, &quot;tag-names&quot;))
-            return testTagNames(extension, args);
-
-        g_assert_not_reached();
-        return false;
-    }
-};
-
-static void __attribute__((constructor)) registerTests()
-{
-    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/hierarchy-navigation&quot;);
-    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/insertion&quot;);
-    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/tag-names&quot;);
-}
-
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsFrameTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebProcessTest.h&quot;
-#include &lt;gio/gio.h&gt;
-#include &lt;webkit2/webkit-web-extension.h&gt;
-
-class WebKitFrameTest : public WebProcessTest {
-public:
-    static PassOwnPtr&lt;WebProcessTest&gt; create() { return adoptPtr(new WebKitFrameTest()); }
-
-private:
-    guint64 webPageFromArgs(GVariant* args)
-    {
-        GVariantIter iter;
-        g_variant_iter_init(&amp;iter, args);
-
-        const char* key;
-        GVariant* value;
-        while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value)) {
-            if (!strcmp(key, &quot;pageID&quot;) &amp;&amp; g_variant_classify(value) == G_VARIANT_CLASS_UINT64)
-                return g_variant_get_uint64(value);
-        }
-
-        g_assert_not_reached();
-        return 0;
-    }
-
-    bool testMainFrame(WebKitWebExtension* extension, GVariant* args)
-    {
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-
-        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
-        g_assert(WEBKIT_IS_FRAME(frame));
-        g_assert(webkit_frame_is_main_frame(frame));
-
-        return true;
-    }
-
-    bool testURI(WebKitWebExtension* extension, GVariant* args)
-    {
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-
-        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
-        g_assert(WEBKIT_IS_FRAME(frame));
-        g_assert_cmpstr(webkit_web_page_get_uri(page), ==, webkit_frame_get_uri(frame));
-
-        return true;
-    }
-
-    bool testJavaScriptContext(WebKitWebExtension* extension, GVariant* args)
-    {
-        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
-        g_assert(WEBKIT_IS_WEB_PAGE(page));
-
-        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
-        g_assert(WEBKIT_IS_FRAME(frame));
-        g_assert(webkit_frame_get_javascript_global_context(frame));
-
-        return true;
-    }
-
-    virtual bool runTest(const char* testName, WebKitWebExtension* extension, GVariant* args)
-    {
-        if (!strcmp(testName, &quot;main-frame&quot;))
-            return testMainFrame(extension, args);
-        if (!strcmp(testName, &quot;uri&quot;))
-            return testURI(extension, args);
-        if (!strcmp(testName, &quot;javascript-context&quot;))
-            return testJavaScriptContext(extension, args);
-
-        g_assert_not_reached();
-        return false;
-    }
-};
-
-static void __attribute__((constructor)) registerTests()
-{
-    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/main-frame&quot;);
-    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/uri&quot;);
-    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/javascript-context&quot;);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsGNUmakefileam"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,327 +0,0 @@
</span><del>-if ENABLE_WEBKIT2
-
-TEST_PROGS += \
-        Programs/WebKit2APITests/InspectorTestServer \
-        Programs/WebKit2APITests/TestAuthentication \
-        Programs/WebKit2APITests/TestBackForwardList \
-        Programs/WebKit2APITests/TestContextMenu \
-        Programs/WebKit2APITests/TestCookieManager \
-        Programs/WebKit2APITests/TestDOMNode \
-        Programs/WebKit2APITests/TestDownloads \
-        Programs/WebKit2APITests/TestFrame \
-        Programs/WebKit2APITests/TestInspector \
-        Programs/WebKit2APITests/TestInspectorServer \
-        Programs/WebKit2APITests/TestLoaderClient \
-        Programs/WebKit2APITests/TestPrinting \
-        Programs/WebKit2APITests/TestResources \
-        Programs/WebKit2APITests/TestSSL \
-        Programs/WebKit2APITests/TestUIClient \
-        Programs/WebKit2APITests/TestWebExtensions \
-        Programs/WebKit2APITests/TestWebKitVersion \
-        Programs/WebKit2APITests/TestWebKitFaviconDatabase \
-        Programs/WebKit2APITests/TestWebKitFindController \
-        Programs/WebKit2APITests/TestWebKitPolicyClient \
-        Programs/WebKit2APITests/TestWebKitSettings \
-        Programs/WebKit2APITests/TestWebKitWebContext \
-        Programs/WebKit2APITests/TestWebKitWebView \
-        Programs/WebKit2APITests/TestWebKitWebViewGroup \
-        Programs/WebKit2APITests/TestWebViewEditor
-
-noinst_PROGRAMS += $(TEST_PROGS)
-
-if HAVE_ATSPI2
-TEST_PROGS += Programs/WebKit2APITests/TestWebKitAccessibility
-
-noinst_PROGRAMS += Programs/WebKit2APITests/AccessibilityTestServer
-endif
-
-webkit2_tests_cppflags = \
-        -DWEBKIT_EXEC_PATH=\&quot;${shell pwd}/$(top_builddir)/Programs\&quot; \
-        -DWEBKIT_SRC_DIR=\&quot;${shell pwd}/${srcdir}\&quot; \
-        -DWEBKIT_DERIVED_SRC_DIR=\&quot;${shell pwd}/${top_builddir}/DerivedSources\&quot; \
-        -DWEBKIT_TEST_PLUGIN_DIR=\&quot;${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\&quot; \
-        -DWEBKIT_TEST_WEB_EXTENSIONS_DIR=\&quot;${shell pwd}/${top_builddir}/Libraries/WebExtensions/.libs\&quot; \
-        -DWEBKIT_INJECTED_BUNDLE_PATH=\&quot;${shell pwd}/$(top_builddir)/.libs\&quot; \
-        $(javascriptcore_cppflags) \
-        -I$(srcdir)/Source/JavaScriptCore \
-        -I$(srcdir)/Source \
-        -I$(srcdir)/Source/WebKit2 \
-        -I$(top_builddir)/DerivedSources/WebKit2/include \
-        -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
-        -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
-        -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
-        $(global_cppflags) \
-        $(FREETYPE_CFLAGS) \
-        $(GLIB_CFLAGS) \
-        $(GTK_CFLAGS) \
-        $(LIBSOUP_CFLAGS)
-
-webkit2_tests_ldadd = \
-        Libraries/libWebKit2APITestCore.la \
-        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-        libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-        $(FREETYPE_LIBS) \
-        $(GEOCLUE_LIBS) \
-        $(GLIB_LIBS) \
-        $(GTK_LIBS) \
-        $(LIBSOUP_LIBS)
-
-webkit2_tests_ldflags = \
-        -no-install \
-        -no-fast-install
-
-Programs/resources/webkit2gtk-tests-resources.gresource: Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml)
-        $(AM_V_at)mkdir -p ${GENPROGRAMS}/resources
-        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $&lt;
-
-Programs/resources/inspector/inspectorPageIndex.html: Source/WebKit2/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
-        $(AM_V_at)mkdir -p ${GENPROGRAMS}/resources/inspector
-        $(AM_V_GEN)cp $(srcdir)/Source/WebKit2/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${GENPROGRAMS}/resources/inspector
-
-DISTCLEANFILES += \
-        Programs/resources/webkit2gtk-tests-resources.gresource \
-        Programs/resources/inspector/inspectorPageIndex.html
-
-noinst_DATA += \
-        Programs/resources/webkit2gtk-tests-resources.gresource \
-        Programs/resources/inspector/inspectorPageIndex.html
-
-noinst_LTLIBRARIES += Libraries/libWebKit2APITestCore.la
-Libraries_libWebKit2APITestCore_la_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h
-Libraries_libWebKit2APITestCore_la_CPPFLAGS = $(webkit2_tests_cppflags)
-
-noinst_LTLIBRARIES += Libraries/WebExtensions/libWebExtensionTest.la
-Libraries_WebExtensions_libWebExtensionTest_la_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp
-
-Libraries_WebExtensions_libWebExtensionTest_la_LDFLAGS = \
-        -rpath ${shell pwd}/$(top_builddir)/Libraries/WebExtensions/.libs \
-        $(no_undefined) \
-        -avoid-version \
-        -module
-
-Libraries_WebExtensions_libWebExtensionTest_la_CPPFLAGS = \
-        -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
-        -I$(top_builddir)/DerivedSources \
-        -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
-        -DWEBKIT2_COMPILATION \
-        $(webkit2_tests_cppflags)
-
-Libraries_WebExtensions_libWebExtensionTest_la_CXXFLAGS = \
-        $(global_cxxflags)
-
-Libraries_WebExtensions_libWebExtensionTest_la_CFLAGS = \
-        $(global_cflags)
-
-
-noinst_LTLIBRARIES += Libraries/WebExtensions/libWebProcessTest.la
-Libraries_WebExtensions_libWebProcessTest_la_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp \
-        Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h
-
-Libraries_WebExtensions_libWebProcessTest_la_LDFLAGS = \
-        -rpath ${shell pwd}/$(top_builddir)/Libraries/WebExtensions/.libs \
-        $(no_undefined) \
-        -avoid-version \
-        -module
-
-Libraries_WebExtensions_libWebProcessTest_la_CPPFLAGS = \
-        -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
-        -I$(top_builddir)/DerivedSources \
-        -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
-        -DWEBKIT2_COMPILATION \
-        $(webkit2_tests_cppflags)
-
-Libraries_WebExtensions_libWebProcessTest_la_CXXFLAGS = \
-        $(global_cxxflags)
-
-Libraries_WebExtensions_libWebProcessTest_la_CFLAGS = \
-        $(global_cflags)
-
-
-EXTRA_DIST += \
-        Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem \
-        Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem \
-        Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml \
-        Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js
-
-Programs_WebKit2APITests_TestWebKitWebContext_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
-Programs_WebKit2APITests_TestWebKitWebContext_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitWebContext_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitWebContext_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitWebView_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp
-Programs_WebKit2APITests_TestWebKitWebView_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitWebView_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitWebView_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestLoaderClient_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp
-Programs_WebKit2APITests_TestLoaderClient_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestLoaderClient_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestLoaderClient_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitSettings_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp
-Programs_WebKit2APITests_TestWebKitSettings_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitSettings_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitSettings_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_InspectorTestServer_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp
-Programs_WebKit2APITests_InspectorTestServer_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_InspectorTestServer_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_InspectorTestServer_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestBackForwardList_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp
-Programs_WebKit2APITests_TestBackForwardList_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestBackForwardList_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestBackForwardList_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitPolicyClient_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp
-Programs_WebKit2APITests_TestWebKitPolicyClient_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitPolicyClient_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitPolicyClient_LDFLAGS = $(webkit2_tests_ldflags)
-
-if HAVE_ATSPI2
-Programs_WebKit2APITests_AccessibilityTestServer_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp
-Programs_WebKit2APITests_AccessibilityTestServer_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_AccessibilityTestServer_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_AccessibilityTestServer_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitAccessibility_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp
-Programs_WebKit2APITests_TestWebKitAccessibility_CPPFLAGS = $(webkit2_tests_cppflags) $(ATSPI2_CFLAGS)
-Programs_WebKit2APITests_TestWebKitAccessibility_LDADD = $(webkit2_tests_ldadd) $(ATSPI2_LIBS)
-Programs_WebKit2APITests_TestWebKitAccessibility_LDFLAGS = $(webkit2_tests_ldflags)
-endif
-
-Programs_WebKit2APITests_TestDownloads_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
-Programs_WebKit2APITests_TestDownloads_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestDownloads_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestDownloads_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebViewEditor_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp
-Programs_WebKit2APITests_TestWebViewEditor_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebViewEditor_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebViewEditor_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestPrinting_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp
-Programs_WebKit2APITests_TestPrinting_CPPFLAGS = $(webkit2_tests_cppflags) $(GTK_UNIX_PRINTING_CFLAGS)
-Programs_WebKit2APITests_TestPrinting_LDADD = $(webkit2_tests_ldadd) $(GTK_UNIX_PRINTING_LIBS)
-Programs_WebKit2APITests_TestPrinting_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitFindController_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
-Programs_WebKit2APITests_TestWebKitFindController_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitFindController_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitFindController_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestResources_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp
-Programs_WebKit2APITests_TestResources_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestResources_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestResources_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestCookieManager_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp
-Programs_WebKit2APITests_TestCookieManager_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestCookieManager_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestCookieManager_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestInspector_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp
-Programs_WebKit2APITests_TestInspector_CPPFLAGS = \
-        $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestInspector_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestInspector_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestInspectorServer_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp
-Programs_WebKit2APITests_TestInspectorServer_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestInspectorServer_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestInspectorServer_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitVersion_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp
-Programs_WebKit2APITests_TestWebKitVersion_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitVersion_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitVersion_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestContextMenu_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp
-Programs_WebKit2APITests_TestContextMenu_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestContextMenu_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestContextMenu_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestSSL_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp
-Programs_WebKit2APITests_TestSSL_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestSSL_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestSSL_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebExtensions_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp
-Programs_WebKit2APITests_TestWebExtensions_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebExtensions_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebExtensions_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestWebKitWebViewGroup_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp
-Programs_WebKit2APITests_TestWebKitWebViewGroup_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitWebViewGroup_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitWebViewGroup_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestDOMNode_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp
-Programs_WebKit2APITests_TestDOMNode_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestDOMNode_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestDOMNode_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestFrame_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp
-Programs_WebKit2APITests_TestFrame_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestFrame_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestFrame_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestAuthentication_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp
-Programs_WebKit2APITests_TestAuthentication_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestAuthentication_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestAuthentication_LDFLAGS = $(webkit2_tests_ldflags)
-
-Programs_WebKit2APITests_TestUIClient_SOURCES = \
-        Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp
-Programs_WebKit2APITests_TestUIClient_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestUIClient_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestUIClient_LDFLAGS = $(webkit2_tests_ldflags)
-
-endif # ENABLE_WEBKIT2
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsInspectorTestServercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-static void loadChangedCallback(WebKitWebView*, WebKitLoadEvent loadEvent, gpointer)
-{
-    // Send a message to the parent process when we're ready.
-    if (loadEvent == WEBKIT_LOAD_FINISHED)
-        g_print(&quot;OK&quot;);
-}
-
-int main(int argc, char** argv)
-{
-    gtk_init(&amp;argc, &amp;argv);
-
-    // Overwrite WEBKIT_INSPECTOR_SERVER variable with default value.
-    g_setenv(&quot;WEBKIT_INSPECTOR_SERVER&quot;, &quot;127.0.0.1:2999&quot;, TRUE);
-
-    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(webView), TRUE);
-    webkit_web_view_load_html(webView,
-        &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector Test Server&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
-        &quot;http://127.0.0.1:2999/&quot;);
-
-    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView));
-    gtk_widget_show_all(window);
-
-    g_signal_connect(window, &quot;delete-event&quot;, G_CALLBACK(gtk_main_quit), 0);
-    g_signal_connect(webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), 0);
-
-    gtk_main();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,207 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;LoadTrackingTest.h&quot;
-
-#include &lt;webkit2/webkit2.h&gt;
-
-static void loadChangedCallback(WebKitWebView* webView, WebKitLoadEvent loadEvent, LoadTrackingTest* test)
-{
-    switch (loadEvent) {
-    case WEBKIT_LOAD_STARTED:
-        g_assert(webkit_web_view_is_loading(webView));
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
-        test-&gt;provisionalLoadStarted();
-        break;
-    case WEBKIT_LOAD_REDIRECTED:
-        g_assert(webkit_web_view_is_loading(webView));
-        test-&gt;m_activeURI = webkit_web_view_get_uri(webView);
-        if (!test-&gt;m_redirectURI.isNull())
-            g_assert_cmpstr(test-&gt;m_redirectURI.data(), ==, test-&gt;m_activeURI.data());
-        test-&gt;provisionalLoadReceivedServerRedirect();
-        break;
-    case WEBKIT_LOAD_COMMITTED: {
-        g_assert(webkit_web_view_is_loading(webView));
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
-
-        // Check that on committed we always have a main resource with a response.
-        WebKitWebResource* resource = webkit_web_view_get_main_resource(webView);
-        g_assert(resource);
-        g_assert(webkit_web_resource_get_response(resource));
-
-        test-&gt;loadCommitted();
-        break;
-    }
-    case WEBKIT_LOAD_FINISHED:
-        g_assert(!webkit_web_view_is_loading(webView));
-        if (!test-&gt;m_loadFailed)
-            g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
-        test-&gt;loadFinished();
-        break;
-    default:
-        g_assert_not_reached();
-    }
-}
-
-static void loadFailedCallback(WebKitWebView* webView, WebKitLoadEvent loadEvent, const char* failingURI, GError* error, LoadTrackingTest* test)
-{
-    test-&gt;m_loadFailed = true;
-    test-&gt;m_error.set(g_error_copy(error));
-
-    switch (loadEvent) {
-    case WEBKIT_LOAD_STARTED:
-        g_assert(!webkit_web_view_is_loading(webView));
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
-        g_assert(error);
-        test-&gt;provisionalLoadFailed(failingURI, error);
-        break;
-    case WEBKIT_LOAD_COMMITTED:
-        g_assert(!webkit_web_view_is_loading(webView));
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
-        g_assert(error);
-        test-&gt;loadFailed(failingURI, error);
-        break;
-    default:
-        g_assert_not_reached();
-    }
-}
-
-static void estimatedProgressChangedCallback(GObject*, GParamSpec*, LoadTrackingTest* test)
-{
-    test-&gt;estimatedProgressChanged();
-}
-
-LoadTrackingTest::LoadTrackingTest()
-    : m_runLoadUntilCompletion(false)
-    , m_loadFailed(false)
-{
-    g_signal_connect(m_webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), this);
-    g_signal_connect(m_webView, &quot;load-failed&quot;, G_CALLBACK(loadFailedCallback), this);
-    g_signal_connect(m_webView, &quot;notify::estimated-load-progress&quot;, G_CALLBACK(estimatedProgressChangedCallback), this);
-
-    g_assert(!webkit_web_view_get_uri(m_webView));
-}
-
-LoadTrackingTest::~LoadTrackingTest()
-{
-    g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-}
-
-void LoadTrackingTest::waitUntilLoadFinished()
-{
-    m_estimatedProgress = 0;
-    m_runLoadUntilCompletion = true;
-    g_main_loop_run(m_mainLoop);
-}
-
-void LoadTrackingTest::provisionalLoadStarted()
-{
-    m_loadEvents.append(ProvisionalLoadStarted);
-}
-
-void LoadTrackingTest::provisionalLoadReceivedServerRedirect()
-{
-    m_loadEvents.append(ProvisionalLoadReceivedServerRedirect);
-}
-
-void LoadTrackingTest::provisionalLoadFailed(const gchar* failingURI, GError* error)
-{
-    m_loadEvents.append(ProvisionalLoadFailed);
-}
-
-void LoadTrackingTest::loadCommitted()
-{
-    m_loadEvents.append(LoadCommitted);
-}
-
-void LoadTrackingTest::loadFinished()
-{
-    m_loadEvents.append(LoadFinished);
-    if (m_runLoadUntilCompletion)
-        g_main_loop_quit(m_mainLoop);
-}
-
-void LoadTrackingTest::loadFailed(const gchar* failingURI, GError* error)
-{
-    m_loadEvents.append(LoadFailed);
-}
-
-void LoadTrackingTest::estimatedProgressChanged()
-{
-    double progress = webkit_web_view_get_estimated_load_progress(m_webView);
-    g_assert_cmpfloat(m_estimatedProgress, &lt;, progress);
-    m_estimatedProgress = progress;
-}
-
-void LoadTrackingTest::loadURI(const char* uri)
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::loadURI(uri);
-}
-
-void LoadTrackingTest::loadHtml(const char* html, const char* baseURI)
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::loadHtml(html, baseURI);
-}
-
-void LoadTrackingTest::loadPlainText(const char* plainText)
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::loadPlainText(plainText);
-}
-
-void LoadTrackingTest::loadRequest(WebKitURIRequest* request)
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::loadRequest(request);
-}
-
-void LoadTrackingTest::reload()
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    webkit_web_view_reload(m_webView);
-}
-
-void LoadTrackingTest::goBack()
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::goBack();
-}
-
-void LoadTrackingTest::goForward()
-{
-    m_loadEvents.clear();
-    m_estimatedProgress = 0;
-    m_error.clear();
-    WebViewTest::goForward();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTesth"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef LoadTrackingTest_h
-#define LoadTrackingTest_h
-
-#include &quot;TestMain.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-class LoadTrackingTest : public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(LoadTrackingTest);
-    LoadTrackingTest();
-    virtual ~LoadTrackingTest();
-    void waitUntilLoadFinished();
-
-    virtual void provisionalLoadStarted();
-    virtual void provisionalLoadReceivedServerRedirect();
-    virtual void provisionalLoadFailed(const gchar* failingURI, GError*);
-    virtual void loadCommitted();
-    virtual void loadFinished();
-    virtual void loadFailed(const char* failingURI, GError*);
-    virtual void estimatedProgressChanged();
-
-    void loadURI(const char* uri);
-    void loadHtml(const char* html, const char* baseURI);
-    void loadPlainText(const char* plainText);
-    void loadRequest(WebKitURIRequest*);
-    void reload();
-    void goBack();
-    void goForward();
-
-    void setRedirectURI(const char* uri) { m_redirectURI = uri; }
-
-    enum LoadEvents {
-        ProvisionalLoadStarted,
-        ProvisionalLoadReceivedServerRedirect,
-        ProvisionalLoadFailed,
-        LoadCommitted,
-        LoadFinished,
-        LoadFailed
-    };
-    bool m_runLoadUntilCompletion;
-    bool m_loadFailed;
-    GOwnPtr&lt;GError&gt; m_error;
-    Vector&lt;LoadEvents&gt; m_loadEvents;
-    float m_estimatedProgress;
-    CString m_redirectURI;
-};
-
-#endif // LoadTrackingTest_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestAuthenticationcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,286 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;LoadTrackingTest.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static WebKitTestServer* kServer;
-
-class AuthenticationTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(AuthenticationTest);
-
-    AuthenticationTest()
-    {
-        g_signal_connect(m_webView, &quot;authenticate&quot;, G_CALLBACK(runAuthenticationCallback), this);
-    }
-
-    ~AuthenticationTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    static int authenticationRetries;
-    static bool authenticationCancelledReceived;
-
-    void loadURI(const char* uri)
-    {
-        // Reset the retry count of the fake server when a page is loaded.
-        authenticationRetries = 0;
-        authenticationCancelledReceived = false;
-        LoadTrackingTest::loadURI(uri);
-    }
-
-    static gboolean runAuthenticationCallback(WebKitWebView*, WebKitAuthenticationRequest* request, AuthenticationTest* test)
-    {
-        g_signal_connect(request, &quot;cancelled&quot;, G_CALLBACK(authenticationCancelledCallback), test);
-        test-&gt;runAuthentication(request);
-        return TRUE;
-    }
-
-    static void authenticationCancelledCallback(WebKitAuthenticationRequest*, AuthenticationTest*)
-    {
-        authenticationCancelledReceived = true;
-    }
-
-    void runAuthentication(WebKitAuthenticationRequest* request)
-    {
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-        m_authenticationRequest = request;
-        g_main_loop_quit(m_mainLoop);
-    }
-
-    WebKitAuthenticationRequest* waitForAuthenticationRequest()
-    {
-        g_main_loop_run(m_mainLoop);
-        return m_authenticationRequest.get();
-    }
-
-private:
-    GRefPtr&lt;WebKitAuthenticationRequest&gt; m_authenticationRequest;
-};
-
-int AuthenticationTest::authenticationRetries = 0;
-bool AuthenticationTest::authenticationCancelledReceived = false;
-
-static const char authTestUsername[] = &quot;username&quot;;
-static const char authTestPassword[] = &quot;password&quot;;
-static const char authExpectedSuccessTitle[] = &quot;WebKit2Gtk+ Authentication test&quot;;
-static const char authExpectedFailureTitle[] = &quot;401 Authorization Required&quot;;
-static const char authExpectedAuthorization[] = &quot;Basic dXNlcm5hbWU6cGFzc3dvcmQ=&quot;; // Base64 encoding of &quot;username:password&quot;.
-static const char authSuccessHTMLString[] =
-    &quot;&lt;html&gt;&quot;
-    &quot;&lt;head&gt;&lt;title&gt;WebKit2Gtk+ Authentication test&lt;/title&gt;&lt;/head&gt;&quot;
-    &quot;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-static const char authFailureHTMLString[] =
-    &quot;&lt;html&gt;&quot;
-    &quot;&lt;head&gt;&lt;title&gt;401 Authorization Required&lt;/title&gt;&lt;/head&gt;&quot;
-    &quot;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static void testWebViewAuthenticationRequest(AuthenticationTest* test, gconstpointer)
-{
-    // Test authentication request getters match soup authentication header.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    g_assert_cmpstr(webkit_authentication_request_get_host(request), ==, soup_uri_get_host(kServer-&gt;baseURI()));
-    g_assert_cmpuint(webkit_authentication_request_get_port(request), ==, soup_uri_get_port(kServer-&gt;baseURI()));
-    g_assert_cmpstr(webkit_authentication_request_get_realm(request), ==, &quot;my realm&quot;);
-    g_assert(webkit_authentication_request_get_scheme(request) == WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC);
-    g_assert(!webkit_authentication_request_is_for_proxy(request));
-    g_assert(!webkit_authentication_request_is_retry(request));
-}
-
-static void testWebViewAuthenticationCancel(AuthenticationTest* test, gconstpointer)
-{
-    // Test cancel.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    webkit_authentication_request_cancel(request);
-    // Server doesn't ask for new credentials.
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-
-    g_assert_error(test-&gt;m_error.get(), WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
-}
-
-static void testWebViewAuthenticationLoadCancelled(AuthenticationTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    test-&gt;waitForAuthenticationRequest();
-    webkit_web_view_stop_loading(test-&gt;m_webView);
-    // Expect empty page.
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;authenticationCancelledReceived);
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-
-    g_assert_error(test-&gt;m_error.get(), WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
-}
-
-static void testWebViewAuthenticationFailure(AuthenticationTest* test, gconstpointer)
-{
-    // Test authentication failures.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    g_assert(!webkit_authentication_request_is_retry(request));
-    WebKitCredential* credential = webkit_credential_new(authTestUsername, &quot;wrongpassword&quot;, WEBKIT_CREDENTIAL_PERSISTENCE_NONE);
-    webkit_authentication_request_authenticate(request, credential);
-    webkit_credential_free(credential);
-    // Expect a second authentication request.
-    request = test-&gt;waitForAuthenticationRequest();
-    g_assert(webkit_authentication_request_is_retry(request));
-    // Test second failure.
-    credential = webkit_credential_new(authTestUsername, &quot;wrongpassword2&quot;, WEBKIT_CREDENTIAL_PERSISTENCE_NONE);
-    webkit_authentication_request_authenticate(request, credential);
-    webkit_credential_free(credential);
-    // Expect authentication failed page.
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedFailureTitle);
-}
-
-static void testWebViewAuthenticationNoCredential(AuthenticationTest* test, gconstpointer)
-{
-    // Test continue without credentials.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    webkit_authentication_request_authenticate(request, 0);
-    // Server doesn't ask for new credentials.
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedFailureTitle);
-}
-
-static void testWebViewAuthenticationStorage(AuthenticationTest* test, gconstpointer)
-{
-    // Enable private browsing before authentication request to test that credentials can't be saved.
-    webkit_settings_set_enable_private_browsing(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    g_assert(!webkit_authentication_request_get_proposed_credential(request));
-    g_assert(!webkit_authentication_request_can_save_credentials(request));
-
-    // If WebKit has been compiled with libsecret, and private browsing is disabled
-    // then check that credentials can be saved.
-#if ENABLE(CREDENTIAL_STORAGE)
-    webkit_settings_set_enable_private_browsing(webkit_web_view_get_settings(test-&gt;m_webView), FALSE);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    request = test-&gt;waitForAuthenticationRequest();
-    g_assert(!webkit_authentication_request_get_proposed_credential(request));
-    g_assert(webkit_authentication_request_can_save_credentials(request));
-#endif
-}
-
-static void testWebViewAuthenticationSuccess(AuthenticationTest* test, gconstpointer)
-{
-    // Test correct authentication.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
-    WebKitCredential* credential = webkit_credential_new(authTestUsername, authTestPassword, WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION);
-    webkit_authentication_request_authenticate(request, credential);
-    webkit_credential_free(credential);
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedSuccessTitle);
-
-    // Test loading the same (authorized) page again.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
-    // There is no authentication challenge.
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedSuccessTitle);
-}
-
-static void serverCallback(SoupServer*, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, void*)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (!strcmp(path, &quot;/auth-test.html&quot;)) {
-        const char* authorization = soup_message_headers_get_one(message-&gt;request_headers, &quot;Authorization&quot;);
-        // Require authentication.
-        if (!g_strcmp0(authorization, authExpectedAuthorization)) {
-            // Successful authentication.
-            soup_message_set_status(message, SOUP_STATUS_OK);
-            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authSuccessHTMLString, strlen(authSuccessHTMLString));
-            AuthenticationTest::authenticationRetries = 0;
-        } else if (++AuthenticationTest::authenticationRetries &lt; 3) {
-            // No or invalid authorization header provided by the client, request authentication twice then fail.
-            soup_message_set_status(message, SOUP_STATUS_UNAUTHORIZED);
-            soup_message_headers_append(message-&gt;response_headers, &quot;WWW-Authenticate&quot;, &quot;Basic realm=\&quot;my realm\&quot;&quot;);
-            // Include a failure message in case the user attempts to proceed without authentication.
-            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authFailureHTMLString, strlen(authFailureHTMLString));
-        } else {
-            // Authentication not successful, display a &quot;401 Authorization Required&quot; page.
-            soup_message_set_status(message, SOUP_STATUS_OK);
-            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authFailureHTMLString, strlen(authFailureHTMLString));
-        }
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-request&quot;, testWebViewAuthenticationRequest);
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-cancel&quot;, testWebViewAuthenticationCancel);
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-load-cancelled&quot;, testWebViewAuthenticationLoadCancelled);
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-failure&quot;, testWebViewAuthenticationFailure);
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-no-credential&quot;, testWebViewAuthenticationNoCredential);
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-storage&quot;, testWebViewAuthenticationStorage);
-    // Testing authentication success must be done last because libsoup will never fire
-    // the authenticate signal again once authentication is successful.
-    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-success&quot;, testWebViewAuthenticationSuccess);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestBackForwardListcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,280 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-// Back forward list limit is 100 by default.
-static const int kBackForwardListLimit = 100;
-
-static WebKitTestServer* kServer;
-
-static void serverCallback(SoupServer* server, SoupMessage* msg, const char* path, GHashTable* query, SoupClientContext* context, gpointer data)
-{
-    if (msg-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_has_suffix(path, &quot;favicon.ico&quot;)) {
-        soup_message_set_status(msg, SOUP_STATUS_NOT_FOUND);
-        return;
-    }
-
-    soup_message_set_status(msg, SOUP_STATUS_OK);
-
-    char* body = g_strdup_printf(&quot;&lt;html&gt;&lt;title&gt;%s&lt;/title&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;&quot;, path + 1, path + 1);
-    soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, body, strlen(body));
-
-    soup_message_body_complete(msg-&gt;response_body);
-}
-
-class BackForwardListTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(BackForwardListTest);
-
-    enum {
-        Backward,
-        Forward
-    };
-
-    enum {
-        CurrentItem  = 1 &lt;&lt; 0,
-        AddedItem    = 1 &lt;&lt; 1,
-        RemovedItems = 1 &lt;&lt; 2
-    };
-
-    static void checkItem(WebKitBackForwardListItem* item, const char* title, const char* uri, const char* originalURI)
-    {
-        g_assert(item);
-        g_assert_cmpstr(webkit_back_forward_list_item_get_uri(item), ==, uri);
-        g_assert_cmpstr(webkit_back_forward_list_item_get_title(item), == , title);
-        g_assert_cmpstr(webkit_back_forward_list_item_get_original_uri(item), ==, originalURI);
-    }
-
-    static void checkItemIndex(WebKitBackForwardList* list)
-    {
-        g_assert(webkit_back_forward_list_get_nth_item(list, -1) == webkit_back_forward_list_get_back_item(list));
-        g_assert(webkit_back_forward_list_get_nth_item(list, 0) == webkit_back_forward_list_get_current_item(list));
-        g_assert(webkit_back_forward_list_get_nth_item(list, 1) == webkit_back_forward_list_get_forward_item(list));
-    }
-
-    static void checkList(WebKitBackForwardList* list, unsigned type, WebKitBackForwardListItem** items, unsigned nItems)
-    {
-        GList* listItems = type == BackForwardListTest::Backward ? webkit_back_forward_list_get_back_list(list) :
-            webkit_back_forward_list_get_forward_list(list);
-        g_assert(listItems);
-
-        unsigned i = 0;
-        for (GList* listItem = listItems; listItem; listItem = g_list_next(listItem), i++) {
-            g_assert_cmpuint(i, &lt;, nItems);
-            g_assert(listItem-&gt;data == items[i]);
-        }
-        g_list_free(listItems);
-    }
-
-    static void backForwardListChanged(WebKitBackForwardList* list, WebKitBackForwardListItem* addedItem, GList* removedItems, BackForwardListTest* test)
-    {
-        test-&gt;m_hasChanged = true;
-
-        if (test-&gt;m_changedFlags &amp; BackForwardListTest::AddedItem) {
-            g_assert(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(addedItem));
-            test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(addedItem));
-        } else
-            g_assert(!addedItem);
-
-        if (test-&gt;m_changedFlags &amp; BackForwardListTest::RemovedItems) {
-            g_assert(removedItems);
-            for (GList* iter = removedItems; iter; iter = iter-&gt;next) {
-                g_assert(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(iter-&gt;data));
-                if (test-&gt;m_expectedRemovedItems)
-                    g_assert(g_list_find(test-&gt;m_expectedRemovedItems, iter-&gt;data));
-            }
-
-        } else
-            g_assert(!removedItems);
-    }
-
-    BackForwardListTest()
-        : m_list(webkit_web_view_get_back_forward_list(m_webView))
-        , m_changedFlags(0)
-        , m_hasChanged(false)
-        , m_expectedRemovedItems(0)
-    {
-        g_signal_connect(m_list, &quot;changed&quot;, G_CALLBACK(backForwardListChanged), this);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_list));
-    }
-
-    ~BackForwardListTest()
-    {
-        g_signal_handlers_disconnect_matched(m_list, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void waitUntilLoadFinished()
-    {
-        m_hasChanged = false;
-        WebViewTest::waitUntilLoadFinished();
-        g_assert(m_hasChanged);
-    }
-
-    void waitUntilLoadFinishedAndCheckRemovedItems(GList* removedItems)
-    {
-        m_expectedRemovedItems = removedItems;
-        waitUntilLoadFinished();
-        m_expectedRemovedItems = 0;
-    }
-
-    WebKitBackForwardList* m_list;
-    unsigned long m_changedFlags;
-    bool m_hasChanged;
-    GList* m_expectedRemovedItems;
-};
-
-static void testBackForwardListNavigation(BackForwardListTest* test, gconstpointer)
-{
-    WebKitBackForwardListItem* items[1];
-
-    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
-    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 0);
-    g_assert(!webkit_back_forward_list_get_current_item(test-&gt;m_list));
-    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
-    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
-    BackForwardListTest::checkItemIndex(test-&gt;m_list);
-    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
-    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
-
-    CString uriPage1 = kServer-&gt;getURIForPath(&quot;/Page1&quot;);
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
-    test-&gt;loadURI(uriPage1.data());
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
-    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 1);
-    WebKitBackForwardListItem* itemPage1 = webkit_back_forward_list_get_current_item(test-&gt;m_list);
-    BackForwardListTest::checkItem(itemPage1, &quot;Page1&quot;, uriPage1.data(), uriPage1.data());
-    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
-    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
-    BackForwardListTest::checkItemIndex(test-&gt;m_list);
-    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
-    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
-
-    CString uriPage2 = kServer-&gt;getURIForPath(&quot;/Page2&quot;);
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
-    test-&gt;loadURI(uriPage2.data());
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(webkit_web_view_can_go_back(test-&gt;m_webView));
-    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
-    WebKitBackForwardListItem* itemPage2 = webkit_back_forward_list_get_current_item(test-&gt;m_list);
-    BackForwardListTest::checkItem(itemPage2, &quot;Page2&quot;, uriPage2.data(), uriPage2.data());
-    g_assert(webkit_back_forward_list_get_back_item(test-&gt;m_list) == itemPage1);
-    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
-    BackForwardListTest::checkItemIndex(test-&gt;m_list);
-    items[0] = itemPage1;
-    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Backward, items, 1);
-    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
-
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
-    test-&gt;goBack();
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
-    g_assert(webkit_web_view_can_go_forward(test-&gt;m_webView));
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
-    g_assert(itemPage1 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
-    BackForwardListTest::checkItem(webkit_back_forward_list_get_current_item(test-&gt;m_list), &quot;Page1&quot;, uriPage1.data(), uriPage1.data());
-    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
-    g_assert(webkit_back_forward_list_get_forward_item(test-&gt;m_list) == itemPage2);
-    BackForwardListTest::checkItemIndex(test-&gt;m_list);
-    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
-    items[0] = itemPage2;
-    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Forward, items, 1);
-
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
-    test-&gt;goForward();
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(webkit_web_view_can_go_back(test-&gt;m_webView));
-    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
-    g_assert(itemPage2 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
-    BackForwardListTest::checkItem(webkit_back_forward_list_get_current_item(test-&gt;m_list), &quot;Page2&quot;, uriPage2.data(), uriPage2.data());
-    g_assert(webkit_back_forward_list_get_back_item(test-&gt;m_list) == itemPage1);
-    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
-    BackForwardListTest::checkItemIndex(test-&gt;m_list);
-    items[0] = itemPage1;
-    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Backward, items, 1);
-    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
-
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
-    test-&gt;goToBackForwardListItem(itemPage1);
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(itemPage1 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
-}
-
-static void testBackForwardListLimitAndCache(BackForwardListTest* test, gconstpointer)
-{
-    for (int i = 0; i &lt; kBackForwardListLimit; i++) {
-        GOwnPtr&lt;char&gt; path(g_strdup_printf(&quot;/Page%d&quot;, i));
-        test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
-        test-&gt;loadURI(kServer-&gt;getURIForPath(path.get()).data());
-        test-&gt;waitUntilLoadFinished();
-    }
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, kBackForwardListLimit);
-    WebKitBackForwardListItem* itemPageFirst = webkit_back_forward_list_get_nth_item(test-&gt;m_list, -(kBackForwardListLimit - 1));
-    GOwnPtr&lt;GList&gt; removedItems(g_list_prepend(0, itemPageFirst));
-
-    GOwnPtr&lt;char&gt; path(g_strdup_printf(&quot;/Page%d&quot;, kBackForwardListLimit));
-    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem | BackForwardListTest::RemovedItems;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(path.get()).data());
-    test-&gt;waitUntilLoadFinishedAndCheckRemovedItems(removedItems.get());
-
-    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, kBackForwardListLimit);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    BackForwardListTest::add(&quot;BackForwardList&quot;, &quot;navigation&quot;, testBackForwardListNavigation);
-    BackForwardListTest::add(&quot;BackForwardList&quot;, &quot;list-limit-and-cache&quot;, testBackForwardListLimitAndCache);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestContextMenucpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,867 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-class ContextMenuTest: public WebViewTest {
-public:
-    enum ContextMenuItemStateFlags {
-        Visible = 1 &lt;&lt; 0,
-        Enabled = 1 &lt;&lt; 1,
-        Checked = 1 &lt;&lt; 2
-    };
-
-    void checkContextMenuEvent(GdkEvent* event)
-    {
-        g_assert(event);
-        g_assert_cmpint(event-&gt;type, ==, GDK_BUTTON_PRESS);
-        g_assert_cmpint(event-&gt;button.button, ==, 3);
-        g_assert_cmpint(event-&gt;button.x, ==, m_menuPositionX);
-        g_assert_cmpint(event-&gt;button.y, ==, m_menuPositionY);
-    }
-
-    static gboolean contextMenuCallback(WebKitWebView* webView, WebKitContextMenu* contextMenu, GdkEvent* event, WebKitHitTestResult* hitTestResult, ContextMenuTest* test)
-    {
-        g_assert(WEBKIT_IS_CONTEXT_MENU(contextMenu));
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(contextMenu));
-        test-&gt;checkContextMenuEvent(event);
-        g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(hitTestResult));
-
-        return test-&gt;contextMenu(contextMenu, event, hitTestResult);
-    }
-
-    static void contextMenuDismissedCallback(WebKitWebView*, ContextMenuTest* test)
-    {
-        test-&gt;contextMenuDismissed();
-    }
-
-    ContextMenuTest()
-        : m_menuPositionX(0)
-        , m_menuPositionY(0)
-    {
-        g_signal_connect(m_webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCallback), this);
-        g_signal_connect(m_webView, &quot;context-menu-dismissed&quot;, G_CALLBACK(contextMenuDismissedCallback), this);
-    }
-
-    ~ContextMenuTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    virtual bool contextMenu(WebKitContextMenu*, GdkEvent*, WebKitHitTestResult*) = 0;
-
-    virtual void contextMenuDismissed()
-    {
-        quitMainLoop();
-    }
-
-    GtkMenu* getPopupMenu()
-    {
-        GOwnPtr&lt;GList&gt; toplevels(gtk_window_list_toplevels());
-        for (GList* iter = toplevels.get(); iter; iter = g_list_next(iter)) {
-            if (!GTK_IS_WINDOW(iter-&gt;data))
-                continue;
-
-            GtkWidget* child = gtk_bin_get_child(GTK_BIN(iter-&gt;data));
-            if (!GTK_IS_MENU(child))
-                continue;
-
-            if (gtk_menu_get_attach_widget(GTK_MENU(child)) == GTK_WIDGET(m_webView))
-                return GTK_MENU(child);
-        }
-        g_assert_not_reached();
-        return 0;
-    }
-
-    bool shouldShowInputMethodsMenu()
-    {
-        GtkSettings* settings = gtk_widget_get_settings(GTK_WIDGET(m_webView));
-        if (!settings)
-            return true;
-
-        gboolean showInputMethodMenu;
-        g_object_get(settings, &quot;gtk-show-input-method-menu&quot;, &amp;showInputMethodMenu, NULL);
-        return showInputMethodMenu;
-    }
-
-    void checkActionState(GtkAction* action, unsigned state)
-    {
-        if (state &amp; Visible)
-            g_assert(gtk_action_get_visible(action));
-        else
-            g_assert(!gtk_action_get_visible(action));
-
-        if (state &amp; Enabled)
-            g_assert(gtk_action_get_sensitive(action));
-        else
-            g_assert(!gtk_action_get_sensitive(action));
-
-        if (GTK_IS_TOGGLE_ACTION(action)) {
-            if (state &amp; Checked)
-                g_assert(gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
-            else
-                g_assert(!gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
-        }
-    }
-
-    GList* checkCurrentItemIsStockActionAndGetNext(GList* items, WebKitContextMenuAction stockAction, unsigned state)
-    {
-        g_assert(items);
-        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
-
-        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
-
-        GtkAction* action = webkit_context_menu_item_get_action(item);
-        g_assert(GTK_IS_ACTION(action));
-
-        g_assert_cmpint(webkit_context_menu_item_get_stock_action(item), ==, stockAction);
-
-        checkActionState(action, state);
-
-        return g_list_next(items);
-    }
-
-    GList* checkCurrentItemIsCustomActionAndGetNext(GList* items, const char* label, unsigned state)
-    {
-        g_assert(items);
-        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
-
-        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
-
-        GtkAction* action = webkit_context_menu_item_get_action(item);
-        g_assert(GTK_IS_ACTION(action));
-
-        g_assert_cmpint(webkit_context_menu_item_get_stock_action(item), ==, WEBKIT_CONTEXT_MENU_ACTION_CUSTOM);
-        g_assert_cmpstr(gtk_action_get_label(action), ==, label);
-
-        checkActionState(action, state);
-
-        return g_list_next(items);
-    }
-
-    GList* checkCurrentItemIsSubMenuAndGetNext(GList* items, const char* label, unsigned state, GList** subMenuIter)
-    {
-        g_assert(items);
-        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
-
-        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
-
-        GtkAction* action = webkit_context_menu_item_get_action(item);
-        g_assert(GTK_IS_ACTION(action));
-
-        g_assert_cmpstr(gtk_action_get_label(action), ==, label);
-        checkActionState(action, state);
-
-        WebKitContextMenu* subMenu = webkit_context_menu_item_get_submenu(item);
-        g_assert(WEBKIT_IS_CONTEXT_MENU(subMenu));
-        if (subMenuIter)
-            *subMenuIter = webkit_context_menu_get_items(subMenu);
-
-        return g_list_next(items);
-    }
-
-    GList* checkCurrentItemIsSeparatorAndGetNext(GList* items)
-    {
-        g_assert(items);
-        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
-
-        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
-        g_assert(webkit_context_menu_item_is_separator(item));
-
-        return g_list_next(items);
-    }
-
-    static gboolean doRightClickIdleCallback(ContextMenuTest* test)
-    {
-        test-&gt;clickMouseButton(test-&gt;m_menuPositionX, test-&gt;m_menuPositionY, 3);
-        return FALSE;
-    }
-
-    void showContextMenuAtPositionAndWaitUntilFinished(int x, int y)
-    {
-        m_menuPositionX = x;
-        m_menuPositionY = y;
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(doRightClickIdleCallback), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void showContextMenuAndWaitUntilFinished()
-    {
-        showContextMenuAtPositionAndWaitUntilFinished(0, 0);
-    }
-
-    static gboolean simulateEscKeyIdleCallback(ContextMenuTest* test)
-    {
-        test-&gt;keyStroke(GDK_KEY_Escape);
-        return FALSE;
-    }
-
-    void dismissContextMenuAndWaitUntilFinished()
-    {
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(simulateEscKeyIdleCallback), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    double m_menuPositionX;
-    double m_menuPositionY;
-};
-
-class ContextMenuDefaultTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuDefaultTest);
-
-    enum DefaultMenuType {
-        Navigation,
-        Link,
-        Image,
-        LinkImage,
-        Video,
-        Audio,
-        Editable
-    };
-
-    ContextMenuDefaultTest()
-        : m_expectedMenuType(Navigation)
-    {
-    }
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent* event, WebKitHitTestResult* hitTestResult)
-    {
-        GList* iter = webkit_context_menu_get_items(contextMenu);
-
-        switch (m_expectedMenuType) {
-        case Navigation:
-            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD, Visible | Enabled);
-            break;
-        case Link:
-            g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD, Visible | Enabled);
-            break;
-        case Image:
-            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD, Visible | Enabled);
-            break;
-        case LinkImage:
-            g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD, Visible | Enabled);
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD, Visible | Enabled);
-            break;
-        case Video:
-            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS, Visible | Enabled | Checked);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN, Visible);
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK, Visible | Enabled);
-            break;
-        case Audio:
-            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS, Visible | Enabled | Checked);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN, Visible);
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK, Visible | Enabled);
-            break;
-        case Editable:
-            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-            g_assert(webkit_hit_test_result_context_is_editable(hitTestResult));
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_CUT, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY, Visible);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_PASTE, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DELETE, Visible);
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL, Visible | Enabled);
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            if (shouldShowInputMethodsMenu())
-                iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS, Visible | Enabled);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_UNICODE, Visible | Enabled);
-            break;
-        default:
-            g_assert_not_reached();
-        }
-
-        if (webkit_settings_get_enable_developer_extras(webkit_web_view_get_settings(m_webView))) {
-            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT, Visible | Enabled);
-        }
-        g_assert(!iter);
-
-        quitMainLoop();
-
-        return true;
-    }
-
-    DefaultMenuType m_expectedMenuType;
-};
-
-static void testContextMenuDefaultMenu(ContextMenuDefaultTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    const char* linksHTML =
-        &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot; &lt;a style='position:absolute; left:1; top:1' href='http://www.webkitgtk.org' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&quot;
-        &quot; &lt;img style='position:absolute; left:1; top:10' src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&quot;
-        &quot; &lt;a style='position:absolute; left:1; top:20' href='http://www.webkitgtk.org/logo' title='WebKitGTK+ Logo'&gt;&lt;img src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&lt;/a&gt;&quot;
-        &quot; &lt;input style='position:absolute; left:1; top:30' size='10'&gt;&lt;/input&gt;&quot;
-        &quot; &lt;video style='position:absolute; left:1; top:50' width='300' height='300' controls='controls' preload='none'&gt;&lt;source src='movie.ogg' type='video/ogg' /&gt;&lt;/video&gt;&quot;
-        &quot; &lt;audio style='position:absolute; left:1; top:60' width='50' height='20' controls='controls' preload='none'&gt;&lt;source src='track.mp3' type='audio/mp3' /&gt;&lt;/audio&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(linksHTML, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    // Context menu for document.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Navigation;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(0, 0);
-
-    // Context menu for link.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Link;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 1);
-
-    // Context menu for image.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Image;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 10);
-
-    // Enable developer extras now, so that inspector element
-    // will be shown in the default context menu.
-    webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
-
-    // Context menu for image link.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::LinkImage;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 20);
-
-    // Context menu for video.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Video;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 50);
-
-    // Context menu for audio.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Audio;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 60);
-
-    // Context menu for editable.
-    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Editable;
-    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(5, 35);
-}
-
-class ContextMenuCustomTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuCustomTest);
-
-    ContextMenuCustomTest()
-        : m_itemToActivateLabel(0)
-        , m_activated(false)
-        , m_toggled(false)
-    {
-    }
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult* hitTestResult)
-    {
-        // Append our custom item to the default menu.
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new(m_action.get()));
-        quitMainLoop();
-
-        return false;
-    }
-
-    GtkMenuItem* getMenuItem(GtkMenu* menu, const gchar* itemLabel)
-    {
-        GOwnPtr&lt;GList&gt; items(gtk_container_get_children(GTK_CONTAINER(menu)));
-        for (GList* iter = items.get(); iter; iter = g_list_next(iter)) {
-            GtkMenuItem* child = GTK_MENU_ITEM(iter-&gt;data);
-            if (g_str_equal(itemLabel, gtk_menu_item_get_label(child)))
-                return child;
-        }
-        g_assert_not_reached();
-        return 0;
-    }
-
-    void activateMenuItem()
-    {
-        g_assert(m_itemToActivateLabel);
-        GtkMenu* menu = getPopupMenu();
-        GtkMenuItem* item = getMenuItem(menu, m_itemToActivateLabel);
-        gtk_menu_shell_activate_item(GTK_MENU_SHELL(menu), GTK_WIDGET(item), TRUE);
-        m_itemToActivateLabel = 0;
-    }
-
-    static gboolean activateMenuItemIdleCallback(gpointer userData)
-    {
-        ContextMenuCustomTest* test = static_cast&lt;ContextMenuCustomTest*&gt;(userData);
-        test-&gt;activateMenuItem();
-        return FALSE;
-    }
-
-    void activateCustomMenuItemAndWaitUntilActivated(const char* actionLabel)
-    {
-        m_activated = m_toggled = false;
-        m_itemToActivateLabel = actionLabel;
-        g_idle_add(activateMenuItemIdleCallback, this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void toggleCustomMenuItemAndWaitUntilToggled(const char* actionLabel)
-    {
-        activateCustomMenuItemAndWaitUntilActivated(actionLabel);
-    }
-
-    static void actionActivatedCallback(GtkAction*, ContextMenuCustomTest* test)
-    {
-        test-&gt;m_activated = true;
-    }
-
-    static void actionToggledCallback(GtkAction*, ContextMenuCustomTest* test)
-    {
-        test-&gt;m_toggled = true;
-    }
-
-    void setAction(GtkAction* action)
-    {
-        m_action = action;
-        if (GTK_IS_TOGGLE_ACTION(action))
-            g_signal_connect(action, &quot;toggled&quot;, G_CALLBACK(actionToggledCallback), this);
-        else
-            g_signal_connect(action, &quot;activate&quot;, G_CALLBACK(actionActivatedCallback), this);
-    }
-
-    GRefPtr&lt;GtkAction&gt; m_action;
-    const char* m_itemToActivateLabel;
-    bool m_activated;
-    bool m_toggled;
-};
-
-static void testContextMenuPopulateMenu(ContextMenuCustomTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    // Create a custom menu item.
-    GRefPtr&lt;GtkAction&gt; action = adoptGRef(gtk_action_new(&quot;WebKitGTK+CustomAction&quot;, &quot;Custom _Action&quot;, 0, 0));
-    test-&gt;setAction(action.get());
-    test-&gt;showContextMenuAndWaitUntilFinished();
-    test-&gt;activateCustomMenuItemAndWaitUntilActivated(gtk_action_get_label(action.get()));
-    g_assert(test-&gt;m_activated);
-    g_assert(!test-&gt;m_toggled);
-
-    // Create a custom toggle menu item.
-    GRefPtr&lt;GtkAction&gt; toggleAction = adoptGRef(GTK_ACTION(gtk_toggle_action_new(&quot;WebKitGTK+CustomToggleAction&quot;, &quot;Custom _Toggle Action&quot;, 0, 0)));
-    test-&gt;setAction(toggleAction.get());
-    test-&gt;showContextMenuAndWaitUntilFinished();
-    test-&gt;toggleCustomMenuItemAndWaitUntilToggled(gtk_action_get_label(toggleAction.get()));
-    g_assert(!test-&gt;m_activated);
-    g_assert(test-&gt;m_toggled);
-}
-
-class ContextMenuCustomFullTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuCustomFullTest);
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
-    {
-        // Clear proposed menu and build our own.
-        webkit_context_menu_remove_all(contextMenu);
-        g_assert_cmpint(webkit_context_menu_get_n_items(contextMenu), ==, 0);
-
-        // Add actions from stock.
-        webkit_context_menu_prepend(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_BACK));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD));
-        webkit_context_menu_insert(contextMenu, webkit_context_menu_item_new_separator(), 2);
-
-        // Add custom actions.
-        GRefPtr&lt;GtkAction&gt; action = adoptGRef(gtk_action_new(&quot;WebKitGTK+CustomAction&quot;, &quot;Custom _Action&quot;, 0, 0));
-        gtk_action_set_sensitive(action.get(), FALSE);
-        webkit_context_menu_insert(contextMenu, webkit_context_menu_item_new(action.get()), -1);
-        GRefPtr&lt;GtkAction&gt; toggleAction = adoptGRef(GTK_ACTION(gtk_toggle_action_new(&quot;WebKitGTK+CustomToggleAction&quot;, &quot;Custom _Toggle Action&quot;, 0, 0)));
-        gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(toggleAction.get()), TRUE);
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new(toggleAction.get()));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-
-        // Add a submenu.
-        GRefPtr&lt;WebKitContextMenu&gt; subMenu = adoptGRef(webkit_context_menu_new());
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(subMenu.get()));
-        webkit_context_menu_insert(subMenu.get(), webkit_context_menu_item_new_from_stock_action_with_label(WEBKIT_CONTEXT_MENU_ACTION_STOP, &quot;Stop Load&quot;), 0);
-        webkit_context_menu_insert(subMenu.get(), webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_RELOAD), -1);
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_with_submenu(&quot;Load options&quot;, subMenu.get()));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-
-        // Move Load submenu before custom actions.
-        webkit_context_menu_move_item(contextMenu, webkit_context_menu_last(contextMenu), 3);
-        webkit_context_menu_move_item(contextMenu, webkit_context_menu_last(contextMenu), 3);
-
-        // If last item is a separator, remove it.
-        if (webkit_context_menu_item_is_separator(webkit_context_menu_last(contextMenu)))
-            webkit_context_menu_remove(contextMenu, webkit_context_menu_last(contextMenu));
-
-        // Check the menu.
-        GList* iter = webkit_context_menu_get_items(contextMenu);
-
-        iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK, Visible | Enabled);
-        iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD, Visible | Enabled);
-        iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-
-        GList* subMenuIter = 0;
-        iter = checkCurrentItemIsSubMenuAndGetNext(iter, &quot;Load options&quot;, Visible | Enabled, &amp;subMenuIter);
-        subMenuIter = checkCurrentItemIsStockActionAndGetNext(subMenuIter, WEBKIT_CONTEXT_MENU_ACTION_STOP, Visible | Enabled);
-        subMenuIter = checkCurrentItemIsStockActionAndGetNext(subMenuIter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD, Visible | Enabled);
-        iter = checkCurrentItemIsSeparatorAndGetNext(iter);
-
-        iter = checkCurrentItemIsCustomActionAndGetNext(iter, &quot;Custom _Action&quot;, Visible);
-        iter = checkCurrentItemIsCustomActionAndGetNext(iter, &quot;Custom _Toggle Action&quot;, Visible | Enabled | Checked);
-        g_assert(!iter);
-
-        quitMainLoop();
-
-        return true;
-    }
-};
-
-static void testContextMenuCustomMenu(ContextMenuCustomFullTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;showContextMenuAndWaitUntilFinished();
-}
-
-class ContextMenuDisabledTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuDisabledTest);
-
-    enum DisableMode {
-        IgnoreClicks,
-        IgnoreDefaultMenu
-    };
-
-    static gboolean buttonPressEventCallback(GtkWidget*, GdkEvent* event, ContextMenuDisabledTest* test)
-    {
-        if (event-&gt;button.button != 3)
-            return FALSE;
-        return test-&gt;rightButtonPressed();
-    }
-
-    ContextMenuDisabledTest()
-        : m_disableMode(IgnoreClicks)
-    {
-        g_signal_connect(m_webView, &quot;button-press-event&quot;, G_CALLBACK(buttonPressEventCallback), this);
-    }
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
-    {
-        if (m_disableMode == IgnoreClicks)
-            g_assert_not_reached();
-        else
-            quitMainLoop();
-
-        return true;
-    }
-
-    bool rightButtonPressed()
-    {
-        if (m_disableMode == IgnoreClicks) {
-            quitMainLoopAfterProcessingPendingEvents();
-            return true;
-        }
-        return false;
-    }
-
-    DisableMode m_disableMode;
-};
-
-static void testContextMenuDisableMenu(ContextMenuDisabledTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;m_disableMode = ContextMenuDisabledTest::IgnoreDefaultMenu;
-    test-&gt;showContextMenuAndWaitUntilFinished();
-
-    test-&gt;m_disableMode = ContextMenuDisabledTest::IgnoreClicks;
-    test-&gt;showContextMenuAndWaitUntilFinished();
-}
-
-class ContextMenuSubmenuTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuSubmenuTest);
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
-    {
-        size_t menuSize = webkit_context_menu_get_n_items(contextMenu);
-        GRefPtr&lt;WebKitContextMenu&gt; subMenu = adoptGRef(webkit_context_menu_new());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_with_submenu(&quot;SubMenuItem&quot;, subMenu.get()));
-        g_assert_cmpuint(webkit_context_menu_get_n_items(contextMenu), ==, menuSize + 1);
-
-        GRefPtr&lt;WebKitContextMenu&gt; subMenu2 = adoptGRef(webkit_context_menu_new());
-        GRefPtr&lt;WebKitContextMenuItem&gt; item = webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK);
-
-        // Add submenu to newly created item.
-        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
-        webkit_context_menu_item_set_submenu(item.get(), subMenu2.get());
-        g_assert(webkit_context_menu_item_get_submenu(item.get()) == subMenu2.get());
-
-        // Replace the submenu.
-        webkit_context_menu_item_set_submenu(item.get(), 0);
-        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
-
-        // Try to add a submenu already added to another item.
-        removeLogFatalFlag(G_LOG_LEVEL_WARNING);
-        webkit_context_menu_item_set_submenu(item.get(), subMenu.get());
-        addLogFatalFlag(G_LOG_LEVEL_WARNING);
-        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
-
-        // A removed submenu shouldn't have a parent.
-        webkit_context_menu_item_set_submenu(item.get(), subMenu2.get());
-        g_assert(webkit_context_menu_item_get_submenu(item.get()) == subMenu2.get());
-
-        quitMainLoop();
-
-        return true;
-    }
-};
-
-static void testContextMenuSubMenu(ContextMenuSubmenuTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;showContextMenuAndWaitUntilFinished();
-}
-
-class ContextMenuDismissedTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuDismissedTest);
-
-    ContextMenuDismissedTest()
-        : m_dismissed(false)
-    {
-    }
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
-    {
-        quitMainLoop();
-        // Show the default context menu.
-        return false;
-    }
-
-    void contextMenuDismissed()
-    {
-        m_dismissed = true;
-        ContextMenuTest::contextMenuDismissed();
-    }
-
-    void showContextMenuAndWaitUntilDismissed()
-    {
-        showContextMenuAndWaitUntilFinished();
-        dismissContextMenuAndWaitUntilFinished();
-    }
-
-    bool m_dismissed;
-};
-
-static void testContextMenuDismissed(ContextMenuDismissedTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;showContextMenuAndWaitUntilDismissed();
-    g_assert(test-&gt;m_dismissed);
-}
-
-class ContextMenuSmartSeparatorsTest: public ContextMenuTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ContextMenuSmartSeparatorsTest);
-
-    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
-    {
-        webkit_context_menu_remove_all(contextMenu);
-
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_BACK));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_COPY));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT));
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
-
-        quitMainLoop();
-
-        return false;
-    }
-
-    GtkMenu* showContextMenuAndGetGtkMenu()
-    {
-        showContextMenuAndWaitUntilFinished();
-        return getPopupMenu();
-    }
-};
-
-static void testContextMenuSmartSeparators(ContextMenuSmartSeparatorsTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    GtkMenu* menu = test-&gt;showContextMenuAndGetGtkMenu();
-    g_assert(menu);
-
-    // Leading and trailing separators are not added to the context menu.
-    GOwnPtr&lt;GList&gt; menuItems(gtk_container_get_children(GTK_CONTAINER(menu)));
-    g_assert_cmpuint(g_list_length(menuItems.get()), ==, 6);
-    GtkWidget* item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-
-    // Hiding a menu item between two separators hides the following separator.
-    GtkAction* action = gtk_activatable_get_related_action(GTK_ACTIVATABLE(g_list_nth_data(menuItems.get(), 3)));
-    gtk_action_set_visible(action, FALSE);
-    menuItems.set(gtk_container_get_children(GTK_CONTAINER(menu)));
-    g_assert_cmpuint(g_list_length(menuItems.get()), ==, 6);
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    gtk_action_set_visible(action, TRUE);
-
-    // Showing an action between two separators shows the hidden separator.
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-
-    // Trailing separators are hidden too.
-    action = gtk_activatable_get_related_action(GTK_ACTIVATABLE(g_list_nth_data(menuItems.get(), 5)));
-    gtk_action_set_visible(action, FALSE);
-    menuItems.set(gtk_container_get_children(GTK_CONTAINER(menu)));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
-    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
-    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
-    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
-}
-
-void beforeAll()
-{
-    ContextMenuDefaultTest::add(&quot;WebKitWebView&quot;, &quot;default-menu&quot;, testContextMenuDefaultMenu);
-    ContextMenuCustomTest::add(&quot;WebKitWebView&quot;, &quot;populate-menu&quot;, testContextMenuPopulateMenu);
-    ContextMenuCustomFullTest::add(&quot;WebKitWebView&quot;, &quot;custom-menu&quot;, testContextMenuCustomMenu);
-    ContextMenuDisabledTest::add(&quot;WebKitWebView&quot;, &quot;disable-menu&quot;, testContextMenuDisableMenu);
-    ContextMenuSubmenuTest::add(&quot;WebKitWebView&quot;, &quot;submenu&quot;, testContextMenuSubMenu);
-    ContextMenuDismissedTest::add(&quot;WebKitWebView&quot;, &quot;menu-dismissed&quot;, testContextMenuDismissed);
-    ContextMenuSmartSeparatorsTest::add(&quot;WebKitWebView&quot;, &quot;smart-separators&quot;, testContextMenuSmartSeparators);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestCookieManagercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,331 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;glib/gstdio.h&gt;
-
-static WebKitTestServer* kServer;
-static char* kTempDirectory;
-
-static const char* kFirstPartyDomain = &quot;127.0.0.1&quot;;
-static const char* kThirdPartyDomain = &quot;localhost&quot;;
-static const char* kIndexHtmlFormat =
-    &quot;&lt;html&gt;&lt;body&gt;&quot;
-    &quot; &lt;p&gt;WebKitGTK+ Cookie Manager test&lt;/p&gt;&quot;
-    &quot; &lt;img src='http://localhost:%u/image.png' width=5 height=5&gt;&lt;/img&gt;&quot;
-    &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-class CookieManagerTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(CookieManagerTest);
-
-    static void cookiesChangedCallback(WebKitCookieManager*, CookieManagerTest* test)
-    {
-        test-&gt;m_cookiesChanged = true;
-        if (test-&gt;m_finishLoopWhenCookiesChange)
-            g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    CookieManagerTest()
-        : WebViewTest()
-        , m_cookieManager(webkit_web_context_get_cookie_manager(webkit_web_view_get_context(m_webView)))
-        , m_acceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY)
-        , m_domains(0)
-        , m_cookiesChanged(false)
-        , m_finishLoopWhenCookiesChange(false)
-    {
-        g_signal_connect(m_cookieManager, &quot;changed&quot;, G_CALLBACK(cookiesChangedCallback), this);
-    }
-
-    ~CookieManagerTest()
-    {
-        g_strfreev(m_domains);
-        g_signal_handlers_disconnect_matched(m_cookieManager, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-        if (m_cookiesTextFile)
-            g_unlink(m_cookiesTextFile.get());
-        if (m_cookiesSQLiteFile)
-            g_unlink(m_cookiesSQLiteFile.get());
-    }
-
-    void setPersistentStorage(WebKitCookiePersistentStorage storage)
-    {
-        const char* filename = 0;
-        switch (storage) {
-        case WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT:
-            if (!m_cookiesTextFile)
-                m_cookiesTextFile.set(g_build_filename(kTempDirectory, &quot;cookies.txt&quot;, NULL));
-            filename = m_cookiesTextFile.get();
-            break;
-        case WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE:
-            if (!m_cookiesSQLiteFile)
-                m_cookiesSQLiteFile.set(g_build_filename(kTempDirectory, &quot;cookies.db&quot;, NULL));
-            filename = m_cookiesSQLiteFile.get();
-            break;
-        default:
-            g_assert_not_reached();
-        }
-        webkit_cookie_manager_set_persistent_storage(m_cookieManager, filename, storage);
-    }
-
-    static void getAcceptPolicyReadyCallback(GObject* object, GAsyncResult* result, gpointer userData)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        WebKitCookieAcceptPolicy policy = webkit_cookie_manager_get_accept_policy_finish(WEBKIT_COOKIE_MANAGER(object), result, &amp;error.outPtr());
-        g_assert(!error.get());
-
-        CookieManagerTest* test = static_cast&lt;CookieManagerTest*&gt;(userData);
-        test-&gt;m_acceptPolicy = policy;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    WebKitCookieAcceptPolicy getAcceptPolicy()
-    {
-        m_acceptPolicy = WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY;
-        webkit_cookie_manager_get_accept_policy(m_cookieManager, 0, getAcceptPolicyReadyCallback, this);
-        g_main_loop_run(m_mainLoop);
-
-        return m_acceptPolicy;
-    }
-
-    void setAcceptPolicy(WebKitCookieAcceptPolicy policy)
-    {
-        webkit_cookie_manager_set_accept_policy(m_cookieManager, policy);
-    }
-
-    static void getDomainsReadyCallback(GObject* object, GAsyncResult* result, gpointer userData)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        char** domains = webkit_cookie_manager_get_domains_with_cookies_finish(WEBKIT_COOKIE_MANAGER(object), result, &amp;error.outPtr());
-        g_assert(!error.get());
-
-        CookieManagerTest* test = static_cast&lt;CookieManagerTest*&gt;(userData);
-        test-&gt;m_domains = domains;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    char** getDomains()
-    {
-        g_strfreev(m_domains);
-        m_domains = 0;
-        webkit_cookie_manager_get_domains_with_cookies(m_cookieManager, 0, getDomainsReadyCallback, this);
-        g_main_loop_run(m_mainLoop);
-
-        return m_domains;
-    }
-
-    bool hasDomain(const char* domain)
-    {
-        if (!m_domains)
-            return false;
-
-        for (size_t i = 0; m_domains[i]; ++i)
-            if (g_str_equal(m_domains[i], domain))
-                return true;
-        return false;
-    }
-
-    void deleteCookiesForDomain(const char* domain)
-    {
-        webkit_cookie_manager_delete_cookies_for_domain(m_cookieManager, domain);
-    }
-
-    void deleteAllCookies()
-    {
-        webkit_cookie_manager_delete_all_cookies(m_cookieManager);
-    }
-
-    void waitUntilCookiesChanged()
-    {
-        m_cookiesChanged = false;
-        m_finishLoopWhenCookiesChange = true;
-        g_main_loop_run(m_mainLoop);
-        m_finishLoopWhenCookiesChange = false;
-    }
-
-    WebKitCookieManager* m_cookieManager;
-    WebKitCookieAcceptPolicy m_acceptPolicy;
-    char** m_domains;
-    bool m_cookiesChanged;
-    bool m_finishLoopWhenCookiesChange;
-    GOwnPtr&lt;char&gt; m_cookiesTextFile;
-    GOwnPtr&lt;char&gt; m_cookiesSQLiteFile;
-};
-
-static void testCookieManagerAcceptPolicy(CookieManagerTest* test, gconstpointer)
-{
-    // Default policy is NO_THIRD_PARTY.
-    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    char** domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 1);
-    g_assert_cmpstr(domains[0], ==, kFirstPartyDomain);
-    test-&gt;deleteAllCookies();
-
-    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
-    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 2);
-    g_assert(test-&gt;hasDomain(kFirstPartyDomain));
-    g_assert(test-&gt;hasDomain(kThirdPartyDomain));
-    test-&gt;deleteAllCookies();
-
-    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_NEVER);
-    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_NEVER);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 0);
-}
-
-static void testCookieManagerDeleteCookies(CookieManagerTest* test, gconstpointer)
-{
-    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 2);
-
-    // Delete first party cookies.
-    test-&gt;deleteCookiesForDomain(kFirstPartyDomain);
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 1);
-
-    // Delete third party cookies.
-    test-&gt;deleteCookiesForDomain(kThirdPartyDomain);
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 2);
-
-    // Delete all cookies.
-    test-&gt;deleteAllCookies();
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
-}
-
-static void testCookieManagerCookiesChanged(CookieManagerTest* test, gconstpointer)
-{
-    g_assert(!test-&gt;m_cookiesChanged);
-    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_cookiesChanged);
-
-    test-&gt;deleteCookiesForDomain(kFirstPartyDomain);
-    test-&gt;waitUntilCookiesChanged();
-    g_assert(test-&gt;m_cookiesChanged);
-
-    test-&gt;deleteAllCookies();
-    test-&gt;waitUntilCookiesChanged();
-    g_assert(test-&gt;m_cookiesChanged);
-}
-
-static void testCookieManagerPersistentStorage(CookieManagerTest* test, gconstpointer)
-{
-    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
-
-    // Text storage using a new file.
-    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
-    char** domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 0);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_cookiesChanged);
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 2);
-
-
-    // SQLite storage using a new file.
-    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 0);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_cookiesChanged);
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 2);
-
-    // Text storage using an existing file.
-    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 2);
-    test-&gt;deleteAllCookies();
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
-
-    // SQLite storage with an existing file.
-    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);
-    domains = test-&gt;getDomains();
-    g_assert(domains);
-    g_assert_cmpint(g_strv_length(domains), ==, 2);
-    test-&gt;deleteAllCookies();
-    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-    if (g_str_equal(path, &quot;/index.html&quot;)) {
-        char* indexHtml = g_strdup_printf(kIndexHtmlFormat, soup_server_get_port(server));
-        soup_message_headers_replace(message-&gt;response_headers, &quot;Set-Cookie&quot;, &quot;foo=bar; Max-Age=60&quot;);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, indexHtml, strlen(indexHtml));
-    } else if (g_str_equal(path, &quot;/image.png&quot;))
-        soup_message_headers_replace(message-&gt;response_headers, &quot;Set-Cookie&quot;, &quot;baz=qux; Max-Age=60&quot;);
-    else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
-    g_assert(kTempDirectory);
-
-    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;accept-policy&quot;, testCookieManagerAcceptPolicy);
-    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;delete-cookies&quot;, testCookieManagerDeleteCookies);
-    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;cookies-changed&quot;, testCookieManagerCookiesChanged);
-    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;persistent-storage&quot;, testCookieManagerPersistentStorage);
-}
-
-void afterAll()
-{
-    delete kServer;
-    g_rmdir(kTempDirectory);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDOMNodecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,87 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebProcessTestRunner.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-static WebProcessTestRunner* testRunner;
-
-static void testWebKitDOMNodeHierarchyNavigation(WebViewTest* test, gconstpointer)
-{
-    static const char* testHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;1&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;&lt;p&gt;3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(testHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GVariantBuilder builder;
-    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
-    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
-    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;hierarchy-navigation&quot;, g_variant_builder_end(&amp;builder)));
-}
-
-static void testWebKitDOMNodeInsertion(WebViewTest* test, gconstpointer)
-{
-    static const char* testHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(testHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GVariantBuilder builder;
-    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
-    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
-    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;insertion&quot;, g_variant_builder_end(&amp;builder)));
-}
-
-static void testWebKitDOMNodeTagNames(WebViewTest* test, gconstpointer)
-{
-    static const char* testHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&quot;
-        &quot;&lt;video id='video' preload='none'&gt;&quot;
-        &quot;    &lt;source src='movie.ogg' type='video/ogg'&gt;&quot;
-        &quot;        Your browser does not support the video tag.&quot;
-        &quot;&lt;/video&gt;&quot;
-        &quot;&lt;video id='video2' preload='none'&gt;&quot;
-        &quot;     &lt;source src='movie.ogg' type='video/ogg'&gt;&quot;
-        &quot;        Your browser does not support the video tag.&quot;
-        &quot;&lt;/video&gt;&quot;
-        &quot;&lt;input type='hidden' id='test' name='finish' value='false'&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(testHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GVariantBuilder builder;
-    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
-    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
-    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;tag-names&quot;, g_variant_builder_end(&amp;builder)));
-}
-
-void beforeAll()
-{
-    testRunner = new WebProcessTestRunner();
-    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
-
-    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;hierarchy-navigation&quot;, testWebKitDOMNodeHierarchyNavigation);
-    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;insertion&quot;, testWebKitDOMNodeInsertion);
-    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;tag-names&quot;, testWebKitDOMNodeTagNames);
-}
-
-void afterAll()
-{
-    delete testRunner;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDownloadscpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,522 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/Vector.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-static char* kTempDirectory;
-
-class DownloadTest: public Test {
-public:
-    MAKE_GLIB_TEST_FIXTURE(DownloadTest);
-
-    enum DownloadEvent {
-        Started,
-        ReceivedResponse,
-        CreatedDestination,
-        ReceivedData,
-        Failed,
-        Finished
-    };
-
-    static void receivedResponseCallback(WebKitDownload* download, GParamSpec*, DownloadTest* test)
-    {
-        g_assert(webkit_download_get_response(download));
-        test-&gt;receivedResponse(download);
-    }
-
-    static gboolean createdDestinationCallback(WebKitDownload* download, const gchar* destination, DownloadTest* test)
-    {
-        g_assert(webkit_download_get_destination(download));
-        g_assert_cmpstr(webkit_download_get_destination(download), ==, destination);
-        test-&gt;createdDestination(download, destination);
-        return TRUE;
-    }
-
-    static gboolean receivedDataCallback(WebKitDownload* download, guint64 dataLength, DownloadTest* test)
-    {
-        test-&gt;receivedData(download, dataLength);
-        return TRUE;
-    }
-
-    static gboolean finishedCallback(WebKitDownload* download, DownloadTest* test)
-    {
-        test-&gt;finished(download);
-        return TRUE;
-    }
-
-    static gboolean failedCallback(WebKitDownload* download, GError* error, DownloadTest* test)
-    {
-        g_assert(error);
-        test-&gt;failed(download, error);
-        return TRUE;
-    }
-
-    static gboolean decideDestinationCallback(WebKitDownload* download, const gchar* suggestedFilename, DownloadTest* test)
-    {
-        g_assert(suggestedFilename);
-        test-&gt;decideDestination(download, suggestedFilename);
-        return TRUE;
-    }
-
-    static void downloadStartedCallback(WebKitWebContext* context, WebKitDownload* download, DownloadTest* test)
-    {
-        g_assert(webkit_download_get_request(download));
-        test-&gt;started(download);
-        g_signal_connect(download, &quot;notify::response&quot;, G_CALLBACK(receivedResponseCallback), test);
-        g_signal_connect(download, &quot;created-destination&quot;, G_CALLBACK(createdDestinationCallback), test);
-        g_signal_connect(download, &quot;received-data&quot;, G_CALLBACK(receivedDataCallback), test);
-        g_signal_connect(download, &quot;finished&quot;, G_CALLBACK(finishedCallback), test);
-        g_signal_connect(download, &quot;failed&quot;, G_CALLBACK(failedCallback), test);
-        g_signal_connect(download, &quot;decide-destination&quot;, G_CALLBACK(decideDestinationCallback), test);
-    }
-
-    DownloadTest()
-        : m_webContext(webkit_web_context_get_default())
-        , m_mainLoop(g_main_loop_new(0, TRUE))
-        , m_downloadSize(0)
-    {
-        g_signal_connect(m_webContext, &quot;download-started&quot;, G_CALLBACK(downloadStartedCallback), this);
-    }
-
-    ~DownloadTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webContext, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-        g_main_loop_unref(m_mainLoop);
-    }
-
-    virtual void started(WebKitDownload* download)
-    {
-        m_downloadEvents.append(Started);
-    }
-
-    virtual void receivedResponse(WebKitDownload* download)
-    {
-        m_downloadEvents.append(ReceivedResponse);
-    }
-
-    virtual void createdDestination(WebKitDownload* download, const char* destination)
-    {
-        m_downloadEvents.append(CreatedDestination);
-    }
-
-    virtual void receivedData(WebKitDownload* download, guint64 dataLength)
-    {
-        m_downloadSize += dataLength;
-        if (!m_downloadEvents.contains(ReceivedData))
-            m_downloadEvents.append(ReceivedData);
-    }
-
-    virtual void finished(WebKitDownload* download)
-    {
-        g_assert_cmpuint(m_downloadSize, ==, webkit_download_get_received_data_length(download));
-        m_downloadEvents.append(Finished);
-        g_main_loop_quit(m_mainLoop);
-    }
-
-    virtual void failed(WebKitDownload* download, GError* error)
-    {
-        m_downloadEvents.append(Failed);
-    }
-
-    virtual void decideDestination(WebKitDownload* download, const gchar* suggestedFilename)
-    {
-        GOwnPtr&lt;char&gt; destination(g_build_filename(kTempDirectory, suggestedFilename, NULL));
-        GOwnPtr&lt;char&gt; destinationURI(g_filename_to_uri(destination.get(), 0, 0));
-        webkit_download_set_destination(download, destinationURI.get());
-    }
-
-    WebKitDownload* downloadURIAndWaitUntilFinishes(const CString&amp; requestURI)
-    {
-        WebKitDownload* download = webkit_web_context_download_uri(m_webContext, requestURI.data());
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(download));
-
-        WebKitURIRequest* request = webkit_download_get_request(download);
-        g_assert(request);
-        ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, requestURI);
-
-        g_main_loop_run(m_mainLoop);
-
-        return download;
-    }
-
-    void checkDestinationAndDeleteFile(WebKitDownload* download, const char* expectedName)
-    {
-        if (!webkit_download_get_destination(download))
-            return;
-        GRefPtr&lt;GFile&gt; destFile = adoptGRef(g_file_new_for_uri(webkit_download_get_destination(download)));
-        GOwnPtr&lt;char&gt; destBasename(g_file_get_basename(destFile.get()));
-        g_assert_cmpstr(destBasename.get(), ==, expectedName);
-
-        g_file_delete(destFile.get(), 0, 0);
-    }
-
-    WebKitWebContext* m_webContext;
-    GMainLoop* m_mainLoop;
-    Vector&lt;DownloadEvent&gt; m_downloadEvents;
-    guint64 m_downloadSize;
-};
-
-static void testDownloadLocalFile(DownloadTest* test, gconstpointer)
-{
-    GOwnPtr&lt;char&gt; sourcePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;test.pdf&quot;, NULL));
-    GRefPtr&lt;GFile&gt; source = adoptGRef(g_file_new_for_path(sourcePath.get()));
-    GRefPtr&lt;GFileInfo&gt; sourceInfo = adoptGRef(g_file_query_info(source.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
-    GOwnPtr&lt;char&gt; sourceURI(g_file_get_uri(source.get()));
-    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(sourceURI.get()));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
-    g_assert_cmpint(events.size(), ==, 5);
-    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::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-&gt;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);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;test.pdf&quot;);
-}
-
-class DownloadErrorTest: public DownloadTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(DownloadErrorTest);
-
-    DownloadErrorTest()
-        : m_expectedError(WEBKIT_DOWNLOAD_ERROR_NETWORK)
-    {
-    }
-
-    void receivedResponse(WebKitDownload* download)
-    {
-        DownloadTest::receivedResponse(download);
-        if (m_expectedError == WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER)
-            webkit_download_cancel(download);
-    }
-
-    void createdDestination(WebKitDownload* download, const char* destination)
-    {
-        g_assert_not_reached();
-    }
-
-    void failed(WebKitDownload* download, GError* error)
-    {
-        g_assert(g_error_matches(error, WEBKIT_DOWNLOAD_ERROR, m_expectedError));
-        DownloadTest::failed(download, error);
-    }
-
-    void decideDestination(WebKitDownload* download, const gchar* suggestedFilename)
-    {
-        if (m_expectedError != WEBKIT_DOWNLOAD_ERROR_DESTINATION) {
-            DownloadTest::decideDestination(download, suggestedFilename);
-            return;
-        }
-        webkit_download_set_destination(download, &quot;file:///foo/bar&quot;);
-    }
-
-    WebKitDownloadError m_expectedError;
-};
-
-static void testDownloadLocalFileError(DownloadErrorTest* test, gconstpointer)
-{
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_NETWORK;
-    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(&quot;file:///foo/bar&quot;));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[2], ==, DownloadTest::Finished);
-    events.clear();
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_DESTINATION;
-    GOwnPtr&lt;char&gt; path(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;test.pdf&quot;, NULL));
-    GRefPtr&lt;GFile&gt; file = adoptGRef(g_file_new_for_path(path.get()));
-    GOwnPtr&lt;char&gt; uri(g_file_get_uri(file.get()));
-    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(uri.get()));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
-    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
-    events.clear();
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;bar&quot;);
-
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
-    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(uri.get()));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
-    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
-    events.clear();
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;test.pdf&quot;);
-}
-
-static WebKitTestServer* kServer;
-static const char* kServerSuggestedFilename = &quot;webkit-downloaded-file&quot;;
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    GOwnPtr&lt;char&gt; filePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), path, NULL));
-    char* contents;
-    gsize contentsLength;
-    if (!g_file_get_contents(filePath.get(), &amp;contents, &amp;contentsLength, 0)) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-        soup_message_body_complete(message-&gt;response_body);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    GOwnPtr&lt;char&gt; contentDisposition(g_strdup_printf(&quot;filename=%s&quot;, kServerSuggestedFilename));
-    soup_message_headers_append(message-&gt;response_headers, &quot;Content-Disposition&quot;, contentDisposition.get());
-    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, contentsLength);
-
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-static void testDownloadRemoteFile(DownloadTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
-    g_assert_cmpint(events.size(), ==, 5);
-    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::Finished);
-    events.clear();
-
-    WebKitURIRequest* request = webkit_download_get_request(download.get());
-    g_assert(request);
-    ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, kServer-&gt;getURIForPath(&quot;/test.pdf&quot;));
-
-    g_assert(webkit_download_get_destination(download.get()));
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), ==, 1);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), kServerSuggestedFilename);
-}
-
-static void testDownloadRemoteFileError(DownloadErrorTest* test, gconstpointer)
-{
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_NETWORK;
-    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/foo&quot;)));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
-    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
-    events.clear();
-    WebKitURIResponse* response = webkit_download_get_response(download.get());
-    g_assert_cmpuint(webkit_uri_response_get_status_code(response), ==, 404);
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_DESTINATION;
-    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
-    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
-    events.clear();
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;bar&quot;);
-
-    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
-    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
-    g_assert(!webkit_download_get_web_view(download.get()));
-
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, DownloadTest::Started);
-    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
-    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
-    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
-    events.clear();
-    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
-    test-&gt;checkDestinationAndDeleteFile(download.get(), kServerSuggestedFilename);
-}
-
-class WebViewDownloadTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(WebViewDownloadTest);
-
-    static void downloadStartedCallback(WebKitWebContext* context, WebKitDownload* download, WebViewDownloadTest* test)
-    {
-        test-&gt;m_download = download;
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(download));
-        test-&gt;quitMainLoop();
-    }
-
-    WebViewDownloadTest()
-    {
-        g_signal_connect(webkit_web_view_get_context(m_webView), &quot;download-started&quot;, G_CALLBACK(downloadStartedCallback), this);
-    }
-
-    ~WebViewDownloadTest()
-    {
-        g_signal_handlers_disconnect_matched(webkit_web_view_get_context(m_webView), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void waitUntilDownloadStarted()
-    {
-        m_download = 0;
-        g_main_loop_run(m_mainLoop);
-        g_assert(m_download.get());
-    }
-
-    static gboolean downloadDecideDestinationCallback(WebKitDownload* download, const gchar* suggestedFilename, WebViewDownloadTest* test)
-    {
-        GOwnPtr&lt;char&gt; destination(g_build_filename(kTempDirectory, suggestedFilename, NULL));
-        GOwnPtr&lt;char&gt; destinationURI(g_filename_to_uri(destination.get(), 0, 0));
-        webkit_download_set_destination(download, destinationURI.get());
-        return TRUE;
-    }
-
-    static void downloadFinishedCallback(WebKitDownload* download, WebViewDownloadTest* test)
-    {
-        test-&gt;quitMainLoop();
-    }
-
-    void waitUntilDownloadFinished()
-    {
-        g_signal_connect(m_download.get(), &quot;decide-destination&quot;, G_CALLBACK(downloadDecideDestinationCallback), this);
-        g_signal_connect(m_download.get(), &quot;finished&quot;, G_CALLBACK(downloadFinishedCallback), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GRefPtr&lt;WebKitDownload&gt; m_download;
-};
-
-static void testWebViewDownloadURI(WebViewDownloadTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(webkit_web_view_download_uri(test-&gt;m_webView, kServer-&gt;getURIForPath(&quot;/test.pdf&quot;).data()));
-    test-&gt;waitUntilDownloadStarted();
-    g_assert(test-&gt;m_webView == webkit_download_get_web_view(download.get()));
-    test-&gt;waitUntilDownloadFinished();
-
-    GRefPtr&lt;GFile&gt; downloadFile = adoptGRef(g_file_new_for_uri(webkit_download_get_destination(download.get())));
-    GRefPtr&lt;GFileInfo&gt; downloadFileInfo = adoptGRef(g_file_query_info(downloadFile.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
-    g_assert_cmpint(g_file_info_get_size(downloadFileInfo.get()), &gt;, 0);
-    g_file_delete(downloadFile.get(), 0, 0);
-}
-
-class PolicyResponseDownloadTest: public WebViewDownloadTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(PolicyResponseDownloadTest);
-
-    static gboolean decidePolicyCallback(WebKitWebView* webView, WebKitPolicyDecision* decision, WebKitPolicyDecisionType type, PolicyResponseDownloadTest* test)
-    {
-        if (type != WEBKIT_POLICY_DECISION_TYPE_RESPONSE)
-            return FALSE;
-
-        webkit_policy_decision_download(decision);
-        return TRUE;
-    }
-
-    PolicyResponseDownloadTest()
-    {
-        g_signal_connect(m_webView, &quot;decide-policy&quot;, G_CALLBACK(decidePolicyCallback), this);
-    }
-
-    ~PolicyResponseDownloadTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void cancelDownloadAndWaitUntilFinished()
-    {
-        webkit_download_cancel(m_download.get());
-        waitUntilDownloadFinished();
-        m_download = 0;
-    }
-};
-
-static void testPolicyResponseDownload(PolicyResponseDownloadTest* test, gconstpointer)
-{
-    // Test that a download started by the the policy checker contains the web view.
-    CString requestURI = kServer-&gt;getURIForPath(&quot;/test.pdf&quot;).data();
-    test-&gt;loadURI(requestURI.data());
-    test-&gt;waitUntilDownloadStarted();
-
-    WebKitURIRequest* request = webkit_download_get_request(test-&gt;m_download.get());
-    g_assert(request);
-    ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, requestURI);
-
-    g_assert(test-&gt;m_webView == webkit_download_get_web_view(test-&gt;m_download.get()));
-    test-&gt;cancelDownloadAndWaitUntilFinished();
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
-    g_assert(kTempDirectory);
-
-    DownloadTest::add(&quot;Downloads&quot;, &quot;local-file&quot;, testDownloadLocalFile);
-    DownloadErrorTest::add(&quot;Downloads&quot;, &quot;local-file-error&quot;, testDownloadLocalFileError);
-    DownloadTest::add(&quot;Downloads&quot;, &quot;remote-file&quot;, testDownloadRemoteFile);
-    DownloadErrorTest::add(&quot;Downloads&quot;, &quot;remote-file-error&quot;, testDownloadRemoteFileError);
-    WebViewDownloadTest::add(&quot;WebKitWebView&quot;, &quot;download-uri&quot;, testWebViewDownloadURI);
-    PolicyResponseDownloadTest::add(&quot;Downloads&quot;, &quot;policy-decision-download&quot;, testPolicyResponseDownload);
-}
-
-void afterAll()
-{
-    delete kServer;
-    g_rmdir(kTempDirectory);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestFramecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebProcessTestRunner.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-static WebProcessTestRunner* testRunner;
-
-static void webkitFrameTestRun(WebViewTest* test, const char* testName)
-{
-    static const char* testHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(testHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GVariantBuilder builder;
-    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
-    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
-    g_assert(testRunner-&gt;runTest(&quot;WebKitFrame&quot;, testName, g_variant_builder_end(&amp;builder)));
-}
-
-static void testWebKitFrameMainFrame(WebViewTest* test, gconstpointer)
-{
-    webkitFrameTestRun(test, &quot;main-frame&quot;);
-}
-
-static void testWebKitFrameURI(WebViewTest* test, gconstpointer)
-{
-    webkitFrameTestRun(test, &quot;uri&quot;);
-}
-
-static void testWebKitFrameJavaScriptContext(WebViewTest* test, gconstpointer)
-{
-    webkitFrameTestRun(test, &quot;javascript-context&quot;);
-}
-
-void beforeAll()
-{
-    testRunner = new WebProcessTestRunner();
-    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
-
-    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;main-frame&quot;, testWebKitFrameMainFrame);
-    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;uri&quot;, testWebKitFrameURI);
-    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;javascript-context&quot;, testWebKitFrameJavaScriptContext);
-}
-
-void afterAll()
-{
-    delete testRunner;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,356 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/Vector.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-class InspectorTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(InspectorTest);
-
-    enum InspectorEvents {
-        OpenWindow,
-        BringToFront,
-        Closed,
-        Attach,
-        Detach
-    };
-
-    static gboolean openWindowCallback(WebKitWebInspector*, InspectorTest* test)
-    {
-        return test-&gt;openWindow();
-    }
-
-    static gboolean bringToFrontCallback(WebKitWebInspector*, InspectorTest* test)
-    {
-        return test-&gt;bringToFront();
-    }
-
-    static void closedCallback(WebKitWebInspector*, InspectorTest* test)
-    {
-        return test-&gt;closed();
-    }
-
-    static gboolean attachCallback(WebKitWebInspector*, InspectorTest* test)
-    {
-        return test-&gt;attach();
-    }
-
-    static gboolean detachCallback(WebKitWebInspector*, InspectorTest* test)
-    {
-        return test-&gt;detach();
-    }
-
-    static const unsigned gMinimumAttachedInspectorWidth = 750;
-    static const unsigned gMinimumAttachedInspectorHeight = 250;
-
-    InspectorTest()
-        : WebViewTest()
-        , m_inspector(webkit_web_view_get_inspector(m_webView))
-    {
-        webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(m_webView), TRUE);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_inspector));
-        g_signal_connect(m_inspector, &quot;open-window&quot;, G_CALLBACK(openWindowCallback), this);
-        g_signal_connect(m_inspector, &quot;bring-to-front&quot;, G_CALLBACK(bringToFrontCallback), this);
-        g_signal_connect(m_inspector, &quot;closed&quot;, G_CALLBACK(closedCallback), this);
-        g_signal_connect(m_inspector, &quot;attach&quot;, G_CALLBACK(attachCallback), this);
-        g_signal_connect(m_inspector, &quot;detach&quot;, G_CALLBACK(detachCallback), this);
-    }
-
-    ~InspectorTest()
-    {
-        g_signal_handlers_disconnect_matched(m_inspector, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    virtual bool openWindow()
-    {
-        m_events.append(OpenWindow);
-        g_main_loop_quit(m_mainLoop);
-        return TRUE;
-    }
-
-    virtual bool bringToFront()
-    {
-        m_events.append(BringToFront);
-        g_main_loop_quit(m_mainLoop);
-        return FALSE;
-    }
-
-    virtual void closed()
-    {
-        m_events.append(Closed);
-    }
-
-    virtual bool attach()
-    {
-        m_events.append(Attach);
-        return TRUE;
-    }
-
-    virtual bool detach()
-    {
-        m_events.append(Detach);
-        return TRUE;
-    }
-
-
-    static gboolean showIdle(InspectorTest* test)
-    {
-        webkit_web_inspector_show(test-&gt;m_inspector);
-        return FALSE;
-    }
-
-    void show()
-    {
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(showIdle), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void resizeViewAndAttach()
-    {
-        // Resize the view to make room for the inspector.
-        resizeView(gMinimumAttachedInspectorWidth, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
-        webkit_web_inspector_attach(m_inspector);
-    }
-
-    static gboolean detachIdle(InspectorTest* test)
-    {
-        webkit_web_inspector_detach(test-&gt;m_inspector);
-        return FALSE;
-    }
-
-    void detachAndWaitUntilWindowOpened()
-    {
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(detachIdle), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void close()
-    {
-        webkit_web_inspector_close(m_inspector);
-    }
-
-    WebKitWebInspector* m_inspector;
-    Vector&lt;InspectorEvents&gt; m_events;
-};
-
-static void testInspectorDefault(InspectorTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-    test-&gt;resizeView(200, 200);
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;show();
-    // We don't add the view to a container, so consume the weak ref with GRefPtr.
-    GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(test-&gt;m_inspector);
-    g_assert(inspectorView.get());
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(inspectorView.get()));
-    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), ==, 0);
-    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow);
-    test-&gt;m_events.clear();
-
-    test-&gt;show();
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::BringToFront);
-    test-&gt;m_events.clear();
-
-    test-&gt;resizeViewAndAttach();
-    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), &gt;=, InspectorTest::gMinimumAttachedInspectorHeight);
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::Attach);
-    test-&gt;m_events.clear();
-
-    test-&gt;detachAndWaitUntilWindowOpened();
-    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 2);
-    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
-    g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow);
-    test-&gt;m_events.clear();
-
-    test-&gt;close();
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::Closed);
-    test-&gt;m_events.clear();
-}
-
-class CustomInspectorTest: public InspectorTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(CustomInspectorTest);
-
-    CustomInspectorTest()
-        : InspectorTest()
-        , m_inspectorWindow(0)
-    {
-    }
-
-    ~CustomInspectorTest()
-    {
-        if (m_inspectorWindow)
-            gtk_widget_destroy(m_inspectorWindow);
-    }
-
-    bool openWindow()
-    {
-        g_assert(!m_inspectorWindow);
-        m_inspectorWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-        WebKitWebViewBase* inspectorView = webkit_web_inspector_get_web_view(m_inspector);
-        g_assert(inspectorView);
-        gtk_container_add(GTK_CONTAINER(m_inspectorWindow), GTK_WIDGET(inspectorView));
-        gtk_widget_show_all(m_inspectorWindow);
-
-        return InspectorTest::openWindow();
-    }
-
-    void closed()
-    {
-        if (m_inspectorWindow) {
-            gtk_widget_destroy(m_inspectorWindow);
-            m_inspectorWindow = 0;
-        }
-
-        return InspectorTest::closed();
-    }
-
-    bool attach()
-    {
-        GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(m_inspector);
-        if (m_inspectorWindow) {
-            gtk_container_remove(GTK_CONTAINER(m_inspectorWindow), GTK_WIDGET(inspectorView.get()));
-            gtk_widget_destroy(m_inspectorWindow);
-            m_inspectorWindow = 0;
-        }
-
-        GtkWidget* pane;
-        if (gtk_bin_get_child(GTK_BIN(m_parentWindow)) == GTK_WIDGET(m_webView)) {
-            GRefPtr&lt;WebKitWebView&gt; inspectedView = m_webView;
-            gtk_container_remove(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
-            pane = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
-            gtk_paned_add1(GTK_PANED(pane), GTK_WIDGET(m_webView));
-            gtk_container_add(GTK_CONTAINER(m_parentWindow), pane);
-            gtk_widget_show_all(pane);
-        } else
-            pane = gtk_bin_get_child(GTK_BIN(m_parentWindow));
-        gtk_paned_set_position(GTK_PANED(pane), webkit_web_inspector_get_attached_height(m_inspector));
-        gtk_paned_add2(GTK_PANED(pane), GTK_WIDGET(inspectorView.get()));
-
-        return InspectorTest::attach();
-    }
-
-    bool detach()
-    {
-        GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(m_inspector);
-        GtkWidget* pane = gtk_bin_get_child(GTK_BIN(m_parentWindow));
-        g_assert(GTK_IS_PANED(pane));
-        gtk_container_remove(GTK_CONTAINER(pane), GTK_WIDGET(inspectorView.get()));
-        return InspectorTest::detach();
-    }
-
-    void destroyWindow()
-    {
-        g_assert(m_inspectorWindow);
-        gtk_widget_destroy(m_inspectorWindow);
-        m_inspectorWindow = 0;
-    }
-
-    GtkWidget* m_inspectorWindow;
-};
-
-static void testInspectorManualAttachDetach(CustomInspectorTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-    test-&gt;resizeView(200, 200);
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;show();
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test-&gt;m_inspector)));
-    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow);
-    test-&gt;m_events.clear();
-
-    test-&gt;resizeViewAndAttach();
-    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), &gt;=, InspectorTest::gMinimumAttachedInspectorHeight);
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::Attach);
-    test-&gt;m_events.clear();
-
-    test-&gt;detachAndWaitUntilWindowOpened();
-    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 2);
-    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
-    g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow);
-    test-&gt;m_events.clear();
-
-    test-&gt;resizeViewAndAttach();
-    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
-    test-&gt;m_events.clear();
-    test-&gt;close();
-    events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 2);
-    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
-    g_assert_cmpint(events[1], ==, InspectorTest::Closed);
-    test-&gt;m_events.clear();
-}
-
-static void testInspectorCustomContainerDestroyed(CustomInspectorTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-    test-&gt;resizeView(200, 200);
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;show();
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test-&gt;m_inspector)));
-    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
-
-    test-&gt;m_events.clear();
-    test-&gt;destroyWindow();
-    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
-    g_assert_cmpint(events.size(), ==, 1);
-    g_assert_cmpint(events[0], ==, InspectorTest::Closed);
-    test-&gt;m_events.clear();
-}
-
-void beforeAll()
-{
-    InspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;default&quot;, testInspectorDefault);
-    CustomInspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;manual-attach-detach&quot;, testInspectorManualAttachDetach);
-    CustomInspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;custom-container-destroyed&quot;, testInspectorCustomContainerDestroyed);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorServercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,294 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-// Name of the test server application creating the webView object.
-static const char* gTestServerAppName = &quot;InspectorTestServer&quot;;
-
-// Max seconds to wait for the test server before inspecting it.
-static const int gMaxWaitForChild = 5;
-
-// The PID for the test server running, so we can kill it if needed.
-static GPid gChildProcessPid = 0;
-
-// Whether the child has replied and it's ready.
-static bool gChildIsReady = false;
-
-static void stopTestServer()
-{
-    // Do nothing if there's no server running.
-    if (!gChildProcessPid)
-        return;
-
-    g_spawn_close_pid(gChildProcessPid);
-    kill(gChildProcessPid, SIGTERM);
-    gChildProcessPid = 0;
-}
-
-static void sigAbortHandler(int sigNum)
-{
-    // Just stop the test server if SIGABRT was received.
-    stopTestServer();
-}
-
-static gpointer testServerMonitorThreadFunc(gpointer)
-{
-    // Wait for the specified timeout to happen.
-    g_usleep(gMaxWaitForChild * G_USEC_PER_SEC);
-
-    // Kill the child process if not ready yet.
-    if (!gChildIsReady)
-        stopTestServer();
-
-    g_thread_exit(0);
-    return 0;
-}
-
-static void startTestServerMonitor()
-{
-    gChildIsReady = false;
-    g_thread_new(&quot;TestServerMonitor&quot;, testServerMonitorThreadFunc, 0);
-}
-
-static void startTestServer()
-{
-    // Prepare argv[] for spawning the server process.
-    GOwnPtr&lt;char&gt; testServerPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;WebKit2APITests&quot;, gTestServerAppName, NULL));
-
-    // We install a handler to ensure that we kill the child process
-    // if the parent dies because of whatever the reason is.
-    signal(SIGABRT, sigAbortHandler);
-
-    char* testServerArgv[2];
-    testServerArgv[0] = testServerPath.get();
-    testServerArgv[1] = 0;
-
-    // Spawn the server, getting its stdout file descriptor to set a
-    // communication channel, so we know when it's ready.
-    int childStdout = 0;
-    g_assert(g_spawn_async_with_pipes(0, testServerArgv, 0, static_cast&lt;GSpawnFlags&gt;(0), 0, 0,
-        &amp;gChildProcessPid, 0, &amp;childStdout, 0, 0));
-
-    // Start monitoring the test server (in a separate thread) to
-    // ensure we don't block on the child process more than a timeout.
-    startTestServerMonitor();
-
-    char msg[2];
-    GIOChannel* ioChannel = g_io_channel_unix_new(childStdout);
-    if (g_io_channel_read_chars(ioChannel, msg, 2, 0, 0) == G_IO_STATUS_NORMAL) {
-        // Check whether the server sent a message saying it's ready
-        // and store the result globally, so the monitor can see it.
-        gChildIsReady = msg[0] == 'O' &amp;&amp; msg[1] == 'K';
-    }
-    g_io_channel_unref(ioChannel);
-    close(childStdout);
-
-    // The timeout was reached and the server is not ready yet, so
-    // stop it inmediately, and let the unit tests fail.
-    if (!gChildIsReady)
-        stopTestServer();
-}
-
-class InspectorServerTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(InspectorServerTest);
-
-    InspectorServerTest()
-        : WebViewTest()
-    {
-    }
-
-    bool getPageList()
-    {
-        loadHtml(&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n&quot;
-            &quot;var pages;\n&quot;
-            &quot;var xhr = new XMLHttpRequest;\n&quot;
-            &quot;xhr.open(\&quot;GET\&quot;, \&quot;/pagelist.json\&quot;);\n&quot;
-            &quot;xhr.onload = function(e) {\n&quot;
-                &quot;if (xhr.status == 200) {\n&quot;
-                    &quot;pages = JSON.parse(xhr.responseText);\n&quot;
-                    &quot;document.title = \&quot;OK\&quot;;\n&quot;
-                &quot;} else \n&quot;
-                    &quot;document.title = \&quot;FAIL\&quot;;\n&quot;
-                &quot;}\n&quot;
-            &quot;xhr.send();\n&quot;
-            &quot;&lt;/script&gt;\n&quot;,
-            &quot;http://127.0.0.1:2999/&quot;);
-
-        waitUntilTitleChanged();
-
-        if (!strcmp(webkit_web_view_get_title(m_webView), &quot;OK&quot;))
-            return true;
-
-        return false;
-    }
-
-    ~InspectorServerTest()
-    {
-    }
-};
-
-// Test to get inspector server page list from the test server.
-// Should contain only one entry pointing to http://127.0.0.1:2999/webinspector/Main.html?page=1
-static void testInspectorServerPageList(InspectorServerTest* test, gconstpointer)
-{
-    GOwnPtr&lt;GError&gt; error;
-
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-    g_assert(test-&gt;getPageList());
-
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages.length;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert_cmpint(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 1);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].id;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    int pageId = WebViewTest::javascriptResultToNumber(javascriptResult);
-
-    GOwnPtr&lt;char&gt; valueString;
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].url;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;http://127.0.0.1:2999/&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].inspectorUrl;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    String validInspectorURL = String(&quot;/Main.html?page=&quot;) + String::number(pageId);
-    ASSERT_CMP_CSTRING(valueString.get(), ==, validInspectorURL.utf8());
-}
-
-// Test sending a raw remote debugging message through our web socket server.
-// For this specific message see: http://code.google.com/chrome/devtools/docs/protocol/tot/runtime.html#command-evaluate
-static void testRemoteDebuggingMessage(InspectorServerTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-
-    test-&gt;loadHtml(&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n&quot;
-        &quot;var socket = new WebSocket('ws://127.0.0.1:2999/devtools/page/1');\n&quot;
-        &quot;socket.onmessage = function(message) {\n&quot;
-            &quot;var response = JSON.parse(message.data);\n&quot;
-            &quot;if (response.id === 1)\n&quot;
-                &quot;document.title = response.result.result.value;\n&quot;
-            &quot;else\n&quot;
-                &quot;document.title = \&quot;FAIL\&quot;;\n&quot;
-            &quot;}\n&quot;
-            &quot;socket.onopen = function() {\n&quot;
-            &quot;socket.send('{\&quot;id\&quot;: 1, \&quot;method\&quot;: \&quot;Runtime.evaluate\&quot;, \&quot;params\&quot;: {\&quot;expression\&quot;: \&quot;2 + 2\&quot; } }');\n&quot;
-        &quot;}\n&quot;
-        &quot;&lt;/script&gt;&quot;,
-        &quot;http://127.0.0.1:2999/&quot;);
-    test-&gt;waitUntilTitleChanged();
-
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, &quot;4&quot;);
-}
-
-static void openRemoteDebuggingSession(InspectorServerTest* test, gconstpointer)
-{
-    // To test the whole pipeline this exploits a behavior of the inspector front-end which won't provide the page address as title unless the
-    // debugging session was established correctly through web socket.
-    // In our case page URL should be http://127.0.0.1:2999/
-    // So this test case will fail if:
-    // - The page list didn't return a valid inspector URL
-    // - Or the front-end couldn't be loaded through the inspector HTTP server
-    // - Or the web socket connection couldn't be established between the front-end and the page through the inspector server
-    // Let's see if this test isn't raising too many false positives, in which case we should use a better predicate if available.
-
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-
-    g_assert(test-&gt;getPageList());
-
-    GOwnPtr&lt;GError&gt; error;
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].inspectorUrl;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-
-    String resolvedURL = String(&quot;http://127.0.0.1:2999/&quot;) + String::fromUTF8(WebViewTest::javascriptResultToCString(javascriptResult));
-    test-&gt;loadURI(resolvedURL.utf8().data());
-    test-&gt;waitUntilLoadFinished();
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementsByTagName('li')[0].title&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-
-    GOwnPtr&lt;char&gt; title(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(title.get(), ==, &quot;http://127.0.0.1:2999/&quot;);
-}
-
-static void sendIncompleteRequest(InspectorServerTest* test, gconstpointer)
-{
-    GOwnPtr&lt;GError&gt; error;
-
-    // Connect to the inspector server.
-    GRefPtr&lt;GSocketClient&gt; client = adoptGRef(g_socket_client_new());
-    GRefPtr&lt;GSocketConnection&gt; connection = adoptGRef(g_socket_client_connect_to_host(client.get(), &quot;127.0.0.1&quot;, 2999, 0, &amp;error.outPtr()));
-    g_assert_no_error(error.get());
-
-    // Send incomplete request (missing blank line after headers) and check if inspector server
-    // replies. The server should not reply to an incomplete request and the test should timeout
-    // on read.
-    GOutputStream* ostream = g_io_stream_get_output_stream(G_IO_STREAM(connection.get()));
-    // Request missing blank line after headers.
-    const gchar* incompleteRequest = &quot;GET /devtools/page/1 HTTP/1.1\r\nHost: Localhost\r\n&quot;;
-    g_output_stream_write(ostream, incompleteRequest, strlen(incompleteRequest), 0, &amp;error.outPtr());
-    g_assert_no_error(error.get());
-
-    GInputStream* istream = g_io_stream_get_input_stream(G_IO_STREAM(connection.get()));
-    char response[16];
-    memset(response, 0, sizeof(response));
-    GRefPtr&lt;GCancellable&gt; cancel = adoptGRef(g_cancellable_new());
-    g_input_stream_read_async(istream, response, sizeof(response) - 1, G_PRIORITY_DEFAULT, cancel.get(), 0, 0);
-    // Give a chance for the server to reply.
-    test-&gt;wait(1);
-    g_cancellable_cancel(cancel.get());
-    // If we got any answer it means the server replied to an incomplete request, lets fail.
-    g_assert(response[0] == '\0');
-}
-
-void beforeAll()
-{
-    // Overwrite WEBKIT_INSPECTOR_SERVER variable with default IP address but different port to avoid conflict with the test inspector server page.
-    g_setenv(&quot;WEBKIT_INSPECTOR_SERVER&quot;, &quot;127.0.0.1:2998&quot;, TRUE);
-
-    startTestServer();
-    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-page-list&quot;, testInspectorServerPageList);
-    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-remote-debugging-message&quot;, testRemoteDebuggingMessage);
-    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-open-debugging-session&quot;, openRemoteDebuggingSession);
-    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-incomplete-request&quot;, sendIncompleteRequest);
-
-}
-
-void afterAll()
-{
-    stopTestServer();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestLoaderClientcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,465 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2010 Gustavo Noronha Silva
- * Copyright (C) 2009, 2011 Igalia S.L.
- * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;LoadTrackingTest.h&quot;
-#include &quot;WebKitTestBus.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-static WebKitTestBus* bus;
-static WebKitTestServer* kServer;
-
-const char* kDNTHeaderNotPresent = &quot;DNT header not present&quot;;
-
-static void testLoadingStatus(LoadTrackingTest* test, gconstpointer data)
-{
-    test-&gt;setRedirectURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(events[1], ==, LoadTrackingTest::ProvisionalLoadReceivedServerRedirect);
-    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(events[3], ==, LoadTrackingTest::LoadFinished);
-}
-
-static void testLoadingError(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/error&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(events[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
-    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFinished);
-}
-
-static void assertNormalLoadHappened(Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events)
-{
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(events[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFinished);
-}
-
-static void testLoadHtml(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;Hello WebKit-GTK+&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-static void testLoadAlternateHTML(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadAlternateHTML(&quot;&lt;html&gt;&lt;body&gt;Alternate page&lt;/body&gt;&lt;/html&gt;&quot;, &quot;http://error-page.foo/&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-static void testLoadPlainText(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadPlainText(&quot;Hello WebKit-GTK+&quot;);
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-static void testLoadRequest(LoadTrackingTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitURIRequest&gt; request(webkit_uri_request_new(kServer-&gt;getURIForPath(&quot;/normal&quot;).data()));
-    test-&gt;loadRequest(request.get());
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-class LoadStopTrackingTest : public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(LoadStopTrackingTest);
-
-    virtual void loadCommitted()
-    {
-        LoadTrackingTest::loadCommitted();
-        webkit_web_view_stop_loading(m_webView);
-    }
-    virtual void loadFailed(const gchar* failingURI, GError* error)
-    {
-        g_assert(g_error_matches(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED));
-        LoadTrackingTest::loadFailed(failingURI, error);
-    }
-};
-
-static void testLoadCancelled(LoadStopTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/cancelled&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(events[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFailed);
-    g_assert_cmpint(events[3], ==, LoadTrackingTest::LoadFinished);
-}
-
-static void testWebViewTitle(LoadTrackingTest* test, gconstpointer)
-{
-    g_assert(!webkit_web_view_get_title(test-&gt;m_webView));
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Welcome to WebKit-GTK+!&lt;/title&gt;&lt;/head&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, &quot;Welcome to WebKit-GTK+!&quot;);
-}
-
-static void testWebViewReload(LoadTrackingTest* test, gconstpointer)
-{
-    // Check that nothing happens when there's nothing to reload.
-    test-&gt;reload();
-    test-&gt;wait(0.25); // Wait for a quarter of a second.
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-
-    test-&gt;reload();
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-static void testLoadProgress(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpfloat(test-&gt;m_estimatedProgress, ==, 1);
-}
-
-static void testWebViewHistoryLoad(LoadTrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal2&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-
-    // Check that load process is the same for pages loaded from history cache.
-    test-&gt;goBack();
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-
-    test-&gt;goForward();
-    test-&gt;waitUntilLoadFinished();
-    assertNormalLoadHappened(test-&gt;m_loadEvents);
-}
-
-class ViewURITrackingTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ViewURITrackingTest);
-
-    static void uriChanged(GObject*, GParamSpec*, ViewURITrackingTest* test)
-    {
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), !=, webkit_web_view_get_uri(test-&gt;m_webView));
-        test-&gt;m_activeURI = webkit_web_view_get_uri(test-&gt;m_webView);
-    }
-
-    ViewURITrackingTest()
-        : m_activeURI(webkit_web_view_get_uri(m_webView))
-    {
-        g_assert(m_activeURI.isNull());
-        g_signal_connect(m_webView, &quot;notify::uri&quot;, G_CALLBACK(uriChanged), this);
-    }
-
-    void provisionalLoadStarted()
-    {
-        checkActiveURI(&quot;/redirect&quot;);
-    }
-
-    void provisionalLoadReceivedServerRedirect()
-    {
-        checkActiveURI(&quot;/normal&quot;);
-    }
-
-    void loadCommitted()
-    {
-        checkActiveURI(&quot;/normal&quot;);
-    }
-
-    void loadFinished()
-    {
-        checkActiveURI(&quot;/normal&quot;);
-        LoadTrackingTest::loadFinished();
-    }
-
-    CString m_activeURI;
-
-private:
-    void checkActiveURI(const char* uri)
-    {
-        ASSERT_CMP_CSTRING(m_activeURI, ==, kServer-&gt;getURIForPath(uri));
-    }
-};
-
-static void testWebViewActiveURI(ViewURITrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-}
-
-class ViewIsLoadingTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ViewIsLoadingTest);
-
-    static void isLoadingChanged(GObject*, GParamSpec*, ViewIsLoadingTest* test)
-    {
-        if (webkit_web_view_is_loading(test-&gt;m_webView))
-            test-&gt;beginLoad();
-        else
-            test-&gt;endLoad();
-    }
-
-    ViewIsLoadingTest()
-    {
-        g_signal_connect(m_webView, &quot;notify::is-loading&quot;, G_CALLBACK(isLoadingChanged), this);
-    }
-
-    void beginLoad()
-    {
-        // New load, load-started hasn't been emitted yet.
-        g_assert(m_loadEvents.isEmpty());
-        g_assert_cmpstr(webkit_web_view_get_uri(m_webView), ==, m_activeURI.data());
-    }
-
-    void endLoad()
-    {
-        // Load finish, load-finished and load-failed haven't been emitted yet.
-        g_assert(!m_loadEvents.isEmpty());
-        g_assert(!m_loadEvents.contains(LoadTrackingTest::LoadFinished));
-        g_assert(!m_loadEvents.contains(LoadTrackingTest::LoadFailed));
-    }
-};
-
-static void testWebViewIsLoading(ViewIsLoadingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;reload();
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/error&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal2&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;goBack();
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;goForward();
-    test-&gt;waitUntilLoadFinished();
-}
-
-class WebPageURITest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(WebPageURITest);
-
-    static void webPageURIChangedCallback(GDBusConnection*, const char*, const char*, const char*, const char*, GVariant* result, WebPageURITest* test)
-    {
-        const char* uri;
-        g_variant_get(result, &quot;(&amp;s)&quot;, &amp;uri);
-        test-&gt;m_webPageURIs.append(uri);
-    }
-
-    static void webViewURIChanged(GObject*, GParamSpec*, WebPageURITest* test)
-    {
-        test-&gt;m_webViewURIs.append(webkit_web_view_get_uri(test-&gt;m_webView));
-    }
-
-    WebPageURITest()
-    {
-        GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
-            &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, m_mainLoop));
-        m_uriChangedSignalID = g_dbus_connection_signal_subscribe(
-            g_dbus_proxy_get_connection(proxy.get()),
-            0,
-            &quot;org.webkit.gtk.WebExtensionTest&quot;,
-            &quot;URIChanged&quot;,
-            &quot;/org/webkit/gtk/WebExtensionTest&quot;,
-            0,
-            G_DBUS_SIGNAL_FLAGS_NONE,
-            reinterpret_cast&lt;GDBusSignalCallback&gt;(webPageURIChangedCallback),
-            this,
-            0);
-        g_assert(m_uriChangedSignalID);
-
-        g_signal_connect(m_webView, &quot;notify::uri&quot;, G_CALLBACK(webViewURIChanged), this);
-    }
-
-    ~WebPageURITest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-        g_dbus_connection_signal_unsubscribe(bus-&gt;connection(), m_uriChangedSignalID);
-    }
-
-    unsigned m_uriChangedSignalID;
-    Vector&lt;CString&gt; m_webPageURIs;
-    Vector&lt;CString&gt; m_webViewURIs;
-};
-
-static void testWebPageURI(WebPageURITest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_webPageURIs.size(), ==, test-&gt;m_webViewURIs.size());
-    for (size_t i = 0; i &lt; test-&gt;m_webPageURIs.size(); ++i)
-        ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[i], ==, test-&gt;m_webViewURIs[i]);
-
-    g_assert_cmpint(test-&gt;m_webPageURIs.size(), ==, 2);
-    ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[0], ==, kServer-&gt;getURIForPath(&quot;/redirect&quot;));
-    ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[1], ==, kServer-&gt;getURIForPath(&quot;/normal&quot;));
-
-}
-
-static void testURIRequestHTTPHeaders(WebViewTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitURIRequest&gt; uriRequest = adoptGRef(webkit_uri_request_new(&quot;file:///foo/bar&quot;));
-    g_assert(uriRequest.get());
-    g_assert_cmpstr(webkit_uri_request_get_uri(uriRequest.get()), ==, &quot;file:///foo/bar&quot;);
-    g_assert(!webkit_uri_request_get_http_headers(uriRequest.get()));
-
-    // Load a request with no Do Not Track header.
-    webkit_uri_request_set_uri(uriRequest.get(), kServer-&gt;getURIForPath(&quot;/do-not-track-header&quot;).data());
-    test-&gt;loadRequest(uriRequest.get());
-    test-&gt;waitUntilLoadFinished();
-
-    size_t mainResourceDataSize = 0;
-    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpint(mainResourceDataSize, ==, strlen(kDNTHeaderNotPresent));
-    g_assert(!strncmp(mainResourceData, kDNTHeaderNotPresent, mainResourceDataSize));
-
-    // Add the Do Not Track header and load the request again.
-    SoupMessageHeaders* headers = webkit_uri_request_get_http_headers(uriRequest.get());
-    g_assert(headers);
-    soup_message_headers_append(headers, &quot;DNT&quot;, &quot;1&quot;);
-    test-&gt;loadRequest(uriRequest.get());
-    test-&gt;waitUntilLoadFinished();
-
-    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpint(mainResourceDataSize, ==, 1);
-    g_assert(!strncmp(mainResourceData, &quot;1&quot;, mainResourceDataSize));
-
-    // Load a URI for which the web extension will add the Do Not Track header.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/add-do-not-track-header&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpint(mainResourceDataSize, ==, 1);
-    g_assert(!strncmp(mainResourceData, &quot;1&quot;, mainResourceDataSize));
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    static const char* responseString = &quot;&lt;html&gt;&lt;body&gt;Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
-        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    if (g_str_has_prefix(path, &quot;/normal&quot;))
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
-    else if (g_str_equal(path, &quot;/error&quot;))
-        soup_message_set_status(message, SOUP_STATUS_CANT_CONNECT);
-    else if (g_str_equal(path, &quot;/redirect&quot;)) {
-        soup_message_set_status(message, SOUP_STATUS_MOVED_PERMANENTLY);
-        soup_message_headers_append(message-&gt;response_headers, &quot;Location&quot;, &quot;/normal&quot;);
-    } else if (g_str_equal(path, &quot;/cancelled&quot;)) {
-        soup_message_headers_set_encoding(message-&gt;response_headers, SOUP_ENCODING_CHUNKED);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
-        soup_server_unpause_message(server, message);
-        return;
-    } else if (g_str_equal(path, &quot;/do-not-track-header&quot;) || g_str_equal(path, &quot;/add-do-not-track-header&quot;)) {
-        const char* doNotTrack = soup_message_headers_get_one(message-&gt;request_headers, &quot;DNT&quot;);
-        if (doNotTrack)
-            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, doNotTrack, strlen(doNotTrack));
-        else
-            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kDNTHeaderNotPresent, strlen(kDNTHeaderNotPresent));
-        soup_message_set_status(message, SOUP_STATUS_OK);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-void beforeAll()
-{
-    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
-    bus = new WebKitTestBus();
-    if (!bus-&gt;run())
-        return;
-
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;loading-status&quot;, testLoadingStatus);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;loading-error&quot;, testLoadingError);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-html&quot;, testLoadHtml);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-alternate-html&quot;, testLoadAlternateHTML);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-plain-text&quot;, testLoadPlainText);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-request&quot;, testLoadRequest);
-    LoadStopTrackingTest::add(&quot;WebKitWebView&quot;, &quot;stop-loading&quot;, testLoadCancelled);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;title&quot;, testWebViewTitle);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;progress&quot;, testLoadProgress);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;reload&quot;, testWebViewReload);
-    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;history-load&quot;, testWebViewHistoryLoad);
-
-    // This test checks that web view notify::uri signal is correctly emitted
-    // and the uri is already updated when loader client signals are emitted.
-    ViewURITrackingTest::add(&quot;WebKitWebView&quot;, &quot;active-uri&quot;, testWebViewActiveURI);
-
-    ViewIsLoadingTest::add(&quot;WebKitWebView&quot;, &quot;is-loading&quot;, testWebViewIsLoading);
-    WebPageURITest::add(&quot;WebKitWebPage&quot;, &quot;get-uri&quot;, testWebPageURI);
-    WebViewTest::add(&quot;WebKitURIRequest&quot;, &quot;http-headers&quot;, testURIRequestHTTPHeaders);
-}
-
-void afterAll()
-{
-    delete bus;
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMaincpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,78 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;TestMain.h&quot;
-
-#include &lt;glib/gstdio.h&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-void beforeAll();
-void afterAll();
-
-static void registerGResource(void)
-{
-    GOwnPtr&lt;char&gt; resourcesPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;resources&quot;, &quot;webkit2gtk-tests-resources.gresource&quot;, NULL));
-    GResource* resource = g_resource_load(resourcesPath.get(), 0);
-    g_assert(resource);
-
-    g_resources_register(resource);
-    g_resource_unref(resource);
-}
-
-static void removeNonEmptyDirectory(const char* directoryPath)
-{
-    GDir* directory = g_dir_open(directoryPath, 0, 0);
-    g_assert(directory);
-    const char* fileName;
-    while ((fileName = g_dir_read_name(directory))) {
-        GOwnPtr&lt;char&gt; filePath(g_build_filename(directoryPath, fileName, NULL));
-        g_unlink(filePath.get());
-    }
-    g_dir_close(directory);
-    g_rmdir(directoryPath);
-}
-
-int main(int argc, char** argv)
-{
-    g_unsetenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;);
-    gtk_test_init(&amp;argc, &amp;argv, 0);
-    g_setenv(&quot;WEBKIT_EXEC_PATH&quot;, WEBKIT_EXEC_PATH, FALSE);
-    g_setenv(&quot;WEBKIT_INJECTED_BUNDLE_PATH&quot;, WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
-    g_setenv(&quot;LC_ALL&quot;, &quot;C&quot;, TRUE);
-    g_setenv(&quot;GIO_USE_VFS&quot;, &quot;local&quot;, TRUE);
-    g_setenv(&quot;GSETTINGS_BACKEND&quot;, &quot;memory&quot;, TRUE);
-    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
-
-    registerGResource();
-
-    GOwnPtr&lt;char&gt; diskCacheTempDirectory(g_dir_make_tmp(&quot;WebKit2TestsDiskCache-XXXXXX&quot;, 0));
-    g_assert(diskCacheTempDirectory.get());
-    webkit_web_context_set_disk_cache_directory(webkit_web_context_get_default(), diskCacheTempDirectory.get());
-
-    beforeAll();
-    int returnValue = g_test_run();
-    afterAll();
-
-    removeNonEmptyDirectory(diskCacheTempDirectory.get());
-
-    return returnValue;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMainh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,119 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef TestMain_h
-#define TestMain_h
-
-#include &lt;cairo.h&gt;
-#include &lt;glib-object.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-#define MAKE_GLIB_TEST_FIXTURE(ClassName) \
-    static void setUp(ClassName* fixture, gconstpointer data) \
-    { \
-        new (fixture) ClassName; \
-    } \
-    static void tearDown(ClassName* fixture, gconstpointer data) \
-    { \
-        fixture-&gt;~ClassName(); \
-    } \
-    static void add(const char* suiteName, const char* testName, void (*testFunc)(ClassName*, const void*)) \
-    { \
-        GOwnPtr&lt;gchar&gt; testPath(g_strdup_printf(&quot;/webkit2/%s/%s&quot;, suiteName, testName)); \
-        g_test_add(testPath.get(), ClassName, 0, ClassName::setUp, testFunc, ClassName::tearDown); \
-    }
-
-#define ASSERT_CMP_CSTRING(s1, cmp, s2) \
-    do { CString __s1 = (s1); CString __s2 = (s2); \
-        if (g_strcmp0(__s1.data(), __s2.data()) cmp 0) ; else \
-            g_assertion_message_cmpstr(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
-                #s1 &quot; &quot; #cmp &quot; &quot; #s2, __s1.data(), #cmp, __s2.data()); } while (0)
-
-class Test {
-public:
-    MAKE_GLIB_TEST_FIXTURE(Test);
-
-    ~Test()
-    {
-        if (m_watchedObjects.isEmpty())
-            return;
-
-        g_print(&quot;Leaked objects:&quot;);
-        HashSet&lt;GObject*&gt;::const_iterator end = m_watchedObjects.end();
-        for (HashSet&lt;GObject*&gt;::const_iterator it = m_watchedObjects.begin(); it != end; ++it)
-            g_print(&quot; %s(%p)&quot;, g_type_name_from_instance(reinterpret_cast&lt;GTypeInstance*&gt;(*it)), *it);
-        g_print(&quot;\n&quot;);
-
-        g_assert(m_watchedObjects.isEmpty());
-    }
-
-    static void objectFinalized(Test* test, GObject* finalizedObject)
-    {
-        test-&gt;m_watchedObjects.remove(finalizedObject);
-    }
-
-    void assertObjectIsDeletedWhenTestFinishes(GObject* object)
-    {
-        m_watchedObjects.add(object);
-        g_object_weak_ref(object, reinterpret_cast&lt;GWeakNotify&gt;(objectFinalized), this);
-    }
-
-    static CString getWebKit1TestResoucesDir()
-    {
-        GOwnPtr&lt;char&gt; resourcesDir(g_build_filename(WEBKIT_SRC_DIR, &quot;Source&quot;, &quot;WebKit&quot;, &quot;gtk&quot;, &quot;tests&quot;, &quot;resources&quot;, NULL));
-        return resourcesDir.get();
-    }
-
-    static CString getResourcesDir()
-    {
-        GOwnPtr&lt;char&gt; resourcesDir(g_build_filename(WEBKIT_SRC_DIR, &quot;Source&quot;, &quot;WebKit2&quot;, &quot;UIProcess&quot;, &quot;API&quot;, &quot;gtk&quot;, &quot;tests&quot;, &quot;resources&quot;, NULL));
-        return resourcesDir.get();
-    }
-
-    void addLogFatalFlag(unsigned flag)
-    {
-        unsigned fatalMask = g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(G_LOG_FATAL_MASK));
-        fatalMask |= flag;
-        g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(fatalMask));
-    }
-
-    void removeLogFatalFlag(unsigned flag)
-    {
-        unsigned fatalMask = g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(G_LOG_FATAL_MASK));
-        fatalMask &amp;= ~flag;
-        g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(fatalMask));
-    }
-
-    static bool cairoSurfacesEqual(cairo_surface_t* s1, cairo_surface_t* s2)
-    {
-        return (cairo_image_surface_get_format(s1) == cairo_image_surface_get_format(s2)
-            &amp;&amp; cairo_image_surface_get_width(s1) == cairo_image_surface_get_width(s2)
-            &amp;&amp; cairo_image_surface_get_height(s1) == cairo_image_surface_get_height(s2)
-            &amp;&amp; cairo_image_surface_get_stride(s1) == cairo_image_surface_get_stride(s2)
-            &amp;&amp; !memcmp(const_cast&lt;const void*&gt;(reinterpret_cast&lt;void*&gt;(cairo_image_surface_get_data(s1))),
-                const_cast&lt;const void*&gt;(reinterpret_cast&lt;void*&gt;(cairo_image_surface_get_data(s2))),
-                cairo_image_surface_get_height(s1)*cairo_image_surface_get_stride(s1)));
-    }
-
-    HashSet&lt;GObject*&gt; m_watchedObjects;
-};
-
-#endif // TestMain_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestPrintingcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,209 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-#ifdef HAVE_GTK_UNIX_PRINTING
-#include &lt;gtk/gtkunixprint.h&gt;
-#endif
-
-static char* kTempDirectory;
-
-static void testPrintOperationPrintSettings(WebViewTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitPrintOperation&gt; printOperation = adoptGRef(webkit_print_operation_new(test-&gt;m_webView));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printOperation.get()));
-
-    g_assert(!webkit_print_operation_get_print_settings(printOperation.get()));
-    g_assert(!webkit_print_operation_get_page_setup(printOperation.get()));
-
-    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printSettings.get()));
-
-    GRefPtr&lt;GtkPageSetup&gt; pageSetup = adoptGRef(gtk_page_setup_new());
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(pageSetup.get()));
-
-    webkit_print_operation_set_print_settings(printOperation.get(), printSettings.get());
-    webkit_print_operation_set_page_setup(printOperation.get(), pageSetup.get());
-
-    g_assert(webkit_print_operation_get_print_settings(printOperation.get()) == printSettings.get());
-    g_assert(webkit_print_operation_get_page_setup(printOperation.get()) == pageSetup.get());
-}
-
-static gboolean webViewPrintCallback(WebKitWebView* webView, WebKitPrintOperation* printOperation, WebViewTest* test)
-{
-    g_assert(webView == test-&gt;m_webView);
-
-    g_assert(WEBKIT_IS_PRINT_OPERATION(printOperation));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printOperation));
-
-    g_assert(!webkit_print_operation_get_print_settings(printOperation));
-    g_assert(!webkit_print_operation_get_page_setup(printOperation));
-
-    g_main_loop_quit(test-&gt;m_mainLoop);
-
-    return TRUE;
-}
-
-static void testWebViewPrint(WebViewTest* test, gconstpointer)
-{
-    g_signal_connect(test-&gt;m_webView, &quot;print&quot;, G_CALLBACK(webViewPrintCallback), test);
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onLoad=\&quot;print();\&quot;&gt;WebKitGTK+ printing test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    g_main_loop_run(test-&gt;m_mainLoop);
-}
-
-#ifdef HAVE_GTK_UNIX_PRINTING
-class PrintTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(PrintTest);
-
-    static void printFinishedCallback(WebKitPrintOperation*, PrintTest* test)
-    {
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    static void printFailedCallback(WebKitPrintOperation*, GError* error, PrintTest* test)
-    {
-        g_assert(test-&gt;m_expectedError);
-        g_assert(error);
-        g_assert(g_error_matches(error, WEBKIT_PRINT_ERROR, test-&gt;m_expectedError));
-    }
-
-    PrintTest()
-        : m_expectedError(0)
-    {
-        m_printOperation = adoptGRef(webkit_print_operation_new(m_webView));
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_printOperation.get()));
-        g_signal_connect(m_printOperation.get(), &quot;finished&quot;, G_CALLBACK(printFinishedCallback), this);
-        g_signal_connect(m_printOperation.get(), &quot;failed&quot;, G_CALLBACK(printFailedCallback), this);
-    }
-
-    static gboolean testPrintOperationPrintPrinter(GtkPrinter* printer, gpointer userData)
-    {
-        if (strcmp(gtk_printer_get_name(printer), &quot;Print to File&quot;))
-            return FALSE;
-
-        GtkPrinter** foundPrinter = static_cast&lt;GtkPrinter**&gt;(userData);
-        *foundPrinter = static_cast&lt;GtkPrinter*&gt;(g_object_ref(printer));
-        return TRUE;
-    }
-
-    GtkPrinter* findPrintToFilePrinter()
-    {
-        GtkPrinter* printer = 0;
-        gtk_enumerate_printers(testPrintOperationPrintPrinter, &amp;printer, 0, TRUE);
-        return printer;
-    }
-
-    void waitUntilPrintFinished()
-    {
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GRefPtr&lt;WebKitPrintOperation&gt; m_printOperation;
-    unsigned int m_expectedError;
-};
-
-static void testPrintOperationPrint(PrintTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ printing test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GRefPtr&lt;GtkPrinter&gt; printer = adoptGRef(test-&gt;findPrintToFilePrinter());
-    if (!printer) {
-        g_message(&quot;%s&quot;, &quot;Cannot test WebKitPrintOperation/print: no suitable printer found&quot;);
-        return;
-    }
-
-    GOwnPtr&lt;char&gt; outputFilename(g_build_filename(kTempDirectory, &quot;webkit-print.pdf&quot;, NULL));
-    GRefPtr&lt;GFile&gt; outputFile = adoptGRef(g_file_new_for_path(outputFilename.get()));
-    GOwnPtr&lt;char&gt; outputURI(g_file_get_uri(outputFile.get()));
-
-    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
-    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
-    gtk_print_settings_set(printSettings.get(), GTK_PRINT_SETTINGS_OUTPUT_URI, outputURI.get());
-
-    webkit_print_operation_set_print_settings(test-&gt;m_printOperation.get(), printSettings.get());
-    webkit_print_operation_print(test-&gt;m_printOperation.get());
-    test-&gt;waitUntilPrintFinished();
-
-    GRefPtr&lt;GFileInfo&gt; fileInfo = adoptGRef(g_file_query_info(outputFile.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE &quot;,&quot; G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
-                                                              static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
-    g_assert(fileInfo.get());
-    g_assert_cmpint(g_file_info_get_size(fileInfo.get()), &gt;, 0);
-    g_assert_cmpstr(g_file_info_get_content_type(fileInfo.get()), ==, &quot;application/pdf&quot;);
-
-    g_file_delete(outputFile.get(), 0, 0);
-}
-
-static void testPrintOperationErrors(PrintTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ printing errors test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GRefPtr&lt;GtkPrinter&gt; printer = adoptGRef(test-&gt;findPrintToFilePrinter());
-    if (!printer) {
-        g_message(&quot;%s&quot;, &quot;Cannot test WebKitPrintOperation/print: no suitable printer found&quot;);
-        return;
-    }
-
-    // General Error: invalid filename.
-    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_GENERAL;
-    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
-    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
-    gtk_print_settings_set(printSettings.get(), GTK_PRINT_SETTINGS_OUTPUT_URI, &quot;file:///foo/bar&quot;);
-    webkit_print_operation_set_print_settings(test-&gt;m_printOperation.get(), printSettings.get());
-    webkit_print_operation_print(test-&gt;m_printOperation.get());
-    test-&gt;waitUntilPrintFinished();
-
-    // Printer not found error.
-    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
-    gtk_print_settings_set_printer(printSettings.get(), &quot;The fake WebKit printer&quot;);
-    webkit_print_operation_print(test-&gt;m_printOperation.get());
-    test-&gt;waitUntilPrintFinished();
-
-    // No pages to print: print even pages for a single page document.
-    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE;
-    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
-    gtk_print_settings_set_page_set(printSettings.get(), GTK_PAGE_SET_EVEN);
-    webkit_print_operation_print(test-&gt;m_printOperation.get());
-    test-&gt;waitUntilPrintFinished();
-}
-#endif // HAVE_GTK_UNIX_PRINTING
-
-void beforeAll()
-{
-    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
-    g_assert(kTempDirectory);
-
-    WebViewTest::add(&quot;WebKitPrintOperation&quot;, &quot;printing-settings&quot;, testPrintOperationPrintSettings);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;print&quot;, testWebViewPrint);
-#ifdef HAVE_GTK_UNIX_PRINTING
-    PrintTest::add(&quot;WebKitPrintOperation&quot;, &quot;print&quot;, testPrintOperationPrint);
-    PrintTest::add(&quot;WebKitPrintOperation&quot;, &quot;print-errors&quot;, testPrintOperationErrors);
-#endif
-}
-
-void afterAll()
-{
-    g_rmdir(kTempDirectory);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestResourcescpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,738 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/Vector.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static WebKitTestServer* kServer;
-
-static const char* kIndexHtml =
-    &quot;&lt;html&gt;&lt;head&gt;&quot;
-    &quot; &lt;link rel='stylesheet' href='/style.css' type='text/css'&gt;&quot;
-    &quot; &lt;script language='javascript' src='/javascript.js'&gt;&lt;/script&gt;&quot;
-    &quot;&lt;/head&gt;&lt;body&gt;WebKitGTK+ resources test&lt;/body&gt;&lt;/html&gt;&quot;;
-
-static const char* kStyleCSS =
-    &quot;body {&quot;
-    &quot;    margin: 0px;&quot;
-    &quot;    padding: 0px;&quot;
-    &quot;    font-family: sans-serif;&quot;
-    &quot;    background: url(/blank.ico) 0 0 no-repeat;&quot;
-    &quot;    color: black;&quot;
-    &quot;}&quot;;
-
-static const char* kJavascript = &quot;function foo () { var a = 1; }&quot;;
-
-class ResourcesTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ResourcesTest);
-
-    static void resourceSentRequestCallback(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse, ResourcesTest* test)
-    {
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-        if (redirectResponse)
-            test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(redirectResponse));
-        test-&gt;resourceSentRequest(resource, request, redirectResponse);
-    }
-
-    static void resourceReceivedResponseCallback(WebKitWebResource* resource, GParamSpec*, ResourcesTest* test)
-    {
-        g_assert(webkit_web_resource_get_response(resource));
-        test-&gt;resourceReceivedResponse(resource);
-    }
-
-    static void resourceReceivedDataCallback(WebKitWebResource* resource, guint64 bytesReceived, ResourcesTest* test)
-    {
-        test-&gt;resourceReceivedData(resource, bytesReceived);
-    }
-
-    static void resourceFinishedCallback(WebKitWebResource* resource, ResourcesTest* test)
-    {
-        test-&gt;resourceFinished(resource);
-    }
-
-    static void resourceFailedCallback(WebKitWebResource* resource, GError* error, ResourcesTest* test)
-    {
-        g_assert(error);
-        test-&gt;resourceFailed(resource, error);
-    }
-
-    static void resourceLoadStartedCallback(WebKitWebView* webView, WebKitWebResource* resource, WebKitURIRequest* request, ResourcesTest* test)
-    {
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(resource));
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-
-        // Ignore favicons.
-        if (g_str_has_suffix(webkit_uri_request_get_uri(request), &quot;favicon.ico&quot;))
-            return;
-
-        test-&gt;resourceLoadStarted(resource, request);
-        g_signal_connect(resource, &quot;sent-request&quot;, G_CALLBACK(resourceSentRequestCallback), test);
-        g_signal_connect(resource, &quot;notify::response&quot;, G_CALLBACK(resourceReceivedResponseCallback), test);
-        g_signal_connect(resource, &quot;received-data&quot;, G_CALLBACK(resourceReceivedDataCallback), test);
-        g_signal_connect(resource, &quot;finished&quot;, G_CALLBACK(resourceFinishedCallback), test);
-        g_signal_connect(resource, &quot;failed&quot;, G_CALLBACK(resourceFailedCallback), test);
-    }
-
-    void clearSubresources()
-    {
-        g_list_free_full(m_subresources, reinterpret_cast&lt;GDestroyNotify&gt;(g_object_unref));
-        m_subresources = 0;
-    }
-
-    ResourcesTest()
-        : WebViewTest()
-        , m_resourcesLoaded(0)
-        , m_resourcesToLoad(0)
-        , m_resourceDataSize(0)
-        , m_subresources(0)
-    {
-        g_signal_connect(m_webView, &quot;resource-load-started&quot;, G_CALLBACK(resourceLoadStartedCallback), this);
-    }
-
-    ~ResourcesTest()
-    {
-        clearSubresources();
-    }
-
-    virtual void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
-    {
-    }
-
-    virtual void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
-    {
-    }
-
-    virtual void resourceReceivedResponse(WebKitWebResource* resource)
-    {
-    }
-
-    virtual void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
-    {
-    }
-
-    virtual void resourceFinished(WebKitWebResource* resource)
-    {
-        g_signal_handlers_disconnect_matched(resource, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-        if (webkit_web_view_get_main_resource(m_webView) != resource)
-            m_subresources = g_list_prepend(m_subresources, g_object_ref(resource));
-        if (++m_resourcesLoaded == m_resourcesToLoad)
-            g_main_loop_quit(m_mainLoop);
-    }
-
-    virtual void resourceFailed(WebKitWebResource* resource, GError* error)
-    {
-        g_assert_not_reached();
-    }
-
-    void waitUntilResourcesLoaded(size_t resourcesCount)
-    {
-        m_resourcesLoaded = 0;
-        m_resourcesToLoad = resourcesCount;
-        clearSubresources();
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GList* subresources()
-    {
-        return m_subresources;
-    }
-
-    static void resourceGetDataCallback(GObject* object, GAsyncResult* result, gpointer userData)
-    {
-        size_t dataSize;
-        GOwnPtr&lt;GError&gt; error;
-        unsigned char* data = webkit_web_resource_get_data_finish(WEBKIT_WEB_RESOURCE(object), result, &amp;dataSize, &amp;error.outPtr());
-        g_assert(!error.get());
-        g_assert(data);
-        g_assert_cmpint(dataSize, &gt;, 0);
-
-        ResourcesTest* test = static_cast&lt;ResourcesTest*&gt;(userData);
-        test-&gt;m_resourceData.set(reinterpret_cast&lt;char*&gt;(data));
-        test-&gt;m_resourceDataSize = dataSize;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    void checkResourceData(WebKitWebResource* resource)
-    {
-        m_resourceDataSize = 0;
-        webkit_web_resource_get_data(resource, 0, resourceGetDataCallback, this);
-        g_main_loop_run(m_mainLoop);
-
-        const char* uri = webkit_web_resource_get_uri(resource);
-        if (uri == kServer-&gt;getURIForPath(&quot;/&quot;)) {
-            g_assert_cmpint(m_resourceDataSize, ==, strlen(kIndexHtml));
-            g_assert(!strncmp(m_resourceData.get(), kIndexHtml, m_resourceDataSize));
-        } else if (uri == kServer-&gt;getURIForPath(&quot;/style.css&quot;)) {
-            g_assert_cmpint(m_resourceDataSize, ==, strlen(kStyleCSS));
-            g_assert(!strncmp(m_resourceData.get(), kStyleCSS, m_resourceDataSize));
-        } else if (uri == kServer-&gt;getURIForPath(&quot;/javascript.js&quot;)) {
-            g_assert_cmpint(m_resourceDataSize, ==, strlen(kJavascript));
-            g_assert(!strncmp(m_resourceData.get(), kJavascript, m_resourceDataSize));
-        } else
-            g_assert_not_reached();
-        m_resourceData.clear();
-    }
-
-    size_t m_resourcesLoaded;
-    size_t m_resourcesToLoad;
-    GOwnPtr&lt;char&gt; m_resourceData;
-    size_t m_resourceDataSize;
-    GList* m_subresources;
-};
-
-static void testWebViewResources(ResourcesTest* test, gconstpointer)
-{
-    // Nothing loaded yet, there shoulnd't be resources.
-    g_assert(!webkit_web_view_get_main_resource(test-&gt;m_webView));
-    g_assert(!test-&gt;subresources());
-
-    // Load simple page without subresources.
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;Testing WebKitGTK+&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_view_get_uri(test-&gt;m_webView), ==, webkit_web_resource_get_uri(resource));
-    g_assert(!test-&gt;subresources());
-
-    // Load simple page with subresources.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilResourcesLoaded(4);
-
-    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_view_get_uri(test-&gt;m_webView), ==, webkit_web_resource_get_uri(resource));
-    GList* subresources = test-&gt;subresources();
-    g_assert(subresources);
-    g_assert_cmpint(g_list_length(subresources), ==, 3);
-
-#if 0
-    // Load the same URI again.
-    // FIXME: we need a workaround for bug https://bugs.webkit.org/show_bug.cgi?id=78510.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilResourcesLoaded(4);
-#endif
-
-    // Reload.
-    webkit_web_view_reload_bypass_cache(test-&gt;m_webView);
-    test-&gt;waitUntilResourcesLoaded(4);
-}
-
-class SingleResourceLoadTest: public ResourcesTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SingleResourceLoadTest);
-
-    enum LoadEvents {
-        Started,
-        SentRequest,
-        Redirected,
-        ReceivedResponse,
-        ReceivedData,
-        Finished,
-        Failed
-    };
-
-    SingleResourceLoadTest()
-        : ResourcesTest()
-        , m_resourceDataReceived(0)
-    {
-         m_resourcesToLoad = 2;
-    }
-
-    void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
-    {
-        if (resource == webkit_web_view_get_main_resource(m_webView))
-            return;
-
-        m_resourceDataReceived = 0;
-        m_resource = resource;
-        m_loadEvents.append(Started);
-    }
-
-    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
-    {
-        if (resource != m_resource)
-            return;
-
-        if (redirectResponse)
-            m_loadEvents.append(Redirected);
-        else
-            m_loadEvents.append(SentRequest);
-    }
-
-    void resourceReceivedResponse(WebKitWebResource* resource)
-    {
-        if (resource != m_resource)
-            return;
-
-        m_loadEvents.append(ReceivedResponse);
-    }
-
-    void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
-    {
-        if (resource != m_resource)
-            return;
-
-        m_resourceDataReceived += bytesReceived;
-        if (!m_loadEvents.contains(ReceivedData))
-            m_loadEvents.append(ReceivedData);
-    }
-
-    void resourceFinished(WebKitWebResource* resource)
-    {
-        if (resource != m_resource) {
-            ResourcesTest::resourceFinished(resource);
-            return;
-        }
-
-        if (!m_loadEvents.contains(Failed)) {
-            WebKitURIResponse* response = webkit_web_resource_get_response(m_resource.get());
-            g_assert(response);
-            g_assert_cmpint(webkit_uri_response_get_content_length(response), ==, m_resourceDataReceived);
-        }
-        m_loadEvents.append(Finished);
-        ResourcesTest::resourceFinished(resource);
-    }
-
-    void resourceFailed(WebKitWebResource* resource, GError* error)
-    {
-        if (resource == m_resource)
-            m_loadEvents.append(Failed);
-    }
-
-    void waitUntilResourceLoadFinished()
-    {
-        m_resource = 0;
-        m_resourcesLoaded = 0;
-        g_main_loop_run(m_mainLoop);
-    }
-
-    WebKitURIResponse* waitUntilResourceLoadFinishedAndReturnURIResponse()
-    {
-        waitUntilResourceLoadFinished();
-        g_assert(m_resource);
-        return webkit_web_resource_get_response(m_resource.get());
-    }
-
-    GRefPtr&lt;WebKitWebResource&gt; m_resource;
-    Vector&lt;LoadEvents&gt; m_loadEvents;
-    guint64 m_resourceDataReceived;
-};
-
-static void testWebResourceLoading(SingleResourceLoadTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-    g_assert(test-&gt;m_resource);
-    Vector&lt;SingleResourceLoadTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
-    g_assert_cmpint(events.size(), ==, 5);
-    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
-    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
-    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::ReceivedResponse);
-    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedData);
-    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::Finished);
-    events.clear();
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-    g_assert(test-&gt;m_resource);
-    g_assert_cmpint(events.size(), ==, 6);
-    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
-    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
-    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Redirected);
-    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedResponse);
-    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::ReceivedData);
-    g_assert_cmpint(events[5], ==, SingleResourceLoadTest::Finished);
-    events.clear();
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/invalid-css.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-    g_assert(test-&gt;m_resource);
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
-    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
-    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Failed);
-    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::Finished);
-    events.clear();
-}
-
-static void testWebResourceResponse(SingleResourceLoadTest* test, gconstpointer)
-{
-    // No cached resource: First load.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
-    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
-
-    // No cached resource: Second load.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
-
-    // No cached resource: Reload.
-    webkit_web_view_reload(test-&gt;m_webView);
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
-
-    // Cached resource: First load.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
-
-    // Cached resource: Second load.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
-
-    // Cached resource: Reload.
-    webkit_web_view_reload(test-&gt;m_webView);
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_NOT_MODIFIED);
-}
-
-static void testWebResourceMimeType(SingleResourceLoadTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
-    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;text/javascript&quot;);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;image/vnd.microsoft.icon&quot;);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;text/css&quot;);
-}
-
-static void testWebResourceSuggestedFilename(SingleResourceLoadTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
-    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert_cmpstr(webkit_uri_response_get_suggested_filename(response), ==, &quot;JavaScript.js&quot;);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
-    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
-    g_assert(!webkit_uri_response_get_suggested_filename(response));
-}
-
-class ResourceURITrackingTest: public SingleResourceLoadTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ResourceURITrackingTest);
-
-    ResourceURITrackingTest()
-        : SingleResourceLoadTest()
-    {
-    }
-
-    static void uriChanged(WebKitWebResource* resource, GParamSpec*, ResourceURITrackingTest* test)
-    {
-        g_assert(resource == test-&gt;m_resource.get());
-        g_assert_cmpstr(test-&gt;m_activeURI.data(), !=, webkit_web_resource_get_uri(test-&gt;m_resource.get()));
-        test-&gt;m_activeURI = webkit_web_resource_get_uri(test-&gt;m_resource.get());
-    }
-
-    void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
-    {
-        if (resource == webkit_web_view_get_main_resource(m_webView))
-            return;
-
-        m_resource = resource;
-        m_activeURI = webkit_web_resource_get_uri(resource);
-        checkActiveURI(&quot;/redirected.css&quot;);
-        g_assert_cmpstr(m_activeURI.data(), ==, webkit_uri_request_get_uri(request));
-        g_signal_connect(resource, &quot;notify::uri&quot;, G_CALLBACK(uriChanged), this);
-    }
-
-    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
-    {
-        if (resource != m_resource)
-            return;
-
-        if (redirectResponse)
-            checkActiveURI(&quot;/simple-style.css&quot;);
-        else
-            checkActiveURI(&quot;/redirected.css&quot;);
-        g_assert_cmpstr(m_activeURI.data(), ==, webkit_uri_request_get_uri(request));
-    }
-
-    void resourceReceivedResponse(WebKitWebResource* resource)
-    {
-        if (resource != m_resource)
-            return;
-
-        checkActiveURI(&quot;/simple-style.css&quot;);
-    }
-
-    void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
-    {
-    }
-
-    void resourceFinished(WebKitWebResource* resource)
-    {
-        if (resource == m_resource)
-            checkActiveURI(&quot;/simple-style.css&quot;);
-        ResourcesTest::resourceFinished(resource);
-    }
-
-    void resourceFailed(WebKitWebResource*, GError*)
-    {
-        g_assert_not_reached();
-    }
-
-    CString m_activeURI;
-
-private:
-    void checkActiveURI(const char* uri)
-    {
-        ASSERT_CMP_CSTRING(m_activeURI, ==, kServer-&gt;getURIForPath(uri));
-    }
-};
-
-static void testWebResourceActiveURI(ResourceURITrackingTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-}
-
-static void testWebResourceGetData(ResourcesTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    // FIXME: this should be 4 instead of 3, but we don't get the css image resource
-    // due to bug https://bugs.webkit.org/show_bug.cgi?id=78510.
-    test-&gt;waitUntilResourcesLoaded(3);
-
-    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    test-&gt;checkResourceData(resource);
-
-    GList* subresources = test-&gt;subresources();
-    for (GList* item = subresources; item; item = g_list_next(item))
-        test-&gt;checkResourceData(WEBKIT_WEB_RESOURCE(item-&gt;data));
-}
-
-static void testWebViewResourcesHistoryCache(SingleResourceLoadTest* test, gconstpointer)
-{
-    CString javascriptURI = kServer-&gt;getURIForPath(&quot;/javascript.html&quot;);
-    test-&gt;loadURI(javascriptURI.data());
-    test-&gt;waitUntilResourceLoadFinished();
-    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, javascriptURI.data());
-
-    CString simpleStyleCSSURI = kServer-&gt;getURIForPath(&quot;/simple-style-css.html&quot;);
-    test-&gt;loadURI(simpleStyleCSSURI.data());
-    test-&gt;waitUntilResourceLoadFinished();
-    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, simpleStyleCSSURI.data());
-
-    test-&gt;goBack();
-    test-&gt;waitUntilResourceLoadFinished();
-    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, javascriptURI.data());
-
-    test-&gt;goForward();
-    test-&gt;waitUntilResourceLoadFinished();
-    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
-    g_assert(resource);
-    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, simpleStyleCSSURI.data());
-}
-
-class SendRequestTest: public SingleResourceLoadTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SendRequestTest);
-
-    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
-    {
-        if (resource != m_resource)
-            return;
-
-        g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, m_expectedNewResourceURI.data());
-        g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, webkit_web_resource_get_uri(resource));
-
-        SingleResourceLoadTest::resourceSentRequest(resource, request, redirectResponse);
-    }
-
-    void resourceFailed(WebKitWebResource* resource, GError* error)
-    {
-        if (resource != m_resource)
-            return;
-
-        g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, m_expectedCancelledResourceURI.data());
-        g_assert_error(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
-
-        SingleResourceLoadTest::resourceFailed(resource, error);
-    }
-
-    void setExpectedNewResourceURI(const CString&amp; uri)
-    {
-        m_expectedNewResourceURI = uri;
-    }
-
-    void setExpectedCancelledResourceURI(const CString&amp; uri)
-    {
-        m_expectedCancelledResourceURI = uri;
-    }
-
-    CString m_expectedNewResourceURI;
-    CString m_expectedCancelledResourceURI;
-};
-
-static void testWebResourceSendRequest(SendRequestTest* test, gconstpointer)
-{
-    test-&gt;setExpectedNewResourceURI(kServer-&gt;getURIForPath(&quot;/javascript.js&quot;));
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;relative-javascript.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-    g_assert(test-&gt;m_resource);
-
-    Vector&lt;SingleResourceLoadTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
-    g_assert_cmpint(events.size(), ==, 5);
-    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
-    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
-    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::ReceivedResponse);
-    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedData);
-    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::Finished);
-    events.clear();
-
-    // Cancel request.
-    test-&gt;setExpectedCancelledResourceURI(kServer-&gt;getURIForPath(&quot;/cancel-this.js&quot;));
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/resource-to-cancel.html&quot;).data());
-    test-&gt;waitUntilResourceLoadFinished();
-    g_assert(test-&gt;m_resource);
-
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
-    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::Failed);
-    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Finished);
-    events.clear();
-}
-
-static void addCacheHTTPHeadersToResponse(SoupMessage* message)
-{
-    // The actual date doesn't really matter.
-    SoupDate* soupDate = soup_date_new_from_now(0);
-    GOwnPtr&lt;char&gt; date(soup_date_to_string(soupDate, SOUP_DATE_HTTP));
-    soup_message_headers_append(message-&gt;response_headers, &quot;Last-Modified&quot;, date.get());
-    soup_date_free(soupDate);
-    soup_message_headers_append(message-&gt;response_headers, &quot;Cache-control&quot;, &quot;public, max-age=31536000&quot;);
-    soupDate = soup_date_new_from_now(3600);
-    date.set(soup_date_to_string(soupDate, SOUP_DATE_HTTP));
-    soup_message_headers_append(message-&gt;response_headers, &quot;Expires&quot;, date.get());
-    soup_date_free(soupDate);
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    if (soup_message_headers_get_one(message-&gt;request_headers, &quot;If-Modified-Since&quot;)) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_MODIFIED);
-        soup_message_body_complete(message-&gt;response_body);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/&quot;)) {
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kIndexHtml, strlen(kIndexHtml));
-    } else if (g_str_equal(path, &quot;/javascript.html&quot;)) {
-        static const char* javascriptHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='/javascript.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, javascriptHtml, strlen(javascriptHtml));
-    } else if (g_str_equal(path, &quot;/image.html&quot;)) {
-        static const char* imageHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;img src='/blank.ico'&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, imageHTML, strlen(imageHTML));
-    } else if (g_str_equal(path, &quot;/redirected-css.html&quot;)) {
-        static const char* redirectedCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/redirected.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, redirectedCSSHtml, strlen(redirectedCSSHtml));
-    } else if (g_str_equal(path, &quot;/invalid-css.html&quot;)) {
-        static const char* invalidCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/invalid.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, invalidCSSHtml, strlen(invalidCSSHtml));
-    } else if (g_str_equal(path, &quot;/simple-style-css.html&quot;)) {
-        static const char* simpleStyleCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/simple-style.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, simpleStyleCSSHtml, strlen(simpleStyleCSSHtml));
-    } else if (g_str_equal(path, &quot;/style.css&quot;)) {
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kStyleCSS, strlen(kStyleCSS));
-        addCacheHTTPHeadersToResponse(message);
-        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/css&quot;);
-    } else if (g_str_equal(path, &quot;/javascript.js&quot;)) {
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kJavascript, strlen(kJavascript));
-        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/javascript&quot;);
-        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Disposition&quot;, &quot;filename=JavaScript.js&quot;);
-    } else if (g_str_equal(path, &quot;/relative-javascript.html&quot;)) {
-        static const char* javascriptRelativeHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='remove-this/javascript.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, javascriptRelativeHTML, strlen(javascriptRelativeHTML));
-    } else if (g_str_equal(path, &quot;/resource-to-cancel.html&quot;)) {
-        static const char* resourceToCancelHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='cancel-this.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, resourceToCancelHTML, strlen(resourceToCancelHTML));
-    } else if (g_str_equal(path, &quot;/blank.ico&quot;)) {
-        GOwnPtr&lt;char&gt; filePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), path, NULL));
-        char* contents;
-        gsize contentsLength;
-        g_file_get_contents(filePath.get(), &amp;contents, &amp;contentsLength, 0);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, contentsLength);
-        addCacheHTTPHeadersToResponse(message);
-        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;image/vnd.microsoft.icon&quot;);
-    } else if (g_str_equal(path, &quot;/simple-style.css&quot;)) {
-        static const char* simpleCSS =
-            &quot;body {&quot;
-            &quot;    margin: 0px;&quot;
-            &quot;    padding: 0px;&quot;
-            &quot;}&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, simpleCSS, strlen(simpleCSS));
-        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/css&quot;);
-    } else if (g_str_equal(path, &quot;/redirected.css&quot;)) {
-        soup_message_set_status(message, SOUP_STATUS_MOVED_PERMANENTLY);
-        soup_message_headers_append(message-&gt;response_headers, &quot;Location&quot;, &quot;/simple-style.css&quot;);
-    } else if (g_str_equal(path, &quot;/invalid.css&quot;))
-        soup_message_set_status(message, SOUP_STATUS_CANT_CONNECT);
-    else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
-
-    ResourcesTest::add(&quot;WebKitWebView&quot;, &quot;resources&quot;, testWebViewResources);
-    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;loading&quot;, testWebResourceLoading);
-    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;response&quot;, testWebResourceResponse);
-    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;mime-type&quot;, testWebResourceMimeType);
-    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;suggested-filename&quot;, testWebResourceSuggestedFilename);
-    ResourceURITrackingTest::add(&quot;WebKitWebResource&quot;, &quot;active-uri&quot;, testWebResourceActiveURI);
-    ResourcesTest::add(&quot;WebKitWebResource&quot;, &quot;get-data&quot;, testWebResourceGetData);
-    SingleResourceLoadTest::add(&quot;WebKitWebView&quot;, &quot;history-cache&quot;, testWebViewResourcesHistoryCache);
-    SendRequestTest::add(&quot;WebKitWebPage&quot;, &quot;send-request&quot;, testWebResourceSendRequest);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestSSLcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,201 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;LoadTrackingTest.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &lt;gtk/gtk.h&gt;
-
-static WebKitTestServer* kHttpsServer;
-static WebKitTestServer* kHttpServer;
-
-static const char* indexHTML = &quot;&lt;html&gt;&lt;body&gt;Testing WebKit2GTK+ SSL&lt;/body&gt;&lt;/htmll&gt;&quot;;
-static const char* insecureContentHTML = &quot;&lt;html&gt;&lt;script src=\&quot;%s\&quot;&gt;&lt;/script&gt;&lt;body&gt;&lt;p&gt;Text + image &lt;img src=\&quot;%s\&quot; align=\&quot;right\&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-class SSLTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SSLTest);
-
-    SSLTest()
-        : m_tlsErrors(static_cast&lt;GTlsCertificateFlags&gt;(0))
-    {
-    }
-
-    virtual void provisionalLoadFailed(const gchar* failingURI, GError* error)
-    {
-        g_assert_error(error, SOUP_HTTP_ERROR, SOUP_STATUS_SSL_FAILED);
-        LoadTrackingTest::provisionalLoadFailed(failingURI, error);
-    }
-
-    virtual void loadCommitted()
-    {
-        GTlsCertificate* certificate = 0;
-        webkit_web_view_get_tls_info(m_webView, &amp;certificate, &amp;m_tlsErrors);
-        m_certificate = certificate;
-        LoadTrackingTest::loadCommitted();
-    }
-
-    void waitUntilLoadFinished()
-    {
-        m_certificate = 0;
-        m_tlsErrors = static_cast&lt;GTlsCertificateFlags&gt;(0);
-        LoadTrackingTest::waitUntilLoadFinished();
-    }
-
-    GRefPtr&lt;GTlsCertificate&gt; m_certificate;
-    GTlsCertificateFlags m_tlsErrors;
-};
-
-static void testSSL(SSLTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_certificate);
-    // We always expect errors because we are using a self-signed certificate,
-    // but only G_TLS_CERTIFICATE_UNKNOWN_CA flags should be present.
-    g_assert(test-&gt;m_tlsErrors);
-    g_assert_cmpuint(test-&gt;m_tlsErrors, ==, G_TLS_CERTIFICATE_UNKNOWN_CA);
-
-    // Non HTTPS loads shouldn't have a certificate nor errors.
-    test-&gt;loadHtml(indexHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-    g_assert(!test-&gt;m_certificate);
-    g_assert(!test-&gt;m_tlsErrors);
-}
-
-class InsecureContentTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(InsecureContentTest);
-
-    InsecureContentTest()
-        : m_insecureContentRun(false)
-        , m_insecureContentDisplayed(false)
-    {
-        g_signal_connect(m_webView, &quot;insecure-content-detected&quot;, G_CALLBACK(insecureContentDetectedCallback), this);
-    }
-
-    static void insecureContentDetectedCallback(WebKitWebView* webView, WebKitInsecureContentEvent event, InsecureContentTest* test)
-    {
-        g_assert(webView == test-&gt;m_webView);
-
-        if (event == WEBKIT_INSECURE_CONTENT_RUN)
-            test-&gt;m_insecureContentRun = true;
-
-        if (event == WEBKIT_INSECURE_CONTENT_DISPLAYED)
-            test-&gt;m_insecureContentDisplayed = true;
-    }
-
-    bool m_insecureContentRun;
-    bool m_insecureContentDisplayed;
-};
-
-static void testInsecureContent(InsecureContentTest* test, gconstpointer)
-{
-    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/insecure-content/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(test-&gt;m_insecureContentRun);
-    g_assert(test-&gt;m_insecureContentDisplayed);
-}
-
-static void testTLSErrorsPolicy(SSLTest* test, gconstpointer)
-{
-    WebKitWebContext* context = webkit_web_view_get_context(test-&gt;m_webView);
-    // TLS errors are ignored by default.
-    g_assert(webkit_web_context_get_tls_errors_policy(context) == WEBKIT_TLS_ERRORS_POLICY_IGNORE);
-    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(!test-&gt;m_loadFailed);
-
-    webkit_web_context_set_tls_errors_policy(context, WEBKIT_TLS_ERRORS_POLICY_FAIL);
-    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_loadFailed);
-    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
-    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::LoadCommitted));
-}
-
-static void httpsServerCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/&quot;)) {
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, indexHTML, strlen(indexHTML));
-        soup_message_body_complete(message-&gt;response_body);
-    } else if (g_str_equal(path, &quot;/insecure-content/&quot;)) {
-        GOwnPtr&lt;char&gt; responseHTML(g_strdup_printf(insecureContentHTML, kHttpServer-&gt;getURIForPath(&quot;/test-script&quot;).data(), kHttpServer-&gt;getURIForPath(&quot;/test-image&quot;).data()));
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, responseHTML.get(), strlen(responseHTML.get()));
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_complete(message-&gt;response_body);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-}
-
-static void httpServerCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/test-script&quot;)) {
-        GOwnPtr&lt;char&gt; pathToFile(g_build_filename(Test::getResourcesDir().data(), &quot;link-title.js&quot;, NULL));
-        char* contents;
-        gsize length;
-        g_file_get_contents(pathToFile.get(), &amp;contents, &amp;length, 0);
-
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_complete(message-&gt;response_body);
-    } else if (g_str_equal(path, &quot;/test-image&quot;)) {
-        GOwnPtr&lt;char&gt; pathToFile(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;blank.ico&quot;, NULL));
-        char* contents;
-        gsize length;
-        g_file_get_contents(pathToFile.get(), &amp;contents, &amp;length, 0);
-
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_complete(message-&gt;response_body);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-}
-
-void beforeAll()
-{
-    kHttpsServer = new WebKitTestServer(WebKitTestServer::ServerHTTPS);
-    kHttpsServer-&gt;run(httpsServerCallback);
-
-    kHttpServer = new WebKitTestServer(WebKitTestServer::ServerHTTP);
-    kHttpServer-&gt;run(httpServerCallback);
-
-    SSLTest::add(&quot;WebKitWebView&quot;, &quot;ssl&quot;, testSSL);
-    InsecureContentTest::add(&quot;WebKitWebView&quot;, &quot;insecure-content&quot;, testInsecureContent);
-    SSLTest::add(&quot;WebKitWebContext&quot;, &quot;tls-errors-policy&quot;, testTLSErrorsPolicy);
-}
-
-void afterAll()
-{
-    delete kHttpsServer;
-    delete kHttpServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestUIClientcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,679 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-
-static const char* kAlertDialogMessage = &quot;WebKitGTK+ alert dialog message&quot;;
-static const char* kConfirmDialogMessage = &quot;WebKitGTK+ confirm dialog message&quot;;
-static const char* kPromptDialogMessage = &quot;WebKitGTK+ prompt dialog message&quot;;
-static const char* kPromptDialogReturnedText = &quot;WebKitGTK+ prompt dialog returned text&quot;;
-
-class UIClientTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(UIClientTest);
-
-    enum WebViewEvents {
-        Create,
-        ReadyToShow,
-        RunAsModal,
-        Close
-    };
-
-    class WindowProperties {
-    public:
-        WindowProperties()
-            : m_isNull(true)
-            , m_toolbarVisible(true)
-            , m_statusbarVisible(true)
-            , m_scrollbarsVisible(true)
-            , m_menubarVisible(true)
-            , m_locationbarVisible(true)
-            , m_resizable(true)
-            , m_fullscreen(false)
-        {
-            memset(&amp;m_geometry, 0, sizeof(GdkRectangle));
-        }
-
-        WindowProperties(WebKitWindowProperties* windowProperties)
-            : m_isNull(false)
-            , m_toolbarVisible(webkit_window_properties_get_toolbar_visible(windowProperties))
-            , m_statusbarVisible(webkit_window_properties_get_statusbar_visible(windowProperties))
-            , m_scrollbarsVisible(webkit_window_properties_get_scrollbars_visible(windowProperties))
-            , m_menubarVisible(webkit_window_properties_get_menubar_visible(windowProperties))
-            , m_locationbarVisible(webkit_window_properties_get_locationbar_visible(windowProperties))
-            , m_resizable(webkit_window_properties_get_resizable(windowProperties))
-            , m_fullscreen(webkit_window_properties_get_fullscreen(windowProperties))
-        {
-            webkit_window_properties_get_geometry(windowProperties, &amp;m_geometry);
-        }
-
-        WindowProperties(GdkRectangle* geometry, bool toolbarVisible, bool statusbarVisible, bool scrollbarsVisible, bool menubarVisible, bool locationbarVisible, bool resizable, bool fullscreen)
-            : m_isNull(false)
-            , m_geometry(*geometry)
-            , m_toolbarVisible(toolbarVisible)
-            , m_statusbarVisible(statusbarVisible)
-            , m_scrollbarsVisible(scrollbarsVisible)
-            , m_menubarVisible(menubarVisible)
-            , m_locationbarVisible(locationbarVisible)
-            , m_resizable(resizable)
-            , m_fullscreen(fullscreen)
-        {
-        }
-
-        bool isNull() const { return m_isNull; }
-
-        void assertEqual(const WindowProperties&amp; other) const
-        {
-            g_assert_cmpint(m_geometry.x, ==, other.m_geometry.x);
-            g_assert_cmpint(m_geometry.y, ==, other.m_geometry.y);
-            g_assert_cmpint(m_geometry.width, ==, other.m_geometry.width);
-            g_assert_cmpint(m_geometry.height, ==, other.m_geometry.height);
-            g_assert_cmpint(static_cast&lt;int&gt;(m_toolbarVisible), ==, static_cast&lt;int&gt;(other.m_toolbarVisible));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_statusbarVisible), ==, static_cast&lt;int&gt;(other.m_statusbarVisible));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_scrollbarsVisible), ==, static_cast&lt;int&gt;(other.m_scrollbarsVisible));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_menubarVisible), ==, static_cast&lt;int&gt;(other.m_menubarVisible));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_locationbarVisible), ==, static_cast&lt;int&gt;(other.m_locationbarVisible));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_resizable), ==, static_cast&lt;int&gt;(other.m_resizable));
-            g_assert_cmpint(static_cast&lt;int&gt;(m_fullscreen), ==, static_cast&lt;int&gt;(other.m_fullscreen));
-        }
-
-    private:
-        bool m_isNull;
-
-        GdkRectangle m_geometry;
-
-        bool m_toolbarVisible;
-        bool m_statusbarVisible;
-        bool m_scrollbarsVisible;
-        bool m_menubarVisible;
-        bool m_locationbarVisible;
-
-        bool m_resizable;
-        bool m_fullscreen;
-    };
-
-    static void windowPropertiesNotifyCallback(GObject*, GParamSpec* paramSpec, UIClientTest* test)
-    {
-        test-&gt;m_windowPropertiesChanged.add(g_param_spec_get_name(paramSpec));
-    }
-
-    static GtkWidget* viewCreateCallback(WebKitWebView* webView, UIClientTest* test)
-    {
-        return test-&gt;viewCreate(webView);
-    }
-
-    static void viewReadyToShowCallback(WebKitWebView* webView, UIClientTest* test)
-    {
-        test-&gt;viewReadyToShow(webView);
-    }
-
-    static void viewCloseCallback(WebKitWebView* webView, UIClientTest* test)
-    {
-        test-&gt;viewClose(webView);
-    }
-
-    void scriptAlert(WebKitScriptDialog* dialog)
-    {
-        switch (m_scriptDialogType) {
-        case WEBKIT_SCRIPT_DIALOG_ALERT:
-            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kAlertDialogMessage);
-            break;
-        case WEBKIT_SCRIPT_DIALOG_CONFIRM:
-            g_assert(m_scriptDialogConfirmed);
-            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, &quot;confirmed&quot;);
-
-            break;
-        case WEBKIT_SCRIPT_DIALOG_PROMPT:
-            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kPromptDialogReturnedText);
-            break;
-        }
-
-        g_main_loop_quit(m_mainLoop);
-    }
-
-    void scriptConfirm(WebKitScriptDialog* dialog)
-    {
-        g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kConfirmDialogMessage);
-        m_scriptDialogConfirmed = !m_scriptDialogConfirmed;
-        webkit_script_dialog_confirm_set_confirmed(dialog, m_scriptDialogConfirmed);
-    }
-
-    void scriptPrompt(WebKitScriptDialog* dialog)
-    {
-        g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kPromptDialogMessage);
-        g_assert_cmpstr(webkit_script_dialog_prompt_get_default_text(dialog), ==, &quot;default&quot;);
-        webkit_script_dialog_prompt_set_text(dialog, kPromptDialogReturnedText);
-    }
-
-    static gboolean scriptDialog(WebKitWebView*, WebKitScriptDialog* dialog, UIClientTest* test)
-    {
-        switch (webkit_script_dialog_get_dialog_type(dialog)) {
-        case WEBKIT_SCRIPT_DIALOG_ALERT:
-            test-&gt;scriptAlert(dialog);
-            break;
-        case WEBKIT_SCRIPT_DIALOG_CONFIRM:
-            test-&gt;scriptConfirm(dialog);
-            break;
-        case WEBKIT_SCRIPT_DIALOG_PROMPT:
-            test-&gt;scriptPrompt(dialog);
-            break;
-        }
-
-        return TRUE;
-    }
-
-    static void mouseTargetChanged(WebKitWebView*, WebKitHitTestResult* hitTestResult, guint modifiers, UIClientTest* test)
-    {
-        g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(hitTestResult));
-
-        test-&gt;m_mouseTargetHitTestResult = hitTestResult;
-        test-&gt;m_mouseTargetModifiers = modifiers;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    static gboolean permissionRequested(WebKitWebView*, WebKitPermissionRequest* request, UIClientTest* test)
-    {
-        g_assert(WEBKIT_IS_PERMISSION_REQUEST(request));
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-
-        if (test-&gt;m_allowPermissionRequests)
-            webkit_permission_request_allow(request);
-        else
-            webkit_permission_request_deny(request);
-
-        return TRUE;
-    }
-
-    UIClientTest()
-        : m_scriptDialogType(WEBKIT_SCRIPT_DIALOG_ALERT)
-        , m_scriptDialogConfirmed(true)
-        , m_allowPermissionRequests(false)
-        , m_mouseTargetModifiers(0)
-    {
-        webkit_settings_set_javascript_can_open_windows_automatically(webkit_web_view_get_settings(m_webView), TRUE);
-        g_signal_connect(m_webView, &quot;create&quot;, G_CALLBACK(viewCreateCallback), this);
-        g_signal_connect(m_webView, &quot;script-dialog&quot;, G_CALLBACK(scriptDialog), this);
-        g_signal_connect(m_webView, &quot;mouse-target-changed&quot;, G_CALLBACK(mouseTargetChanged), this);
-        g_signal_connect(m_webView, &quot;permission-request&quot;, G_CALLBACK(permissionRequested), this);
-    }
-
-    ~UIClientTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void waitUntilMainLoopFinishes()
-    {
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void setExpectedWindowProperties(const WindowProperties&amp; windowProperties)
-    {
-        m_windowProperties = windowProperties;
-    }
-
-    WebKitHitTestResult* moveMouseAndWaitUntilMouseTargetChanged(int x, int y, unsigned mouseModifiers = 0)
-    {
-        mouseMoveTo(x, y, mouseModifiers);
-        g_main_loop_run(m_mainLoop);
-        return m_mouseTargetHitTestResult.get();
-    }
-
-    virtual GtkWidget* viewCreate(WebKitWebView* webView)
-    {
-        g_assert(webView == m_webView);
-
-        GtkWidget* newWebView = webkit_web_view_new_with_context(webkit_web_view_get_context(webView));
-        g_object_ref_sink(newWebView);
-
-        m_webViewEvents.append(Create);
-
-        WebKitWindowProperties* windowProperties = webkit_web_view_get_window_properties(WEBKIT_WEB_VIEW(newWebView));
-        g_assert(windowProperties);
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(windowProperties));
-        m_windowPropertiesChanged.clear();
-
-        g_signal_connect(windowProperties, &quot;notify&quot;, G_CALLBACK(windowPropertiesNotifyCallback), this);
-        g_signal_connect(newWebView, &quot;ready-to-show&quot;, G_CALLBACK(viewReadyToShowCallback), this);
-        g_signal_connect(newWebView, &quot;close&quot;, G_CALLBACK(viewCloseCallback), this);
-
-        return newWebView;
-    }
-
-    virtual void viewReadyToShow(WebKitWebView* webView)
-    {
-        g_assert(webView != m_webView);
-
-        WebKitWindowProperties* windowProperties = webkit_web_view_get_window_properties(webView);
-        g_assert(windowProperties);
-        if (!m_windowProperties.isNull())
-            WindowProperties(windowProperties).assertEqual(m_windowProperties);
-
-        m_webViewEvents.append(ReadyToShow);
-    }
-
-    virtual void viewClose(WebKitWebView* webView)
-    {
-        g_assert(webView != m_webView);
-
-        m_webViewEvents.append(Close);
-        g_object_unref(webView);
-
-        g_main_loop_quit(m_mainLoop);
-    }
-
-    Vector&lt;WebViewEvents&gt; m_webViewEvents;
-    WebKitScriptDialogType m_scriptDialogType;
-    bool m_scriptDialogConfirmed;
-    bool m_allowPermissionRequests;
-    WindowProperties m_windowProperties;
-    HashSet&lt;WTF::String&gt; m_windowPropertiesChanged;
-    GRefPtr&lt;WebKitHitTestResult&gt; m_mouseTargetHitTestResult;
-    unsigned m_mouseTargetModifiers;
-};
-
-static void testWebViewCreateReadyClose(UIClientTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onLoad=\&quot;window.open().close();\&quot;&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilMainLoopFinishes();
-
-    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, UIClientTest::Create);
-    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
-    g_assert_cmpint(events[2], ==, UIClientTest::Close);
-}
-
-static gboolean checkMimeTypeForFilter(GtkFileFilter* filter, const gchar* mimeType)
-{
-    GtkFileFilterInfo filterInfo;
-    filterInfo.contains = GTK_FILE_FILTER_MIME_TYPE;
-    filterInfo.mime_type = mimeType;
-    return gtk_file_filter_filter(filter, &amp;filterInfo);
-}
-
-class ModalDialogsTest: public UIClientTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(ModalDialogsTest);
-
-    static void dialogRunAsModalCallback(WebKitWebView* webView, ModalDialogsTest* test)
-    {
-        g_assert(webView != test-&gt;m_webView);
-        test-&gt;m_webViewEvents.append(RunAsModal);
-    }
-
-    GtkWidget* viewCreate(WebKitWebView* webView)
-    {
-        g_assert(webView == m_webView);
-
-        GtkWidget* newWebView = UIClientTest::viewCreate(webView);
-        g_signal_connect(newWebView, &quot;run-as-modal&quot;, G_CALLBACK(dialogRunAsModalCallback), this);
-        return newWebView;
-    }
-
-    void viewReadyToShow(WebKitWebView* webView)
-    {
-        g_assert(webView != m_webView);
-        m_webViewEvents.append(ReadyToShow);
-    }
-};
-
-static void testWebViewAllowModalDialogs(ModalDialogsTest* test, gconstpointer)
-{
-    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
-    webkit_settings_set_allow_modal_dialogs(settings, TRUE);
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onload=\&quot;window.showModalDialog('data:text/html,&lt;html&gt;&lt;body/&gt;&lt;script&gt;window.close();&lt;/script&gt;&lt;/html&gt;')\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilMainLoopFinishes();
-
-    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
-    g_assert_cmpint(events.size(), ==, 4);
-    g_assert_cmpint(events[0], ==, UIClientTest::Create);
-    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
-    g_assert_cmpint(events[2], ==, UIClientTest::RunAsModal);
-    g_assert_cmpint(events[3], ==, UIClientTest::Close);
-}
-
-static void testWebViewDisallowModalDialogs(ModalDialogsTest* test, gconstpointer)
-{
-    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
-    webkit_settings_set_allow_modal_dialogs(settings, FALSE);
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onload=\&quot;window.showModalDialog('data:text/html,&lt;html&gt;&lt;body/&gt;&lt;script&gt;window.close();&lt;/script&gt;&lt;/html&gt;')\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    // We need to use a timeout here because the viewClose() function
-    // won't ever be called as the dialog won't be created.
-    test-&gt;wait(1);
-
-    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
-    g_assert_cmpint(events.size(), ==, 0);
-}
-
-static void testWebViewJavaScriptDialogs(UIClientTest* test, gconstpointer)
-{
-    static const char* htmlOnLoadFormat = &quot;&lt;html&gt;&lt;body onLoad=\&quot;%s\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    static const char* jsAlertFormat = &quot;alert('%s')&quot;;
-    static const char* jsConfirmFormat = &quot;do { confirmed = confirm('%s'); } while (!confirmed); alert('confirmed');&quot;;
-    static const char* jsPromptFormat = &quot;alert(prompt('%s', 'default'));&quot;;
-
-    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_ALERT;
-    GOwnPtr&lt;char&gt; alertDialogMessage(g_strdup_printf(jsAlertFormat, kAlertDialogMessage));
-    GOwnPtr&lt;char&gt; alertHTML(g_strdup_printf(htmlOnLoadFormat, alertDialogMessage.get()));
-    test-&gt;loadHtml(alertHTML.get(), 0);
-    test-&gt;waitUntilMainLoopFinishes();
-
-    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_CONFIRM;
-    GOwnPtr&lt;char&gt; confirmDialogMessage(g_strdup_printf(jsConfirmFormat, kConfirmDialogMessage));
-    GOwnPtr&lt;char&gt; confirmHTML(g_strdup_printf(htmlOnLoadFormat, confirmDialogMessage.get()));
-    test-&gt;loadHtml(confirmHTML.get(), 0);
-    test-&gt;waitUntilMainLoopFinishes();
-
-    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_PROMPT;
-    GOwnPtr&lt;char&gt; promptDialogMessage(g_strdup_printf(jsPromptFormat, kPromptDialogMessage));
-    GOwnPtr&lt;char&gt; promptHTML(g_strdup_printf(htmlOnLoadFormat, promptDialogMessage.get()));
-    test-&gt;loadHtml(promptHTML.get(), 0);
-    test-&gt;waitUntilMainLoopFinishes();
-}
-
-static void testWebViewWindowProperties(UIClientTest* test, gconstpointer)
-{
-    static const char* windowProrpertiesString = &quot;left=100,top=150,width=400,height=400,location=no,menubar=no,status=no,toolbar=no,scrollbars=no&quot;;
-    GdkRectangle geometry = { 100, 150, 400, 400 };
-    test-&gt;setExpectedWindowProperties(UIClientTest::WindowProperties(&amp;geometry, false, false, false, false, false, true, false));
-
-    GOwnPtr&lt;char&gt; htmlString(g_strdup_printf(&quot;&lt;html&gt;&lt;body onLoad=\&quot;window.open('', '', '%s').close();\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, windowProrpertiesString));
-    test-&gt;loadHtml(htmlString.get(), 0);
-    test-&gt;waitUntilMainLoopFinishes();
-
-    static const char* propertiesChanged[] = {
-        &quot;geometry&quot;, &quot;locationbar-visible&quot;, &quot;menubar-visible&quot;, &quot;statusbar-visible&quot;, &quot;toolbar-visible&quot;, &quot;scrollbars-visible&quot;
-    };
-    for (size_t i = 0; i &lt; G_N_ELEMENTS(propertiesChanged); ++i)
-        g_assert(test-&gt;m_windowPropertiesChanged.contains(propertiesChanged[i]));
-
-    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
-    g_assert_cmpint(events.size(), ==, 3);
-    g_assert_cmpint(events[0], ==, UIClientTest::Create);
-    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
-    g_assert_cmpint(events[2], ==, UIClientTest::Close);
-}
-
-static void testWebViewMouseTarget(UIClientTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
-
-    const char* linksHoveredHTML =
-        &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot; &lt;a style='position:absolute; left:1; top:1' href='http://www.webkitgtk.org' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&quot;
-        &quot; &lt;img style='position:absolute; left:1; top:10' src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&quot;
-        &quot; &lt;a style='position:absolute; left:1; top:20' href='http://www.webkitgtk.org/logo' title='WebKitGTK+ Logo'&gt;&lt;img src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&lt;/a&gt;&quot;
-        &quot; &lt;input style='position:absolute; left:1; top:30' size='10'&gt;&lt;/input&gt;&quot;
-        &quot; &lt;div style='position:absolute; left:1; top:50; width:30; height:30; overflow:scroll'&gt;&amp;nbsp;&lt;/div&gt;&quot;
-        &quot; &lt;video style='position:absolute; left:1; top:100' width='300' height='300' controls='controls' preload='none'&gt;&lt;source src='movie.ogg' type='video/ogg' /&gt;&lt;/video&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    test-&gt;loadHtml(linksHoveredHTML, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    // Move over link.
-    WebKitHitTestResult* hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 1);
-    g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert_cmpstr(webkit_hit_test_result_get_link_uri(hitTestResult), ==, &quot;http://www.webkitgtk.org/&quot;);
-    g_assert_cmpstr(webkit_hit_test_result_get_link_title(hitTestResult), ==, &quot;WebKitGTK+ Title&quot;);
-    g_assert_cmpstr(webkit_hit_test_result_get_link_label(hitTestResult), ==, &quot;WebKitGTK+ Website&quot;);
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-
-    // Move out of the link.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(0, 0);
-    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-
-    // Move over image with GDK_CONTROL_MASK.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 10, GDK_CONTROL_MASK);
-    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
-    g_assert_cmpstr(webkit_hit_test_result_get_image_uri(hitTestResult), ==, &quot;file:///0xdeadbeef&quot;);
-    g_assert(test-&gt;m_mouseTargetModifiers &amp; GDK_CONTROL_MASK);
-
-    // Move over image link.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 20);
-    g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
-    g_assert_cmpstr(webkit_hit_test_result_get_link_uri(hitTestResult), ==, &quot;http://www.webkitgtk.org/logo&quot;);
-    g_assert_cmpstr(webkit_hit_test_result_get_image_uri(hitTestResult), ==, &quot;file:///0xdeadbeef&quot;);
-    g_assert_cmpstr(webkit_hit_test_result_get_link_title(hitTestResult), ==, &quot;WebKitGTK+ Logo&quot;);
-    g_assert(!webkit_hit_test_result_get_link_label(hitTestResult));
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-
-    // Move over media.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 100);
-    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
-    g_assert_cmpstr(webkit_hit_test_result_get_media_uri(hitTestResult), ==, &quot;file:///movie.ogg&quot;);
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-
-    // Mover over input.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(5, 35);
-    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
-    g_assert(webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-
-    // Move over scrollbar.
-    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(5, 75);
-    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
-    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
-    g_assert(webkit_hit_test_result_context_is_scrollbar(hitTestResult));
-    g_assert(!test-&gt;m_mouseTargetModifiers);
-}
-
-static void testWebViewPermissionRequests(UIClientTest* test, gconstpointer)
-{
-    // Some versions of geoclue give a runtime warning because it tries
-    // to register the error quark twice. See https://bugs.webkit.org/show_bug.cgi?id=89858.
-    // Make warnings non-fatal for this test to make it pass.
-    test-&gt;removeLogFatalFlag(G_LOG_LEVEL_WARNING);
-    test-&gt;showInWindowAndWaitUntilMapped();
-    static const char* geolocationRequestHTML =
-        &quot;&lt;html&gt;&quot;
-        &quot;  &lt;script&gt;&quot;
-        &quot;  function runTest()&quot;
-        &quot;  {&quot;
-        &quot;    navigator.geolocation.getCurrentPosition(function(p) { document.title = \&quot;OK\&quot; },&quot;
-        &quot;                                             function(e) { document.title = e.code });&quot;
-        &quot;  }&quot;
-        &quot;  &lt;/script&gt;&quot;
-        &quot;  &lt;body onload='runTest();'&gt;&lt;/body&gt;&quot;
-        &quot;&lt;/html&gt;&quot;;
-
-    // Test denying a permission request.
-    test-&gt;m_allowPermissionRequests = false;
-    test-&gt;loadHtml(geolocationRequestHTML, 0);
-    test-&gt;waitUntilTitleChanged();
-
-    // According to the Geolocation API specification, '1' is the
-    // error code returned for the PERMISSION_DENIED error.
-    // http://dev.w3.org/geo/api/spec-source.html#position_error_interface
-    const gchar* result = webkit_web_view_get_title(test-&gt;m_webView);
-    g_assert_cmpstr(result, ==, &quot;1&quot;);
-
-    // Test allowing a permission request.
-    test-&gt;m_allowPermissionRequests = true;
-    test-&gt;loadHtml(geolocationRequestHTML, 0);
-    test-&gt;waitUntilTitleChanged();
-
-    // Check that we did not get the PERMISSION_DENIED error now.
-    result = webkit_web_view_get_title(test-&gt;m_webView);
-    g_assert_cmpstr(result, !=, &quot;1&quot;);
-    test-&gt;addLogFatalFlag(G_LOG_LEVEL_WARNING);
-}
-
-class FileChooserTest: public UIClientTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FileChooserTest);
-
-    FileChooserTest()
-    {
-        g_signal_connect(m_webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCallback), this);
-    }
-
-    static gboolean runFileChooserCallback(WebKitWebView*, WebKitFileChooserRequest* request, FileChooserTest* test)
-    {
-        test-&gt;runFileChooser(request);
-        return TRUE;
-    }
-
-    void runFileChooser(WebKitFileChooserRequest* request)
-    {
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-        m_fileChooserRequest = request;
-        g_main_loop_quit(m_mainLoop);
-    }
-
-    WebKitFileChooserRequest* clickMouseButtonAndWaitForFileChooserRequest(int x, int y)
-    {
-        clickMouseButton(x, y);
-        g_main_loop_run(m_mainLoop);
-        return m_fileChooserRequest.get();
-    }
-
-private:
-    GRefPtr&lt;WebKitFileChooserRequest&gt; m_fileChooserRequest;
-};
-
-static void testWebViewFileChooserRequest(FileChooserTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-    static const char* fileChooserHTMLFormat = &quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute;left:0;top:0;margin:0;padding:0' type='file' %s/&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    // Multiple selections not allowed, no MIME filtering.
-    GOwnPtr&lt;char&gt; simpleFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;&quot;));
-    test-&gt;loadHtml(simpleFileUploadHTML.get(), 0);
-    test-&gt;waitUntilLoadFinished();
-    WebKitFileChooserRequest* fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
-    g_assert(!webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
-
-    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
-    g_assert(!mimeTypes);
-    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
-    g_assert(!filter);
-    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
-    g_assert(!selectedFiles);
-    webkit_file_chooser_request_cancel(fileChooserRequest);
-
-    // Multiple selections allowed, no MIME filtering, some pre-selected files.
-    GOwnPtr&lt;char&gt; multipleSelectionFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;multiple&quot;));
-    test-&gt;loadHtml(multipleSelectionFileUploadHTML.get(), 0);
-    test-&gt;waitUntilLoadFinished();
-    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
-    g_assert(webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
-
-    mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
-    g_assert(!mimeTypes);
-    filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
-    g_assert(!filter);
-    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
-    g_assert(!selectedFiles);
-
-    // Select some files.
-    const gchar* filesToSelect[4] = { &quot;/foo&quot;, &quot;/foo/bar&quot;, &quot;/foo/bar/baz&quot;, 0 };
-    webkit_file_chooser_request_select_files(fileChooserRequest, filesToSelect);
-
-    // Check the files that have been just selected.
-    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
-    g_assert(selectedFiles);
-    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
-    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
-    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
-    g_assert(!selectedFiles[3]);
-
-    // Perform another request to check if the list of files selected
-    // in the previous step appears now as part of the new request.
-    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
-    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
-    g_assert(selectedFiles);
-    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
-    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
-    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
-    g_assert(!selectedFiles[3]);
-    webkit_file_chooser_request_cancel(fileChooserRequest);
-
-    // Multiple selections not allowed, only accept images, audio and video files..
-    GOwnPtr&lt;char&gt; mimeFilteredFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;accept='audio/*,video/*,image/*'&quot;));
-    test-&gt;loadHtml(mimeFilteredFileUploadHTML.get(), 0);
-    test-&gt;waitUntilLoadFinished();
-    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
-    g_assert(!webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
-
-    mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
-    g_assert(mimeTypes);
-    g_assert_cmpstr(mimeTypes[0], ==, &quot;audio/*&quot;);
-    g_assert_cmpstr(mimeTypes[1], ==, &quot;video/*&quot;);
-    g_assert_cmpstr(mimeTypes[2], ==, &quot;image/*&quot;);
-    g_assert(!mimeTypes[3]);
-
-    filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
-    g_assert(GTK_IS_FILE_FILTER(filter));
-    g_assert(checkMimeTypeForFilter(filter, &quot;audio/*&quot;));
-    g_assert(checkMimeTypeForFilter(filter, &quot;video/*&quot;));
-    g_assert(checkMimeTypeForFilter(filter, &quot;image/*&quot;));
-
-    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
-    g_assert(!selectedFiles);
-    webkit_file_chooser_request_cancel(fileChooserRequest);
-}
-
-void beforeAll()
-{
-    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;create-ready-close&quot;, testWebViewCreateReadyClose);
-    ModalDialogsTest::add(&quot;WebKitWebView&quot;, &quot;allow-modal-dialogs&quot;, testWebViewAllowModalDialogs);
-    ModalDialogsTest::add(&quot;WebKitWebView&quot;, &quot;disallow-modal-dialogs&quot;, testWebViewDisallowModalDialogs);
-    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;javascript-dialogs&quot;, testWebViewJavaScriptDialogs);
-    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;window-properties&quot;, testWebViewWindowProperties);
-    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;mouse-target&quot;, testWebViewMouseTarget);
-    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;permission-requests&quot;, testWebViewPermissionRequests);
-    FileChooserTest::add(&quot;WebKitWebView&quot;, &quot;file-chooser-request&quot;, testWebViewFileChooserRequest);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebExtensionscpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,195 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestBus.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static WebKitTestBus* bus;
-
-static void testWebExtensionGetTitle(WebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;WebKitGTK+ Web Extensions Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot; , &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
-    GRefPtr&lt;GVariant&gt; result = adoptGRef(g_dbus_proxy_call_sync(
-        proxy.get(),
-        &quot;GetTitle&quot;,
-        g_variant_new(&quot;(t)&quot;, webkit_web_view_get_page_id(test-&gt;m_webView)),
-        G_DBUS_CALL_FLAGS_NONE,
-        -1, 0, 0));
-    g_assert(result);
-
-    const char* title;
-    g_variant_get(result.get(), &quot;(&amp;s)&quot;, &amp;title);
-    g_assert_cmpstr(title, ==, &quot;WebKitGTK+ Web Extensions Test&quot;);
-}
-
-static void documentLoadedCallback(GDBusConnection*, const char*, const char*, const char*, const char*, GVariant*, WebViewTest* test)
-{
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-static void testDocumentLoadedSignal(WebViewTest* test, gconstpointer)
-{
-    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
-    GDBusConnection* connection = g_dbus_proxy_get_connection(proxy.get());
-    guint id = g_dbus_connection_signal_subscribe(connection,
-        0,
-        &quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;DocumentLoaded&quot;,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
-        0,
-        G_DBUS_SIGNAL_FLAGS_NONE,
-        reinterpret_cast&lt;GDBusSignalCallback&gt;(documentLoadedCallback),
-        test,
-        0);
-    g_assert(id);
-
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;WebKitGTK+ Web Extensions Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    g_main_loop_run(test-&gt;m_mainLoop);
-    g_dbus_connection_signal_unsubscribe(connection, id);
-}
-
-static gboolean webProcessCrashedCallback(WebKitWebView*, WebViewTest* test)
-{
-    test-&gt;quitMainLoop();
-
-    return FALSE;
-}
-
-static void testWebKitWebViewProcessCrashed(WebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    g_signal_connect(test-&gt;m_webView, &quot;web-process-crashed&quot;,
-        G_CALLBACK(webProcessCrashedCallback), test);
-
-    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
-
-    GRefPtr&lt;GVariant&gt; result = adoptGRef(g_dbus_proxy_call_sync(
-        proxy.get(),
-        &quot;AbortProcess&quot;,
-        0,
-        G_DBUS_CALL_FLAGS_NONE,
-        -1, 0, 0));
-    g_assert(!result);
-    g_main_loop_run(test-&gt;m_mainLoop);
-}
-
-static void testWebExtensionWindowObjectCleared(WebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;header&gt;&lt;/header&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GOwnPtr&lt;GError&gt; error;
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.echo('Foo');&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;Foo&quot;);
-}
-
-static gboolean scriptDialogCallback(WebKitWebView*, WebKitScriptDialog* dialog, char** result)
-{
-    g_assert_cmpuint(webkit_script_dialog_get_dialog_type(dialog), ==, WEBKIT_SCRIPT_DIALOG_ALERT);
-    g_assert(!*result);
-    *result = g_strdup(webkit_script_dialog_get_message(dialog));
-    return TRUE;
-}
-
-static void runJavaScriptInIsolatedWorldFinishedCallback(GDBusProxy* proxy, GAsyncResult* result, WebViewTest* test)
-{
-    g_dbus_proxy_call_finish(proxy, result, 0);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-static void testWebExtensionIsolatedWorld(WebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;header&gt;&lt;/header&gt;&lt;body&gt;&lt;div id='console'&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GOwnPtr&lt;char&gt; result;
-    gulong scriptDialogID = g_signal_connect(test-&gt;m_webView, &quot;script-dialog&quot;, G_CALLBACK(scriptDialogCallback), &amp;result.outPtr());
-
-    static const char *mainWorldScript =
-        &quot;top.foo = 'Foo';\n&quot;
-        &quot;document.getElementById('console').innerHTML = top.foo;\n&quot;
-        &quot;window.open = function () { alert('Main World'); }\n&quot;
-        &quot;document.open(1, 2, 3);&quot;;
-    test-&gt;runJavaScriptAndWaitUntilFinished(mainWorldScript, 0);
-    g_assert_cmpstr(result.get(), ==, &quot;Main World&quot;);
-    result.clear();
-
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.getElementById('console').innerHTML&quot;, 0);
-    g_assert(javascriptResult);
-    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;Foo&quot;);
-
-    static const char *isolatedWorldScript =
-        &quot;document.getElementById('console').innerHTML = top.foo;\n&quot;
-        &quot;window.open = function () { alert('Isolated World'); }\n&quot;
-        &quot;document.open(1, 2, 3);&quot;;
-    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot; , &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
-    g_dbus_proxy_call(proxy.get(),
-        &quot;RunJavaScriptInIsolatedWorld&quot;,
-        g_variant_new(&quot;(t&amp;s)&quot;, webkit_web_view_get_page_id(test-&gt;m_webView), isolatedWorldScript),
-        G_DBUS_CALL_FLAGS_NONE,
-        -1, 0,
-        reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptInIsolatedWorldFinishedCallback),
-        test);
-    g_main_loop_run(test-&gt;m_mainLoop);
-    g_assert_cmpstr(result.get(), ==, &quot;Isolated World&quot;);
-    result.clear();
-
-    // Check that 'top.foo' defined in main world is not visible in isolated world.
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.getElementById('console').innerHTML&quot;, 0);
-    g_assert(javascriptResult);
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;undefined&quot;);
-
-    g_signal_handler_disconnect(test-&gt;m_webView, scriptDialogID);
-}
-
-void beforeAll()
-{
-    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
-    bus = new WebKitTestBus();
-    if (!bus-&gt;run())
-        return;
-
-    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;dom-document-title&quot;, testWebExtensionGetTitle);
-    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;document-loaded-signal&quot;, testDocumentLoadedSignal);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;web-process-crashed&quot;, testWebKitWebViewProcessCrashed);
-    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;window-object-cleared&quot;, testWebExtensionWindowObjectCleared);
-    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;isolated-world&quot;, testWebExtensionIsolatedWorld);
-}
-
-void afterAll()
-{
-    delete bus;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitAccessibilitycpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,225 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;TestMain.h&quot;
-#include &quot;WebViewTest.h&quot;
-
-// The libatspi headers don't use G_BEGIN_DECLS
-extern &quot;C&quot; {
-#include &lt;atspi/atspi.h&gt;
-}
-
-#include &lt;errno.h&gt;
-#include &lt;fcntl.h&gt;
-#include &lt;glib.h&gt;
-#include &lt;signal.h&gt;
-#include &lt;unistd.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-// Name of the test server application creating the webView object.
-static const char* kTestServerAppName = &quot;AccessibilityTestServer&quot;;
-
-// Max seconds to wait for the test server before inspecting it.
-static const int kMaxWaitForChild = 5;
-
-// The PID for the test server running, so we can kill it if needed.
-static GPid kChildProcessPid = 0;
-
-// Whether the child has replied and it's ready.
-static bool kChildIsReady = false;
-
-static void stopTestServer()
-{
-    // Do nothing if there's no server running.
-    if (!kChildProcessPid)
-        return;
-
-    g_spawn_close_pid(kChildProcessPid);
-    kill(kChildProcessPid, SIGTERM);
-    kChildProcessPid = 0;
-}
-
-static void sigAbortHandler(int sigNum)
-{
-    // Just stop the test server if SIGABRT was received.
-    stopTestServer();
-}
-
-static gpointer testServerMonitorThreadFunc(gpointer)
-{
-    // Wait for the specified timeout to happen.
-    g_usleep(kMaxWaitForChild * G_USEC_PER_SEC);
-
-    // Kill the child process if not ready yet.
-    if (!kChildIsReady)
-        stopTestServer();
-
-    g_thread_exit(0);
-    return 0;
-}
-
-static void startTestServerMonitor()
-{
-    kChildIsReady = false;
-    g_thread_new(&quot;TestServerMonitor&quot;, testServerMonitorThreadFunc, 0);
-}
-
-static void startTestServer()
-{
-    // Prepare argv[] for spawning the server process.
-    GOwnPtr&lt;char&gt; testServerPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;WebKit2APITests&quot;, kTestServerAppName, NULL));
-
-    char* testServerArgv[2];
-    testServerArgv[0] = testServerPath.get();
-    testServerArgv[1] = 0;
-
-    // Spawn the server, getting its stdout file descriptor to set a
-    // communication channel, so we know when it's ready.
-    int childStdout = 0;
-    if (!g_spawn_async_with_pipes(0, testServerArgv, 0, static_cast&lt;GSpawnFlags&gt;(0), 0, 0,
-                                  &amp;kChildProcessPid, 0, &amp;childStdout, 0, 0)) {
-        close(childStdout);
-        return;
-    }
-
-    // Start monitoring the test server (in a separate thread) to
-    // ensure we don't block on the child process more than a timeout.
-    startTestServerMonitor();
-
-    char msg[2];
-    GIOChannel* ioChannel = g_io_channel_unix_new(childStdout);
-    if (g_io_channel_read_chars(ioChannel, msg, 2, 0, 0) == G_IO_STATUS_NORMAL) {
-        // Check whether the server sent a message saying it's ready
-        // and store the result globally, so the monitor can see it.
-        kChildIsReady = msg[0] == 'O' &amp;&amp; msg[1] == 'K';
-    }
-    g_io_channel_unref(ioChannel);
-    close(childStdout);
-
-    // The timeout was reached and the server is not ready yet, so
-    // stop it inmediately, and let the unit tests fail.
-    if (!kChildIsReady)
-        stopTestServer();
-}
-
-static void checkAtspiAccessible(AtspiAccessible* accessible, const char* targetName, AtspiRole targetRole)
-{
-    g_assert(ATSPI_IS_ACCESSIBLE(accessible));
-
-    GOwnPtr&lt;char&gt; name(atspi_accessible_get_name(accessible, 0));
-    g_assert_cmpstr(targetName, ==, name.get());
-    g_assert_cmpint(targetRole, ==, atspi_accessible_get_role(accessible, 0));
-}
-
-static GRefPtr&lt;AtspiAccessible&gt; findTestServerApplication()
-{
-    // Only one desktop is supported by ATSPI at the moment.
-    GRefPtr&lt;AtspiAccessible&gt; desktop = adoptGRef(atspi_get_desktop(0));
-
-    // Look for the server application in the list of apps.
-    GRefPtr&lt;AtspiAccessible&gt; current;
-    int childCount = atspi_accessible_get_child_count(desktop.get(), 0);
-    for (int i = 0; i &lt; childCount; i++) {
-        current = adoptGRef(atspi_accessible_get_child_at_index(desktop.get(), i, 0));
-        if (!g_strcmp0(atspi_accessible_get_name(current.get(), 0), kTestServerAppName))
-            return current;
-    }
-
-    return 0;
-}
-
-static void testAtspiBasicHierarchy(WebViewTest* test, gconstpointer)
-{
-    // The test server's accessibility object (UI Process).
-    GRefPtr&lt;AtspiAccessible&gt; testServerApp = findTestServerApplication();
-    g_assert(ATSPI_IS_ACCESSIBLE(testServerApp.get()));
-    checkAtspiAccessible(testServerApp.get(), &quot;AccessibilityTestServer&quot;, ATSPI_ROLE_APPLICATION);
-
-    // The main window's accessibility object (UI Process).
-    GRefPtr&lt;AtspiAccessible&gt; currentParent = testServerApp;
-    GRefPtr&lt;AtspiAccessible&gt; currentChild = adoptGRef(atspi_accessible_get_child_at_index(currentParent.get(), 0, 0));
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FRAME);
-
-    // The WebView's accessibility object (UI Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FILLER);
-
-    // The WebPage's accessibility object (Web Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FILLER);
-
-    // HTML root element's accessible element (Web Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-
-    // HTML body's accessible element (Web Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_DOCUMENT_WEB);
-
-    // HTML H1's accessible element (Web Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;This is a test&quot;, ATSPI_ROLE_HEADING);
-
-    // HTML first paragraph's accessible element (Web Process).
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 1, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_PARAGRAPH);
-
-    // HTML second paragraph's accessible element (Web Process).
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 2, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_PARAGRAPH);
-
-    // HTML link's accessible element (Web Process).
-    currentParent = currentChild;
-    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
-    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
-    checkAtspiAccessible(currentChild.get(), &quot;a link&quot;, ATSPI_ROLE_LINK);
-}
-
-void beforeAll()
-{
-    // We install a handler to ensure that we kill the child process
-    // if the parent dies because of whatever the reason is.
-    signal(SIGABRT, sigAbortHandler);
-
-    // Start the accessibility test server and load the tests.
-    startTestServer();
-    WebViewTest::add(&quot;WebKitAccessibility&quot;, &quot;atspi-basic-hierarchy&quot;, testAtspiBasicHierarchy);
-}
-
-void afterAll()
-{
-    // Ensure we stop the server.
-    stopTestServer();
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFaviconDatabasecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,274 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;libsoup/soup.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-static WebKitTestServer* kServer;
-static char* kTempDirectory;
-
-class FaviconDatabaseTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FaviconDatabaseTest);
-
-    FaviconDatabaseTest()
-        : m_webContext(webkit_web_context_get_default())
-        , m_favicon(0)
-        , m_error(0)
-        , m_faviconNotificationReceived(false)
-    {
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        g_signal_connect(database, &quot;favicon-changed&quot;, G_CALLBACK(faviconChangedCallback), this);
-    }
-
-    ~FaviconDatabaseTest()
-    {
-        if (m_favicon)
-            cairo_surface_destroy(m_favicon);
-
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        g_signal_handlers_disconnect_matched(database, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    static void faviconChangedCallback(WebKitFaviconDatabase* database, const char* pageURI, const char* faviconURI, FaviconDatabaseTest* test)
-    {
-        if (!g_strcmp0(webkit_web_view_get_uri(test-&gt;m_webView), pageURI))
-            test-&gt;m_faviconURI = faviconURI;
-    }
-
-    static void viewFaviconChangedCallback(WebKitWebView* webView, GParamSpec* pspec, gpointer data)
-    {
-        FaviconDatabaseTest* test = static_cast&lt;FaviconDatabaseTest*&gt;(data);
-        g_assert(test-&gt;m_webView == webView);
-        test-&gt;m_faviconNotificationReceived = true;
-        test-&gt;quitMainLoop();
-    }
-
-    static void getFaviconCallback(GObject* sourceObject, GAsyncResult* result, void* data)
-    {
-        FaviconDatabaseTest* test = static_cast&lt;FaviconDatabaseTest*&gt;(data);
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
-        test-&gt;m_favicon = webkit_favicon_database_get_favicon_finish(database, result, &amp;test-&gt;m_error.outPtr());
-        test-&gt;quitMainLoop();
-    }
-
-    void waitUntilFaviconChanged()
-    {
-        m_faviconNotificationReceived = false;
-        unsigned long handlerID = g_signal_connect(m_webView, &quot;notify::favicon&quot;, G_CALLBACK(viewFaviconChangedCallback), this);
-        g_main_loop_run(m_mainLoop);
-        g_signal_handler_disconnect(m_webView, handlerID);
-    }
-
-    void getFaviconForPageURIAndWaitUntilReady(const char* pageURI)
-    {
-        m_error.clear();
-        if (m_favicon) {
-            cairo_surface_destroy(m_favicon);
-            m_favicon = 0;
-        }
-
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        webkit_favicon_database_get_favicon(database, pageURI, 0, getFaviconCallback, this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    WebKitWebContext* m_webContext;
-    cairo_surface_t* m_favicon;
-    CString m_faviconURI;
-    GOwnPtr&lt;GError&gt; m_error;
-    bool m_faviconNotificationReceived;
-};
-
-static void
-serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable* query, SoupClientContext* context, void* data)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-        soup_message_body_complete(message-&gt;response_body);
-        return;
-    }
-
-    char* contents;
-    gsize length;
-    if (g_str_equal(path, &quot;/icon/favicon.ico&quot;)) {
-        GOwnPtr&lt;char&gt; pathToFavicon(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;blank.ico&quot;, NULL));
-        g_file_get_contents(pathToFavicon.get(), &amp;contents, &amp;length, 0);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
-    } else if (g_str_equal(path, &quot;/nofavicon&quot;)) {
-        static const char* noFaviconHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, noFaviconHTML, strlen(noFaviconHTML));
-    } else {
-        static const char* contentsHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='icon' href='/icon/favicon.ico' type='image/x-ico; charset=binary'&gt;&lt;/head&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, contentsHTML, strlen(contentsHTML));
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-static void testNotInitialized(FaviconDatabaseTest* test)
-{
-    // Try to retrieve a valid favicon from a not initialized database.
-    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
-    g_assert(!test-&gt;m_favicon);
-    g_assert(test-&gt;m_error);
-    g_assert_cmpint(test-&gt;m_error-&gt;code, ==, WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED);
-}
-
-static void testSetDirectory(FaviconDatabaseTest* test)
-{
-    webkit_web_context_set_favicon_database_directory(test-&gt;m_webContext, kTempDirectory);
-    g_assert_cmpstr(kTempDirectory, ==, webkit_web_context_get_favicon_database_directory(test-&gt;m_webContext));
-}
-
-static void testClearDatabase(FaviconDatabaseTest* test)
-{
-    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
-    webkit_favicon_database_clear(database);
-
-    GOwnPtr&lt;char&gt; iconURI(webkit_favicon_database_get_favicon_uri(database, kServer-&gt;getURIForPath(&quot;/foo&quot;).data()));
-    g_assert(!iconURI);
-}
-
-static void testGetFavicon(FaviconDatabaseTest* test)
-{
-    // We need to load the page first to ensure the icon data will be
-    // in the database in case there's an associated favicon.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
-    test-&gt;waitUntilFaviconChanged();
-    CString faviconURI = kServer-&gt;getURIForPath(&quot;/icon/favicon.ico&quot;);
-
-    // Check the API retrieving a valid favicon.
-    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
-    g_assert(test-&gt;m_favicon);
-    g_assert_cmpstr(test-&gt;m_faviconURI.data(), ==, faviconURI.data());
-    g_assert(!test-&gt;m_error);
-
-    // Check that width and height match those from blank.ico (16x16 favicon).
-    g_assert_cmpint(cairo_image_surface_get_width(test-&gt;m_favicon), ==, 16);
-    g_assert_cmpint(cairo_image_surface_get_height(test-&gt;m_favicon), ==, 16);
-
-    // Check that another page with the same favicon return the same icon.
-    cairo_surface_t* favicon = cairo_surface_reference(test-&gt;m_favicon);
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/bar&quot;).data());
-    // It's a new page in the database, so favicon will change twice, first to reset it
-    // and then when the icon is loaded.
-    test-&gt;waitUntilFaviconChanged();
-    test-&gt;waitUntilFaviconChanged();
-    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/bar&quot;).data());
-    g_assert(test-&gt;m_favicon);
-    g_assert_cmpstr(test-&gt;m_faviconURI.data(), ==, faviconURI.data());
-    g_assert(test-&gt;m_favicon == favicon);
-    g_assert(!test-&gt;m_error);
-    cairo_surface_destroy(favicon);
-
-    // Check the API retrieving an invalid favicon.
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/nofavicon&quot;).data());
-    test-&gt;waitUntilFaviconChanged();
-
-    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/nofavicon&quot;).data());
-    g_assert(!test-&gt;m_favicon);
-    g_assert(test-&gt;m_error);
-}
-
-static void testGetFaviconURI(FaviconDatabaseTest* test)
-{
-    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
-
-    CString baseURI = kServer-&gt;getURIForPath(&quot;/foo&quot;);
-    GOwnPtr&lt;char&gt; iconURI(webkit_favicon_database_get_favicon_uri(database, baseURI.data()));
-    ASSERT_CMP_CSTRING(iconURI.get(), ==, kServer-&gt;getURIForPath(&quot;/icon/favicon.ico&quot;));
-}
-
-static void testWebViewFavicon(FaviconDatabaseTest* test)
-{
-    test-&gt;m_faviconURI = CString();
-
-    cairo_surface_t* iconFromWebView = webkit_web_view_get_favicon(test-&gt;m_webView);
-    g_assert(!iconFromWebView);
-
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
-    test-&gt;waitUntilFaviconChanged();
-    g_assert(test-&gt;m_faviconNotificationReceived);
-    // The icon is known and hasn't changed in the database, so notify::favicon is emitted
-    // but WebKitFaviconDatabase::icon-changed isn't.
-    g_assert(test-&gt;m_faviconURI.isNull());
-
-    iconFromWebView = webkit_web_view_get_favicon(test-&gt;m_webView);
-    g_assert(iconFromWebView);
-    g_assert_cmpuint(cairo_image_surface_get_width(iconFromWebView), ==, 16);
-    g_assert_cmpuint(cairo_image_surface_get_height(iconFromWebView), ==, 16);
-}
-
-static void testFaviconDatabase(FaviconDatabaseTest* test, gconstpointer)
-{
-    // These tests depend on this order to run properly so we declare them in a single one.
-    // See https://bugs.webkit.org/show_bug.cgi?id=111434.
-    testNotInitialized(test);
-    testSetDirectory(test);
-    testGetFavicon(test);
-    testGetFaviconURI(test);
-    testWebViewFavicon(test);
-    testClearDatabase(test);
-}
-
-void beforeAll()
-{
-    // Start a soup server for testing.
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
-    g_assert(kTempDirectory);
-
-    // Add tests to the suite.
-    FaviconDatabaseTest::add(&quot;WebKitFaviconDatabase&quot;, &quot;favicon-database-test&quot;, testFaviconDatabase);
-}
-
-static void webkitFaviconDatabaseFinalizedCallback(gpointer, GObject*)
-{
-    if (!g_file_test(kTempDirectory, G_FILE_TEST_IS_DIR))
-        return;
-
-    GOwnPtr&lt;char&gt; filename(g_build_filename(kTempDirectory, &quot;WebpageIcons.db&quot;, NULL));
-    g_unlink(filename.get());
-
-    g_rmdir(kTempDirectory);
-}
-
-void afterAll()
-{
-    delete kServer;
-
-    // Delete the temporary files after the IconDatabase has been
-    // closed, that is, once WebKitFaviconDatabase is being destroyed.
-    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(webkit_web_context_get_default());
-    g_object_weak_ref(G_OBJECT(database), webkitFaviconDatabaseFinalizedCallback, 0);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFindControllercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,335 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;LoadTrackingTest.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static const char* testString = &quot;&lt;html&gt;&lt;body&gt;first testing second testing secondHalf&lt;/body&gt;&lt;/html&gt;&quot;;
-
-class FindControllerTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FindControllerTest);
-
-    FindControllerTest()
-        : m_findController(webkit_web_view_get_find_controller(m_webView))
-        , m_runFindUntilCompletion(false)
-    {
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_findController.get()));
-    }
-
-    ~FindControllerTest()
-    {
-        if (m_findController)
-            g_signal_handlers_disconnect_matched(m_findController.get(), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void find(const char* searchText, guint32 findOptions, guint maxMatchCount)
-    {
-        g_signal_connect(m_findController.get(), &quot;found-text&quot;, G_CALLBACK(foundTextCallback), this);
-        g_signal_connect(m_findController.get(), &quot;failed-to-find-text&quot;, G_CALLBACK(failedToFindTextCallback), this);
-        webkit_find_controller_search(m_findController.get(), searchText, findOptions, maxMatchCount);
-    }
-
-    void count(const char* searchText, guint32 findOptions, guint maxMatchCount)
-    {
-        g_signal_connect(m_findController.get(), &quot;counted-matches&quot;, G_CALLBACK(countedMatchesCallback), this);
-        webkit_find_controller_count_matches(m_findController.get(), searchText, findOptions, maxMatchCount);
-    }
-
-    void waitUntilFindFinished()
-    {
-        m_runFindUntilCompletion = true;
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GRefPtr&lt;WebKitFindController&gt; m_findController;
-    bool m_textFound;
-    unsigned m_matchCount;
-
-private:
-    bool m_runFindUntilCompletion;
-
-    static void foundTextCallback(WebKitFindController*, guint matchCount, FindControllerTest* test)
-    {
-        test-&gt;m_textFound = true;
-        test-&gt;m_matchCount = matchCount;
-        if (test-&gt;m_runFindUntilCompletion)
-            g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    static void failedToFindTextCallback(WebKitFindController*, FindControllerTest* test)
-    {
-        test-&gt;m_textFound = false;
-        if (test-&gt;m_runFindUntilCompletion)
-            g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    static void countedMatchesCallback(WebKitFindController*, guint matchCount, FindControllerTest* test)
-    {
-        test-&gt;m_matchCount = matchCount;
-        if (test-&gt;m_runFindUntilCompletion)
-            g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-};
-
-static void testFindControllerTextFound(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-}
-
-static void testFindControllerTextNotFound(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;notFound&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_textFound);
-}
-
-static void testFindControllerMatchCount(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_matchCount == 2);
-    g_assert(test-&gt;m_textFound);
-}
-
-static void testFindControllerMaxMatchCount(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_matchCount == G_MAXUINT);
-    g_assert(test-&gt;m_textFound);
-}
-
-static void testFindControllerNext(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-    g_assert(test-&gt;m_matchCount == 2);
-
-    webkit_find_controller_search_next(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-    g_assert(test-&gt;m_matchCount == 1);
-    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
-
-    webkit_find_controller_search_next(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_textFound);
-    g_assert(test-&gt;m_matchCount == 1);
-    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
-}
-
-static void testFindControllerPrevious(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_matchCount == 2);
-    g_assert(test-&gt;m_textFound);
-
-    webkit_find_controller_search_next(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-    g_assert(test-&gt;m_matchCount == 1);
-    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
-
-    webkit_find_controller_search_previous(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-    g_assert(test-&gt;m_matchCount == 1);
-    g_assert(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS);
-}
-
-static void testFindControllerCountedMatches(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;count(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_matchCount == 2);
-
-    test-&gt;count(&quot;first&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_matchCount == 1);
-
-    test-&gt;count(&quot;notFound&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_matchCount);
-}
-
-static void testFindControllerOptions(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;find(&quot;Testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_textFound);
-
-    test-&gt;find(&quot;Testing&quot;, WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-
-    test-&gt;find(&quot;esting&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-
-    test-&gt;find(&quot;esting&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_textFound);
-
-    test-&gt;find(&quot;Half&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(!test-&gt;m_textFound);
-
-    test-&gt;find(&quot;Half&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS | WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, 2);
-    test-&gt;waitUntilFindFinished();
-
-    g_assert(test-&gt;m_textFound);
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_WRAP_AROUND, 3);
-    test-&gt;waitUntilFindFinished();
-    g_assert(test-&gt;m_textFound);
-
-    webkit_find_controller_search_next(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-    g_assert(test-&gt;m_textFound);
-
-    webkit_find_controller_search_next(test-&gt;m_findController.get());
-    test-&gt;waitUntilFindFinished();
-    g_assert(test-&gt;m_textFound);
-}
-
-static void testFindControllerHide(FindControllerTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(testString, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    cairo_surface_t* originalSurface = cairo_surface_reference(
-        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
-    g_assert(originalSurface);
-
-    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
-    test-&gt;waitUntilFindFinished();
-    g_assert(test-&gt;m_textFound);
-
-    cairo_surface_t* highlightSurface = cairo_surface_reference(
-        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
-    g_assert(highlightSurface);
-    g_assert(!Test::cairoSurfacesEqual(originalSurface, highlightSurface));
-
-    WebKitFindController* findController = webkit_web_view_get_find_controller(test-&gt;m_webView);
-    webkit_find_controller_search_finish(findController);
-    webkit_web_view_execute_editing_command(test-&gt;m_webView, &quot;Unselect&quot;);
-
-    cairo_surface_t* unhighlightSurface = cairo_surface_reference(
-        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
-    g_assert(unhighlightSurface);
-    g_assert(Test::cairoSurfacesEqual(originalSurface, unhighlightSurface));
-
-    cairo_surface_destroy(originalSurface);
-    cairo_surface_destroy(highlightSurface);
-    cairo_surface_destroy(unhighlightSurface);
-}
-
-static void testFindControllerInstance(FindControllerTest* test, gconstpointer)
-{
-    WebKitFindController* findController1 = webkit_web_view_get_find_controller(test-&gt;m_webView);
-    WebKitFindController* findController2 = webkit_web_view_get_find_controller(test-&gt;m_webView);
-
-    g_assert(findController1 == findController2);
-}
-
-static void testFindControllerGetters(FindControllerTest* test, gconstpointer)
-{
-    const char* searchText = &quot;testing&quot;;
-    guint maxMatchCount = 1;
-    guint32 findOptions = WEBKIT_FIND_OPTIONS_WRAP_AROUND | WEBKIT_FIND_OPTIONS_AT_WORD_STARTS;
-    WebKitFindController* findController = webkit_web_view_get_find_controller(test-&gt;m_webView);
-
-    webkit_find_controller_search(findController, searchText, findOptions, maxMatchCount);
-    g_assert(webkit_find_controller_get_web_view(findController) == test-&gt;m_webView);
-    g_assert(!g_strcmp0(webkit_find_controller_get_search_text(findController), searchText));
-    g_assert(webkit_find_controller_get_max_match_count(findController) == maxMatchCount);
-    g_assert(webkit_find_controller_get_options(findController) == findOptions);
-}
-
-void beforeAll()
-{
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;getters&quot;, testFindControllerGetters);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;instance&quot;, testFindControllerInstance);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;text-found&quot;, testFindControllerTextFound);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;text-not-found&quot;, testFindControllerTextNotFound);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;match-count&quot;, testFindControllerMatchCount);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;max-match-count&quot;, testFindControllerMaxMatchCount);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;next&quot;, testFindControllerNext);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;previous&quot;, testFindControllerPrevious);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;counted-matches&quot;, testFindControllerCountedMatches);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;options&quot;, testFindControllerOptions);
-    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;hide&quot;, testFindControllerHide);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitPolicyClientcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,257 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;LoadTrackingTest.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-static WebKitTestServer* kServer;
-
-class PolicyClientTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(PolicyClientTest);
-
-    enum PolicyDecisionResponse {
-        Use,
-        Ignore,
-        Download,
-        None
-    };
-
-    PolicyClientTest()
-        : LoadTrackingTest()
-        , m_policyDecisionResponse(None)
-        , m_policyDecisionTypeFilter(0)
-        , m_respondToPolicyDecisionAsynchronously(false)
-        , m_haltMainLoopAfterMakingDecision(false)
-    {
-        g_signal_connect(m_webView, &quot;decide-policy&quot;, G_CALLBACK(decidePolicyCallback), this);
-    }
-
-    static gboolean quitMainLoopLater(GMainLoop* loop)
-    {
-        g_main_loop_quit(loop);
-        return FALSE;
-    }
-
-    static void respondToPolicyDecision(PolicyClientTest* test, WebKitPolicyDecision* decision)
-    {
-        switch (test-&gt;m_policyDecisionResponse) {
-        case Use:
-            webkit_policy_decision_use(decision);
-            break;
-        case Ignore:
-            webkit_policy_decision_ignore(decision);
-            break;
-        case Download:
-            webkit_policy_decision_download(decision);
-            break;
-        case None:
-            break;
-        }
-
-        if (test-&gt;m_haltMainLoopAfterMakingDecision)
-            g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(quitMainLoopLater), test-&gt;m_mainLoop);
-    }
-
-    static gboolean respondToPolicyDecisionLater(PolicyClientTest* test)
-    {
-        respondToPolicyDecision(test, test-&gt;m_previousPolicyDecision.get());
-        test-&gt;m_previousPolicyDecision = 0;
-        return FALSE;
-    }
-
-    static gboolean decidePolicyCallback(WebKitWebView* webView, WebKitPolicyDecision* decision, WebKitPolicyDecisionType type, PolicyClientTest* test)
-    {
-        if (test-&gt;m_policyDecisionTypeFilter != type)
-            return FALSE;
-
-        test-&gt;m_previousPolicyDecision = decision;
-        if (test-&gt;m_respondToPolicyDecisionAsynchronously) {
-            g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(respondToPolicyDecisionLater), test);
-            return TRUE;
-        }
-
-        respondToPolicyDecision(test, decision);
-
-        // We return FALSE here to ensure that the default policy decision
-        // handler doesn't override whatever we use here.
-        return FALSE;
-    }
-
-    PolicyDecisionResponse m_policyDecisionResponse;
-    int m_policyDecisionTypeFilter;
-    bool m_respondToPolicyDecisionAsynchronously;
-    bool m_haltMainLoopAfterMakingDecision;
-    GRefPtr&lt;WebKitPolicyDecision&gt; m_previousPolicyDecision;
-};
-
-static void testNavigationPolicy(PolicyClientTest* test, gconstpointer)
-{
-    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION;
-
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
-    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-
-    // Ideally we'd like to have a more intensive test here, but it's still pretty tricky
-    // to trigger different types of navigations with the GTK+ WebKit2 API.
-    WebKitNavigationPolicyDecision* decision = WEBKIT_NAVIGATION_POLICY_DECISION(test-&gt;m_previousPolicyDecision.get());
-    g_assert_cmpint(webkit_navigation_policy_decision_get_navigation_type(decision), ==, WEBKIT_NAVIGATION_TYPE_OTHER);
-    g_assert_cmpint(webkit_navigation_policy_decision_get_mouse_button(decision), ==, 0);
-    g_assert_cmpint(webkit_navigation_policy_decision_get_modifiers(decision), ==, 0);
-    g_assert_cmpstr(webkit_navigation_policy_decision_get_frame_name(decision), ==, 0);
-    WebKitURIRequest* request = webkit_navigation_policy_decision_get_request(decision);
-    g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, &quot;http://webkitgtk.org/&quot;);
-
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
-    test-&gt;m_respondToPolicyDecisionAsynchronously = true;
-    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-
-    // If we are waiting until load completion, it will never complete if we ignore the
-    // navigation. So we tell the main loop to quit sometime later.
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
-    test-&gt;m_respondToPolicyDecisionAsynchronously = false;
-    test-&gt;m_haltMainLoopAfterMakingDecision = true;
-    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 0);
-
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
-    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 0);
-}
-
-static void testResponsePolicy(PolicyClientTest* test, gconstpointer)
-{
-    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_RESPONSE;
-
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-
-    test-&gt;m_respondToPolicyDecisionAsynchronously = true;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-
-    test-&gt;m_respondToPolicyDecisionAsynchronously = false;
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
-    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
-    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
-}
-
-struct CreateCallbackData {
-    bool triedToOpenWindow;
-    GMainLoop* mainLoop;
-};
-
-static WebKitWebView* createCallback(WebKitWebView* webView, CreateCallbackData* data)
-{
-    data-&gt;triedToOpenWindow = true;
-    g_main_loop_quit(data-&gt;mainLoop);
-    return 0;
-}
-
-static void testNewWindowPolicy(PolicyClientTest* test, gconstpointer)
-{
-    static const char* windowOpeningHTML =
-        &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot;    &lt;a id=\&quot;link\&quot; href=\&quot;http://www.google.com\&quot; target=\&quot;_blank\&quot;&gt;Link&lt;/a&gt;&quot;
-        &quot;    &lt;script&gt;&quot;
-        &quot;        var event = document.createEvent('MouseEvents');&quot;
-        &quot;        event.initEvent('click', true, false);&quot;
-        &quot;        document.getElementById('link').dispatchEvent(event);&quot;
-        &quot;    &lt;/script&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION;
-    webkit_settings_set_javascript_can_open_windows_automatically(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
-
-    CreateCallbackData data;
-    data.triedToOpenWindow = false;
-    data.mainLoop = test-&gt;m_mainLoop;
-
-    g_signal_connect(test-&gt;m_webView, &quot;create&quot;, G_CALLBACK(createCallback), &amp;data);
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
-    test-&gt;loadHtml(windowOpeningHTML, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;wait(1);
-    g_assert(data.triedToOpenWindow);
-
-    WebKitNavigationPolicyDecision* decision = WEBKIT_NAVIGATION_POLICY_DECISION(test-&gt;m_previousPolicyDecision.get());
-    g_assert_cmpstr(webkit_navigation_policy_decision_get_frame_name(decision), ==, &quot;_blank&quot;);
-
-    // Using a short timeout is a bit ugly here, but it's hard to get around because if we block
-    // the new window signal we cannot halt the main loop in the create callback. If we
-    // halt the main loop in the policy decision, the create callback never executes.
-    data.triedToOpenWindow = false;
-    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
-    test-&gt;loadHtml(windowOpeningHTML, &quot;http://webkitgtk.org/&quot;);
-    test-&gt;wait(.2);
-    g_assert(!data.triedToOpenWindow);
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/&quot;)) {
-        static const char* responseString = &quot;&lt;html&gt;&lt;body&gt;Testing!&lt;/body&gt;&lt;/html&gt;&quot;;
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
-        soup_message_body_complete(message-&gt;response_body);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;navigation-policy&quot;, testNavigationPolicy);
-    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;response-policy&quot;, testResponsePolicy);
-    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;new-window-policy&quot;, testNewWindowPolicy);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitSettingscpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,355 +0,0 @@
</span><del>-/*
- * Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, 
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, 
- * this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice, 
- * this list of conditions and the following disclaimer in the documentation and/or 
- * other materials provided with the distribution.
- *
- * Neither the name of Motorola Mobility, Inc. nor the names of its contributors may 
- * be used to endorse or promote products derived from this software without 
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;TestMain.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static WebKitTestServer* gServer;
-
-static void testWebKitSettings(Test*, gconstpointer)
-{
-    WebKitSettings* settings = webkit_settings_new();
-
-    // JavaScript is enabled by default.
-    g_assert(webkit_settings_get_enable_javascript(settings));
-    webkit_settings_set_enable_javascript(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_javascript(settings));
-
-    // By default auto-load-image is true.
-    g_assert(webkit_settings_get_auto_load_images(settings));
-    webkit_settings_set_auto_load_images(settings, FALSE);
-    g_assert(!webkit_settings_get_auto_load_images(settings));
-
-    // load-icons-ignoring-image-load-setting is false by default.
-    g_assert(!webkit_settings_get_load_icons_ignoring_image_load_setting(settings));
-    webkit_settings_set_load_icons_ignoring_image_load_setting(settings, TRUE);
-    g_assert(webkit_settings_get_load_icons_ignoring_image_load_setting(settings));
-    
-    // Offline application cache is true by default.
-    g_assert(webkit_settings_get_enable_offline_web_application_cache(settings));
-    webkit_settings_set_enable_offline_web_application_cache(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_offline_web_application_cache(settings));
-
-    // Local storage is enable by default.
-    g_assert(webkit_settings_get_enable_html5_local_storage(settings));
-    webkit_settings_set_enable_html5_local_storage(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_html5_local_storage(settings));
-
-    // HTML5 database is enabled by default.
-    g_assert(webkit_settings_get_enable_html5_database(settings));
-    webkit_settings_set_enable_html5_database(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_html5_database(settings));
-
-    // XSS Auditor is enabled by default.
-    g_assert(webkit_settings_get_enable_xss_auditor(settings));
-    webkit_settings_set_enable_xss_auditor(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_xss_auditor(settings));
-
-    // Frame flattening is disabled by default.
-    g_assert(!webkit_settings_get_enable_frame_flattening(settings));
-    webkit_settings_set_enable_frame_flattening(settings, TRUE);
-    g_assert(webkit_settings_get_enable_frame_flattening(settings));
-
-    // Plugins are enabled by default.
-    g_assert(webkit_settings_get_enable_plugins(settings));
-    webkit_settings_set_enable_plugins(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_plugins(settings));
-
-    // Java is enabled by default.
-    g_assert(webkit_settings_get_enable_java(settings));
-    webkit_settings_set_enable_java(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_java(settings));
-
-    // By default, JavaScript can open windows automatically is disabled.
-    g_assert(!webkit_settings_get_javascript_can_open_windows_automatically(settings));
-    webkit_settings_set_javascript_can_open_windows_automatically(settings, TRUE);
-    g_assert(webkit_settings_get_javascript_can_open_windows_automatically(settings));
-
-    // By default hyper link auditing is disabled.
-    g_assert(!webkit_settings_get_enable_hyperlink_auditing(settings));
-    webkit_settings_set_enable_hyperlink_auditing(settings, TRUE);
-    g_assert(webkit_settings_get_enable_hyperlink_auditing(settings));
-
-    // Default font family is &quot;sans-serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_default_font_family(settings), ==, &quot;sans-serif&quot;);
-    webkit_settings_set_default_font_family(settings, &quot;monospace&quot;);
-    g_assert_cmpstr(webkit_settings_get_default_font_family(settings), ==, &quot;monospace&quot;);
-
-    // Default monospace font family font family is &quot;monospace&quot;.
-    g_assert_cmpstr(webkit_settings_get_monospace_font_family(settings), ==, &quot;monospace&quot;);
-    webkit_settings_set_monospace_font_family(settings, &quot;sans-serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_monospace_font_family(settings), ==, &quot;sans-serif&quot;);
-
-    // Default serif font family is &quot;serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_serif_font_family(settings), ==, &quot;serif&quot;);
-    webkit_settings_set_serif_font_family(settings, &quot;sans-serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_serif_font_family(settings), ==, &quot;sans-serif&quot;);
-
-    // Default sans serif font family is &quot;sans-serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_sans_serif_font_family(settings), ==, &quot;sans-serif&quot;);
-    webkit_settings_set_sans_serif_font_family(settings, &quot;serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_sans_serif_font_family(settings), ==, &quot;serif&quot;);
-
-    // Default cursive font family &quot;serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_cursive_font_family(settings), ==, &quot;serif&quot;);
-    webkit_settings_set_cursive_font_family(settings, &quot;sans-serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_cursive_font_family(settings), ==, &quot;sans-serif&quot;);
-
-    // Default fantasy font family is &quot;serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_fantasy_font_family(settings), ==, &quot;serif&quot;);
-    webkit_settings_set_fantasy_font_family(settings, &quot;sans-serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_fantasy_font_family(settings), ==, &quot;sans-serif&quot;);
-
-    // Default pictograph font family is &quot;serif&quot;.
-    g_assert_cmpstr(webkit_settings_get_pictograph_font_family(settings), ==, &quot;serif&quot;);
-    webkit_settings_set_pictograph_font_family(settings, &quot;sans-serif&quot;);
-    g_assert_cmpstr(webkit_settings_get_pictograph_font_family(settings), ==, &quot;sans-serif&quot;);
-
-    // Default font size is 16.
-    g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 16);
-    webkit_settings_set_default_font_size(settings, 14);
-    g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 14);
-
-    // Default monospace font size is 13.
-    g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 13);
-    webkit_settings_set_default_monospace_font_size(settings, 10);
-    g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 10);
-
-    // Default minimum font size is 0.
-    g_assert_cmpuint(webkit_settings_get_minimum_font_size(settings), ==, 0);
-    webkit_settings_set_minimum_font_size(settings, 7);
-    g_assert_cmpuint(webkit_settings_get_minimum_font_size(settings), ==, 7);
-
-    // Default charset is &quot;iso-8859-1&quot;.
-    g_assert_cmpstr(webkit_settings_get_default_charset(settings), ==, &quot;iso-8859-1&quot;);
-    webkit_settings_set_default_charset(settings, &quot;utf8&quot;);
-    g_assert_cmpstr(webkit_settings_get_default_charset(settings), ==, &quot;utf8&quot;);
-
-    g_assert(!webkit_settings_get_enable_private_browsing(settings));
-    webkit_settings_set_enable_private_browsing(settings, TRUE);
-    g_assert(webkit_settings_get_enable_private_browsing(settings));
-
-    g_assert(!webkit_settings_get_enable_developer_extras(settings));
-    webkit_settings_set_enable_developer_extras(settings, TRUE);
-    g_assert(webkit_settings_get_enable_developer_extras(settings));
-
-    g_assert(webkit_settings_get_enable_resizable_text_areas(settings));
-    webkit_settings_set_enable_resizable_text_areas(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_resizable_text_areas(settings));
-
-    g_assert(webkit_settings_get_enable_tabs_to_links(settings));
-    webkit_settings_set_enable_tabs_to_links(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_tabs_to_links(settings));
-
-    g_assert(!webkit_settings_get_enable_dns_prefetching(settings));
-    webkit_settings_set_enable_dns_prefetching(settings, TRUE);
-    g_assert(webkit_settings_get_enable_dns_prefetching(settings));
-
-    // Caret browsing is disabled by default.
-    g_assert(!webkit_settings_get_enable_caret_browsing(settings));
-    webkit_settings_set_enable_caret_browsing(settings, TRUE);
-    g_assert(webkit_settings_get_enable_caret_browsing(settings));
-
-    // Fullscreen JavaScript API is disabled by default.
-    g_assert(!webkit_settings_get_enable_fullscreen(settings));
-    webkit_settings_set_enable_fullscreen(settings, TRUE);
-    g_assert(webkit_settings_get_enable_fullscreen(settings));
-
-    // Print backgrounds is enabled by default
-    g_assert(webkit_settings_get_print_backgrounds(settings));
-    webkit_settings_set_print_backgrounds(settings, FALSE);
-    g_assert(!webkit_settings_get_print_backgrounds(settings));
-
-    // WebAudio is disabled by default.
-    g_assert(!webkit_settings_get_enable_webaudio(settings));
-    webkit_settings_set_enable_webaudio(settings, TRUE);
-    g_assert(webkit_settings_get_enable_webaudio(settings));
-
-    // WebGL is disabled by default.
-    g_assert(!webkit_settings_get_enable_webgl(settings));
-    webkit_settings_set_enable_webgl(settings, TRUE);
-    g_assert(webkit_settings_get_enable_webgl(settings));
-
-    // Allow Modal Dialogs is disabled by default.
-    g_assert(!webkit_settings_get_allow_modal_dialogs(settings));
-    webkit_settings_set_allow_modal_dialogs(settings, TRUE);
-    g_assert(webkit_settings_get_allow_modal_dialogs(settings));
-
-    // Zoom text only is disabled by default.
-    g_assert(!webkit_settings_get_zoom_text_only(settings));
-    webkit_settings_set_zoom_text_only(settings, TRUE);
-    g_assert(webkit_settings_get_zoom_text_only(settings));
-
-    // By default, JavaScript cannot access the clipboard.
-    g_assert(!webkit_settings_get_javascript_can_access_clipboard(settings));
-    webkit_settings_set_javascript_can_access_clipboard(settings, TRUE);
-    g_assert(webkit_settings_get_javascript_can_access_clipboard(settings));
-
-    // By default, media playback doesn't require user gestures.
-    g_assert(!webkit_settings_get_media_playback_requires_user_gesture(settings));
-    webkit_settings_set_media_playback_requires_user_gesture(settings, TRUE);
-    g_assert(webkit_settings_get_media_playback_requires_user_gesture(settings));
-
-    // By default, inline media playback is allowed
-    g_assert(webkit_settings_get_media_playback_allows_inline(settings));
-    webkit_settings_set_media_playback_allows_inline(settings, FALSE);
-    g_assert(!webkit_settings_get_media_playback_allows_inline(settings));
-
-    // By default, debug indicators are disabled.
-    g_assert(!webkit_settings_get_draw_compositing_indicators(settings));
-    webkit_settings_set_draw_compositing_indicators(settings, TRUE);
-    g_assert(webkit_settings_get_draw_compositing_indicators(settings));
-
-    // By default, site specific quirks are disabled.
-    g_assert(!webkit_settings_get_enable_site_specific_quirks(settings));
-    webkit_settings_set_enable_site_specific_quirks(settings, TRUE);
-    g_assert(webkit_settings_get_enable_site_specific_quirks(settings));
-
-    // By default, page cache is enabled.
-    g_assert(webkit_settings_get_enable_page_cache(settings));
-    webkit_settings_set_enable_page_cache(settings, FALSE);
-    g_assert(!webkit_settings_get_enable_page_cache(settings));
-
-    // By default, smooth scrolling is disabled.
-    g_assert(!webkit_settings_get_enable_smooth_scrolling(settings));
-    webkit_settings_set_enable_smooth_scrolling(settings, TRUE);
-    g_assert(webkit_settings_get_enable_smooth_scrolling(settings));
-
-    // By default, accelerated 2D canvas is disabled.
-    g_assert(!webkit_settings_get_enable_accelerated_2d_canvas(settings));
-    webkit_settings_set_enable_accelerated_2d_canvas(settings, TRUE);
-    g_assert(webkit_settings_get_enable_accelerated_2d_canvas(settings));
-
-    // By default, writing of console messages to stdout is disabled.
-    g_assert(!webkit_settings_get_enable_write_console_messages_to_stdout(settings));
-    webkit_settings_set_enable_write_console_messages_to_stdout(settings, TRUE);
-    g_assert(webkit_settings_get_enable_write_console_messages_to_stdout(settings));
-
-    g_object_unref(G_OBJECT(settings));
-}
-
-void testWebKitSettingsNewWithSettings(Test* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitSettings&gt; settings = adoptGRef(webkit_settings_new_with_settings(&quot;enable-javascript&quot;, FALSE,
-                                                                                   &quot;auto-load-images&quot;, FALSE,
-                                                                                   &quot;load-icons-ignoring-image-load-setting&quot;, TRUE,
-                                                                                   NULL));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(settings.get()));
-    g_assert(!webkit_settings_get_enable_javascript(settings.get()));
-    g_assert(!webkit_settings_get_auto_load_images(settings.get()));
-    g_assert(webkit_settings_get_load_icons_ignoring_image_load_setting(settings.get()));
-}
-
-static CString convertWebViewMainResourceDataToCString(WebViewTest* test)
-{
-    size_t mainResourceDataSize = 0;
-    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    return CString(mainResourceData, mainResourceDataSize);
-}
-
-static void assertThatUserAgentIsSentInHeaders(WebViewTest* test, const CString&amp; userAgent)
-{
-    test-&gt;loadURI(gServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    ASSERT_CMP_CSTRING(convertWebViewMainResourceDataToCString(test), ==, userAgent);
-}
-
-static void testWebKitSettingsUserAgent(WebViewTest* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitSettings&gt; settings = adoptGRef(webkit_settings_new());
-    CString defaultUserAgent = webkit_settings_get_user_agent(settings.get());
-    webkit_web_view_set_settings(test-&gt;m_webView, settings.get());
-
-    g_assert(g_strstr_len(defaultUserAgent.data(), -1, &quot;AppleWebKit&quot;));
-    g_assert(g_strstr_len(defaultUserAgent.data(), -1, &quot;Safari&quot;));
-
-    webkit_settings_set_user_agent(settings.get(), 0);
-    g_assert_cmpstr(defaultUserAgent.data(), ==, webkit_settings_get_user_agent(settings.get()));
-    assertThatUserAgentIsSentInHeaders(test, defaultUserAgent.data());
-
-    webkit_settings_set_user_agent(settings.get(), &quot;&quot;);
-    g_assert_cmpstr(defaultUserAgent.data(), ==, webkit_settings_get_user_agent(settings.get()));
-
-    const char* funkyUserAgent = &quot;Funky!&quot;;
-    webkit_settings_set_user_agent(settings.get(), funkyUserAgent);
-    g_assert_cmpstr(funkyUserAgent, ==, webkit_settings_get_user_agent(settings.get()));
-    assertThatUserAgentIsSentInHeaders(test, funkyUserAgent);
-
-    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebKitGTK+&quot;, 0);
-    const char* userAgentWithNullVersion = webkit_settings_get_user_agent(settings.get());
-    g_assert_cmpstr(g_strstr_len(userAgentWithNullVersion, -1, defaultUserAgent.data()), ==, userAgentWithNullVersion);
-    g_assert(g_strstr_len(userAgentWithNullVersion, -1, &quot;WebKitGTK+&quot;));
-
-    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebKitGTK+&quot;, &quot;&quot;);
-    g_assert_cmpstr(webkit_settings_get_user_agent(settings.get()), ==, userAgentWithNullVersion);
-
-    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebCatGTK+&quot;, &quot;3.4.5&quot;);
-    const char* newUserAgent = webkit_settings_get_user_agent(settings.get());
-    g_assert(g_strstr_len(newUserAgent, -1, &quot;3.4.5&quot;));
-    g_assert(g_strstr_len(newUserAgent, -1, &quot;WebCatGTK+&quot;));
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/&quot;)) {
-        const char* userAgent = soup_message_headers_get_one(message-&gt;request_headers, &quot;User-Agent&quot;);
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, userAgent, strlen(userAgent));
-        soup_message_body_complete(message-&gt;response_body);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-}
-
-void beforeAll()
-{
-    gServer = new WebKitTestServer();
-    gServer-&gt;run(serverCallback);
-
-    Test::add(&quot;WebKitSettings&quot;, &quot;webkit-settings&quot;, testWebKitSettings);
-    Test::add(&quot;WebKitSettings&quot;, &quot;new-with-settings&quot;, testWebKitSettingsNewWithSettings);
-    WebViewTest::add(&quot;WebKitSettings&quot;, &quot;user-agent&quot;, testWebKitSettingsUserAgent);
-}
-
-void afterAll()
-{
-    delete gServer;
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitVersioncpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;TestMain.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-
-
-static void testWebKitVersion(Test*, gconstpointer)
-{
-    g_assert_cmpuint(webkit_get_major_version(), ==, WEBKIT_MAJOR_VERSION);
-    g_assert_cmpuint(webkit_get_minor_version(), ==, WEBKIT_MINOR_VERSION);
-    g_assert_cmpuint(webkit_get_micro_version(), ==, WEBKIT_MICRO_VERSION);
-}
-
-static void testWebKitCheckVersion(Test*, gconstpointer)
-{
-    g_assert(WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION));
-    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION + 1, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION));
-    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION + 1, WEBKIT_MICRO_VERSION));
-    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION + 1));
-}
-
-void beforeAll()
-{
-    Test::add(&quot;WebKitVersion&quot;, &quot;version&quot;, testWebKitVersion);
-    Test::add(&quot;WebKitVersion&quot;, &quot;check-version&quot;, testWebKitCheckVersion);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebContextcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,425 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;LoadTrackingTest.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-
-static WebKitTestServer* kServer;
-
-static void testWebContextDefault(Test* test, gconstpointer)
-{
-    // Check there's a single instance of the default web context.
-    g_assert(webkit_web_context_get_default() == webkit_web_context_get_default());
-}
-
-class PluginsTest: public Test {
-public:
-    MAKE_GLIB_TEST_FIXTURE(PluginsTest);
-
-    PluginsTest()
-        : m_context(webkit_web_context_get_default())
-        , m_mainLoop(g_main_loop_new(0, TRUE))
-        , m_plugins(0)
-    {
-        webkit_web_context_set_additional_plugins_directory(m_context, WEBKIT_TEST_PLUGIN_DIR);
-    }
-
-    ~PluginsTest()
-    {
-        g_main_loop_unref(m_mainLoop);
-        g_list_free_full(m_plugins, g_object_unref);
-    }
-
-    static void getPluginsAsyncReadyCallback(GObject*, GAsyncResult* result, PluginsTest* test)
-    {
-        test-&gt;m_plugins = webkit_web_context_get_plugins_finish(test-&gt;m_context, result, 0);
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    GList* getPlugins()
-    {
-        g_list_free_full(m_plugins, g_object_unref);
-        webkit_web_context_get_plugins(m_context, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(getPluginsAsyncReadyCallback), this);
-        g_main_loop_run(m_mainLoop);
-        return m_plugins;
-    }
-
-    WebKitWebContext* m_context;
-    GMainLoop* m_mainLoop;
-    GList* m_plugins;
-};
-
-static void testWebContextGetPlugins(PluginsTest* test, gconstpointer)
-{
-    GList* plugins = test-&gt;getPlugins();
-    g_assert(plugins);
-
-    GRefPtr&lt;WebKitPlugin&gt; testPlugin;
-    for (GList* item = plugins; item; item = g_list_next(item)) {
-        WebKitPlugin* plugin = WEBKIT_PLUGIN(item-&gt;data);
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(plugin));
-        if (!g_strcmp0(webkit_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;)) {
-            testPlugin = plugin;
-            break;
-        }
-    }
-    g_assert(WEBKIT_IS_PLUGIN(testPlugin.get()));
-
-    GOwnPtr&lt;char&gt; pluginPath(g_build_filename(WEBKIT_TEST_PLUGIN_DIR, &quot;libtestnetscapeplugin.so&quot;, NULL));
-    g_assert_cmpstr(webkit_plugin_get_path(testPlugin.get()), ==, pluginPath.get());
-    g_assert_cmpstr(webkit_plugin_get_description(testPlugin.get()), ==, &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;);
-    GList* mimeInfoList = webkit_plugin_get_mime_info_list(testPlugin.get());
-    g_assert(mimeInfoList);
-    g_assert_cmpuint(g_list_length(mimeInfoList), ==, 2);
-
-    WebKitMimeInfo* mimeInfo = static_cast&lt;WebKitMimeInfo*&gt;(mimeInfoList-&gt;data);
-    g_assert_cmpstr(webkit_mime_info_get_mime_type(mimeInfo), ==, &quot;image/png&quot;);
-    g_assert_cmpstr(webkit_mime_info_get_description(mimeInfo), ==, &quot;png image&quot;);
-    const gchar* const* extensions = webkit_mime_info_get_extensions(mimeInfo);
-    g_assert(extensions);
-    g_assert_cmpstr(extensions[0], ==, &quot;png&quot;);
-
-    mimeInfoList = g_list_next(mimeInfoList);
-    mimeInfo = static_cast&lt;WebKitMimeInfo*&gt;(mimeInfoList-&gt;data);
-    g_assert_cmpstr(webkit_mime_info_get_mime_type(mimeInfo), ==, &quot;application/x-webkit-test-netscape&quot;);
-    g_assert_cmpstr(webkit_mime_info_get_description(mimeInfo), ==, &quot;test netscape content&quot;);
-    extensions = webkit_mime_info_get_extensions(mimeInfo);
-    g_assert(extensions);
-    g_assert_cmpstr(extensions[0], ==, &quot;testnetscape&quot;);
-}
-
-static const char* kBarHTML = &quot;&lt;html&gt;&lt;body&gt;Bar&lt;/body&gt;&lt;/html&gt;&quot;;
-static const char* kEchoHTMLFormat = &quot;&lt;html&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;&quot;;
-static const char* errorDomain = &quot;test&quot;;
-static const int errorCode = 10;
-static const char* errorMessage = &quot;Error message.&quot;;
-
-class URISchemeTest: public LoadTrackingTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(URISchemeTest);
-
-    struct URISchemeHandler {
-        URISchemeHandler()
-            : replyLength(0)
-        {
-        }
-
-        URISchemeHandler(const char* reply, int replyLength, const char* mimeType)
-            : reply(reply)
-            , replyLength(replyLength)
-            , mimeType(mimeType)
-        {
-        }
-
-        CString reply;
-        int replyLength;
-        CString mimeType;
-    };
-
-    static void uriSchemeRequestCallback(WebKitURISchemeRequest* request, gpointer userData)
-    {
-        URISchemeTest* test = static_cast&lt;URISchemeTest*&gt;(userData);
-        test-&gt;m_uriSchemeRequest = request;
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-
-        g_assert(webkit_uri_scheme_request_get_web_view(request) == test-&gt;m_webView);
-
-        GRefPtr&lt;GInputStream&gt; inputStream = adoptGRef(g_memory_input_stream_new());
-        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(inputStream.get()));
-
-        const char* scheme = webkit_uri_scheme_request_get_scheme(request);
-        g_assert(scheme);
-        g_assert(test-&gt;m_handlersMap.contains(String::fromUTF8(scheme)));
-
-        if (!g_strcmp0(scheme, &quot;error&quot;)) {
-            GOwnPtr&lt;GError&gt; error(g_error_new_literal(g_quark_from_string(errorDomain), errorCode, errorMessage));
-            webkit_uri_scheme_request_finish_error(request, error.get());
-            return;
-        }
-
-        const URISchemeHandler&amp; handler = test-&gt;m_handlersMap.get(String::fromUTF8(scheme));
-
-        if (!g_strcmp0(scheme, &quot;echo&quot;)) {
-            char* replyHTML = g_strdup_printf(handler.reply.data(), webkit_uri_scheme_request_get_path(request));
-            g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(inputStream.get()), replyHTML, strlen(replyHTML), g_free);
-        } else if (!g_strcmp0(scheme, &quot;closed&quot;))
-            g_input_stream_close(inputStream.get(), 0, 0);
-        else if (!handler.reply.isNull())
-            g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(inputStream.get()), handler.reply.data(), handler.reply.length(), 0);
-
-        webkit_uri_scheme_request_finish(request, inputStream.get(), handler.replyLength, handler.mimeType.data());
-    }
-
-    void registerURISchemeHandler(const char* scheme, const char* reply, int replyLength, const char* mimeType)
-    {
-        m_handlersMap.set(String::fromUTF8(scheme), URISchemeHandler(reply, replyLength, mimeType));
-        webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), scheme, uriSchemeRequestCallback, this, 0);
-    }
-
-    GRefPtr&lt;WebKitURISchemeRequest&gt; m_uriSchemeRequest;
-    HashMap&lt;String, URISchemeHandler&gt; m_handlersMap;
-};
-
-static void testWebContextURIScheme(URISchemeTest* test, gconstpointer)
-{
-    test-&gt;registerURISchemeHandler(&quot;foo&quot;, kBarHTML, strlen(kBarHTML), &quot;text/html&quot;);
-    test-&gt;loadURI(&quot;foo:blank&quot;);
-    test-&gt;waitUntilLoadFinished();
-    size_t mainResourceDataSize = 0;
-    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpint(mainResourceDataSize, ==, strlen(kBarHTML));
-    g_assert(!strncmp(mainResourceData, kBarHTML, mainResourceDataSize));
-
-    test-&gt;registerURISchemeHandler(&quot;echo&quot;, kEchoHTMLFormat, -1, &quot;text/html&quot;);
-    test-&gt;loadURI(&quot;echo:hello world&quot;);
-    test-&gt;waitUntilLoadFinished();
-    GOwnPtr&lt;char&gt; echoHTML(g_strdup_printf(kEchoHTMLFormat, webkit_uri_scheme_request_get_path(test-&gt;m_uriSchemeRequest.get())));
-    mainResourceDataSize = 0;
-    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpint(mainResourceDataSize, ==, strlen(echoHTML.get()));
-    g_assert(!strncmp(mainResourceData, echoHTML.get(), mainResourceDataSize));
-
-    test-&gt;registerURISchemeHandler(&quot;nomime&quot;, kBarHTML, -1, 0);
-    test-&gt;m_loadEvents.clear();
-    test-&gt;loadURI(&quot;nomime:foo bar&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
-
-    test-&gt;registerURISchemeHandler(&quot;empty&quot;, 0, 0, &quot;text/html&quot;);
-    test-&gt;m_loadEvents.clear();
-    test-&gt;loadURI(&quot;empty:nothing&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
-    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::LoadFailed));
-
-    test-&gt;registerURISchemeHandler(&quot;error&quot;, 0, 0, 0);
-    test-&gt;m_loadEvents.clear();
-    test-&gt;loadURI(&quot;error:error&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
-    g_assert(test-&gt;m_loadFailed);
-    g_assert_error(test-&gt;m_error.get(), g_quark_from_string(errorDomain), errorCode);
-    g_assert_cmpstr(test-&gt;m_error-&gt;message, ==, errorMessage);
-
-    test-&gt;registerURISchemeHandler(&quot;closed&quot;, 0, 0, 0);
-    test-&gt;m_loadEvents.clear();
-    test-&gt;loadURI(&quot;closed:input-stream&quot;);
-    test-&gt;waitUntilLoadFinished();
-    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
-    g_assert(test-&gt;m_loadFailed);
-    g_assert_error(test-&gt;m_error.get(), G_IO_ERROR, G_IO_ERROR_CLOSED);
-}
-
-static void testWebContextSpellChecker(Test* test, gconstpointer)
-{
-    WebKitWebContext* webContext = webkit_web_context_get_default();
-
-    // Check what happens if no spell checking language has been set.
-    const gchar* const* currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
-    g_assert(!currentLanguage);
-
-    // Set the language to a specific one.
-    GRefPtr&lt;GPtrArray&gt; languages = adoptGRef(g_ptr_array_new());
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en_US&quot;)));
-    g_ptr_array_add(languages.get(), 0);
-    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
-    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
-    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 1);
-    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
-
-    // Set the language string to list of valid languages.
-    g_ptr_array_remove_index_fast(languages.get(), languages-&gt;len - 1);
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en_GB&quot;)));
-    g_ptr_array_add(languages.get(), 0);
-    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
-    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
-    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 2);
-    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
-    g_assert_cmpstr(currentLanguage[1], ==, &quot;en_GB&quot;);
-
-    // Try passing a wrong language along with good ones.
-    g_ptr_array_remove_index_fast(languages.get(), languages-&gt;len - 1);
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;bd_WR&quot;)));
-    g_ptr_array_add(languages.get(), 0);
-    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
-    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
-    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 2);
-    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
-    g_assert_cmpstr(currentLanguage[1], ==, &quot;en_GB&quot;);
-
-    // Try passing a list with only wrong languages.
-    languages = adoptGRef(g_ptr_array_new());
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;bd_WR&quot;)));
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;wr_BD&quot;)));
-    g_ptr_array_add(languages.get(), 0);
-    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
-    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
-    g_assert(!currentLanguage);
-
-    // Check disabling and re-enabling spell checking.
-    webkit_web_context_set_spell_checking_enabled(webContext, FALSE);
-    g_assert(!webkit_web_context_get_spell_checking_enabled(webContext));
-    webkit_web_context_set_spell_checking_enabled(webContext, TRUE);
-    g_assert(webkit_web_context_get_spell_checking_enabled(webContext));
-}
-
-static void testWebContextLanguages(WebViewTest* test, gconstpointer)
-{
-    static const char* expectedDefaultLanguage = &quot;en&quot;;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    size_t mainResourceDataSize = 0;
-    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpuint(mainResourceDataSize, ==, strlen(expectedDefaultLanguage));
-    g_assert(!strncmp(mainResourceData, expectedDefaultLanguage, mainResourceDataSize));
-
-    GRefPtr&lt;GPtrArray&gt; languages = adoptGRef(g_ptr_array_new());
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en&quot;)));
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;ES_es&quot;)));
-    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;dE&quot;)));
-    g_ptr_array_add(languages.get(), 0);
-    webkit_web_context_set_preferred_languages(webkit_web_context_get_default(), reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
-
-    static const char* expectedLanguages = &quot;en, es-es;q=0.90, de;q=0.80&quot;;
-    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
-    test-&gt;waitUntilLoadFinished();
-    mainResourceDataSize = 0;
-    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
-    g_assert_cmpuint(mainResourceDataSize, ==, strlen(expectedLanguages));
-    g_assert(!strncmp(mainResourceData, expectedLanguages, mainResourceDataSize));
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message-&gt;method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (g_str_equal(path, &quot;/&quot;)) {
-        const char* acceptLanguage = soup_message_headers_get_one(message-&gt;request_headers, &quot;Accept-Language&quot;);
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, acceptLanguage, strlen(acceptLanguage));
-        soup_message_body_complete(message-&gt;response_body);
-    } else
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-}
-
-class SecurityPolicyTest: public Test {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SecurityPolicyTest);
-
-    enum SecurityPolicy {
-        Local = 1 &lt;&lt; 1,
-        NoAccess = 1 &lt;&lt; 2,
-        DisplayIsolated = 1 &lt;&lt; 3,
-        Secure = 1 &lt;&lt; 4,
-        CORSEnabled = 1 &lt;&lt; 5,
-        EmptyDocument = 1 &lt;&lt; 6
-    };
-
-    SecurityPolicyTest()
-        : m_manager(webkit_web_context_get_security_manager(webkit_web_context_get_default()))
-    {
-    }
-
-    void verifyThatSchemeMatchesPolicy(const char* scheme, unsigned policy)
-    {
-        if (policy &amp; Local)
-            g_assert(webkit_security_manager_uri_scheme_is_local(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_local(m_manager, scheme));
-        if (policy &amp; NoAccess)
-            g_assert(webkit_security_manager_uri_scheme_is_no_access(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_no_access(m_manager, scheme));
-        if (policy &amp; DisplayIsolated)
-            g_assert(webkit_security_manager_uri_scheme_is_display_isolated(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_display_isolated(m_manager, scheme));
-        if (policy &amp; Secure)
-            g_assert(webkit_security_manager_uri_scheme_is_secure(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_secure(m_manager, scheme));
-        if (policy &amp; CORSEnabled)
-            g_assert(webkit_security_manager_uri_scheme_is_cors_enabled(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_cors_enabled(m_manager, scheme));
-        if (policy &amp; EmptyDocument)
-            g_assert(webkit_security_manager_uri_scheme_is_empty_document(m_manager, scheme));
-        else
-            g_assert(!webkit_security_manager_uri_scheme_is_empty_document(m_manager, scheme));
-    }
-
-    WebKitSecurityManager* m_manager;
-};
-
-static void testWebContextSecurityPolicy(SecurityPolicyTest* test, gconstpointer)
-{
-    // VerifyThatSchemeMatchesPolicy default policy for well known schemes.
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;http&quot;, SecurityPolicyTest::CORSEnabled);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;https&quot;, SecurityPolicyTest::CORSEnabled | SecurityPolicyTest::Secure);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;file&quot;, SecurityPolicyTest::Local);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;data&quot;, SecurityPolicyTest::NoAccess | SecurityPolicyTest::Secure);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;about&quot;, SecurityPolicyTest::NoAccess | SecurityPolicyTest::Secure | SecurityPolicyTest::EmptyDocument);
-
-    // Custom scheme.
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, 0);
-
-    webkit_security_manager_register_uri_scheme_as_local(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local);
-    webkit_security_manager_register_uri_scheme_as_no_access(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess);
-    webkit_security_manager_register_uri_scheme_as_display_isolated(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated);
-    webkit_security_manager_register_uri_scheme_as_secure(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure);
-    webkit_security_manager_register_uri_scheme_as_cors_enabled(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure
-                | SecurityPolicyTest::CORSEnabled);
-    webkit_security_manager_register_uri_scheme_as_empty_document(test-&gt;m_manager, &quot;foo&quot;);
-    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure
-                | SecurityPolicyTest::CORSEnabled | SecurityPolicyTest::EmptyDocument);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    Test::add(&quot;WebKitWebContext&quot;, &quot;default-context&quot;, testWebContextDefault);
-    PluginsTest::add(&quot;WebKitWebContext&quot;, &quot;get-plugins&quot;, testWebContextGetPlugins);
-    URISchemeTest::add(&quot;WebKitWebContext&quot;, &quot;uri-scheme&quot;, testWebContextURIScheme);
-    Test::add(&quot;WebKitWebContext&quot;, &quot;spell-checker&quot;, testWebContextSpellChecker);
-    WebViewTest::add(&quot;WebKitWebContext&quot;, &quot;languages&quot;, testWebContextLanguages);
-    SecurityPolicyTest::add(&quot;WebKitSecurityManager&quot;, &quot;security-policy&quot;, testWebContextSecurityPolicy);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,608 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;JavaScriptCore/JSStringRef.h&gt;
-#include &lt;JavaScriptCore/JSValueRef.h&gt;
-#include &lt;glib/gstdio.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static void testWebViewDefaultContext(WebViewTest* test, gconstpointer)
-{
-    g_assert(webkit_web_view_get_context(test-&gt;m_webView) == webkit_web_context_get_default());
-
-    // Check that a web view created with g_object_new has the default context.
-    GRefPtr&lt;WebKitWebView&gt; webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, NULL));
-    g_assert(webkit_web_view_get_context(webView.get()) == webkit_web_context_get_default());
-}
-
-static void testWebViewCustomCharset(WebViewTest* test, gconstpointer)
-{
-    g_assert(!webkit_web_view_get_custom_charset(test-&gt;m_webView));
-    webkit_web_view_set_custom_charset(test-&gt;m_webView, &quot;utf8&quot;);
-    g_assert_cmpstr(webkit_web_view_get_custom_charset(test-&gt;m_webView), ==, &quot;utf8&quot;);
-    // Go back to the default charset.
-    webkit_web_view_set_custom_charset(test-&gt;m_webView, 0);
-    g_assert(!webkit_web_view_get_custom_charset(test-&gt;m_webView));
-}
-
-static void testWebViewSettings(WebViewTest* test, gconstpointer)
-{
-    WebKitSettings* defaultSettings = webkit_web_view_get_settings(test-&gt;m_webView);
-    g_assert(defaultSettings);
-    g_assert(webkit_settings_get_enable_javascript(defaultSettings));
-
-    GRefPtr&lt;WebKitSettings&gt; newSettings = adoptGRef(webkit_settings_new());
-    g_object_set(G_OBJECT(newSettings.get()), &quot;enable-javascript&quot;, FALSE, NULL);
-    webkit_web_view_set_settings(test-&gt;m_webView, newSettings.get());
-
-    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
-    g_assert(settings != defaultSettings);
-    g_assert(!webkit_settings_get_enable_javascript(settings));
-
-    GRefPtr&lt;GtkWidget&gt; webView2 = webkit_web_view_new();
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webView2.get()));
-    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), settings);
-    g_assert(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get())) == settings);
-
-    GRefPtr&lt;WebKitSettings&gt; newSettings2 = adoptGRef(webkit_settings_new());
-    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), newSettings2.get());
-    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get()));
-    g_assert(settings == newSettings2.get());
-    g_assert(webkit_settings_get_enable_javascript(settings));
-}
-
-static void testWebViewZoomLevel(WebViewTest* test, gconstpointer)
-{
-    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 1);
-    webkit_web_view_set_zoom_level(test-&gt;m_webView, 2.5);
-    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 2.5);
-
-    webkit_settings_set_zoom_text_only(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
-    // The zoom level shouldn't change when zoom-text-only setting changes.
-    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 2.5);
-}
-
-static void testWebViewRunJavaScript(WebViewTest* test, gconstpointer)
-{
-    static const char* html = &quot;&lt;html&gt;&lt;body&gt;&lt;a id='WebKitLink' href='http://www.webkitgtk.org/' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-    test-&gt;loadHtml(html, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    GOwnPtr&lt;GError&gt; error;
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').title;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Title&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').href;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;http://www.webkitgtk.org/&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').textContent&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Website&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = 25;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert_cmpfloat(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 25);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = 2.5;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert_cmpfloat(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 2.5);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = true&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = false&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult));
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = null&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(WebViewTest::javascriptResultIsNull(javascriptResult));
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;function Foo() { a = 25; } Foo();&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(WebViewTest::javascriptResultIsUndefined(javascriptResult));
-
-    javascriptResult = test-&gt;runJavaScriptFromGResourceAndWaitUntilFinished(&quot;/org/webkit/webkit2gtk/tests/link-title.js&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Title&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptFromGResourceAndWaitUntilFinished(&quot;/wrong/path/to/resource.js&quot;, &amp;error.outPtr());
-    g_assert(!javascriptResult);
-    g_assert_error(error.get(), G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
-    error.clear();
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;foo();&quot;, &amp;error.outPtr());
-    g_assert(!javascriptResult);
-    g_assert_error(error.get(), WEBKIT_JAVASCRIPT_ERROR, WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED);
-}
-
-class FullScreenClientTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FullScreenClientTest);
-
-    enum FullScreenEvent {
-        None,
-        Enter,
-        Leave
-    };
-
-    static gboolean viewEnterFullScreenCallback(WebKitWebView*, FullScreenClientTest* test)
-    {
-        test-&gt;m_event = Enter;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-        return FALSE;
-    }
-
-    static gboolean viewLeaveFullScreenCallback(WebKitWebView*, FullScreenClientTest* test)
-    {
-        test-&gt;m_event = Leave;
-        g_main_loop_quit(test-&gt;m_mainLoop);
-        return FALSE;
-    }
-
-    FullScreenClientTest()
-        : m_event(None)
-    {
-        webkit_settings_set_enable_fullscreen(webkit_web_view_get_settings(m_webView), TRUE);
-        g_signal_connect(m_webView, &quot;enter-fullscreen&quot;, G_CALLBACK(viewEnterFullScreenCallback), this);
-        g_signal_connect(m_webView, &quot;leave-fullscreen&quot;, G_CALLBACK(viewLeaveFullScreenCallback), this);
-    }
-
-    ~FullScreenClientTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void requestFullScreenAndWaitUntilEnteredFullScreen()
-    {
-        m_event = None;
-        webkit_web_view_run_javascript(m_webView, &quot;document.documentElement.webkitRequestFullScreen();&quot;, 0, 0, 0);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    static gboolean leaveFullScreenIdle(FullScreenClientTest* test)
-    {
-        test-&gt;keyStroke(GDK_KEY_Escape);
-        return FALSE;
-    }
-
-    void leaveFullScreenAndWaitUntilLeftFullScreen()
-    {
-        m_event = None;
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(leaveFullScreenIdle), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    FullScreenEvent m_event;
-};
-
-static void testWebViewFullScreen(FullScreenClientTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;FullScreen test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-    test-&gt;requestFullScreenAndWaitUntilEnteredFullScreen();
-    g_assert_cmpint(test-&gt;m_event, ==, FullScreenClientTest::Enter);
-    test-&gt;leaveFullScreenAndWaitUntilLeftFullScreen();
-    g_assert_cmpint(test-&gt;m_event, ==, FullScreenClientTest::Leave);
-}
-
-static void testWebViewCanShowMIMEType(WebViewTest* test, gconstpointer)
-{
-    // Supported MIME types.
-    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/html&quot;));
-    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/plain&quot;));
-    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;image/jpeg&quot;));
-
-    // Unsupported MIME types.
-    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/vcard&quot;));
-    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/pdf&quot;));
-    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/zip&quot;));
-    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/octet-stream&quot;));
-
-    // Plugins are only supported when enabled.
-    webkit_web_context_set_additional_plugins_directory(webkit_web_view_get_context(test-&gt;m_webView), WEBKIT_TEST_PLUGIN_DIR);
-    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/x-webkit-test-netscape&quot;));
-    webkit_settings_set_enable_plugins(webkit_web_view_get_settings(test-&gt;m_webView), FALSE);
-    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/x-webkit-test-netscape&quot;));
-}
-
-class FormClientTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FormClientTest);
-
-    static void submitFormCallback(WebKitWebView*, WebKitFormSubmissionRequest* request, FormClientTest* test)
-    {
-        test-&gt;submitForm(request);
-    }
-
-    FormClientTest()
-        : m_submitPositionX(0)
-        , m_submitPositionY(0)
-    {
-        g_signal_connect(m_webView, &quot;submit-form&quot;, G_CALLBACK(submitFormCallback), this);
-    }
-
-    ~FormClientTest()
-    {
-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    void submitForm(WebKitFormSubmissionRequest* request)
-    {
-        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
-        m_request = request;
-        webkit_form_submission_request_submit(request);
-        quitMainLoop();
-    }
-
-    GHashTable* waitUntilFormSubmittedAndGetTextFields()
-    {
-        g_main_loop_run(m_mainLoop);
-        return webkit_form_submission_request_get_text_fields(m_request.get());
-    }
-
-    static gboolean doClickIdleCallback(FormClientTest* test)
-    {
-        test-&gt;clickMouseButton(test-&gt;m_submitPositionX, test-&gt;m_submitPositionY, 1);
-        return FALSE;
-    }
-
-    void submitFormAtPosition(int x, int y)
-    {
-        m_submitPositionX = x;
-        m_submitPositionY = y;
-        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(doClickIdleCallback), this);
-    }
-
-    int m_submitPositionX;
-    int m_submitPositionY;
-    GRefPtr&lt;WebKitFormSubmissionRequest&gt; m_request;
-};
-
-static void testWebViewSubmitForm(FormClientTest* test, gconstpointer)
-{
-    test-&gt;showInWindowAndWaitUntilMapped();
-
-    const char* formHTML =
-        &quot;&lt;html&gt;&lt;body&gt;&quot;
-        &quot; &lt;form action='#'&gt;&quot;
-        &quot;  &lt;input type='text' name='text1' value='value1'&gt;&quot;
-        &quot;  &lt;input type='text' name='text2' value='value2'&gt;&quot;
-        &quot;  &lt;input type='password' name='password' value='secret'&gt;&quot;
-        &quot;  &lt;textarea cols='5' rows='5' name='textarea'&gt;Text&lt;/textarea&gt;&quot;
-        &quot;  &lt;input type='hidden' name='hidden1' value='hidden1'&gt;&quot;
-        &quot;  &lt;input type='submit' value='Submit' style='position:absolute; left:1; top:1' size='10'&gt;&quot;
-        &quot; &lt;/form&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    test-&gt;loadHtml(formHTML, &quot;file:///&quot;);
-    test-&gt;waitUntilLoadFinished();
-
-    test-&gt;submitFormAtPosition(5, 5);
-    GHashTable* values = test-&gt;waitUntilFormSubmittedAndGetTextFields();
-    g_assert(values);
-    g_assert_cmpuint(g_hash_table_size(values), ==, 3);
-    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;text1&quot;)), ==, &quot;value1&quot;);
-    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;text2&quot;)), ==, &quot;value2&quot;);
-    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;password&quot;)), ==, &quot;secret&quot;);
-}
-
-class SaveWebViewTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SaveWebViewTest);
-
-    SaveWebViewTest()
-        : m_tempDirectory(g_dir_make_tmp(&quot;WebKit2SaveViewTest-XXXXXX&quot;, 0))
-    {
-    }
-
-    ~SaveWebViewTest()
-    {
-        if (G_IS_FILE(m_file.get()))
-            g_file_delete(m_file.get(), 0, 0);
-
-        if (G_IS_INPUT_STREAM(m_inputStream.get()))
-            g_input_stream_close(m_inputStream.get(), 0, 0);
-
-        if (m_tempDirectory)
-            g_rmdir(m_tempDirectory.get());
-    }
-
-    static void webViewSavedToStreamCallback(GObject* object, GAsyncResult* result, SaveWebViewTest* test)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        test-&gt;m_inputStream = adoptGRef(webkit_web_view_save_finish(test-&gt;m_webView, result, &amp;error.outPtr()));
-        g_assert(G_IS_INPUT_STREAM(test-&gt;m_inputStream.get()));
-        g_assert(!error);
-
-        test-&gt;quitMainLoop();
-    }
-
-    static void webViewSavedToFileCallback(GObject* object, GAsyncResult* result, SaveWebViewTest* test)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        g_assert(webkit_web_view_save_to_file_finish(test-&gt;m_webView, result, &amp;error.outPtr()));
-        g_assert(!error);
-
-        test-&gt;quitMainLoop();
-    }
-
-    void saveAndWaitForStream()
-    {
-        webkit_web_view_save(m_webView, WEBKIT_SAVE_MODE_MHTML, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(webViewSavedToStreamCallback), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void saveAndWaitForFile()
-    {
-        m_saveDestinationFilePath.set(g_build_filename(m_tempDirectory.get(), &quot;testWebViewSaveResult.mht&quot;, NULL));
-        m_file = adoptGRef(g_file_new_for_path(m_saveDestinationFilePath.get()));
-        webkit_web_view_save_to_file(m_webView, m_file.get(), WEBKIT_SAVE_MODE_MHTML, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(webViewSavedToFileCallback), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GOwnPtr&lt;char&gt; m_tempDirectory;
-    GOwnPtr&lt;char&gt; m_saveDestinationFilePath;
-    GRefPtr&lt;GInputStream&gt; m_inputStream;
-    GRefPtr&lt;GFile&gt; m_file;
-};
-
-static void testWebViewSave(SaveWebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&quot;
-                   &quot;&lt;body&gt;&quot;
-                   &quot;  &lt;p&gt;A paragraph with plain text&lt;/p&gt;&quot;
-                   &quot;  &lt;p&gt;&quot;
-                   &quot;    A red box: &lt;img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AYWDTMVwnSZnwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFklEQVQI12P8z8DAwMDAxMDAwMDAAAANHQEDK+mmyAAAAABJRU5ErkJggg=='&gt;&lt;/br&gt;&quot;
-                   &quot;    A blue box: &lt;img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AYWDTMvBHhALQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFklEQVQI12Nk4PnPwMDAxMDAwMDAAAALrwEPPIs1pgAAAABJRU5ErkJggg=='&gt;&quot;
-                   &quot;  &lt;/p&gt;&quot;
-                   &quot;&lt;/body&gt;&quot;
-                   &quot;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    // Write to a file and to an input stream.
-    test-&gt;saveAndWaitForFile();
-    test-&gt;saveAndWaitForStream();
-
-    // We should have exactly the same amount of bytes in the file
-    // than those coming from the GInputStream. We don't compare the
-    // strings read since the 'Date' field and the boundaries will be
-    // different on each case. MHTML functionality will be tested by
-    // Layout tests, so checking the amount of bytes is enough.
-    GOwnPtr&lt;GError&gt; error;
-    gchar buffer[512] = { 0 };
-    gssize readBytes = 0;
-    gssize totalBytesFromStream = 0;
-    while (readBytes = g_input_stream_read(test-&gt;m_inputStream.get(), &amp;buffer, 512, 0, &amp;error.outPtr())) {
-        g_assert(!error);
-        totalBytesFromStream += readBytes;
-    }
-
-    // Check that the file exists and that it contains the same amount of bytes.
-    GRefPtr&lt;GFileInfo&gt; fileInfo = adoptGRef(g_file_query_info(test-&gt;m_file.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
-    g_assert_cmpint(g_file_info_get_size(fileInfo.get()), ==, totalBytesFromStream);
-}
-
-static void testWebViewMode(WebViewTest* test, gconstpointer)
-{
-    static const char* indexHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Test Web View Mode&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    // Web mode.
-    g_assert_cmpuint(webkit_web_view_get_view_mode(test-&gt;m_webView), ==, WEBKIT_VIEW_MODE_WEB);
-    test-&gt;loadHtml(indexHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.body.textContent;&quot;, 0);
-    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;Test Web View Mode&quot;);
-
-    // Source mode.
-    webkit_web_view_set_view_mode(test-&gt;m_webView, WEBKIT_VIEW_MODE_SOURCE);
-    test-&gt;loadHtml(indexHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.body.textContent;&quot;, 0);
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, indexHTML);
-}
-
-// To test page visibility API. Currently only 'visible' and 'hidden' states are implemented fully in WebCore.
-// See also http://www.w3.org/TR/2011/WD-page-visibility-20110602/ and https://developers.google.com/chrome/whitepapers/pagevisibility
-static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;title&gt;&lt;/title&gt;&quot;
-        &quot;&lt;body&gt;&lt;p&gt;Test Web Page Visibility&lt;/p&gt;&quot;
-        &quot;&lt;script&gt;&quot;
-        &quot;document.addEventListener(\&quot;visibilitychange\&quot;, onVisibilityChange, false);&quot;
-        &quot;function onVisibilityChange() {&quot;
-        &quot;    document.title = document.visibilityState;&quot;
-        &quot;}&quot;
-        &quot;&lt;/script&gt;&quot;
-        &quot;&lt;/body&gt;&lt;/html&gt;&quot;,
-        0);
-
-    // Wait untill the page is loaded. Initial visibility should be 'hidden'.
-    test-&gt;waitUntilLoadFinished();
-
-    GOwnPtr&lt;GError&gt; error;
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;hidden&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
-
-    // Show the page. The visibility should be updated to 'visible'.
-    test-&gt;showInWindow();
-    test-&gt;waitUntilTitleChanged();
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;visible&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult));
-
-    // Hide the page. The visibility should be updated to 'hidden'.
-    gtk_widget_hide(GTK_WIDGET(test-&gt;m_webView));
-    test-&gt;waitUntilTitleChanged();
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(valueString.get(), ==, &quot;hidden&quot;);
-
-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
-}
-
-class SnapshotWebViewTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(SnapshotWebViewTest);
-
-    static void onSnapshotCancelledReady(WebKitWebView* web_view, GAsyncResult* res, SnapshotWebViewTest* test)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        test-&gt;m_surface = webkit_web_view_get_snapshot_finish(web_view, res, &amp;error.outPtr());
-        g_assert(!test-&gt;m_surface);
-        g_assert_error(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED);
-        test-&gt;quitMainLoop();
-    }
-
-    gboolean getSnapshotAndCancel()
-    {
-        if (m_surface)
-            cairo_surface_destroy(m_surface);
-        m_surface = 0;
-        GRefPtr&lt;GCancellable&gt; cancellable = adoptGRef(g_cancellable_new());
-        webkit_web_view_get_snapshot(m_webView, WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE, cancellable.get(), reinterpret_cast&lt;GAsyncReadyCallback&gt;(onSnapshotCancelledReady), this);
-        g_cancellable_cancel(cancellable.get());
-        g_main_loop_run(m_mainLoop);
-
-        return true;
-    }
-
-};
-
-static void testWebViewSnapshot(SnapshotWebViewTest* test, gconstpointer)
-{
-    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Whatever&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    // WebView not visible.
-    cairo_surface_t* surface1 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
-    g_assert(!surface1);
-
-    // Show surface, resize to 50x50, try again.
-    test-&gt;showInWindowAndWaitUntilMapped();
-    test-&gt;resizeView(50, 50);
-    surface1 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
-    g_assert(surface1);
-
-    // obtained surface should be at the most 50x50. Store the size
-    // for comparison later.
-    int width = cairo_image_surface_get_width(surface1);
-    int height = cairo_image_surface_get_height(surface1);
-    g_assert_cmpint(width, &lt;=, 50);
-    g_assert_cmpint(height, &lt;=, 50);
-
-    // Select all text in the WebView, request a snapshot ignoring selection.
-    test-&gt;selectAll();
-    surface1 = cairo_surface_reference(test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE));
-    g_assert(surface1);
-    g_assert_cmpint(cairo_image_surface_get_width(surface1), ==, width);
-    g_assert_cmpint(cairo_image_surface_get_height(surface1), ==, height);
-
-    // Create identical surface.
-    cairo_surface_t* surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
-    g_assert(surface2);
-
-    // Compare these two, they should be identical.
-    g_assert(Test::cairoSurfacesEqual(surface1, surface2));
-
-    // Request a new snapshot, including the selection this time. The
-    // size should be the same but the result must be different to the
-    // one previously obtained.
-    surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING);
-    g_assert(surface2);
-    g_assert_cmpint(cairo_image_surface_get_width(surface2), ==, width);
-    g_assert_cmpint(cairo_image_surface_get_height(surface2), ==, height);
-    g_assert(!Test::cairoSurfacesEqual(surface1, surface2));
-
-    // Request a snapshot of the whole document in the WebView. The
-    // result should be different from the size obtained previously.
-    surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE);
-    g_assert(surface2);
-    g_assert_cmpint(cairo_image_surface_get_width(surface2),  &gt;, width);
-    g_assert_cmpint(cairo_image_surface_get_height(surface2), &gt;, height);
-    g_assert(!Test::cairoSurfacesEqual(surface1, surface2));
-
-    cairo_surface_destroy(surface1);
-
-    g_assert(test-&gt;getSnapshotAndCancel());
-}
-
-void beforeAll()
-{
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;default-context&quot;, testWebViewDefaultContext);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;custom-charset&quot;, testWebViewCustomCharset);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;settings&quot;, testWebViewSettings);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;zoom-level&quot;, testWebViewZoomLevel);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;run-javascript&quot;, testWebViewRunJavaScript);
-    FullScreenClientTest::add(&quot;WebKitWebView&quot;, &quot;fullscreen&quot;, testWebViewFullScreen);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;can-show-mime-type&quot;, testWebViewCanShowMIMEType);
-    FormClientTest::add(&quot;WebKitWebView&quot;, &quot;submit-form&quot;, testWebViewSubmitForm);
-    SaveWebViewTest::add(&quot;WebKitWebView&quot;, &quot;save&quot;, testWebViewSave);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;view-mode&quot;, testWebViewMode);
-    SnapshotWebViewTest::add(&quot;WebKitWebView&quot;, &quot;snapshot&quot;, testWebViewSnapshot);
-    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;page-visibility&quot;, testWebViewPageVisibility);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewGroupcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,206 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &quot;WebKitTestServer.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;cstdarg&gt;
-#include &lt;gtk/gtk.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-static WebKitTestServer* kServer;
-
-// These are all here so that they can be changed easily, if necessary.
-static const char* kStyleSheetHTML = &quot;&lt;html&gt;&lt;div id=\&quot;styledElement\&quot;&gt;Sweet stylez!&lt;/div&gt;&lt;/html&gt;&quot;;
-static const char* kInjectedStyleSheet = &quot;#styledElement { font-weight: bold; }&quot;;
-static const char* kStyleSheetTestScript = &quot;getComputedStyle(document.getElementById('styledElement'))['font-weight']&quot;;
-static const char* kStyleSheetTestScriptResult = &quot;bold&quot;;
-
-static void testWebViewGroupDefault(Test* test, gconstpointer)
-{
-    // Default group is shared by all WebViews by default.
-    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_assert(webkit_web_view_get_group(webView1.get()) == webkit_web_view_get_group(webView2.get()));
-
-    // Settings are shared by all web view in the same group.
-    g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_get_settings(webView2.get()));
-    g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_group_get_settings(webkit_web_view_get_group(webView2.get())));
-}
-
-static void testWebViewGroupNewGroup(Test* test, gconstpointer)
-{
-    // Passing 0 as group name generates the name automatically.
-    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(0));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
-    g_assert(webkit_web_view_group_get_name(viewGroup1.get()));
-
-    // New group with a given name.
-    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup2 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup2&quot;));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup2.get()));
-    g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), ==, &quot;TestGroup2&quot;);
-    g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), !=, webkit_web_view_group_get_name(viewGroup1.get()));
-
-    // Every group has its own settings.
-    g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) != webkit_web_view_group_get_settings(viewGroup2.get()));
-}
-
-static void testWebViewNewWithGroup(Test* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup1&quot;));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
-    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
-    g_assert(webkit_web_view_get_group(webView1.get()) == viewGroup1.get());
-
-    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    g_assert(webkit_web_view_get_group(webView2.get()) != viewGroup1.get());
-
-    // Settings should be different for views in different groups.
-    g_assert(webkit_web_view_get_settings(webView1.get()) != webkit_web_view_get_settings(webView2.get()));
-}
-
-static void testWebViewGroupSettings(Test* test, gconstpointer)
-{
-    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup1&quot;));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
-    GRefPtr&lt;WebKitSettings&gt; newSettings = adoptGRef(webkit_settings_new_with_settings(&quot;enable-javascript&quot;, FALSE, NULL));
-    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(newSettings.get()));
-    webkit_web_view_group_set_settings(viewGroup1.get(), newSettings.get());
-    g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) == newSettings.get());
-
-    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
-    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
-    WebKitSettings* webView1Settings = webkit_web_view_get_settings(webView1.get());
-    WebKitSettings* webView2Settings = webkit_web_view_get_settings(webView2.get());
-    g_assert(webView1Settings != webView2Settings);
-    g_assert(webkit_settings_get_enable_javascript(webView1Settings) != webkit_settings_get_enable_javascript(webView2Settings));
-
-    webkit_web_view_set_settings(webView1.get(), webView2Settings);
-    g_assert(webkit_web_view_get_settings(webView1.get()) == webView2Settings);
-    g_assert(webkit_web_view_group_get_settings(webkit_web_view_get_group(webView1.get())) == webView2Settings);
-}
-
-static bool isStyleSheetInjectedForURLAtPath(WebViewTest* test, const char* path)
-{
-    test-&gt;loadURI(kServer-&gt;getURIForPath(path).data());
-    test-&gt;waitUntilLoadFinished();
-
-    GOwnPtr&lt;GError&gt; error;
-    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(kStyleSheetTestScript, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-
-    GOwnPtr&lt;char&gt; resultString(WebViewTest::javascriptResultToCString(javascriptResult));
-    return !g_strcmp0(resultString.get(), kStyleSheetTestScriptResult);
-}
-
-static void fillURLListFromPaths(char** list, const char* path, ...)
-{
-    va_list argumentList;
-    va_start(argumentList, path);
-
-    int i = 0;
-    while (path) {
-        // FIXME: We must use a wildcard for the host here until http://wkbug.com/112476 is fixed.
-        // Until that time patterns with port numbers in them will not properly match URLs with port numbers.
-        list[i++] = g_strdup_printf(&quot;http://*/%s*&quot;, path);
-        path = va_arg(argumentList, const char*);
-    }
-}
-
-static void removeOldInjectedStyleSheetsAndResetLists(WebKitWebViewGroup* group, char** whitelist, char** blacklist)
-{
-    webkit_web_view_group_remove_all_user_style_sheets(group);
-
-    while (*whitelist) {
-        g_free(*whitelist);
-        *whitelist = 0;
-        whitelist++;
-    }
-
-    while (*blacklist) {
-        g_free(*blacklist);
-        *blacklist = 0;
-        blacklist++;
-    }
-}
-
-static void testWebViewGroupInjectedStyleSheet(WebViewTest* test, gconstpointer)
-{
-    WebKitWebViewGroup* group = webkit_web_view_get_group(test-&gt;m_webView);
-    char* whitelist[3] = { 0, 0, 0 };
-    char* blacklist[3] = { 0, 0, 0 };
-
-    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
-
-    // Without a whitelist or a blacklist all URLs should have the injected style sheet.
-    static const char* randomPath = &quot;somerandompath&quot;;
-    g_assert(!isStyleSheetInjectedForURLAtPath(test, randomPath));
-    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, 0, 0, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
-    g_assert(isStyleSheetInjectedForURLAtPath(test, randomPath));
-
-    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
-
-    fillURLListFromPaths(blacklist, randomPath, 0);
-    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, 0, blacklist, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
-    g_assert(!isStyleSheetInjectedForURLAtPath(test, randomPath));
-    g_assert(isStyleSheetInjectedForURLAtPath(test, &quot;someotherrandompath&quot;));
-
-    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
-
-    static const char* inTheWhiteList = &quot;inthewhitelist&quot;;
-    static const char* notInWhitelist = &quot;notinthewhitelist&quot;;
-    static const char* inTheWhiteListAndBlackList = &quot;inthewhitelistandblacklist&quot;;
-
-    fillURLListFromPaths(whitelist, inTheWhiteList, inTheWhiteListAndBlackList, 0);
-    fillURLListFromPaths(blacklist, inTheWhiteListAndBlackList, 0);
-    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, whitelist, blacklist, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
-    g_assert(isStyleSheetInjectedForURLAtPath(test, inTheWhiteList));
-    g_assert(!isStyleSheetInjectedForURLAtPath(test, inTheWhiteListAndBlackList));
-    g_assert(!isStyleSheetInjectedForURLAtPath(test, notInWhitelist));
-
-    // It's important to clean up the environment before other tests.
-    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
-}
-
-static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    soup_message_set_status(message, SOUP_STATUS_OK);
-    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kStyleSheetHTML, strlen(kStyleSheetHTML));
-    soup_message_body_complete(message-&gt;response_body);
-}
-
-void beforeAll()
-{
-    kServer = new WebKitTestServer();
-    kServer-&gt;run(serverCallback);
-
-    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;default-group&quot;, testWebViewGroupDefault);
-    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;new-group&quot;, testWebViewGroupNewGroup);
-    Test::add(&quot;WebKitWebView&quot;, &quot;new-with-group&quot;, testWebViewNewWithGroup);
-    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;settings&quot;, testWebViewGroupSettings);
-    WebViewTest::add(&quot;WebKitWebViewGroup&quot;, &quot;injected-style-sheet&quot;, testWebViewGroupInjectedStyleSheet);
-}
-
-void afterAll()
-{
-    delete kServer;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebViewEditorcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,202 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-class EditorTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(EditorTest);
-
-    static const unsigned int kClipboardWaitTimeout = 50;
-    static const unsigned int kClipboardWaitMaxTries = 2;
-
-    EditorTest()
-        : m_clipboard(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD))
-        , m_canExecuteEditingCommand(false)
-        , m_triesCount(0)
-    {
-        gtk_clipboard_clear(m_clipboard);
-    }
-
-    static void canExecuteEditingCommandReadyCallback(GObject*, GAsyncResult* result, EditorTest* test)
-    {
-        GOwnPtr&lt;GError&gt; error;
-        test-&gt;m_canExecuteEditingCommand = webkit_web_view_can_execute_editing_command_finish(test-&gt;m_webView, result, &amp;error.outPtr());
-        g_assert(!error.get());
-        g_main_loop_quit(test-&gt;m_mainLoop);
-    }
-
-    bool canExecuteEditingCommand(const char* command)
-    {
-        m_canExecuteEditingCommand = false;
-        webkit_web_view_can_execute_editing_command(m_webView, command, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(canExecuteEditingCommandReadyCallback), this);
-        g_main_loop_run(m_mainLoop);
-        return m_canExecuteEditingCommand;
-    }
-
-    static gboolean waitForClipboardText(EditorTest* test)
-    {
-        test-&gt;m_triesCount++;
-        if (gtk_clipboard_wait_is_text_available(test-&gt;m_clipboard) || test-&gt;m_triesCount &gt; kClipboardWaitMaxTries) {
-            g_main_loop_quit(test-&gt;m_mainLoop);
-            return FALSE;
-        }
-
-        return TRUE;
-    }
-
-    void copyClipboard()
-    {
-        webkit_web_view_execute_editing_command(m_webView, WEBKIT_EDITING_COMMAND_COPY);
-        // There's no way to know when the selection has been copied to
-        // the clipboard, so use a timeout source to query the clipboard.
-        m_triesCount = 0;
-        g_timeout_add(kClipboardWaitTimeout, reinterpret_cast&lt;GSourceFunc&gt;(waitForClipboardText), this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    GtkClipboard* m_clipboard;
-    bool m_canExecuteEditingCommand;
-    size_t m_triesCount;
-};
-
-static void testWebViewEditorCutCopyPasteNonEditable(EditorTest* test, gconstpointer)
-{
-    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;false\&quot;&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    // Nothing loaded yet.
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
-
-    test-&gt;loadHtml(selectedSpanHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
-    // It's not possible to cut and paste when content is not editable
-    // even if there's a selection.
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
-
-    test-&gt;copyClipboard();
-    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
-}
-
-static void testWebViewEditorCutCopyPasteEditable(EditorTest* test, gconstpointer)
-{
-    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;true\&quot;&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;document.getSelection().selectAllChildren(document.getElementById('mainspan'));\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    // Nothing loaded yet.
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
-    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
-
-    test-&gt;loadHtml(selectedSpanHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    // There's a selection.
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
-
-    test-&gt;copyClipboard();
-    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
-}
-
-static void testWebViewEditorSelectAllNonEditable(EditorTest* test, gconstpointer)
-{
-    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;false\&quot;&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
-
-    test-&gt;loadHtml(selectedSpanHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
-
-    test-&gt;copyClipboard();
-    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-
-    // Initially only the subspan is selected.
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
-
-    webkit_web_view_execute_editing_command(test-&gt;m_webView, WEBKIT_EDITING_COMMAND_SELECT_ALL);
-    test-&gt;copyClipboard();
-    clipboardText.set(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-
-    // The mainspan should be selected after calling SELECT_ALL.
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
-}
-
-static void testWebViewEditorSelectAllEditable(EditorTest* test, gconstpointer)
-{
-    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;true\&quot;&gt;&quot;
-        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
-        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
-        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
-        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
-
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
-
-    test-&gt;loadHtml(selectedSpanHTML, 0);
-    test-&gt;waitUntilLoadFinished();
-
-    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
-
-    test-&gt;copyClipboard();
-    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-
-    // Initially only the subspan is selected.
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
-
-    webkit_web_view_execute_editing_command(test-&gt;m_webView, WEBKIT_EDITING_COMMAND_SELECT_ALL);
-    test-&gt;copyClipboard();
-    clipboardText.set(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
-
-    // The mainspan should be selected after calling SELECT_ALL.
-    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
-}
-
-void beforeAll()
-{
-    EditorTest::add(&quot;WebKitWebView&quot;, &quot;cut-copy-paste/non-editable&quot;, testWebViewEditorCutCopyPasteNonEditable);
-    EditorTest::add(&quot;WebKitWebView&quot;, &quot;cut-copy-paste/editable&quot;, testWebViewEditorCutCopyPasteEditable);
-    EditorTest::add(&quot;WebKitWebView&quot;, &quot;select-all/non-editable&quot;, testWebViewEditorSelectAllNonEditable);
-    EditorTest::add(&quot;WebKitWebView&quot;, &quot;select-all/editable&quot;, testWebViewEditorSelectAllEditable);
-}
-
-void afterAll()
-{
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebExtensionTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,267 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-
-#include &lt;JavaScriptCore/JSContextRef.h&gt;
-#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
-#include &lt;gio/gio.h&gt;
-#include &lt;stdlib.h&gt;
-#include &lt;string.h&gt;
-#include &lt;webkit2/webkit-web-extension.h&gt;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-static const char introspectionXML[] =
-    &quot;&lt;node&gt;&quot;
-    &quot; &lt;interface name='org.webkit.gtk.WebExtensionTest'&gt;&quot;
-    &quot;  &lt;method name='GetTitle'&gt;&quot;
-    &quot;   &lt;arg type='t' name='pageID' direction='in'/&gt;&quot;
-    &quot;   &lt;arg type='s' name='title' direction='out'/&gt;&quot;
-    &quot;  &lt;/method&gt;&quot;
-    &quot;  &lt;method name='AbortProcess'&gt;&quot;
-    &quot;  &lt;/method&gt;&quot;
-    &quot;  &lt;method name='RunJavaScriptInIsolatedWorld'&gt;&quot;
-    &quot;   &lt;arg type='t' name='pageID' direction='in'/&gt;&quot;
-    &quot;   &lt;arg type='s' name='script' direction='in'/&gt;&quot;
-    &quot;  &lt;/method&gt;&quot;
-    &quot;  &lt;signal name='DocumentLoaded'/&gt;&quot;
-    &quot;  &lt;signal name='URIChanged'&gt;&quot;
-    &quot;   &lt;arg type='s' name='uri' direction='out'/&gt;&quot;
-    &quot;  &lt;/signal&gt;&quot;
-    &quot; &lt;/interface&gt;&quot;
-    &quot;&lt;/node&gt;&quot;;
-
-typedef enum {
-    DocumentLoadedSignal,
-    URIChangedSignal,
-} DelayedSignalType;
-
-struct DelayedSignal {
-    DelayedSignal(DelayedSignalType type)
-        : type(type)
-    {
-    }
-
-    DelayedSignal(DelayedSignalType type, const char* uri)
-        : type(type)
-        , uri(uri)
-    {
-    }
-
-    DelayedSignalType type;
-    CString uri;
-};
-
-Deque&lt;OwnPtr&lt;DelayedSignal&gt;&gt; delayedSignalsQueue;
-
-static void emitDocumentLoaded(GDBusConnection* connection)
-{
-    bool ok = g_dbus_connection_emit_signal(
-        connection,
-        0,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
-        &quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;DocumentLoaded&quot;,
-        0,
-        0);
-    g_assert(ok);
-}
-
-static void documentLoadedCallback(WebKitWebPage*, WebKitWebExtension* extension)
-{
-    gpointer data = g_object_get_data(G_OBJECT(extension), &quot;dbus-connection&quot;);
-    if (data)
-        emitDocumentLoaded(G_DBUS_CONNECTION(data));
-    else
-        delayedSignalsQueue.append(adoptPtr(new DelayedSignal(DocumentLoadedSignal)));
-}
-
-static void emitURIChanged(GDBusConnection* connection, const char* uri)
-{
-    bool ok = g_dbus_connection_emit_signal(
-        connection,
-        0,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
-        &quot;org.webkit.gtk.WebExtensionTest&quot;,
-        &quot;URIChanged&quot;,
-        g_variant_new(&quot;(s)&quot;, uri),
-        0);
-    g_assert(ok);
-}
-
-static void uriChangedCallback(WebKitWebPage* webPage, GParamSpec* pspec, WebKitWebExtension* extension)
-{
-    gpointer data = g_object_get_data(G_OBJECT(extension), &quot;dbus-connection&quot;);
-    if (data)
-        emitURIChanged(G_DBUS_CONNECTION(data), webkit_web_page_get_uri(webPage));
-    else
-        delayedSignalsQueue.append(adoptPtr(new DelayedSignal(URIChangedSignal, webkit_web_page_get_uri(webPage))));
-}
-
-static gboolean sendRequestCallback(WebKitWebPage*, WebKitURIRequest* request, WebKitURIResponse*, gpointer)
-{
-    const char* requestURI = webkit_uri_request_get_uri(request);
-    g_assert(requestURI);
-
-    if (const char* suffix = g_strrstr(requestURI, &quot;/remove-this/javascript.js&quot;)) {
-        GOwnPtr&lt;char&gt; prefix(g_strndup(requestURI, strlen(requestURI) - strlen(suffix)));
-        GOwnPtr&lt;char&gt; newURI(g_strdup_printf(&quot;%s/javascript.js&quot;, prefix.get()));
-        webkit_uri_request_set_uri(request, newURI.get());
-    } else if (g_str_has_suffix(requestURI, &quot;/add-do-not-track-header&quot;)) {
-        SoupMessageHeaders* headers = webkit_uri_request_get_http_headers(request);
-        g_assert(headers);
-        soup_message_headers_append(headers, &quot;DNT&quot;, &quot;1&quot;);
-    } else if (g_str_has_suffix(requestURI, &quot;/cancel-this.js&quot;))
-        return TRUE;
-
-    return FALSE;
-}
-
-static void pageCreatedCallback(WebKitWebExtension* extension, WebKitWebPage* webPage, gpointer)
-{
-    g_signal_connect(webPage, &quot;document-loaded&quot;, G_CALLBACK(documentLoadedCallback), extension);
-    g_signal_connect(webPage, &quot;notify::uri&quot;, G_CALLBACK(uriChangedCallback), extension);
-    g_signal_connect(webPage, &quot;send-request&quot;, G_CALLBACK(sendRequestCallback), 0);
-}
-
-static JSValueRef echoCallback(JSContextRef jsContext, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef*)
-{
-    if (argumentCount &lt;= 0)
-        return JSValueMakeUndefined(jsContext);
-
-    JSRetainPtr&lt;JSStringRef&gt; string(Adopt, JSValueToStringCopy(jsContext, arguments[0], 0));
-    return JSValueMakeString(jsContext, string.get());
-}
-
-static void windowObjectCleared(WebKitScriptWorld* world, WebKitWebPage* page, WebKitFrame* frame, gpointer)
-{
-    JSGlobalContextRef jsContext = webkit_frame_get_javascript_context_for_script_world(frame, world);
-    g_assert(jsContext);
-    JSObjectRef globalObject = JSContextGetGlobalObject(jsContext);
-    g_assert(globalObject);
-
-    JSRetainPtr&lt;JSStringRef&gt; functionName(Adopt, JSStringCreateWithUTF8CString(&quot;echo&quot;));
-    JSObjectRef function = JSObjectMakeFunctionWithCallback(jsContext, functionName.get(), echoCallback);
-    JSObjectSetProperty(jsContext, globalObject, functionName.get(), function, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly, 0);
-}
-
-static WebKitWebPage* getWebPage(WebKitWebExtension* extension, uint64_t pageID, GDBusMethodInvocation* invocation)
-{
-    WebKitWebPage* page = webkit_web_extension_get_page(extension, pageID);
-    if (!page) {
-        g_dbus_method_invocation_return_error(
-            invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
-            &quot;Invalid page ID: %&quot; G_GUINT64_FORMAT, pageID);
-        return 0;
-    }
-
-    g_assert_cmpuint(webkit_web_page_get_id(page), ==, pageID);
-    return page;
-}
-
-static void methodCallCallback(GDBusConnection* connection, const char* sender, const char* objectPath, const char* interfaceName, const char* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData)
-{
-    if (g_strcmp0(interfaceName, &quot;org.webkit.gtk.WebExtensionTest&quot;))
-        return;
-
-    if (!g_strcmp0(methodName, &quot;GetTitle&quot;)) {
-        uint64_t pageID;
-        g_variant_get(parameters, &quot;(t)&quot;, &amp;pageID);
-        WebKitWebPage* page = getWebPage(WEBKIT_WEB_EXTENSION(userData), pageID, invocation);
-        if (!page)
-            return;
-
-        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
-        GOwnPtr&lt;char&gt; title(webkit_dom_document_get_title(document));
-        g_dbus_method_invocation_return_value(invocation, g_variant_new(&quot;(s)&quot;, title.get()));
-    } else if (!g_strcmp0(methodName, &quot;RunJavaScriptInIsolatedWorld&quot;)) {
-        uint64_t pageID;
-        const char* script;
-        g_variant_get(parameters, &quot;(t&amp;s)&quot;, &amp;pageID, &amp;script);
-        WebKitWebPage* page = getWebPage(WEBKIT_WEB_EXTENSION(userData), pageID, invocation);
-        if (!page)
-            return;
-
-        GRefPtr&lt;WebKitScriptWorld&gt; world = adoptGRef(webkit_script_world_new());
-        g_assert(webkit_script_world_get_default() != world.get());
-        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
-        JSGlobalContextRef jsContext = webkit_frame_get_javascript_context_for_script_world(frame, world.get());
-        JSRetainPtr&lt;JSStringRef&gt; jsScript(Adopt, JSStringCreateWithUTF8CString(script));
-        JSEvaluateScript(jsContext, jsScript.get(), 0, 0, 0, 0);
-        g_dbus_method_invocation_return_value(invocation, 0);
-    } else if (!g_strcmp0(methodName, &quot;AbortProcess&quot;)) {
-        abort();
-    }
-}
-
-static const GDBusInterfaceVTable interfaceVirtualTable = {
-    methodCallCallback, 0, 0, { 0, }
-};
-
-static void busAcquiredCallback(GDBusConnection* connection, const char* name, gpointer userData)
-{
-    static GDBusNodeInfo *introspectionData = 0;
-    if (!introspectionData)
-        introspectionData = g_dbus_node_info_new_for_xml(introspectionXML, 0);
-
-    GOwnPtr&lt;GError&gt; error;
-    unsigned registrationID = g_dbus_connection_register_object(
-        connection,
-        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
-        introspectionData-&gt;interfaces[0],
-        &amp;interfaceVirtualTable,
-        g_object_ref(userData),
-        static_cast&lt;GDestroyNotify&gt;(g_object_unref),
-        &amp;error.outPtr());
-    if (!registrationID)
-        g_warning(&quot;Failed to register object: %s\n&quot;, error-&gt;message);
-
-    g_object_set_data(G_OBJECT(userData), &quot;dbus-connection&quot;, connection);
-    while (delayedSignalsQueue.size()) {
-        OwnPtr&lt;DelayedSignal&gt; delayedSignal = delayedSignalsQueue.takeFirst();
-        switch (delayedSignal-&gt;type) {
-        case DocumentLoadedSignal:
-            emitDocumentLoaded(connection);
-            break;
-        case URIChangedSignal:
-            emitURIChanged(connection, delayedSignal-&gt;uri.data());
-            break;
-        }
-    }
-}
-
-extern &quot;C&quot; void webkit_web_extension_initialize(WebKitWebExtension* extension)
-{
-    g_signal_connect(extension, &quot;page-created&quot;, G_CALLBACK(pageCreatedCallback), extension);
-    g_signal_connect(webkit_script_world_get_default(), &quot;window-object-cleared&quot;, G_CALLBACK(windowObjectCleared), 0);
-
-    g_bus_own_name(
-        G_BUS_TYPE_SESSION,
-        &quot;org.webkit.gtk.WebExtensionTest&quot;,
-        G_BUS_NAME_OWNER_FLAGS_NONE,
-        busAcquiredCallback,
-        0, 0,
-        g_object_ref(extension),
-        static_cast&lt;GDestroyNotify&gt;(g_object_unref));
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBuscpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,106 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebKitTestBus.h&quot;
-
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-WebKitTestBus::WebKitTestBus()
-    : m_pid(-1)
-{
-}
-
-bool WebKitTestBus::run()
-{
-    // FIXME: Use GTestDBus when we bump glib to 2.34.
-    GOwnPtr&lt;char&gt; dbusLaunch(g_find_program_in_path(&quot;dbus-launch&quot;));
-    if (!dbusLaunch) {
-        g_warning(&quot;Error starting DBUS daemon: dbus-launch not found in path&quot;);
-        return false;
-    }
-
-    GOwnPtr&lt;char&gt; output;
-    GOwnPtr&lt;GError&gt; error;
-    if (!g_spawn_command_line_sync(dbusLaunch.get(), &amp;output.outPtr(), 0, 0, &amp;error.outPtr())) {
-        g_warning(&quot;Error starting DBUS daemon: %s&quot;, error-&gt;message);
-        return false;
-    }
-
-    String outputString = String::fromUTF8(output.get());
-    Vector&lt;String&gt; lines;
-    outputString.split(UChar('\n'), /* allowEmptyEntries */ false, lines);
-    for (size_t i = 0; i &lt; lines.size(); ++i) {
-        char** keyValue = g_strsplit(lines[i].utf8().data(), &quot;=&quot;, 2);
-        g_assert_cmpuint(g_strv_length(keyValue), ==, 2);
-        if (!g_strcmp0(keyValue[0], &quot;DBUS_SESSION_BUS_ADDRESS&quot;)) {
-            m_address = keyValue[1];
-            g_setenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;, keyValue[1], TRUE);
-        } else if (!g_strcmp0(keyValue[0], &quot;DBUS_SESSION_BUS_PID&quot;))
-            m_pid = g_ascii_strtoll(keyValue[1], 0, 10);
-        g_strfreev(keyValue);
-    }
-
-    return m_pid &gt; 0;
-}
-
-WebKitTestBus::~WebKitTestBus()
-{
-    g_unsetenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;);
-
-    if (m_pid != -1)
-        kill(m_pid, SIGTERM);
-}
-
-GDBusConnection* WebKitTestBus::getOrCreateConnection()
-{
-    if (m_connection)
-        return m_connection.get();
-
-    g_assert(!m_address.isNull());
-    m_connection = adoptGRef(g_dbus_connection_new_for_address_sync(m_address.data(),
-        static_cast&lt;GDBusConnectionFlags&gt;(G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION),
-        0, 0, 0));
-    return m_connection.get();
-}
-
-static void onNameAppeared(GDBusConnection*, const char*, const char*, gpointer userData)
-{
-    g_main_loop_quit(static_cast&lt;GMainLoop*&gt;(userData));
-}
-
-GDBusProxy* WebKitTestBus::createProxy(const char* serviceName, const char* objectPath, const char* interfaceName, GMainLoop* mainLoop)
-{
-    unsigned watcherID = g_bus_watch_name_on_connection(getOrCreateConnection(), serviceName, G_BUS_NAME_WATCHER_FLAGS_NONE, onNameAppeared, 0, mainLoop, 0);
-    g_main_loop_run(mainLoop);
-    g_bus_unwatch_name(watcherID);
-
-    GDBusProxy* proxy = g_dbus_proxy_new_sync(
-        connection(),
-        G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-        0, // GDBusInterfaceInfo
-        serviceName,
-        objectPath,
-        interfaceName,
-        0, // GCancellable
-        0);
-    g_assert(proxy);
-    return proxy;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBush"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebKitTestBus_h
-#define WebKitTestBus_h
-
-#include &lt;gio/gio.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-class WebKitTestBus {
-public:
-    WebKitTestBus();
-    virtual ~WebKitTestBus();
-
-    bool run();
-    GDBusProxy* createProxy(const char* serviceName, const char* objectPath, const char* interfaceName, GMainLoop*);
-    GDBusConnection* connection() const { return m_connection.get(); }
-
-private:
-    GDBusConnection* getOrCreateConnection();
-
-    pid_t m_pid;
-    CString m_address;
-    GRefPtr&lt;GDBusConnection&gt; m_connection;
-};
-
-#endif // WebKitTestBus_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebKitTestServer.h&quot;
-
-#include &quot;TestMain.h&quot;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-WebKitTestServer::WebKitTestServer(ServerType type)
-{
-    GOwnPtr&lt;char&gt; sslCertificateFile;
-    GOwnPtr&lt;char&gt; sslKeyFile;
-    if (type == ServerHTTPS) {
-        CString resourcesDir = Test::getResourcesDir();
-        sslCertificateFile.set(g_build_filename(resourcesDir.data(), &quot;test-cert.pem&quot;, NULL));
-        sslKeyFile.set(g_build_filename(resourcesDir.data(), &quot;test-key.pem&quot;, NULL));
-    }
-
-    GRefPtr&lt;SoupAddress&gt; address = adoptGRef(soup_address_new(&quot;127.0.0.1&quot;, SOUP_ADDRESS_ANY_PORT));
-    soup_address_resolve_sync(address.get(), 0);
-
-    m_soupServer = adoptGRef(soup_server_new(SOUP_SERVER_INTERFACE, address.get(),
-                                             SOUP_SERVER_SSL_CERT_FILE, sslCertificateFile.get(),
-                                             SOUP_SERVER_SSL_KEY_FILE, sslKeyFile.get(), NULL));
-    m_baseURI = type == ServerHTTPS ? soup_uri_new(&quot;https://127.0.0.1/&quot;) : soup_uri_new(&quot;http://127.0.0.1/&quot;);
-    soup_uri_set_port(m_baseURI, soup_server_get_port(m_soupServer.get()));
-}
-
-WebKitTestServer::~WebKitTestServer()
-{
-    soup_uri_free(m_baseURI);
-}
-
-void WebKitTestServer::run(SoupServerCallback serverCallback)
-{
-    soup_server_run_async(m_soupServer.get());
-    soup_server_add_handler(m_soupServer.get(), 0, serverCallback, 0, 0);
-}
-
-CString WebKitTestServer::getURIForPath(const char* path)
-{
-    SoupURI* uri = soup_uri_new_with_base(m_baseURI, path);
-    GOwnPtr&lt;gchar&gt; uriString(soup_uri_to_string(uri, FALSE));
-    soup_uri_free(uri);
-    return uriString.get();
-}
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServerh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebKitTestServer_h
-#define WebKitTestServer_h
-
-#include &lt;libsoup/soup.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-class WebKitTestServer {
-public:
-
-    enum ServerType {
-        ServerHTTP,
-        ServerHTTPS
-    };
-
-    WebKitTestServer(ServerType type = ServerHTTP);
-    virtual ~WebKitTestServer();
-
-    SoupURI* baseURI() { return m_baseURI; }
-
-    CString getURIForPath(const char* path);
-    void run(SoupServerCallback);
-
-private:
-    GRefPtr&lt;SoupServer&gt; m_soupServer;
-    SoupURI* m_baseURI;
-};
-
-#endif // WebKitTestServer_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,106 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebProcessTest.h&quot;
-
-#include &lt;gio/gio.h&gt;
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-typedef HashMap&lt;String, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt;&gt; TestsMap;
-static TestsMap&amp; testsMap()
-{
-    DEFINE_STATIC_LOCAL(TestsMap, s_testsMap, ());
-    return s_testsMap;
-}
-
-void WebProcessTest::add(const String&amp; testName, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt; closure)
-{
-    testsMap().add(testName, closure);
-}
-
-PassOwnPtr&lt;WebProcessTest&gt; WebProcessTest::create(const String&amp; testName)
-{
-    g_assert(testsMap().contains(testName));
-    return testsMap().get(testName)();
-}
-
-static const char introspectionXML[] =
-    &quot;&lt;node&gt;&quot;
-    &quot; &lt;interface name='org.webkit.gtk.WebProcessTest'&gt;&quot;
-    &quot;  &lt;method name='RunTest'&gt;&quot;
-    &quot;   &lt;arg type='s' name='path' direction='in'/&gt;&quot;
-    &quot;   &lt;arg type='a{sv}' name='args' direction='in'/&gt;&quot;
-    &quot;   &lt;arg type='b' name='result' direction='out'/&gt;&quot;
-    &quot;  &lt;/method&gt;&quot;
-    &quot; &lt;/interface&gt;&quot;
-    &quot;&lt;/node&gt;&quot;;
-
-static void methodCallCallback(GDBusConnection* connection, const char* sender, const char* objectPath, const char* interfaceName, const char* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData)
-{
-    if (g_strcmp0(interfaceName, &quot;org.webkit.gtk.WebProcessTest&quot;))
-        return;
-
-    if (!g_strcmp0(methodName, &quot;RunTest&quot;)) {
-        const char* testPath;
-        GVariant* args;
-        g_variant_get(parameters, &quot;(&amp;s@a{sv})&quot;, &amp;testPath, &amp;args);
-        OwnPtr&lt;WebProcessTest&gt; test = WebProcessTest::create(String::fromUTF8(testPath));
-        bool result = test-&gt;runTest(g_strrstr(testPath, &quot;/&quot;) + 1, WEBKIT_WEB_EXTENSION(userData), args);
-        g_variant_unref(args);
-
-        g_dbus_method_invocation_return_value(invocation, g_variant_new(&quot;(b)&quot;, result));
-    } else
-        g_assert_not_reached();
-}
-
-static const GDBusInterfaceVTable interfaceVirtualTable = {
-    methodCallCallback, 0, 0, { 0, }
-};
-
-static void busAcquiredCallback(GDBusConnection* connection, const char* name, gpointer userData)
-{
-    static GDBusNodeInfo *introspectionData = 0;
-    if (!introspectionData)
-        introspectionData = g_dbus_node_info_new_for_xml(introspectionXML, 0);
-
-    GOwnPtr&lt;GError&gt; error;
-    unsigned registrationID = g_dbus_connection_register_object(
-        connection,
-        &quot;/org/webkit/gtk/WebProcessTest&quot;,
-        introspectionData-&gt;interfaces[0],
-        &amp;interfaceVirtualTable,
-        g_object_ref(userData),
-        static_cast&lt;GDestroyNotify&gt;(g_object_unref),
-        &amp;error.outPtr());
-    if (!registrationID)
-        g_warning(&quot;Failed to register object: %s\n&quot;, error-&gt;message);
-}
-
-extern &quot;C&quot; void webkit_web_extension_initialize(WebKitWebExtension* extension)
-{
-    g_bus_own_name(
-        G_BUS_TYPE_SESSION,
-        &quot;org.webkit.gtk.WebProcessTest&quot;,
-        G_BUS_NAME_OWNER_FLAGS_NONE,
-        busAcquiredCallback,
-        0, 0,
-        g_object_ref(extension),
-        static_cast&lt;GDestroyNotify&gt;(g_object_unref));
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTesth"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &lt;webkit2/webkit-web-extension.h&gt;
-#include &lt;wtf/Functional.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-class WebProcessTest {
-public:
-    virtual ~WebProcessTest() { }
-    virtual bool runTest(const char* testName, WebKitWebExtension*, GVariant* args) = 0;
-
-    static void add(const String&amp; testName, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt;);
-    static PassOwnPtr&lt;WebProcessTest&gt; create(const String&amp; testName);
-};
-
-#define REGISTER_TEST(ClassName, TestName) \
-    WebProcessTest::add(String::fromUTF8(TestName), WTF::bind(&amp;ClassName::create))
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,115 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebProcessTestRunner.h&quot;
-
-#include &lt;wtf/gobject/GOwnPtr.h&gt;
-
-WebProcessTestRunner::WebProcessTestRunner()
-    : m_mainLoop(g_main_loop_new(0, TRUE))
-    , m_bus(adoptGRef(g_test_dbus_new(G_TEST_DBUS_NONE)))
-{
-    // Save the DISPLAY env var to restore it after calling g_test_dbus_up() that unsets it.
-    // See https://bugs.webkit.org/show_bug.cgi?id=125621.
-    const char* display = g_getenv(&quot;DISPLAY&quot;);
-    g_test_dbus_up(m_bus.get());
-    g_setenv(&quot;DISPLAY&quot;, display, FALSE);
-    m_connection = adoptGRef(g_bus_get_sync(G_BUS_TYPE_SESSION, 0, 0));
-}
-
-WebProcessTestRunner::~WebProcessTestRunner()
-{
-    g_main_loop_unref(m_mainLoop);
-
-    // g_test_dbus_down waits until the connection is freed, so release our refs explicitly before calling it.
-    m_connection = 0;
-    m_proxy = 0;
-    g_test_dbus_down(m_bus.get());
-}
-
-void WebProcessTestRunner::proxyCreatedCallback(GObject*, GAsyncResult* result, WebProcessTestRunner* testRunner)
-{
-    testRunner-&gt;m_proxy = adoptGRef(g_dbus_proxy_new_finish(result, 0));
-    g_main_loop_quit(testRunner-&gt;m_mainLoop);
-}
-
-GDBusProxy* WebProcessTestRunner::proxy()
-{
-    if (m_proxy)
-        return m_proxy.get();
-
-    g_dbus_proxy_new(m_connection.get(), G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, 0,
-        &quot;org.webkit.gtk.WebProcessTest&quot;, &quot;/org/webkit/gtk/WebProcessTest&quot;, &quot;org.webkit.gtk.WebProcessTest&quot;,
-        0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(WebProcessTestRunner::proxyCreatedCallback), this);
-    g_main_loop_run(m_mainLoop);
-    g_assert(m_proxy.get());
-
-    return m_proxy.get();
-}
-
-void WebProcessTestRunner::onNameAppeared(GDBusConnection*, const char*, const char*, gpointer userData)
-{
-    WebProcessTestRunner* testRunner = static_cast&lt;WebProcessTestRunner*&gt;(userData);
-    g_main_loop_quit(testRunner-&gt;m_mainLoop);
-}
-
-void WebProcessTestRunner::onNameVanished(GDBusConnection*, const char* name, gpointer userData)
-{
-    _exit(1);
-}
-
-void WebProcessTestRunner::testFinishedCallback(GDBusProxy* proxy, GAsyncResult* result, WebProcessTestRunner* testRunner)
-{
-    GRefPtr&lt;GVariant&gt; returnValue = adoptGRef(g_dbus_proxy_call_finish(proxy, result, 0));
-    g_assert(returnValue.get());
-    gboolean testResult;
-    g_variant_get(returnValue.get(), &quot;(b)&quot;, &amp;testResult);
-    testRunner-&gt;finishTest(testResult);
-}
-
-bool WebProcessTestRunner::runTest(const char* suiteName, const char* testName, GVariant* args)
-{
-    g_assert(g_variant_is_of_type(args, G_VARIANT_TYPE_VARDICT));
-
-    unsigned watcherID = g_bus_watch_name_on_connection(m_connection.get(), &quot;org.webkit.gtk.WebProcessTest&quot;, G_BUS_NAME_WATCHER_FLAGS_NONE,
-        WebProcessTestRunner::onNameAppeared, WebProcessTestRunner::onNameVanished, this, 0);
-    g_main_loop_run(m_mainLoop);
-
-    m_testResult = false;
-    GOwnPtr&lt;char&gt; testPath(g_strdup_printf(&quot;%s/%s&quot;, suiteName, testName));
-    g_dbus_proxy_call(
-        proxy(),
-        &quot;RunTest&quot;,
-        g_variant_new(&quot;(s@a{sv})&quot;, testPath.get(), args),
-        G_DBUS_CALL_FLAGS_NONE,
-        -1, 0,
-        reinterpret_cast&lt;GAsyncReadyCallback&gt;(WebProcessTestRunner::testFinishedCallback),
-        this);
-    g_main_loop_run(m_mainLoop);
-    g_bus_unwatch_name(watcherID);
-
-    return m_testResult;
-}
-
-void WebProcessTestRunner::finishTest(bool result)
-{
-    m_testResult = result;
-    g_main_loop_quit(m_mainLoop);
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnerh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebProcessTestRunner_h
-#define WebProcessTestRunner_h
-
-#include &lt;gio/gio.h&gt;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/gobject/GRefPtr.h&gt;
-
-class WebProcessTestRunner {
-public:
-    WebProcessTestRunner();
-    ~WebProcessTestRunner();
-
-    bool runTest(const char* suiteName, const char* testName, GVariant* args);
-
-private:
-    static void proxyCreatedCallback(GObject*, GAsyncResult*, WebProcessTestRunner*);
-    static void onNameAppeared(GDBusConnection*, const char*, const char*, gpointer);
-    static void onNameVanished(GDBusConnection*, const char*, gpointer);
-    static void testFinishedCallback(GDBusProxy*, GAsyncResult*, WebProcessTestRunner*);
-
-    GDBusProxy* proxy();
-    void finishTest(bool result);
-
-    GMainLoop* m_mainLoop;
-    GRefPtr&lt;GTestDBus&gt; m_bus;
-    GRefPtr&lt;GDBusConnection&gt; m_connection;
-    GRefPtr&lt;GDBusProxy&gt; m_proxy;
-    bool m_testResult;
-};
-
-#endif // WebProcessTestRunner_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTestcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,444 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebViewTest.h&quot;
-
-#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
-#include &lt;WebCore/GOwnPtrGtk.h&gt;
-
-WebViewTest::WebViewTest()
-    : m_webView(WEBKIT_WEB_VIEW(g_object_ref_sink(webkit_web_view_new())))
-    , m_mainLoop(g_main_loop_new(0, TRUE))
-    , m_parentWindow(0)
-    , m_javascriptResult(0)
-    , m_resourceDataSize(0)
-    , m_surface(0)
-{
-    assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_webView));
-}
-
-WebViewTest::~WebViewTest()
-{
-    if (m_parentWindow)
-        gtk_widget_destroy(m_parentWindow);
-    if (m_javascriptResult)
-        webkit_javascript_result_unref(m_javascriptResult);
-    if (m_surface)
-        cairo_surface_destroy(m_surface);
-    g_object_unref(m_webView);
-    g_main_loop_unref(m_mainLoop);
-}
-
-void WebViewTest::loadURI(const char* uri)
-{
-    m_activeURI = uri;
-    webkit_web_view_load_uri(m_webView, uri);
-}
-
-void WebViewTest::loadHtml(const char* html, const char* baseURI)
-{
-    if (!baseURI)
-        m_activeURI = &quot;about:blank&quot;;
-    else
-        m_activeURI = baseURI;
-    webkit_web_view_load_html(m_webView, html, baseURI);
-}
-
-void WebViewTest::loadPlainText(const char* plainText)
-{
-    m_activeURI = &quot;about:blank&quot;;
-    webkit_web_view_load_plain_text(m_webView, plainText);
-}
-
-void WebViewTest::loadRequest(WebKitURIRequest* request)
-{
-    m_activeURI = webkit_uri_request_get_uri(request);
-    webkit_web_view_load_request(m_webView, request);
-}
-
-void WebViewTest::loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI)
-{
-    m_activeURI = contentURI;
-    webkit_web_view_load_alternate_html(m_webView, html, contentURI, baseURI);
-}
-
-void WebViewTest::goBack()
-{
-    if (webkit_web_view_can_go_back(m_webView)) {
-        WebKitBackForwardList* list = webkit_web_view_get_back_forward_list(m_webView);
-        WebKitBackForwardListItem* item = webkit_back_forward_list_get_nth_item(list, -1);
-        m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
-    }
-
-    // Call go_back even when can_go_back returns FALSE to check nothing happens.
-    webkit_web_view_go_back(m_webView);
-}
-
-void WebViewTest::goForward()
-{
-    if (webkit_web_view_can_go_forward(m_webView)) {
-        WebKitBackForwardList* list = webkit_web_view_get_back_forward_list(m_webView);
-        WebKitBackForwardListItem* item = webkit_back_forward_list_get_nth_item(list, 1);
-        m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
-    }
-
-    // Call go_forward even when can_go_forward returns FALSE to check nothing happens.
-    webkit_web_view_go_forward(m_webView);
-}
-
-void WebViewTest::goToBackForwardListItem(WebKitBackForwardListItem* item)
-{
-    m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
-    webkit_web_view_go_to_back_forward_list_item(m_webView, item);
-}
-
-void WebViewTest::quitMainLoop()
-{
-    g_main_loop_quit(m_mainLoop);
-}
-
-void WebViewTest::quitMainLoopAfterProcessingPendingEvents()
-{
-    while (gtk_events_pending())
-        gtk_main_iteration();
-    quitMainLoop();
-}
-
-static gboolean quitMainLoopIdleCallback(WebViewTest* test)
-{
-    test-&gt;quitMainLoop();
-    return FALSE;
-}
-
-void WebViewTest::wait(double seconds)
-{
-    g_timeout_add_seconds(seconds, reinterpret_cast&lt;GSourceFunc&gt;(quitMainLoopIdleCallback), this);
-    g_main_loop_run(m_mainLoop);
-}
-
-static void loadChanged(WebKitWebView* webView, WebKitLoadEvent loadEvent, WebViewTest* test)
-{
-    if (loadEvent != WEBKIT_LOAD_FINISHED)
-        return;
-    g_signal_handlers_disconnect_by_func(webView, reinterpret_cast&lt;void*&gt;(loadChanged), test);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-void WebViewTest::waitUntilLoadFinished()
-{
-    g_signal_connect(m_webView, &quot;load-changed&quot;, G_CALLBACK(loadChanged), this);
-    g_main_loop_run(m_mainLoop);
-}
-
-static void titleChanged(WebKitWebView* webView, GParamSpec*, WebViewTest* test)
-{
-    if (!test-&gt;m_expectedTitle.isNull() &amp;&amp; test-&gt;m_expectedTitle != webkit_web_view_get_title(webView))
-        return;
-
-    g_signal_handlers_disconnect_by_func(webView, reinterpret_cast&lt;void*&gt;(titleChanged), test);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-void WebViewTest::waitUntilTitleChangedTo(const char* expectedTitle)
-{
-    m_expectedTitle = expectedTitle;
-    g_signal_connect(m_webView, &quot;notify::title&quot;, G_CALLBACK(titleChanged), this);
-    g_main_loop_run(m_mainLoop);
-    m_expectedTitle = CString();
-}
-
-void WebViewTest::waitUntilTitleChanged()
-{
-    waitUntilTitleChangedTo(0);
-}
-
-static gboolean parentWindowMapped(GtkWidget* widget, GdkEvent*, WebViewTest* test)
-{
-    g_signal_handlers_disconnect_by_func(widget, reinterpret_cast&lt;void*&gt;(parentWindowMapped), test);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-
-    return FALSE;
-}
-
-void WebViewTest::showInWindow(GtkWindowType windowType)
-{
-    g_assert(!m_parentWindow);
-    m_parentWindow = gtk_window_new(windowType);
-    gtk_container_add(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
-    gtk_widget_show(GTK_WIDGET(m_webView));
-    gtk_widget_show(m_parentWindow);
-}
-
-void WebViewTest::showInWindowAndWaitUntilMapped(GtkWindowType windowType)
-{
-    g_assert(!m_parentWindow);
-    m_parentWindow = gtk_window_new(windowType);
-    gtk_container_add(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
-    gtk_widget_show(GTK_WIDGET(m_webView));
-
-    g_signal_connect(m_parentWindow, &quot;map-event&quot;, G_CALLBACK(parentWindowMapped), this);
-    gtk_widget_show(m_parentWindow);
-    g_main_loop_run(m_mainLoop);
-}
-
-void WebViewTest::resizeView(int width, int height)
-{
-    GtkAllocation allocation;
-    gtk_widget_get_allocation(GTK_WIDGET(m_webView), &amp;allocation);
-    if (width != -1)
-        allocation.width = width;
-    if (height != -1)
-        allocation.height = height;
-    gtk_widget_size_allocate(GTK_WIDGET(m_webView), &amp;allocation);
-}
-
-void WebViewTest::selectAll()
-{
-    webkit_web_view_execute_editing_command(m_webView, &quot;SelectAll&quot;);
-}
-
-static void resourceGetDataCallback(GObject* object, GAsyncResult* result, gpointer userData)
-{
-    size_t dataSize;
-    GOwnPtr&lt;GError&gt; error;
-    unsigned char* data = webkit_web_resource_get_data_finish(WEBKIT_WEB_RESOURCE(object), result, &amp;dataSize, &amp;error.outPtr());
-    g_assert(data);
-
-    WebViewTest* test = static_cast&lt;WebViewTest*&gt;(userData);
-    test-&gt;m_resourceData.set(reinterpret_cast&lt;char*&gt;(data));
-    test-&gt;m_resourceDataSize = dataSize;
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-const char* WebViewTest::mainResourceData(size_t&amp; mainResourceDataSize)
-{
-    m_resourceDataSize = 0;
-    m_resourceData.clear();
-    WebKitWebResource* resource = webkit_web_view_get_main_resource(m_webView);
-    g_assert(resource);
-
-    webkit_web_resource_get_data(resource, 0, resourceGetDataCallback, this);
-    g_main_loop_run(m_mainLoop);
-
-    mainResourceDataSize = m_resourceDataSize;
-    return m_resourceData.get();
-}
-
-void WebViewTest::mouseMoveTo(int x, int y, unsigned int mouseModifiers)
-{
-    g_assert(m_parentWindow);
-    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
-    g_assert(gtk_widget_get_realized(viewWidget));
-
-    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(GDK_MOTION_NOTIFY));
-    event-&gt;motion.x = x;
-    event-&gt;motion.y = y;
-
-    event-&gt;motion.time = GDK_CURRENT_TIME;
-    event-&gt;motion.window = gtk_widget_get_window(viewWidget);
-    g_object_ref(event-&gt;motion.window);
-    event-&gt;motion.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
-    event-&gt;motion.state = mouseModifiers;
-    event-&gt;motion.axes = 0;
-
-    int xRoot, yRoot;
-    gdk_window_get_root_coords(gtk_widget_get_window(viewWidget), x, y, &amp;xRoot, &amp;yRoot);
-    event-&gt;motion.x_root = xRoot;
-    event-&gt;motion.y_root = yRoot;
-    gtk_main_do_event(event.get());
-}
-
-void WebViewTest::clickMouseButton(int x, int y, unsigned int button, unsigned int mouseModifiers)
-{
-    doMouseButtonEvent(GDK_BUTTON_PRESS, x, y, button, mouseModifiers);
-    doMouseButtonEvent(GDK_BUTTON_RELEASE, x, y, button, mouseModifiers);
-}
-
-void WebViewTest::keyStroke(unsigned int keyVal, unsigned int keyModifiers)
-{
-    g_assert(m_parentWindow);
-    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
-    g_assert(gtk_widget_get_realized(viewWidget));
-
-    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(GDK_KEY_PRESS));
-    event-&gt;key.keyval = keyVal;
-
-    event-&gt;key.time = GDK_CURRENT_TIME;
-    event-&gt;key.window = gtk_widget_get_window(viewWidget);
-    g_object_ref(event-&gt;key.window);
-    gdk_event_set_device(event.get(), gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget))));
-    event-&gt;key.state = keyModifiers;
-
-    // When synthesizing an event, an invalid hardware_keycode value can cause it to be badly processed by GTK+.
-    GOwnPtr&lt;GdkKeymapKey&gt; keys;
-    int keysCount;
-    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keyVal, &amp;keys.outPtr(), &amp;keysCount))
-        event-&gt;key.hardware_keycode = keys.get()[0].keycode;
-
-    gtk_main_do_event(event.get());
-    event-&gt;key.type = GDK_KEY_RELEASE;
-    gtk_main_do_event(event.get());
-}
-
-void WebViewTest::doMouseButtonEvent(GdkEventType eventType, int x, int y, unsigned int button, unsigned int mouseModifiers)
-{
-    g_assert(m_parentWindow);
-    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
-    g_assert(gtk_widget_get_realized(viewWidget));
-
-    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(eventType));
-    event-&gt;button.window = gtk_widget_get_window(viewWidget);
-    g_object_ref(event-&gt;button.window);
-
-    event-&gt;button.time = GDK_CURRENT_TIME;
-    event-&gt;button.x = x;
-    event-&gt;button.y = y;
-    event-&gt;button.axes = 0;
-    event-&gt;button.state = mouseModifiers;
-    event-&gt;button.button = button;
-
-    event-&gt;button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
-
-    int xRoot, yRoot;
-    gdk_window_get_root_coords(gtk_widget_get_window(viewWidget), x, y, &amp;xRoot, &amp;yRoot);
-    event-&gt;button.x_root = xRoot;
-    event-&gt;button.y_root = yRoot;
-    gtk_main_do_event(event.get());
-}
-
-static void runJavaScriptReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test)
-{
-    test-&gt;m_javascriptResult = webkit_web_view_run_javascript_finish(test-&gt;m_webView, result, test-&gt;m_javascriptError);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-static void runJavaScriptFromGResourceReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test)
-{
-    test-&gt;m_javascriptResult = webkit_web_view_run_javascript_from_gresource_finish(test-&gt;m_webView, result, test-&gt;m_javascriptError);
-    g_main_loop_quit(test-&gt;m_mainLoop);
-}
-
-WebKitJavascriptResult* WebViewTest::runJavaScriptAndWaitUntilFinished(const char* javascript, GError** error)
-{
-    if (m_javascriptResult)
-        webkit_javascript_result_unref(m_javascriptResult);
-    m_javascriptResult = 0;
-    m_javascriptError = error;
-    webkit_web_view_run_javascript(m_webView, javascript, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptReadyCallback), this);
-    g_main_loop_run(m_mainLoop);
-
-    return m_javascriptResult;
-}
-
-WebKitJavascriptResult* WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished(const char* resource, GError** error)
-{
-    if (m_javascriptResult)
-        webkit_javascript_result_unref(m_javascriptResult);
-    m_javascriptResult = 0;
-    m_javascriptError = error;
-    webkit_web_view_run_javascript_from_gresource(m_webView, resource, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptFromGResourceReadyCallback), this);
-    g_main_loop_run(m_mainLoop);
-
-    return m_javascriptResult;
-}
-
-static char* jsValueToCString(JSGlobalContextRef context, JSValueRef value)
-{
-    g_assert(value);
-    g_assert(JSValueIsString(context, value));
-
-    JSRetainPtr&lt;JSStringRef&gt; stringValue(Adopt, JSValueToStringCopy(context, value, 0));
-    g_assert(stringValue);
-
-    size_t cStringLength = JSStringGetMaximumUTF8CStringSize(stringValue.get());
-    char* cString = static_cast&lt;char*&gt;(g_malloc(cStringLength));
-    JSStringGetUTF8CString(stringValue.get(), cString, cStringLength);
-    return cString;
-}
-
-char* WebViewTest::javascriptResultToCString(WebKitJavascriptResult* javascriptResult)
-{
-    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
-    g_assert(context);
-    return jsValueToCString(context, webkit_javascript_result_get_value(javascriptResult));
-}
-
-double WebViewTest::javascriptResultToNumber(WebKitJavascriptResult* javascriptResult)
-{
-    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
-    g_assert(context);
-    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
-    g_assert(value);
-    g_assert(JSValueIsNumber(context, value));
-
-    return JSValueToNumber(context, value, 0);
-}
-
-bool WebViewTest::javascriptResultToBoolean(WebKitJavascriptResult* javascriptResult)
-{
-    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
-    g_assert(context);
-    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
-    g_assert(value);
-    g_assert(JSValueIsBoolean(context, value));
-
-    return JSValueToBoolean(context, value);
-}
-
-bool WebViewTest::javascriptResultIsNull(WebKitJavascriptResult* javascriptResult)
-{
-    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
-    g_assert(context);
-    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
-    g_assert(value);
-
-    return JSValueIsNull(context, value);
-}
-
-bool WebViewTest::javascriptResultIsUndefined(WebKitJavascriptResult* javascriptResult)
-{
-    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
-    g_assert(context);
-    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
-    g_assert(value);
-
-    return JSValueIsUndefined(context, value);
-}
-
-static void onSnapshotReady(WebKitWebView* web_view, GAsyncResult* res, WebViewTest* test)
-{
-    GOwnPtr&lt;GError&gt; error;
-    test-&gt;m_surface = webkit_web_view_get_snapshot_finish(web_view, res, &amp;error.outPtr());
-    g_assert(!test-&gt;m_surface || !error.get());
-    if (error)
-        g_assert_error(error.get(), WEBKIT_SNAPSHOT_ERROR, WEBKIT_SNAPSHOT_ERROR_FAILED_TO_CREATE);
-    test-&gt;quitMainLoop();
-}
-
-cairo_surface_t* WebViewTest::getSnapshotAndWaitUntilReady(WebKitSnapshotRegion region, WebKitSnapshotOptions options)
-{
-    if (m_surface)
-        cairo_surface_destroy(m_surface);
-    m_surface = 0;
-    webkit_web_view_get_snapshot(m_webView, region, options, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(onSnapshotReady), this);
-    g_main_loop_run(m_mainLoop);
-    return m_surface;
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTesth"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,86 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Igalia S.L.
- * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebViewTest_h
-#define WebViewTest_h
-
-#include &quot;TestMain.h&quot;
-#include &lt;webkit2/webkit2.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-class WebViewTest: public Test {
-public:
-    MAKE_GLIB_TEST_FIXTURE(WebViewTest);
-    WebViewTest();
-    virtual ~WebViewTest();
-
-    virtual void loadURI(const char* uri);
-    virtual void loadHtml(const char* html, const char* baseURI);
-    virtual void loadPlainText(const char* plainText);
-    virtual void loadRequest(WebKitURIRequest*);
-    void loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI);
-    void goBack();
-    void goForward();
-    void goToBackForwardListItem(WebKitBackForwardListItem*);
-
-    void quitMainLoop();
-    void quitMainLoopAfterProcessingPendingEvents();
-    void wait(double seconds);
-    void waitUntilLoadFinished();
-    void waitUntilTitleChangedTo(const char* expectedTitle);
-    void waitUntilTitleChanged();
-    void showInWindow(GtkWindowType = GTK_WINDOW_POPUP);
-    void showInWindowAndWaitUntilMapped(GtkWindowType = GTK_WINDOW_POPUP);
-    void resizeView(int width, int height);
-    void selectAll();
-    const char* mainResourceData(size_t&amp; mainResourceDataSize);
-
-    void mouseMoveTo(int x, int y, unsigned int mouseModifiers = 0);
-    void clickMouseButton(int x, int y, unsigned int button = 1, unsigned int mouseModifiers = 0);
-    void keyStroke(unsigned int keyVal, unsigned int keyModifiers = 0);
-
-    WebKitJavascriptResult* runJavaScriptAndWaitUntilFinished(const char* javascript, GError**);
-    WebKitJavascriptResult* runJavaScriptFromGResourceAndWaitUntilFinished(const char* resource, GError**);
-
-    // Javascript result helpers.
-    static char* javascriptResultToCString(WebKitJavascriptResult*);
-    static double javascriptResultToNumber(WebKitJavascriptResult*);
-    static bool javascriptResultToBoolean(WebKitJavascriptResult*);
-    static bool javascriptResultIsNull(WebKitJavascriptResult*);
-    static bool javascriptResultIsUndefined(WebKitJavascriptResult*);
-
-    cairo_surface_t* getSnapshotAndWaitUntilReady(WebKitSnapshotRegion, WebKitSnapshotOptions);
-
-    WebKitWebView* m_webView;
-    GMainLoop* m_mainLoop;
-    CString m_activeURI;
-    GtkWidget* m_parentWindow;
-    CString m_expectedTitle;
-    WebKitJavascriptResult* m_javascriptResult;
-    GError** m_javascriptError;
-    GOwnPtr&lt;char&gt; m_resourceData;
-    size_t m_resourceDataSize;
-    cairo_surface_t* m_surface;
-
-private:
-    void doMouseButtonEvent(GdkEventType, int, int, unsigned int, unsigned int);
-};
-
-#endif // WebViewTest_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceslinktitlejs"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-window.document.getElementById('WebKitLink').title;
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestcertpem"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>------BEGIN CERTIFICATE-----
-MIIB9jCCAV+gAwIBAgIJALeuXBo+vwz9MA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
-BAMMCTEyNy4wLjAuMTAeFw0xMjA3MTIxMjQ4MjRaFw0yMjA3MTAxMjQ4MjRaMBQx
-EjAQBgNVBAMMCTEyNy4wLjAuMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-0TUzOQxHBIKDD2mkuq+tU92mQvDZg73B0G+Nhr2T2G6MbcLqIwjg1QYtBZWJ83tZ
-xMMEfiweHLF85Z9ohavAgxJlKG7YmvZO79KkFpmjV2W5CVRm0eYMPnzmxNCoaYqo
-DLl0zsH6KZOLPKu/fX4eDX9XpAP1f83hWB1UFBmHKN8CAwEAAaNQME4wHQYDVR0O
-BBYEFDHv5ZQ1BdmhzTsDUEoY55EXyUdKMB8GA1UdIwQYMBaAFDHv5ZQ1BdmhzTsD
-UEoY55EXyUdKMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAh3qMBx7v
-jSodMf3OyTqTLE7deLnmnCeBVpgzxRZEoizcGqYcjiqO27i5N5Z6KVQsnITnLiyC
-mUtuR5KnF69uTKUw4m/ugZe5whjig5Mq2l410KVK6EeG4tdLlfXR+wi4U5K4KjP6
-p4nchQUXLa2zcbJn+VBexJn6/9wdhr+DUGY=
------END CERTIFICATE-----
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestkeypem"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>------BEGIN PRIVATE KEY-----
-MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANE1MzkMRwSCgw9p
-pLqvrVPdpkLw2YO9wdBvjYa9k9hujG3C6iMI4NUGLQWVifN7WcTDBH4sHhyxfOWf
-aIWrwIMSZShu2Jr2Tu/SpBaZo1dluQlUZtHmDD585sTQqGmKqAy5dM7B+imTizyr
-v31+Hg1/V6QD9X/N4VgdVBQZhyjfAgMBAAECgYB2QwOUsRsIMprRwJ9tJNfvO7G7
-z5i1/zOrlxPC4jHMPBnIBlICwgcOhLI4oOLdr5H8R12n0VqoT7DRwP396iwlJipF
-iO1heDMn/8z8LPGwkCK/+ck04rMDksxWIdMwYKBXt9ahnJ/xRLzQ1/3AJiAGnoe5
-/QLXQweofd4mmfsjKQJBAO2CwT7uMP6nMjXgtVMJq5QP8UbeCS1sEOPJJbHuDxJB
-/HePQHBjq4kzG6CL4oO7T+5fDv4g+fIIHzuXerZ0imsCQQDhfmiTIc9OucEIfg6/
-ms0JiKSmWc+qoiOCtrILuQvFoNwJRciQANqeJs6wpaDvevSUvBLGfG/7b3HvaE5X
-iqBdAkBEQIvp2qcHtuJN60oQF7pPrRknxUyb2e8sljQX4pJAK+gyL19ULMAxiBdL
-Vod8VYqNtJFpY+6Pp9fZ1xjzb6ALAkEA4JzrDAw0lQXA+3WduUw4ixOadr2ldyG0
-36KebcDwsfZO18m0Q4UmPz0Gy7zgN0wxzuochaw0W6+iPUiYKOlEXQJBAMWQrPlu
-rrinoZS2f8doJ9BNNUa+RNpMug6UXc55qoUJlyiXEh+tu4AaMOtxuGIyC0sAcuw6
-XdAPVPXKd7Mne70=
------END PRIVATE KEY-----
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceswebkit2gtktestsgresourcexml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;gresources&gt;
-  &lt;gresource prefix=&quot;/org/webkit/webkit2gtk/tests/&quot;&gt;
-    &lt;file alias=&quot;link-title.js&quot;&gt;Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js&lt;/file&gt;
-  &lt;/gresource&gt;
-&lt;/gresources&gt;
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Tools/ChangeLog (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/ChangeLog        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Tools/ChangeLog        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,3 +1,103 @@
</span><ins>+2014-01-04  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=126342
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Include the new unit tests subdirectories.
+        * Scripts/run-gtk-tests: Update to refer to the new build locations.
+        * Scripts/webkitpy/style/checker.py: Update the style checker.
+        * Scripts/webkitpy/style/checker_unittest.py:
+        * TestWebKitAPI/GNUmakefile.am:
+        * TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Added.
+        * TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp: Added.
+        * TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/LoadTrackingTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/LoadTrackingTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp: Added.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestMain.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestMain.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestBus.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestBus.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestServer.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebKitTestServer.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTestRunner.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTestRunner.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp.
+        * TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.h: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h.
+        * TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js.
+        * TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem.
+        * TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem.
+        * TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml.
+        * TestWebKitAPI/Tests/WebKitGtk/CMakeLists.txt: Added.
+        * TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico: Renamed from Source/WebKit/gtk/tests/resources/blank.ico.
+        * TestWebKitAPI/Tests/WebKitGtk/resources/test.html: Renamed from Source/WebKit/gtk/tests/resources/test.html.
+        * TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg: Renamed from Source/WebKit/gtk/tests/resources/test.ogg.
+        * TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf: Renamed from Source/WebKit/gtk/tests/resources/test.pdf.
+        * TestWebKitAPI/Tests/WebKitGtk/resources/test.txt: Renamed from Source/WebKit/gtk/tests/resources/test.txt.
+        * TestWebKitAPI/Tests/WebKitGtk/test_utils.c: Renamed from Source/WebKit/gtk/tests/test_utils.c.
+        * TestWebKitAPI/Tests/WebKitGtk/test_utils.h: Renamed from Source/WebKit/gtk/tests/test_utils.h.
+        * TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c: Renamed from Source/WebKit/gtk/tests/testapplicationcache.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testatk.c: Renamed from Source/WebKit/gtk/tests/testatk.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testatkroles.c: Renamed from Source/WebKit/gtk/tests/testatkroles.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c: Renamed from Source/WebKit/gtk/tests/testcontextmenu.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c: Renamed from Source/WebKit/gtk/tests/testcopyandpaste.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c: Renamed from Source/WebKit/gtk/tests/testdomdocument.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c: Renamed from Source/WebKit/gtk/tests/testdomdomwindow.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testdomnode.c: Renamed from Source/WebKit/gtk/tests/testdomnode.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testdownload.c: Renamed from Source/WebKit/gtk/tests/testdownload.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c: Renamed from Source/WebKit/gtk/tests/testfavicondatabase.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testglobals.c: Renamed from Source/WebKit/gtk/tests/testglobals.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c: Renamed from Source/WebKit/gtk/tests/testhittestresult.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c: Renamed from Source/WebKit/gtk/tests/testhttpbackend.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c: Renamed from Source/WebKit/gtk/tests/testkeyevents.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testloading.c: Renamed from Source/WebKit/gtk/tests/testloading.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c: Renamed from Source/WebKit/gtk/tests/testmimehandling.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c: Renamed from Source/WebKit/gtk/tests/testnetworkrequest.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c: Renamed from Source/WebKit/gtk/tests/testnetworkresponse.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c: Renamed from Source/WebKit/gtk/tests/testwebbackforwardlist.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c: Renamed from Source/WebKit/gtk/tests/testwebdatasource.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebframe.c: Renamed from Source/WebKit/gtk/tests/testwebframe.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c: Renamed from Source/WebKit/gtk/tests/testwebhistoryitem.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c: Renamed from Source/WebKit/gtk/tests/testwebinspector.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c: Renamed from Source/WebKit/gtk/tests/testwebplugindatabase.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebresource.c: Renamed from Source/WebKit/gtk/tests/testwebresource.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c: Renamed from Source/WebKit/gtk/tests/testwebsettings.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwebview.c: Renamed from Source/WebKit/gtk/tests/testwebview.c.
+        * TestWebKitAPI/Tests/WebKitGtk/testwindow.c: Renamed from Source/WebKit/gtk/tests/testwindow.c.
+
</ins><span class="cx"> 2013-12-06  Lukasz Gajowy  &lt;l.gajowy@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ATK] Missing aria roles mappings
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsScriptsrungtktests"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Tools/Scripts/run-gtk-tests (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/Scripts/run-gtk-tests        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Tools/Scripts/run-gtk-tests        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -58,31 +58,31 @@
</span><span class="cx">     pass
</span><span class="cx"> 
</span><span class="cx"> class TestRunner:
</span><del>-    TEST_DIRS = [ &quot;unittests&quot;, &quot;WebKit2APITests&quot;, &quot;TestWebKitAPI&quot; ]
</del><ins>+    TEST_DIRS = [ &quot;WebKit2Gtk&quot;, &quot;WebKitGtk&quot;, &quot;WebKit2&quot;, &quot;JavaScriptCore&quot;, &quot;WTF&quot;, &quot;WebCore&quot;,  &quot;WebCoreGtk&quot; ]
</ins><span class="cx"> 
</span><span class="cx">     SKIPPED = [
</span><del>-        SkippedTest(&quot;unittests/testdownload&quot;, &quot;/webkit/download/not-found&quot;, &quot;Test fails in GTK Linux 64-bit Release bot&quot;, 82329),
-        SkippedTest(&quot;unittests/testwebinspector&quot;, &quot;/webkit/webinspector/close-and-inspect&quot;, &quot;Test is flaky in GTK Linux 32-bit Release bot&quot;, 82869),
-        SkippedTest(&quot;unittests/testwebresource&quot;, &quot;/webkit/webresource/loading&quot;, &quot;Test fails&quot;, 104689),
-        SkippedTest(&quot;unittests/testwebresource&quot;, &quot;/webkit/webresource/sub_resource_loading&quot;, &quot;Test fails in GTK Linux 64-bit Release bot&quot;, 82330),
-        SkippedTest(&quot;unittests/testwebview&quot;, &quot;/webkit/webview/icon-uri&quot;, &quot;Test times out in GTK Linux 64-bit Release bot&quot;, 82328),
-        SkippedTest(&quot;WebKit2APITests/TestResources&quot;, &quot;/webkit2/WebKitWebView/resources&quot;, &quot;Test is flaky in GTK Linux 32-bit Release bot&quot;, 82868),
-        SkippedTest(&quot;WebKit2APITests/TestUIClient&quot;, &quot;/webkit2/WebKitWebView/mouse-target&quot;, &quot;Test times out after r150890&quot;, 117689),
-        SkippedTest(&quot;WebKit2APITests/TestAuthentication&quot;, SkippedTest.ENTIRE_SUITE, &quot;Test times out after r150890&quot;, 117689),
-        SkippedTest(&quot;WebKit2APITests/TestContextMenu&quot;, SkippedTest.ENTIRE_SUITE, &quot;Test times out after r150890&quot;, 117689),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.MouseMoveAfterCrash&quot;, &quot;Test is flaky&quot;, 85066),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.NewFirstVisuallyNonEmptyLayoutForImages&quot;, &quot;Test is flaky&quot;, 85066),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.NewFirstVisuallyNonEmptyLayoutFrames&quot;, &quot;Test fails&quot;, 85037),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.RestoreSessionStateContainingFormData&quot;, &quot;Session State is not implemented in GTK+ port&quot;, 84960),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.SpacebarScrolling&quot;, &quot;Test fails&quot;, 84961),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.WKConnection&quot;, &quot;Tests fail and time out out&quot;, 84959),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.WKPageGetScaleFactorNotZero&quot;, &quot;Test fails and times out&quot;, 88455),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.ForceRepaint&quot;, &quot;Test times out&quot;, 105532),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.ReloadPageAfterCrash&quot;, &quot;Test flakily times out&quot;, 110129),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.DidAssociateFormControls&quot;, &quot;Test times out&quot;, 120302),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.InjectedBundleFrameHitTest&quot;, &quot;Test times out&quot;, 120303),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.ResizeReversePaginatedWebView&quot;, &quot;Test fails&quot;, 120305),
-        SkippedTest(&quot;TestWebKitAPI/TestWebKit2&quot;, &quot;WebKit2.ScrollPinningBehaviors&quot;, &quot;Test fails&quot;, 120306),
</del><ins>+        SkippedTest(&quot;WebKitGtk/testdownload&quot;, &quot;/webkit/download/not-found&quot;, &quot;Test fails in GTK Linux 64-bit Release bot&quot;, 82329),
+        SkippedTest(&quot;WebKitGtk/testwebinspector&quot;, &quot;/webkit/webinspector/close-and-inspect&quot;, &quot;Test is flaky in GTK Linux 32-bit Release bot&quot;, 82869),
+        SkippedTest(&quot;WebKitGtk/testwebresource&quot;, &quot;/webkit/webresource/loading&quot;, &quot;Test fails&quot;, 104689),
+        SkippedTest(&quot;WebKitGtk/testwebresource&quot;, &quot;/webkit/webresource/sub_resource_loading&quot;, &quot;Test fails in GTK Linux 64-bit Release bot&quot;, 82330),
+        SkippedTest(&quot;WebKitGtk/testwebview&quot;, &quot;/webkit/webview/icon-uri&quot;, &quot;Test times out in GTK Linux 64-bit Release bot&quot;, 82328),
+        SkippedTest(&quot;WebKit2Gtk/TestResources&quot;, &quot;/webkit2/WebKitWebView/resources&quot;, &quot;Test is flaky in GTK Linux 32-bit Release bot&quot;, 82868),
+        SkippedTest(&quot;WebKit2Gtk/TestUIClient&quot;, &quot;/webkit2/WebKitWebView/mouse-target&quot;, &quot;Test times out after r150890&quot;, 117689),
+        SkippedTest(&quot;WebKit2Gtk/TestAuthentication&quot;, SkippedTest.ENTIRE_SUITE, &quot;Test times out after r150890&quot;, 117689),
+        SkippedTest(&quot;WebKit2Gtk/TestContextMenu&quot;, SkippedTest.ENTIRE_SUITE, &quot;Test times out after r150890&quot;, 117689),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.MouseMoveAfterCrash&quot;, &quot;Test is flaky&quot;, 85066),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.NewFirstVisuallyNonEmptyLayoutForImages&quot;, &quot;Test is flaky&quot;, 85066),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.NewFirstVisuallyNonEmptyLayoutFrames&quot;, &quot;Test fails&quot;, 85037),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.RestoreSessionStateContainingFormData&quot;, &quot;Session State is not implemented in GTK+ port&quot;, 84960),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.SpacebarScrolling&quot;, &quot;Test fails&quot;, 84961),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.WKConnection&quot;, &quot;Tests fail and time out out&quot;, 84959),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.WKPageGetScaleFactorNotZero&quot;, &quot;Test fails and times out&quot;, 88455),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.ForceRepaint&quot;, &quot;Test times out&quot;, 105532),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.ReloadPageAfterCrash&quot;, &quot;Test flakily times out&quot;, 110129),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.DidAssociateFormControls&quot;, &quot;Test times out&quot;, 120302),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.InjectedBundleFrameHitTest&quot;, &quot;Test times out&quot;, 120303),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.ResizeReversePaginatedWebView&quot;, &quot;Test fails&quot;, 120305),
+        SkippedTest(&quot;WebKit2/TestWebKit2&quot;, &quot;WebKit2.ScrollPinningBehaviors&quot;, &quot;Test fails&quot;, 120306),
</ins><span class="cx">     ]
</span><span class="cx"> 
</span><span class="cx">     def __init__(self, options, tests=[]):
</span><span class="lines">@@ -100,6 +100,9 @@
</span><span class="cx">         self._spi_registryd = None
</span><span class="cx">         self._spi_bus_launcher = None
</span><span class="cx"> 
</span><ins>+    def _test_programs_base_dir(self):
+        return os.path.join(self._programs_path, &quot;TestWebKitAPI&quot;)
+
</ins><span class="cx">     def _get_tests_from_dir(self, test_dir):
</span><span class="cx">         if not os.path.isdir(test_dir):
</span><span class="cx">             return []
</span><span class="lines">@@ -125,7 +128,7 @@
</span><span class="cx"> 
</span><span class="cx">         tests = []
</span><span class="cx">         for test_dir in self.TEST_DIRS:
</span><del>-            absolute_test_dir = os.path.join(self._programs_path, test_dir)
</del><ins>+            absolute_test_dir = os.path.join(self._test_programs_base_dir(), test_dir)
</ins><span class="cx">             tests.extend(self._get_tests_from_dir(absolute_test_dir))
</span><span class="cx">         return tests
</span><span class="cx"> 
</span><span class="lines">@@ -330,17 +333,18 @@
</span><span class="cx">         return self._run_test_command(tester_command, self._options.timeout)
</span><span class="cx"> 
</span><span class="cx">     def _run_test(self, test_program):
</span><del>-        if &quot;unittests&quot; in test_program or &quot;WebKit2APITests&quot; in test_program:
</del><ins>+        basedir = os.path.basename(os.path.dirname(test_program))
+        if basedir in [&quot;WebKit2Gtk&quot;, &quot;WebKitGtk&quot;]:
</ins><span class="cx">             return self._run_test_glib(test_program)
</span><span class="cx"> 
</span><del>-        if &quot;TestWebKitAPI&quot; in test_program:
</del><ins>+        if basedir in [&quot;WebKit2&quot;, &quot;JavaScriptCore&quot;, &quot;WTF&quot;, &quot;WebCore&quot;,  &quot;WebCoreGtk&quot;]:
</ins><span class="cx">             return self._run_test_google(test_program)
</span><span class="cx"> 
</span><span class="cx">         return False
</span><span class="cx"> 
</span><span class="cx">     def run_tests(self):
</span><span class="cx">         if not self._tests:
</span><del>-            sys.stderr.write(&quot;ERROR: tests not found in %s.\n&quot; % (self._programs_path))
</del><ins>+            sys.stderr.write(&quot;ERROR: tests not found in %s.\n&quot; % (self._test_programs_base_dir()))
</ins><span class="cx">             sys.stderr.flush()
</span><span class="cx">             return 1
</span><span class="cx"> 
</span><span class="lines">@@ -369,12 +373,12 @@
</span><span class="cx">             self._tear_down_testing_environment()
</span><span class="cx"> 
</span><span class="cx">         if failed_tests:
</span><del>-            names = [test.replace(self._programs_path, '', 1) for test in failed_tests]
</del><ins>+            names = [test.replace(self._test_programs_base_dir(), '', 1) for test in failed_tests]
</ins><span class="cx">             sys.stdout.write(&quot;Tests failed (%d): %s\n&quot; % (len(names), &quot;, &quot;.join(names)))
</span><span class="cx">             sys.stdout.flush()
</span><span class="cx"> 
</span><span class="cx">         if timed_out_tests:
</span><del>-            names = [test.replace(self._programs_path, '', 1) for test in timed_out_tests]
</del><ins>+            names = [test.replace(self._test_programs_base_dir(), '', 1) for test in timed_out_tests]
</ins><span class="cx">             sys.stdout.write(&quot;Tests that timed out (%d): %s\n&quot; % (len(names), &quot;, &quot;.join(names)))
</span><span class="cx">             sys.stdout.flush()
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsScriptswebkitpystylecheckerpy"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker.py (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker.py        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker.py        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -327,7 +327,7 @@
</span><span class="cx"> # WebKit maintains some files in Mozilla style on purpose to ease
</span><span class="cx"> # future merges.
</span><span class="cx"> _SKIPPED_FILES_WITH_WARNING = [
</span><del>-    &quot;Source/WebKit/gtk/tests/&quot;,
</del><ins>+    &quot;Tools/TestWebKitAPI/Tests/WebKitGtk/&quot;,
</ins><span class="cx">     # All WebKit*.h files in Source/WebKit2/UIProcess/API/gtk,
</span><span class="cx">     # except those ending in ...Private.h are GTK+ API headers,
</span><span class="cx">     # which differ greatly from WebKit coding style.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsScriptswebkitpystylechecker_unittestpy"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker_unittest.py (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker_unittest.py        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Tools/Scripts/webkitpy/style/checker_unittest.py        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">         &quot;&quot;&quot;Test should_skip_with_warning().&quot;&quot;&quot;
</span><span class="cx">         # Check skipped files.
</span><span class="cx">         paths_to_skip = [
</span><del>-           &quot;Source/WebKit/gtk/tests/testatk.c&quot;,
</del><ins>+           &quot;Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c&quot;,
</ins><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/webkit2.h&quot;,
</span><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h&quot;,
</span><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/WebKitLoader.h&quot;,
</span><span class="lines">@@ -320,8 +320,8 @@
</span><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/HelperClass.h&quot;,
</span><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp&quot;,
</span><span class="cx">            &quot;Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h&quot;,
</span><del>-           &quot;Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp&quot;,
-           &quot;Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h&quot;,
</del><ins>+           &quot;Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.cpp&quot;,
+           &quot;Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebViewTest.h&quot;,
</ins><span class="cx">             ]
</span><span class="cx"> 
</span><span class="cx">         for path in paths_not_to_skip:
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIGNUmakefileam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/GNUmakefile.am (162335 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/GNUmakefile.am        2014-01-20 11:59:30 UTC (rev 162335)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/GNUmakefile.am        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -1,6 +1,11 @@
</span><span class="cx"> noinst_LTLIBRARIES += \
</span><span class="cx">         Libraries/libTestWebKitAPIMain.la
</span><span class="cx"> 
</span><ins>+if ENABLE_WEBKIT2
+noinst_LTLIBRARIES += \
+        Libraries/libTestWebKit2GtkAPI.la
+endif
+
</ins><span class="cx"> Libraries_libTestWebKitAPIMain_la_SOURCES = \
</span><span class="cx">         Tools/TestWebKitAPI/Test.h \
</span><span class="cx">         Tools/TestWebKitAPI/TestsController.cpp \
</span><span class="lines">@@ -20,38 +25,187 @@
</span><span class="cx">         $(javascriptcore_cppflags) \
</span><span class="cx">         $(GTK_CFLAGS)
</span><span class="cx"> 
</span><ins>+webkitgtk_tests_cflags = \
+        -fno-strict-aliasing \
+        -DTEST_PLUGIN_DIR=\&quot;${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\&quot; \
+        -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
+        -I$(WebKit) \
+        -I$(GENSOURCES) \
+        -I$(top_builddir)/Source/WebKit/gtk \
+        -I$(top_srcdir)/Source/WebCore/bindings \
+        -I$(top_srcdir)/Source/WebCore/bindings/gobject \
+        $(global_cppflags) \
+        $(global_cflags) \
+        $(javascriptcore_cppflags) \
+        $(FREETYPE_CFLAGS) \
+        $(GLIB_CFLAGS) \
+        $(GTK_CFLAGS) \
+        $(LIBSOUP_CFLAGS) \
+        $(XRENDER_CFLAGS) \
+        $(XT_CFLAGS)
+
+webkitgtk_tests_ldadd = \
+        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+        libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+        $(FREETYPE_LIBS) \
+        $(GTK_LIBS) \
+        $(GLIB_LIBS) \
+        $(LIBSOUP_LIBS) \
+        $(XRENDER_LIBS)
+
+webkitgtk_tests_ldflags = \
+        -no-install \
+        -no-fast-install
+
+
+webkit2gtk_tests_cppflags = \
+        -DWEBKIT_EXEC_PATH=\&quot;${shell pwd}/$(top_builddir)/Programs\&quot; \
+        -DWEBKIT_SRC_DIR=\&quot;${shell pwd}/${srcdir}\&quot; \
+        -DWEBKIT_DERIVED_SRC_DIR=\&quot;${shell pwd}/${top_builddir}/DerivedSources\&quot; \
+        -DWEBKIT_TEST_PLUGIN_DIR=\&quot;${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\&quot; \
+        -DWEBKIT_TEST_WEB_EXTENSIONS_DIR=\&quot;${shell pwd}/${top_builddir}/Libraries/WebExtensions/.libs\&quot; \
+        -DWEBKIT_INJECTED_BUNDLE_PATH=\&quot;${shell pwd}/$(top_builddir)/.libs\&quot; \
+        $(javascriptcore_cppflags) \
+        -I$(srcdir)/Source \
+        -I$(srcdir)/Source/WebKit2 \
+        -I$(srcdir)/Source/JavaScriptCore \
+        -I$(srcdir)/Tools/TestWebKitAPI/gtk/WebKit2Gtk \
+        -I$(top_builddir)/DerivedSources/WebKit2/include \
+        -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
+        -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
+        -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
+        $(global_cppflags) \
+        $(FREETYPE_CFLAGS) \
+        $(GLIB_CFLAGS) \
+        $(GTK_CFLAGS) \
+        $(LIBSOUP_CFLAGS)
+
+webkit2gtk_tests_ldadd = \
+        Libraries/libTestWebKit2GtkAPI.la \
+        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+        libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+        $(FREETYPE_LIBS) \
+        $(GEOCLUE_LIBS) \
+        $(GLIB_LIBS) \
+        $(GTK_LIBS) \
+        $(LIBSOUP_LIBS)
+
+webkit2gtk_tests_ldflags = \
+        -no-install \
+        -no-fast-install
+
+Libraries_libTestWebKit2GtkAPI_la_SOURCES = \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.h \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp \
+        Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h
+
+Libraries_libTestWebKit2GtkAPI_la_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+
+
</ins><span class="cx"> noinst_PROGRAMS += \
</span><del>-        Programs/TestWebKitAPI/TestWTF \
-        Programs/TestWebKitAPI/TestJavaScriptCore \
-        Programs/TestWebKitAPI/TestWebCore \
-        Programs/TestWebKitAPI/TestGtk
</del><ins>+        Programs/TestWebKitAPI/WTF/TestWTF \
+        Programs/TestWebKitAPI/JavaScriptCore/TestJavaScriptCore \
+        Programs/TestWebKitAPI/WebCore/TestWebCore \
+        Programs/TestWebKitAPI/WebCoreGtk/TestWebCoreGtk
</ins><span class="cx"> 
</span><ins>+if ENABLE_WEBKIT1
+noinst_PROGRAMS += \
+        Programs/TestWebKitAPI/WebKitGtk/testapplicationcache \
+        Programs/TestWebKitAPI/WebKitGtk/testcontextmenu \
+        Programs/TestWebKitAPI/WebKitGtk/testdomdocument \
+        Programs/TestWebKitAPI/WebKitGtk/testdomdomwindow \
+        Programs/TestWebKitAPI/WebKitGtk/testdomnode \
+        Programs/TestWebKitAPI/WebKitGtk/testhttpbackend \
+        Programs/TestWebKitAPI/WebKitGtk/testfavicondatabase \
+        Programs/TestWebKitAPI/WebKitGtk/testloading \
+        Programs/TestWebKitAPI/WebKitGtk/testglobals \
+        Programs/TestWebKitAPI/WebKitGtk/testmimehandling \
+        Programs/TestWebKitAPI/WebKitGtk/testnetworkrequest \
+        Programs/TestWebKitAPI/WebKitGtk/testnetworkresponse \
+        Programs/TestWebKitAPI/WebKitGtk/testwebframe \
+        Programs/TestWebKitAPI/WebKitGtk/testwebbackforwardlist \
+        Programs/TestWebKitAPI/WebKitGtk/testwebhistoryitem \
+        Programs/TestWebKitAPI/WebKitGtk/testwindow \
+        Programs/TestWebKitAPI/WebKitGtk/testdownload \
+        Programs/TestWebKitAPI/WebKitGtk/testatk \
+        Programs/TestWebKitAPI/WebKitGtk/testatkroles \
+        Programs/TestWebKitAPI/WebKitGtk/testhittestresult \
+        Programs/TestWebKitAPI/WebKitGtk/testwebinspector \
+        Programs/TestWebKitAPI/WebKitGtk/testwebsettings \
+        Programs/TestWebKitAPI/WebKitGtk/testwebresource \
+        Programs/TestWebKitAPI/WebKitGtk/testwebdatasource \
+        Programs/TestWebKitAPI/WebKitGtk/testwebplugindatabase \
+        Programs/TestWebKitAPI/WebKitGtk/testwebview \
+        Programs/TestWebKitAPI/WebKitGtk/testkeyevents \
+        Programs/TestWebKitAPI/WebKitGtk/testcopyandpaste
+endif
+
</ins><span class="cx"> if ENABLE_WEBKIT2
</span><span class="cx"> noinst_PROGRAMS += \
</span><del>-        Programs/TestWebKitAPI/TestWebKit2
</del><ins>+        Programs/TestWebKitAPI/WebKit2/TestWebKit2 \
+        Programs/TestWebKitAPI/WebKit2Gtk/InspectorTestServer \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestAuthentication \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestBackForwardList \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestContextMenu \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestCookieManager \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestDOMNode \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestDownloads \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestFrame \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestInspector \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestInspectorServer \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestLoaderClient \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestPrinting \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestResources \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestSSL \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestUIClient \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebExtensions \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitVersion \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitFaviconDatabase \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitFindController \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitPolicyClient \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitSettings \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitWebContext \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitWebView \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitWebViewGroup \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebViewEditor
+
+if HAVE_ATSPI2
+noinst_PROGRAMS += \
+        Programs/TestWebKitAPI/WebKit2Gtk/AccessibilityTestServer \
+        Programs/TestWebKitAPI/WebKit2Gtk/TestWebKitAccessibility
+endif
</ins><span class="cx"> endif # ENABLE_WEBKIT2
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWTF_CPPFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WTF_TestWTF_CPPFLAGS = \
</ins><span class="cx">         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
</span><span class="cx">         $(GLIB_LIBS) \
</span><span class="cx">         $(CAIRO_CFLAGS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWTF_CXXFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WTF_TestWTF_CXXFLAGS = \
</ins><span class="cx">         -DGTEST_HAS_RTTI=0 \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWTF_LDADD = \
</del><ins>+Programs_TestWebKitAPI_WTF_TestWTF_LDADD = \
</ins><span class="cx">         Libraries/libTestWebKitAPIMain.la \
</span><span class="cx">         Libraries/libgtest.la \
</span><span class="cx">         libWTF.la \
</span><span class="cx">         $(GTK_LIBS) \
</span><span class="cx">         $(GLIB_LIBS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWTF_LDFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WTF_TestWTF_LDFLAGS = \
</ins><span class="cx">         -no-install \
</span><span class="cx">         -no-fast-install
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWTF_SOURCES = \
</del><ins>+Programs_TestWebKitAPI_WTF_TestWTF_SOURCES = \
</ins><span class="cx">         Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WTF/CString.cpp \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp \
</span><span class="lines">@@ -77,24 +231,24 @@
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp \
</span><span class="cx">         Tools/TestWebKitAPI/WTFStringUtilities.h
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestJavaScriptCore_CPPFLAGS = \
</del><ins>+Programs_TestWebKitAPI_JavaScriptCore_TestJavaScriptCore_CPPFLAGS = \
</ins><span class="cx">         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestJavaScriptCore_CXXFLAGS = \
</del><ins>+Programs_TestWebKitAPI_JavaScriptCore_TestJavaScriptCore_CXXFLAGS = \
</ins><span class="cx">         -DGTEST_HAS_RTTI=0 \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestJavaScriptCore_LDADD = \
</del><ins>+Programs_TestWebKitAPI_JavaScriptCore_TestJavaScriptCore_LDADD = \
</ins><span class="cx">         Libraries/libTestWebKitAPIMain.la \
</span><span class="cx">         Libraries/libgtest.la \
</span><span class="cx">         libWTF.la \
</span><span class="cx">         $(GTK_LIBS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestJavaScriptCore_LDFLAGS = \
</del><ins>+Programs_TestWebKitAPI_JavaScriptCore_TestJavaScriptCore_LDFLAGS = \
</ins><span class="cx">         -no-install \
</span><span class="cx">         -no-fast-install
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestJavaScriptCore_SOURCES = \
</del><ins>+Programs_TestWebKitAPI_JavaScriptCore_TestJavaScriptCore_SOURCES = \
</ins><span class="cx">         Tools/TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp
</span><span class="cx"> 
</span><span class="cx"> webcore_layer_deps = \
</span><span class="lines">@@ -127,15 +281,15 @@
</span><span class="cx"> DISTCLEANFILES += \
</span><span class="cx">         $(top_builddir)/WebCoreLayer.a
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebCore_CPPFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WebCore_TestWebCore_CPPFLAGS = \
</ins><span class="cx">         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
</span><span class="cx">         -I$(top_builddir)/DerivedSources/WebCore/include
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebCore_CXXFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WebCore_TestWebCore_CXXFLAGS = \
</ins><span class="cx">         -DGTEST_HAS_RTTI=0 \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebCore_LDADD = \
</del><ins>+Programs_TestWebKitAPI_WebCore_TestWebCore_LDADD = \
</ins><span class="cx">         Libraries/libTestWebKitAPIMain.la \
</span><span class="cx">         Libraries/libgtest.la \
</span><span class="cx">         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
</span><span class="lines">@@ -162,16 +316,16 @@
</span><span class="cx">         $(XT_LIBS) \
</span><span class="cx">         $(ZLIB_LIBS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebCore_LDFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WebCore_TestWebCore_LDFLAGS = \
</ins><span class="cx">         -no-install \
</span><span class="cx">         -no-fast-install
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebCore_SOURCES = \
</del><ins>+Programs_TestWebKitAPI_WebCore_TestWebCore_SOURCES = \
</ins><span class="cx">         Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
-        $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
</del><ins>+Programs_TestWebKitAPI_WebCoreGtk_TestWebCoreGtk_CPPFLAGS = \
+        $(Programs_TestWebKitAPI_WTF_TestWTF_CPPFLAGS) \
</ins><span class="cx">         $(platform_cppflags) \
</span><span class="cx">         $(platformgtk_cppflags) \
</span><span class="cx">         $(webcore_cppflags) \
</span><span class="lines">@@ -181,11 +335,11 @@
</span><span class="cx">         $(GTK_CFLAGS) \
</span><span class="cx">         $(LIBSOUP_CFLAGS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestGtk_CXXFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WebCoreGtk_TestWebCoreGtk_CXXFLAGS = \
</ins><span class="cx">         -DGTEST_HAS_RTTI=0 \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestGtk_LDADD = \
</del><ins>+Programs_TestWebKitAPI_WebCoreGtk_TestWebCoreGtk_LDADD = \
</ins><span class="cx">         Libraries/libTestWebKitAPIMain.la \
</span><span class="cx">         Libraries/libgtest.la \
</span><span class="cx">         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
</span><span class="lines">@@ -197,10 +351,10 @@
</span><span class="cx">         $(GTK_LIBS) \
</span><span class="cx">         $(LIBSOUP_LIBS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestGtk_LDFLAGS = \
-        $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
</del><ins>+Programs_TestWebKitAPI_WebCoreGtk_TestWebCoreGtk_LDFLAGS = \
+        $(Programs_TestWebKitAPI_WTF_TestWTF_LDFLAGS)
</ins><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestGtk_SOURCES = \
</del><ins>+Programs_TestWebKitAPI_WebCoreGtk_TestWebCoreGtk_SOURCES = \
</ins><span class="cx">         Source/WebCore/platform/graphics/IntPoint.cpp \
</span><span class="cx">         Source/WebCore/platform/graphics/IntRect.cpp \
</span><span class="cx">         Source/WebCore/platform/graphics/IntSize.cpp \
</span><span class="lines">@@ -210,19 +364,192 @@
</span><span class="cx">         Tools/TestWebKitAPI/config.h \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebKit2_CPPFLAGS = \
-        $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
</del><ins>+Programs_TestWebKitAPI_WebKitGtk_testapplicationcache_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c
+Programs_TestWebKitAPI_WebKitGtk_testapplicationcache_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testapplicationcache_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testapplicationcache_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testcontextmenu_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c
+Programs_TestWebKitAPI_WebKitGtk_testcontextmenu_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testcontextmenu_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testcontextmenu_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testdomdocument_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c
+Programs_TestWebKitAPI_WebKitGtk_testdomdocument_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testdomdocument_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testdomdocument_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testdomdomwindow_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c
+Programs_TestWebKitAPI_WebKitGtk_testdomdomwindow_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testdomdomwindow_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testdomdomwindow_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testdomnode_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testdomnode.c
+Programs_TestWebKitAPI_WebKitGtk_testdomnode_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testdomnode_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testdomnode_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testhttpbackend_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c
+Programs_TestWebKitAPI_WebKitGtk_testhttpbackend_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testhttpbackend_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testhttpbackend_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testfavicondatabase_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c
+Programs_TestWebKitAPI_WebKitGtk_testfavicondatabase_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testfavicondatabase_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testfavicondatabase_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testglobals_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testglobals.c
+Programs_TestWebKitAPI_WebKitGtk_testglobals_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testglobals_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testglobals_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testloading_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testloading.c
+Programs_TestWebKitAPI_WebKitGtk_testloading_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testloading_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testloading_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testmimehandling_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c
+Programs_TestWebKitAPI_WebKitGtk_testmimehandling_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testmimehandling_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testmimehandling_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testnetworkrequest_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c
+Programs_TestWebKitAPI_WebKitGtk_testnetworkrequest_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testnetworkrequest_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testnetworkrequest_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testnetworkresponse_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c
+Programs_TestWebKitAPI_WebKitGtk_testnetworkresponse_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testnetworkresponse_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testnetworkresponse_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebframe_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebframe.c
+Programs_TestWebKitAPI_WebKitGtk_testwebframe_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebframe_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebframe_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebplugindatabase_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c
+Programs_TestWebKitAPI_WebKitGtk_testwebplugindatabase_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebplugindatabase_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebplugindatabase_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebbackforwardlist_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c
+Programs_TestWebKitAPI_WebKitGtk_testwebbackforwardlist_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebbackforwardlist_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebbackforwardlist_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebhistoryitem_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c
+Programs_TestWebKitAPI_WebKitGtk_testwebhistoryitem_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebhistoryitem_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebhistoryitem_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwindow_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwindow.c
+Programs_TestWebKitAPI_WebKitGtk_testwindow_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwindow_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwindow_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testdownload_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testdownload.c
+Programs_TestWebKitAPI_WebKitGtk_testdownload_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testdownload_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testdownload_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testatk_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c
+Programs_TestWebKitAPI_WebKitGtk_testatk_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testatk_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testatk_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testatkroles_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testatkroles.c
+Programs_TestWebKitAPI_WebKitGtk_testatkroles_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testatkroles_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testatkroles_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebinspector_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c
+Programs_TestWebKitAPI_WebKitGtk_testwebinspector_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebinspector_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebinspector_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebsettings_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c
+Programs_TestWebKitAPI_WebKitGtk_testwebsettings_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebsettings_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebsettings_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebresource_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebresource.c
+Programs_TestWebKitAPI_WebKitGtk_testwebresource_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebresource_LDADD = $(webkitgtk_tests_ldadd)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebdatasource_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c
+Programs_TestWebKitAPI_WebKitGtk_testwebdatasource_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebdatasource_LDADD = $(webkitgtk_tests_ldadd)
+
+Programs_TestWebKitAPI_WebKitGtk_testwebview_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testwebview.c Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c
+Programs_TestWebKitAPI_WebKitGtk_testwebview_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testwebview_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testwebview_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testhittestresult_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c
+Programs_TestWebKitAPI_WebKitGtk_testhittestresult_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testhittestresult_LDADD = $(webkitgtk_tests_ldadd)
+
+Programs_TestWebKitAPI_WebKitGtk_testkeyevents_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c
+Programs_TestWebKitAPI_WebKitGtk_testkeyevents_CFLAGS = $(webkitgtk_tests_cflags)
+Programs_TestWebKitAPI_WebKitGtk_testkeyevents_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testkeyevents_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKitGtk_testcopyandpaste_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c \
+        Source/WebCore/platform/gtk/GtkVersioning.c
+Programs_TestWebKitAPI_WebKitGtk_testcopyandpaste_CFLAGS = \
+        $(webkitgtk_tests_cflags) \
+        -I$(srcdir)/Source/WebCore/platform/gtk \
+        -I$(srcdir)/Source/WebCore
+Programs_TestWebKitAPI_WebKitGtk_testcopyandpaste_LDADD = $(webkitgtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKitGtk_testcopyandpaste_LDFLAGS = $(webkitgtk_tests_ldflags)
+
+
+Programs_TestWebKitAPI_WebKit2_TestWebKit2_CPPFLAGS = \
+        $(Programs_TestWebKitAPI_WTF_TestWTF_CPPFLAGS) \
</ins><span class="cx">         -I$(top_builddir)/DerivedSources/WebKit2/include \
</span><span class="cx">         $(FREETYPE_CFLAGS) \
</span><span class="cx">         $(GLIB_CFLAGS) \
</span><span class="cx">         $(GTK_CFLAGS) \
</span><span class="cx">         $(LIBSOUP_CFLAGS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebKit2_CXXFLAGS = \
</del><ins>+Programs_TestWebKitAPI_WebKit2_TestWebKit2_CXXFLAGS = \
</ins><span class="cx">         -DGTEST_HAS_RTTI=0 \
</span><span class="cx">         $(global_cxxflags)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebKit2_LDADD = \
</del><ins>+Programs_TestWebKitAPI_WebKit2_TestWebKit2_LDADD = \
</ins><span class="cx">         Libraries/libTestWebKitAPIMain.la \
</span><span class="cx">         Libraries/libgtest.la \
</span><span class="cx">         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
</span><span class="lines">@@ -232,10 +559,10 @@
</span><span class="cx">         $(GTK_LIBS) \
</span><span class="cx">         $(LIBSOUP_LIBS)
</span><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebKit2_LDFLAGS = \
-        $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
</del><ins>+Programs_TestWebKitAPI_WebKit2_TestWebKit2_LDFLAGS = \
+        $(Programs_TestWebKitAPI_WTF_TestWTF_LDFLAGS)
</ins><span class="cx"> 
</span><del>-Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
</del><ins>+Programs_TestWebKitAPI_WebKit2_TestWebKit2_SOURCES = \
</ins><span class="cx">         Tools/TestWebKitAPI/config.h \
</span><span class="cx">         Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp \
</span><span class="cx">         Tools/TestWebKitAPI/gtk/PlatformWebViewGtk.cpp \
</span><span class="lines">@@ -356,11 +683,245 @@
</span><span class="cx">         $(global_cflags)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-stamp-testwebkitapi-webcore-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebCore_SOURCES)
</del><ins>+if ENABLE_WEBKIT2
+noinst_LTLIBRARIES += Libraries/WebExtensions/libWebExtensionTest.la
+endif
+
+Libraries_WebExtensions_libWebExtensionTest_la_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp
+
+Libraries_WebExtensions_libWebExtensionTest_la_LDFLAGS = \
+        -rpath ${shell pwd}/$(top_builddir)/Libraries/WebExtensions/.libs \
+        $(no_undefined) \
+        -avoid-version \
+        -module
+
+Libraries_WebExtensions_libWebExtensionTest_la_CPPFLAGS = \
+        -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
+        -I$(top_builddir)/DerivedSources \
+        -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
+        -DWEBKIT2_COMPILATION \
+        $(webkit2gtk_tests_cppflags)
+
+Libraries_WebExtensions_libWebExtensionTest_la_CXXFLAGS = \
+        $(global_cxxflags)
+
+Libraries_WebExtensions_libWebExtensionTest_la_CFLAGS = \
+        $(global_cflags)
+
+
+if ENABLE_WEBKIT2
+noinst_LTLIBRARIES += Libraries/WebExtensions/libWebProcessTest.la
+endif
+
+Libraries_WebExtensions_libWebProcessTest_la_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h
+
+Libraries_WebExtensions_libWebProcessTest_la_LDFLAGS = \
+        -rpath ${shell pwd}/$(top_builddir)/Libraries/WebExtensions/.libs \
+        $(no_undefined) \
+        -avoid-version \
+        -module
+
+Libraries_WebExtensions_libWebProcessTest_la_CPPFLAGS = \
+        -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
+        -I$(top_builddir)/DerivedSources \
+        -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
+        -DWEBKIT2_COMPILATION \
+        $(webkit2gtk_tests_cppflags)
+
+Libraries_WebExtensions_libWebProcessTest_la_CXXFLAGS = \
+        $(global_cxxflags)
+
+Libraries_WebExtensions_libWebProcessTest_la_CFLAGS = \
+        $(global_cflags)
+
+
+Programs/TestWebKitAPI/WebKit2Gtk/resources/webkit2gtk-tests-resources.gresource: Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml)
+        $(AM_V_at)mkdir -p ${GENPROGRAMS}/TestWebKitAPI/WebKit2Gtk/resources
+        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $&lt;
+
+DISTCLEANFILES += \
+        Programs/TestWebKitAPI/WebKit2Gtk/resources/webkit2gtk-tests-resources.gresource
+
+noinst_DATA += \
+        Programs/TestWebKitAPI/WebKit2Gtk/resources/webkit2gtk-tests-resources.gresource
+
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebContext_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebContext_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebContext_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebContext_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebView_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebView_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebView_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebView_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestLoaderClient_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestLoaderClient_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestLoaderClient_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestLoaderClient_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitSettings_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitSettings_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitSettings_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitSettings_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_InspectorTestServer_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_InspectorTestServer_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_InspectorTestServer_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_InspectorTestServer_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestBackForwardList_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestBackForwardList_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestBackForwardList_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestBackForwardList_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitPolicyClient_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitPolicyClient_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitPolicyClient_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitPolicyClient_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+if HAVE_ATSPI2
+Programs_TestWebKitAPI_WebKit2Gtk_AccessibilityTestServer_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_AccessibilityTestServer_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_AccessibilityTestServer_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_AccessibilityTestServer_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitAccessibility_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitAccessibility_CPPFLAGS = $(webkit2gtk_tests_cppflags) $(ATSPI2_CFLAGS)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitAccessibility_LDADD = $(webkit2gtk_tests_ldadd) $(ATSPI2_LIBS)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitAccessibility_LDFLAGS = $(webkit2gtk_tests_ldflags)
+endif
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestDownloads_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestDownloads_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestDownloads_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestDownloads_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebViewEditor_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebViewEditor_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebViewEditor_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebViewEditor_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestPrinting_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestPrinting_CPPFLAGS = $(webkit2gtk_tests_cppflags) $(GTK_UNIX_PRINTING_CFLAGS)
+Programs_TestWebKitAPI_WebKit2Gtk_TestPrinting_LDADD = $(webkit2gtk_tests_ldadd) $(GTK_UNIX_PRINTING_LIBS)
+Programs_TestWebKitAPI_WebKit2Gtk_TestPrinting_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFaviconDatabase_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFaviconDatabase_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFaviconDatabase_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFaviconDatabase_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFindController_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFindController_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFindController_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitFindController_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestResources_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestResources_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestResources_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestResources_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestCookieManager_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestCookieManager_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestCookieManager_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestCookieManager_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspector_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspector_CPPFLAGS = \
+        $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspector_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspector_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspectorServer_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspectorServer_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspectorServer_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestInspectorServer_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitVersion_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitVersion_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitVersion_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitVersion_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestContextMenu_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestContextMenu_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestContextMenu_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestContextMenu_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestSSL_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestSSL_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestSSL_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestSSL_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebExtensions_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebExtensions_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebExtensions_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebExtensions_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebViewGroup_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebViewGroup_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebViewGroup_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestWebKitWebViewGroup_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestDOMNode_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestDOMNode_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestDOMNode_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestDOMNode_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestFrame_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestFrame_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestFrame_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestFrame_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestAuthentication_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestAuthentication_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestAuthentication_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestAuthentication_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+Programs_TestWebKitAPI_WebKit2Gtk_TestUIClient_SOURCES = \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp
+Programs_TestWebKitAPI_WebKit2Gtk_TestUIClient_CPPFLAGS = $(webkit2gtk_tests_cppflags)
+Programs_TestWebKitAPI_WebKit2Gtk_TestUIClient_LDADD = $(webkit2gtk_tests_ldadd)
+Programs_TestWebKitAPI_WebKit2Gtk_TestUIClient_LDFLAGS = $(webkit2gtk_tests_ldflags)
+
+
+stamp-testwebkitapi-webcore-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_WebCore_TestWebCore_SOURCES)
</ins><span class="cx">         $(AM_V_GEN)$(PERL) $&lt; $(srcdir)/Tools/TestWebKitAPI/Tests/WebCore $(GENSOURCES_WEBCORE)/include gtk \
</span><span class="cx">         &amp;&amp; echo timestamp &gt; $(@F)
</span><span class="cx"> 
</span><del>-stamp-testwebkitapi-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES)
</del><ins>+stamp-testwebkitapi-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_WebKit2_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES)
</ins><span class="cx">         $(AM_V_GEN)$(PERL) $&lt; $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \
</span><span class="cx">         &amp;&amp; echo timestamp &gt; $(@F)
</span><span class="cx"> 
</span><span class="lines">@@ -385,4 +946,14 @@
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WebKit2/simple.html \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WebKit2/simple-iframe.html \
</span><span class="cx">         Tools/TestWebKitAPI/Tests/WebKit2/simple-tall.html \
</span><del>-        Tools/TestWebKitAPI/Tests/WebKit2/spacebar-scrolling.html
</del><ins>+        Tools/TestWebKitAPI/Tests/WebKit2/spacebar-scrolling.html \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml \
+        Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.h \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf \
+        Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.txt
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkAccessibilityTestServercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsAccessibilityTestServercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/AccessibilityTestServer.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/AccessibilityTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+static void loadChangedCallback(WebKitWebView*, WebKitLoadEvent loadEvent, gpointer)
+{
+    // Send a message to the parent process when we're ready.
+    if (loadEvent == WEBKIT_LOAD_FINISHED)
+        g_print(&quot;OK&quot;);
+}
+
+int main(int argc, char** argv)
+{
+    // Make sure that the ATK bridge is loaded.
+    g_setenv(&quot;GTK_MODULES&quot;, &quot;atk-bridge&quot;, TRUE);
+
+    gtk_init(&amp;argc, &amp;argv);
+
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    webkit_web_view_load_html(webView,
+        &quot;&lt;html&gt;&quot;
+        &quot;  &lt;body&gt;&quot;
+        &quot;   &lt;h1&gt;This is a test&lt;/h1&gt;&quot;
+        &quot;   &lt;p&gt;This is a paragraph with some plain text.&lt;/p&gt;&quot;
+        &quot;   &lt;p&gt;This paragraph contains &lt;a href=\&quot;http://www.webkitgtk.org\&quot;&gt;a link&lt;/a&gt; in the middle.&lt;/p&gt;&quot;
+        &quot;  &lt;/body&gt;&quot;
+        &quot;&lt;/html&gt;&quot;,
+        0);
+
+    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView));
+    gtk_widget_show_all(window);
+
+    g_signal_connect(window, &quot;delete-event&quot;, G_CALLBACK(gtk_main_quit), 0);
+    g_signal_connect(webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), 0);
+
+    gtk_main();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkDOMDOMWindowTestcpp"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,221 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTest.h&quot;
+#include &lt;gio/gio.h&gt;
+#include &lt;webkit2/webkit-web-extension.h&gt;
+#include &lt;wtf/RunLoop.h&gt;
+
+class WebKitDOMDOMWindowTest;
+static gboolean loadedCallback(WebKitDOMDOMWindow*, WebKitDOMEvent*, WebKitDOMDOMWindowTest*);
+static gboolean clickedCallback(WebKitDOMDOMWindow*, WebKitDOMEvent*, WebKitDOMDOMWindowTest*);
+
+class WebKitDOMDOMWindowTest : public WebProcessTest {
+public:
+    static PassOwnPtr&lt;WebProcessTest&gt; create() { return adoptPtr(new WebKitDOMDOMWindowTest()); }
+
+private:
+    guint64 webPageFromArgs(GVariant* args)
+    {
+        GVariantIter iter;
+        g_variant_iter_init(&amp;iter, args);
+
+        const char* key;
+        GVariant* value;
+        while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value)) {
+            if (!strcmp(key, &quot;pageID&quot;) &amp;&amp; g_variant_classify(value) == G_VARIANT_CLASS_UINT64)
+                return g_variant_get_uint64(value);
+        }
+
+        g_assert_not_reached();
+        return 0;
+    }
+
+    bool testSignals(WebKitWebExtension* extension, GVariant* args)
+    {
+        notify(&quot;ready&quot;, &quot;&quot;);
+
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
+        g_assert(domWindow);
+
+        // The &quot;load&quot; WebKitDOMDOMWindow signal is issued before this test is
+        // called. There's no way to capture it here. We simply assume that
+        // the document is loaded and notify the uiprocess accordingly
+        // notify(&quot;loaded&quot;, &quot;&quot;);
+
+        webkit_dom_event_target_add_event_listener(
+            WEBKIT_DOM_EVENT_TARGET(domWindow),
+            &quot;load&quot;,
+            G_CALLBACK(loadedCallback),
+            false,
+            this);
+
+        // loadedCallback() will stop this loop
+        RunLoop::run();
+
+        document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+        g_assert(element);
+
+        webkit_dom_event_target_add_event_listener(
+            WEBKIT_DOM_EVENT_TARGET(element),
+            &quot;click&quot;,
+            G_CALLBACK(clickedCallback),
+            false,
+            this);
+
+        // The &quot;click&quot; action will be issued in the uiprocess and that will
+        // trigger the dom event here.
+        // clickedCallback() will stop this loop
+        RunLoop::run();
+
+        return true;
+    }
+
+    bool testDispatchEvent(WebKitWebExtension* extension, GVariant* args)
+    {
+        notify(&quot;ready&quot;, &quot;&quot;);
+
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
+        g_assert(domWindow);
+
+        // The &quot;load&quot; WebKitDOMDOMWindow signal is issued before this test is
+        // called. There's no way to capture it here. We simply assume that
+        // the document is loaded and notify the uiprocess accordingly
+        // notify(&quot;loaded&quot;, &quot;&quot;);
+
+        webkit_dom_event_target_add_event_listener(
+            WEBKIT_DOM_EVENT_TARGET(domWindow),
+            &quot;load&quot;,
+            G_CALLBACK(loadedCallback),
+            false,
+            this);
+
+        // loadedCallback() will stop this loop
+        RunLoop::run();
+
+        document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+        g_assert(element);
+
+        WebKitDOMEvent* event = webkit_dom_document_create_event(document, &quot;MouseEvent&quot;, 0);
+        g_assert(event);
+        g_assert(WEBKIT_DOM_IS_EVENT(event));
+        g_assert(WEBKIT_DOM_IS_MOUSE_EVENT(event));
+
+        glong clientX, clientY;
+        clientX = webkit_dom_element_get_client_left(element);
+        clientY = webkit_dom_element_get_client_top(element);
+
+        webkit_dom_event_target_add_event_listener(
+            WEBKIT_DOM_EVENT_TARGET(element),
+            &quot;click&quot;,
+            G_CALLBACK(clickedCallback),
+            false,
+            this);
+
+        webkit_dom_mouse_event_init_mouse_event(WEBKIT_DOM_MOUSE_EVENT(event),
+            &quot;click&quot;, TRUE, TRUE,
+            domWindow, 0, 0, 0, clientX, clientY,
+            FALSE, FALSE, FALSE, FALSE,
+            1, WEBKIT_DOM_EVENT_TARGET(element));
+
+        webkit_dom_event_target_dispatch_event(WEBKIT_DOM_EVENT_TARGET(element), event, 0);
+
+        // clickedCallback() will stop this loop
+        RunLoop::run();
+
+        return true;
+    }
+
+    bool testGetComputedStyle(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+        WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
+        g_assert(domWindow);
+        WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+        g_assert(element);
+        g_assert(WEBKIT_DOM_IS_ELEMENT(element));
+        WebKitDOMCSSStyleDeclaration* cssStyle = webkit_dom_dom_window_get_computed_style(domWindow, element, 0);
+        gchar* fontSize = webkit_dom_css_style_declaration_get_property_value(cssStyle, &quot;font-size&quot;);
+        g_assert_cmpstr(fontSize, ==, &quot;16px&quot;);
+
+        return true;
+    }
+
+    virtual bool runTest(const char* testName, WebKitWebExtension* extension, GVariant* args)
+    {
+        if (!strcmp(testName, &quot;signals&quot;))
+            return testSignals(extension, args);
+        if (!strcmp(testName, &quot;dispatch-event&quot;))
+            return testDispatchEvent(extension, args);
+        if (!strcmp(testName, &quot;get-computed-style&quot;))
+            return testGetComputedStyle(extension, args);
+
+        g_assert_not_reached();
+        return false;
+    }
+};
+
+static void __attribute__((constructor)) registerTests()
+{
+    REGISTER_TEST(WebKitDOMDOMWindowTest, &quot;WebKitDOMDOMWindow/signals&quot;);
+    REGISTER_TEST(WebKitDOMDOMWindowTest, &quot;WebKitDOMDOMWindow/dispatch-event&quot;);
+    REGISTER_TEST(WebKitDOMDOMWindowTest, &quot;WebKitDOMDOMWindow/get-computed-style&quot;);
+}
+
+static gboolean loadedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, WebKitDOMDOMWindowTest* test)
+{
+    test-&gt;notify(&quot;loaded&quot;, &quot;&quot;);
+
+    // Stop the loop and let testSignals() or testDispatchEvent() continue its course
+    RunLoop::current()-&gt;stop();
+
+    return FALSE;
+}
+
+static gboolean clickedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, WebKitDOMDOMWindowTest* test)
+{
+    test-&gt;notify(&quot;clicked&quot;, &quot;&quot;);
+    test-&gt;notify(&quot;finish&quot;, &quot;&quot;);
+
+    // Stop the loop and let testSignals() or testDispatchEvent() continue its course
+    RunLoop::current()-&gt;stop();
+
+    return FALSE;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkDOMNodeTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsDOMNodeTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/DOMNodeTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,216 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTest.h&quot;
+#include &lt;gio/gio.h&gt;
+#include &lt;webkit2/webkit-web-extension.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+class WebKitDOMNodeTest : public WebProcessTest {
+public:
+    static PassOwnPtr&lt;WebProcessTest&gt; create() { return adoptPtr(new WebKitDOMNodeTest()); }
+
+private:
+    guint64 webPageFromArgs(GVariant* args)
+    {
+        GVariantIter iter;
+        g_variant_iter_init(&amp;iter, args);
+
+        const char* key;
+        GVariant* value;
+        while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value)) {
+            if (!strcmp(key, &quot;pageID&quot;) &amp;&amp; g_variant_classify(value) == G_VARIANT_CLASS_UINT64)
+                return g_variant_get_uint64(value);
+        }
+
+        g_assert_not_reached();
+        return 0;
+    }
+
+    bool testHierarchyNavigation(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMHTMLHeadElement* head = webkit_dom_document_get_head(document);
+        g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head));
+
+        // Title, head's child.
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head)));
+        GRefPtr&lt;WebKitDOMNodeList&gt; list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(head)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
+        WebKitDOMNode* node = webkit_dom_node_list_item(list.get(), 0);
+        g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(node));
+
+        // Body, Head sibling.
+        node = webkit_dom_node_get_next_sibling(WEBKIT_DOM_NODE(head));
+        g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(node));
+        WebKitDOMHTMLBodyElement* body = WEBKIT_DOM_HTML_BODY_ELEMENT(node);
+
+        // There is no third sibling
+        g_assert(!webkit_dom_node_get_next_sibling(node));
+
+        // Body's previous sibling is Head.
+        node = webkit_dom_node_get_previous_sibling(WEBKIT_DOM_NODE(body));
+        g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(node));
+
+        // Body has 3 children.
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        unsigned long length = webkit_dom_node_list_get_length(list.get());
+        g_assert_cmpint(length, ==, 3);
+
+        // The three of them are P tags.
+        for (unsigned long i = 0; i &lt; length; i++) {
+            node = webkit_dom_node_list_item(list.get(), i);
+            g_assert(WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT(node));
+        }
+
+        // Go backwards
+        unsigned i;
+        for (i = 0; node; node = webkit_dom_node_get_previous_sibling(node), i++) { }
+        g_assert_cmpint(i, ==, 3);
+
+        return true;
+    }
+
+    bool testInsertion(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMHTMLElement* body = webkit_dom_document_get_body(document);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(body));
+
+        // Body shouldn't have any children at this point.
+        g_assert(!webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+
+        // Insert one P element.
+        WebKitDOMElement* p = webkit_dom_document_create_element(document, &quot;P&quot;, 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(p));
+        webkit_dom_node_append_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), 0);
+
+        // Now it should have one, the same that we inserted.
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+        GRefPtr&lt;WebKitDOMNodeList&gt; list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
+        WebKitDOMNode* node = webkit_dom_node_list_item(list.get(), 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
+        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
+
+        // Replace the P tag with a DIV tag.
+        WebKitDOMElement* div = webkit_dom_document_create_element(document, &quot;DIV&quot;, 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
+        webkit_dom_node_replace_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), WEBKIT_DOM_NODE(p), 0);
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
+        node = webkit_dom_node_list_item(list.get(), 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
+        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+
+        // Now remove the tag.
+        webkit_dom_node_remove_child(WEBKIT_DOM_NODE(body), node, 0);
+        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 0);
+
+        // Test insert before. If refChild is null, insert newChild as last element of parent.
+        div = webkit_dom_document_create_element(document, &quot;DIV&quot;, 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
+        webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), 0, 0);
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 1);
+        node = webkit_dom_node_list_item(list.get(), 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
+        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+
+        // Now insert a 'p' before 'div'.
+        p = webkit_dom_document_create_element(document, &quot;P&quot;, 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(p));
+        webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), WEBKIT_DOM_NODE(div), 0);
+        g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+        list = adoptGRef(webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body)));
+        g_assert(WEBKIT_DOM_IS_NODE_LIST(list.get()));
+        g_assert_cmpint(webkit_dom_node_list_get_length(list.get()), ==, 2);
+        node = webkit_dom_node_list_item(list.get(), 0);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
+        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
+        node = webkit_dom_node_list_item(list.get(), 1);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(node));
+        g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+
+        return true;
+    }
+
+    bool testTagNames(WebKitWebExtension* extension, GVariant* args)
+    {
+        static const char* expectedTagNames[] = { &quot;HTML&quot;, &quot;HEAD&quot;, &quot;BODY&quot;, &quot;VIDEO&quot;, &quot;SOURCE&quot;, &quot;VIDEO&quot;, &quot;SOURCE&quot;, &quot;INPUT&quot; };
+
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+
+        WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;*&quot;);
+        gulong nodeCount = webkit_dom_node_list_get_length(list);
+        g_assert_cmpuint(nodeCount, ==, G_N_ELEMENTS(expectedTagNames));
+        for (unsigned i = 0; i &lt; nodeCount; i++) {
+            WebKitDOMNode* node = webkit_dom_node_list_item(list, i);
+            g_assert(WEBKIT_DOM_IS_NODE(node));
+            GOwnPtr&lt;char&gt; tagName(webkit_dom_node_get_node_name(node));
+            g_assert_cmpstr(tagName.get(), ==, expectedTagNames[i]);
+        }
+
+        return true;
+    }
+
+    virtual bool runTest(const char* testName, WebKitWebExtension* extension, GVariant* args)
+    {
+        if (!strcmp(testName, &quot;hierarchy-navigation&quot;))
+            return testHierarchyNavigation(extension, args);
+        if (!strcmp(testName, &quot;insertion&quot;))
+            return testInsertion(extension, args);
+        if (!strcmp(testName, &quot;tag-names&quot;))
+            return testTagNames(extension, args);
+
+        g_assert_not_reached();
+        return false;
+    }
+};
+
+static void __attribute__((constructor)) registerTests()
+{
+    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/hierarchy-navigation&quot;);
+    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/insertion&quot;);
+    REGISTER_TEST(WebKitDOMNodeTest, &quot;WebKitDOMNode/tag-names&quot;);
+}
+
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkFrameTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsFrameTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/FrameTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/FrameTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTest.h&quot;
+#include &lt;gio/gio.h&gt;
+#include &lt;webkit2/webkit-web-extension.h&gt;
+
+class WebKitFrameTest : public WebProcessTest {
+public:
+    static PassOwnPtr&lt;WebProcessTest&gt; create() { return adoptPtr(new WebKitFrameTest()); }
+
+private:
+    guint64 webPageFromArgs(GVariant* args)
+    {
+        GVariantIter iter;
+        g_variant_iter_init(&amp;iter, args);
+
+        const char* key;
+        GVariant* value;
+        while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value)) {
+            if (!strcmp(key, &quot;pageID&quot;) &amp;&amp; g_variant_classify(value) == G_VARIANT_CLASS_UINT64)
+                return g_variant_get_uint64(value);
+        }
+
+        g_assert_not_reached();
+        return 0;
+    }
+
+    bool testMainFrame(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+
+        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
+        g_assert(WEBKIT_IS_FRAME(frame));
+        g_assert(webkit_frame_is_main_frame(frame));
+
+        return true;
+    }
+
+    bool testURI(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+
+        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
+        g_assert(WEBKIT_IS_FRAME(frame));
+        g_assert_cmpstr(webkit_web_page_get_uri(page), ==, webkit_frame_get_uri(frame));
+
+        return true;
+    }
+
+    bool testJavaScriptContext(WebKitWebExtension* extension, GVariant* args)
+    {
+        WebKitWebPage* page = webkit_web_extension_get_page(extension, webPageFromArgs(args));
+        g_assert(WEBKIT_IS_WEB_PAGE(page));
+
+        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
+        g_assert(WEBKIT_IS_FRAME(frame));
+        g_assert(webkit_frame_get_javascript_global_context(frame));
+
+        return true;
+    }
+
+    virtual bool runTest(const char* testName, WebKitWebExtension* extension, GVariant* args)
+    {
+        if (!strcmp(testName, &quot;main-frame&quot;))
+            return testMainFrame(extension, args);
+        if (!strcmp(testName, &quot;uri&quot;))
+            return testURI(extension, args);
+        if (!strcmp(testName, &quot;javascript-context&quot;))
+            return testJavaScriptContext(extension, args);
+
+        g_assert_not_reached();
+        return false;
+    }
+};
+
+static void __attribute__((constructor)) registerTests()
+{
+    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/main-frame&quot;);
+    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/uri&quot;);
+    REGISTER_TEST(WebKitFrameTest, &quot;WebKitFrame/javascript-context&quot;);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkInspectorTestServercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsInspectorTestServercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+static void loadChangedCallback(WebKitWebView*, WebKitLoadEvent loadEvent, gpointer)
+{
+    // Send a message to the parent process when we're ready.
+    if (loadEvent == WEBKIT_LOAD_FINISHED)
+        g_print(&quot;OK&quot;);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_init(&amp;argc, &amp;argv);
+
+    // Overwrite WEBKIT_INSPECTOR_SERVER variable with default value.
+    g_setenv(&quot;WEBKIT_INSPECTOR_SERVER&quot;, &quot;127.0.0.1:2999&quot;, TRUE);
+
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(webView), TRUE);
+    webkit_web_view_load_html(webView,
+        &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector Test Server&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+        &quot;http://127.0.0.1:2999/&quot;);
+
+    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView));
+    gtk_widget_show_all(window);
+
+    g_signal_connect(window, &quot;delete-event&quot;, G_CALLBACK(gtk_main_quit), 0);
+    g_signal_connect(webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), 0);
+
+    gtk_main();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestAuthenticationcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestAuthenticationcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestAuthentication.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,286 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;LoadTrackingTest.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static WebKitTestServer* kServer;
+
+class AuthenticationTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(AuthenticationTest);
+
+    AuthenticationTest()
+    {
+        g_signal_connect(m_webView, &quot;authenticate&quot;, G_CALLBACK(runAuthenticationCallback), this);
+    }
+
+    ~AuthenticationTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    static int authenticationRetries;
+    static bool authenticationCancelledReceived;
+
+    void loadURI(const char* uri)
+    {
+        // Reset the retry count of the fake server when a page is loaded.
+        authenticationRetries = 0;
+        authenticationCancelledReceived = false;
+        LoadTrackingTest::loadURI(uri);
+    }
+
+    static gboolean runAuthenticationCallback(WebKitWebView*, WebKitAuthenticationRequest* request, AuthenticationTest* test)
+    {
+        g_signal_connect(request, &quot;cancelled&quot;, G_CALLBACK(authenticationCancelledCallback), test);
+        test-&gt;runAuthentication(request);
+        return TRUE;
+    }
+
+    static void authenticationCancelledCallback(WebKitAuthenticationRequest*, AuthenticationTest*)
+    {
+        authenticationCancelledReceived = true;
+    }
+
+    void runAuthentication(WebKitAuthenticationRequest* request)
+    {
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+        m_authenticationRequest = request;
+        g_main_loop_quit(m_mainLoop);
+    }
+
+    WebKitAuthenticationRequest* waitForAuthenticationRequest()
+    {
+        g_main_loop_run(m_mainLoop);
+        return m_authenticationRequest.get();
+    }
+
+private:
+    GRefPtr&lt;WebKitAuthenticationRequest&gt; m_authenticationRequest;
+};
+
+int AuthenticationTest::authenticationRetries = 0;
+bool AuthenticationTest::authenticationCancelledReceived = false;
+
+static const char authTestUsername[] = &quot;username&quot;;
+static const char authTestPassword[] = &quot;password&quot;;
+static const char authExpectedSuccessTitle[] = &quot;WebKit2Gtk+ Authentication test&quot;;
+static const char authExpectedFailureTitle[] = &quot;401 Authorization Required&quot;;
+static const char authExpectedAuthorization[] = &quot;Basic dXNlcm5hbWU6cGFzc3dvcmQ=&quot;; // Base64 encoding of &quot;username:password&quot;.
+static const char authSuccessHTMLString[] =
+    &quot;&lt;html&gt;&quot;
+    &quot;&lt;head&gt;&lt;title&gt;WebKit2Gtk+ Authentication test&lt;/title&gt;&lt;/head&gt;&quot;
+    &quot;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+static const char authFailureHTMLString[] =
+    &quot;&lt;html&gt;&quot;
+    &quot;&lt;head&gt;&lt;title&gt;401 Authorization Required&lt;/title&gt;&lt;/head&gt;&quot;
+    &quot;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static void testWebViewAuthenticationRequest(AuthenticationTest* test, gconstpointer)
+{
+    // Test authentication request getters match soup authentication header.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    g_assert_cmpstr(webkit_authentication_request_get_host(request), ==, soup_uri_get_host(kServer-&gt;baseURI()));
+    g_assert_cmpuint(webkit_authentication_request_get_port(request), ==, soup_uri_get_port(kServer-&gt;baseURI()));
+    g_assert_cmpstr(webkit_authentication_request_get_realm(request), ==, &quot;my realm&quot;);
+    g_assert(webkit_authentication_request_get_scheme(request) == WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC);
+    g_assert(!webkit_authentication_request_is_for_proxy(request));
+    g_assert(!webkit_authentication_request_is_retry(request));
+}
+
+static void testWebViewAuthenticationCancel(AuthenticationTest* test, gconstpointer)
+{
+    // Test cancel.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    webkit_authentication_request_cancel(request);
+    // Server doesn't ask for new credentials.
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+
+    g_assert_error(test-&gt;m_error.get(), WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
+}
+
+static void testWebViewAuthenticationLoadCancelled(AuthenticationTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    test-&gt;waitForAuthenticationRequest();
+    webkit_web_view_stop_loading(test-&gt;m_webView);
+    // Expect empty page.
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;authenticationCancelledReceived);
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+
+    g_assert_error(test-&gt;m_error.get(), WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
+}
+
+static void testWebViewAuthenticationFailure(AuthenticationTest* test, gconstpointer)
+{
+    // Test authentication failures.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    g_assert(!webkit_authentication_request_is_retry(request));
+    WebKitCredential* credential = webkit_credential_new(authTestUsername, &quot;wrongpassword&quot;, WEBKIT_CREDENTIAL_PERSISTENCE_NONE);
+    webkit_authentication_request_authenticate(request, credential);
+    webkit_credential_free(credential);
+    // Expect a second authentication request.
+    request = test-&gt;waitForAuthenticationRequest();
+    g_assert(webkit_authentication_request_is_retry(request));
+    // Test second failure.
+    credential = webkit_credential_new(authTestUsername, &quot;wrongpassword2&quot;, WEBKIT_CREDENTIAL_PERSISTENCE_NONE);
+    webkit_authentication_request_authenticate(request, credential);
+    webkit_credential_free(credential);
+    // Expect authentication failed page.
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedFailureTitle);
+}
+
+static void testWebViewAuthenticationNoCredential(AuthenticationTest* test, gconstpointer)
+{
+    // Test continue without credentials.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    webkit_authentication_request_authenticate(request, 0);
+    // Server doesn't ask for new credentials.
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedFailureTitle);
+}
+
+static void testWebViewAuthenticationStorage(AuthenticationTest* test, gconstpointer)
+{
+    // Enable private browsing before authentication request to test that credentials can't be saved.
+    webkit_settings_set_enable_private_browsing(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    g_assert(!webkit_authentication_request_get_proposed_credential(request));
+    g_assert(!webkit_authentication_request_can_save_credentials(request));
+
+    // If WebKit has been compiled with libsecret, and private browsing is disabled
+    // then check that credentials can be saved.
+#if ENABLE(CREDENTIAL_STORAGE)
+    webkit_settings_set_enable_private_browsing(webkit_web_view_get_settings(test-&gt;m_webView), FALSE);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    request = test-&gt;waitForAuthenticationRequest();
+    g_assert(!webkit_authentication_request_get_proposed_credential(request));
+    g_assert(webkit_authentication_request_can_save_credentials(request));
+#endif
+}
+
+static void testWebViewAuthenticationSuccess(AuthenticationTest* test, gconstpointer)
+{
+    // Test correct authentication.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    WebKitAuthenticationRequest* request = test-&gt;waitForAuthenticationRequest();
+    WebKitCredential* credential = webkit_credential_new(authTestUsername, authTestPassword, WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION);
+    webkit_authentication_request_authenticate(request, credential);
+    webkit_credential_free(credential);
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedSuccessTitle);
+
+    // Test loading the same (authorized) page again.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/auth-test.html&quot;).data());
+    // There is no authentication challenge.
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, authExpectedSuccessTitle);
+}
+
+static void serverCallback(SoupServer*, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, void*)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (!strcmp(path, &quot;/auth-test.html&quot;)) {
+        const char* authorization = soup_message_headers_get_one(message-&gt;request_headers, &quot;Authorization&quot;);
+        // Require authentication.
+        if (!g_strcmp0(authorization, authExpectedAuthorization)) {
+            // Successful authentication.
+            soup_message_set_status(message, SOUP_STATUS_OK);
+            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authSuccessHTMLString, strlen(authSuccessHTMLString));
+            AuthenticationTest::authenticationRetries = 0;
+        } else if (++AuthenticationTest::authenticationRetries &lt; 3) {
+            // No or invalid authorization header provided by the client, request authentication twice then fail.
+            soup_message_set_status(message, SOUP_STATUS_UNAUTHORIZED);
+            soup_message_headers_append(message-&gt;response_headers, &quot;WWW-Authenticate&quot;, &quot;Basic realm=\&quot;my realm\&quot;&quot;);
+            // Include a failure message in case the user attempts to proceed without authentication.
+            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authFailureHTMLString, strlen(authFailureHTMLString));
+        } else {
+            // Authentication not successful, display a &quot;401 Authorization Required&quot; page.
+            soup_message_set_status(message, SOUP_STATUS_OK);
+            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, authFailureHTMLString, strlen(authFailureHTMLString));
+        }
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-request&quot;, testWebViewAuthenticationRequest);
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-cancel&quot;, testWebViewAuthenticationCancel);
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-load-cancelled&quot;, testWebViewAuthenticationLoadCancelled);
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-failure&quot;, testWebViewAuthenticationFailure);
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-no-credential&quot;, testWebViewAuthenticationNoCredential);
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-storage&quot;, testWebViewAuthenticationStorage);
+    // Testing authentication success must be done last because libsoup will never fire
+    // the authenticate signal again once authentication is successful.
+    AuthenticationTest::add(&quot;WebKitWebView&quot;, &quot;authentication-success&quot;, testWebViewAuthenticationSuccess);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestBackForwardListcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestBackForwardListcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestBackForwardList.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,280 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+// Back forward list limit is 100 by default.
+static const int kBackForwardListLimit = 100;
+
+static WebKitTestServer* kServer;
+
+static void serverCallback(SoupServer* server, SoupMessage* msg, const char* path, GHashTable* query, SoupClientContext* context, gpointer data)
+{
+    if (msg-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_has_suffix(path, &quot;favicon.ico&quot;)) {
+        soup_message_set_status(msg, SOUP_STATUS_NOT_FOUND);
+        return;
+    }
+
+    soup_message_set_status(msg, SOUP_STATUS_OK);
+
+    char* body = g_strdup_printf(&quot;&lt;html&gt;&lt;title&gt;%s&lt;/title&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;&quot;, path + 1, path + 1);
+    soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, body, strlen(body));
+
+    soup_message_body_complete(msg-&gt;response_body);
+}
+
+class BackForwardListTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(BackForwardListTest);
+
+    enum {
+        Backward,
+        Forward
+    };
+
+    enum {
+        CurrentItem  = 1 &lt;&lt; 0,
+        AddedItem    = 1 &lt;&lt; 1,
+        RemovedItems = 1 &lt;&lt; 2
+    };
+
+    static void checkItem(WebKitBackForwardListItem* item, const char* title, const char* uri, const char* originalURI)
+    {
+        g_assert(item);
+        g_assert_cmpstr(webkit_back_forward_list_item_get_uri(item), ==, uri);
+        g_assert_cmpstr(webkit_back_forward_list_item_get_title(item), == , title);
+        g_assert_cmpstr(webkit_back_forward_list_item_get_original_uri(item), ==, originalURI);
+    }
+
+    static void checkItemIndex(WebKitBackForwardList* list)
+    {
+        g_assert(webkit_back_forward_list_get_nth_item(list, -1) == webkit_back_forward_list_get_back_item(list));
+        g_assert(webkit_back_forward_list_get_nth_item(list, 0) == webkit_back_forward_list_get_current_item(list));
+        g_assert(webkit_back_forward_list_get_nth_item(list, 1) == webkit_back_forward_list_get_forward_item(list));
+    }
+
+    static void checkList(WebKitBackForwardList* list, unsigned type, WebKitBackForwardListItem** items, unsigned nItems)
+    {
+        GList* listItems = type == BackForwardListTest::Backward ? webkit_back_forward_list_get_back_list(list) :
+            webkit_back_forward_list_get_forward_list(list);
+        g_assert(listItems);
+
+        unsigned i = 0;
+        for (GList* listItem = listItems; listItem; listItem = g_list_next(listItem), i++) {
+            g_assert_cmpuint(i, &lt;, nItems);
+            g_assert(listItem-&gt;data == items[i]);
+        }
+        g_list_free(listItems);
+    }
+
+    static void backForwardListChanged(WebKitBackForwardList* list, WebKitBackForwardListItem* addedItem, GList* removedItems, BackForwardListTest* test)
+    {
+        test-&gt;m_hasChanged = true;
+
+        if (test-&gt;m_changedFlags &amp; BackForwardListTest::AddedItem) {
+            g_assert(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(addedItem));
+            test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(addedItem));
+        } else
+            g_assert(!addedItem);
+
+        if (test-&gt;m_changedFlags &amp; BackForwardListTest::RemovedItems) {
+            g_assert(removedItems);
+            for (GList* iter = removedItems; iter; iter = iter-&gt;next) {
+                g_assert(WEBKIT_IS_BACK_FORWARD_LIST_ITEM(iter-&gt;data));
+                if (test-&gt;m_expectedRemovedItems)
+                    g_assert(g_list_find(test-&gt;m_expectedRemovedItems, iter-&gt;data));
+            }
+
+        } else
+            g_assert(!removedItems);
+    }
+
+    BackForwardListTest()
+        : m_list(webkit_web_view_get_back_forward_list(m_webView))
+        , m_changedFlags(0)
+        , m_hasChanged(false)
+        , m_expectedRemovedItems(0)
+    {
+        g_signal_connect(m_list, &quot;changed&quot;, G_CALLBACK(backForwardListChanged), this);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_list));
+    }
+
+    ~BackForwardListTest()
+    {
+        g_signal_handlers_disconnect_matched(m_list, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void waitUntilLoadFinished()
+    {
+        m_hasChanged = false;
+        WebViewTest::waitUntilLoadFinished();
+        g_assert(m_hasChanged);
+    }
+
+    void waitUntilLoadFinishedAndCheckRemovedItems(GList* removedItems)
+    {
+        m_expectedRemovedItems = removedItems;
+        waitUntilLoadFinished();
+        m_expectedRemovedItems = 0;
+    }
+
+    WebKitBackForwardList* m_list;
+    unsigned long m_changedFlags;
+    bool m_hasChanged;
+    GList* m_expectedRemovedItems;
+};
+
+static void testBackForwardListNavigation(BackForwardListTest* test, gconstpointer)
+{
+    WebKitBackForwardListItem* items[1];
+
+    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
+    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 0);
+    g_assert(!webkit_back_forward_list_get_current_item(test-&gt;m_list));
+    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
+    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
+    BackForwardListTest::checkItemIndex(test-&gt;m_list);
+    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
+    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
+
+    CString uriPage1 = kServer-&gt;getURIForPath(&quot;/Page1&quot;);
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
+    test-&gt;loadURI(uriPage1.data());
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
+    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 1);
+    WebKitBackForwardListItem* itemPage1 = webkit_back_forward_list_get_current_item(test-&gt;m_list);
+    BackForwardListTest::checkItem(itemPage1, &quot;Page1&quot;, uriPage1.data(), uriPage1.data());
+    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
+    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
+    BackForwardListTest::checkItemIndex(test-&gt;m_list);
+    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
+    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
+
+    CString uriPage2 = kServer-&gt;getURIForPath(&quot;/Page2&quot;);
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
+    test-&gt;loadURI(uriPage2.data());
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(webkit_web_view_can_go_back(test-&gt;m_webView));
+    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
+    WebKitBackForwardListItem* itemPage2 = webkit_back_forward_list_get_current_item(test-&gt;m_list);
+    BackForwardListTest::checkItem(itemPage2, &quot;Page2&quot;, uriPage2.data(), uriPage2.data());
+    g_assert(webkit_back_forward_list_get_back_item(test-&gt;m_list) == itemPage1);
+    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
+    BackForwardListTest::checkItemIndex(test-&gt;m_list);
+    items[0] = itemPage1;
+    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Backward, items, 1);
+    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
+
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
+    test-&gt;goBack();
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(!webkit_web_view_can_go_back(test-&gt;m_webView));
+    g_assert(webkit_web_view_can_go_forward(test-&gt;m_webView));
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
+    g_assert(itemPage1 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
+    BackForwardListTest::checkItem(webkit_back_forward_list_get_current_item(test-&gt;m_list), &quot;Page1&quot;, uriPage1.data(), uriPage1.data());
+    g_assert(!webkit_back_forward_list_get_back_item(test-&gt;m_list));
+    g_assert(webkit_back_forward_list_get_forward_item(test-&gt;m_list) == itemPage2);
+    BackForwardListTest::checkItemIndex(test-&gt;m_list);
+    g_assert(!webkit_back_forward_list_get_back_list(test-&gt;m_list));
+    items[0] = itemPage2;
+    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Forward, items, 1);
+
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
+    test-&gt;goForward();
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(webkit_web_view_can_go_back(test-&gt;m_webView));
+    g_assert(!webkit_web_view_can_go_forward(test-&gt;m_webView));
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, 2);
+    g_assert(itemPage2 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
+    BackForwardListTest::checkItem(webkit_back_forward_list_get_current_item(test-&gt;m_list), &quot;Page2&quot;, uriPage2.data(), uriPage2.data());
+    g_assert(webkit_back_forward_list_get_back_item(test-&gt;m_list) == itemPage1);
+    g_assert(!webkit_back_forward_list_get_forward_item(test-&gt;m_list));
+    BackForwardListTest::checkItemIndex(test-&gt;m_list);
+    items[0] = itemPage1;
+    BackForwardListTest::checkList(test-&gt;m_list, BackForwardListTest::Backward, items, 1);
+    g_assert(!webkit_back_forward_list_get_forward_list(test-&gt;m_list));
+
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem;
+    test-&gt;goToBackForwardListItem(itemPage1);
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(itemPage1 == webkit_back_forward_list_get_current_item(test-&gt;m_list));
+}
+
+static void testBackForwardListLimitAndCache(BackForwardListTest* test, gconstpointer)
+{
+    for (int i = 0; i &lt; kBackForwardListLimit; i++) {
+        GOwnPtr&lt;char&gt; path(g_strdup_printf(&quot;/Page%d&quot;, i));
+        test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem;
+        test-&gt;loadURI(kServer-&gt;getURIForPath(path.get()).data());
+        test-&gt;waitUntilLoadFinished();
+    }
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, kBackForwardListLimit);
+    WebKitBackForwardListItem* itemPageFirst = webkit_back_forward_list_get_nth_item(test-&gt;m_list, -(kBackForwardListLimit - 1));
+    GOwnPtr&lt;GList&gt; removedItems(g_list_prepend(0, itemPageFirst));
+
+    GOwnPtr&lt;char&gt; path(g_strdup_printf(&quot;/Page%d&quot;, kBackForwardListLimit));
+    test-&gt;m_changedFlags = BackForwardListTest::CurrentItem | BackForwardListTest::AddedItem | BackForwardListTest::RemovedItems;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(path.get()).data());
+    test-&gt;waitUntilLoadFinishedAndCheckRemovedItems(removedItems.get());
+
+    g_assert_cmpuint(webkit_back_forward_list_get_length(test-&gt;m_list), ==, kBackForwardListLimit);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    BackForwardListTest::add(&quot;BackForwardList&quot;, &quot;navigation&quot;, testBackForwardListNavigation);
+    BackForwardListTest::add(&quot;BackForwardList&quot;, &quot;list-limit-and-cache&quot;, testBackForwardListLimitAndCache);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestContextMenucppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestContextMenucpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,867 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+class ContextMenuTest: public WebViewTest {
+public:
+    enum ContextMenuItemStateFlags {
+        Visible = 1 &lt;&lt; 0,
+        Enabled = 1 &lt;&lt; 1,
+        Checked = 1 &lt;&lt; 2
+    };
+
+    void checkContextMenuEvent(GdkEvent* event)
+    {
+        g_assert(event);
+        g_assert_cmpint(event-&gt;type, ==, GDK_BUTTON_PRESS);
+        g_assert_cmpint(event-&gt;button.button, ==, 3);
+        g_assert_cmpint(event-&gt;button.x, ==, m_menuPositionX);
+        g_assert_cmpint(event-&gt;button.y, ==, m_menuPositionY);
+    }
+
+    static gboolean contextMenuCallback(WebKitWebView* webView, WebKitContextMenu* contextMenu, GdkEvent* event, WebKitHitTestResult* hitTestResult, ContextMenuTest* test)
+    {
+        g_assert(WEBKIT_IS_CONTEXT_MENU(contextMenu));
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(contextMenu));
+        test-&gt;checkContextMenuEvent(event);
+        g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(hitTestResult));
+
+        return test-&gt;contextMenu(contextMenu, event, hitTestResult);
+    }
+
+    static void contextMenuDismissedCallback(WebKitWebView*, ContextMenuTest* test)
+    {
+        test-&gt;contextMenuDismissed();
+    }
+
+    ContextMenuTest()
+        : m_menuPositionX(0)
+        , m_menuPositionY(0)
+    {
+        g_signal_connect(m_webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCallback), this);
+        g_signal_connect(m_webView, &quot;context-menu-dismissed&quot;, G_CALLBACK(contextMenuDismissedCallback), this);
+    }
+
+    ~ContextMenuTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    virtual bool contextMenu(WebKitContextMenu*, GdkEvent*, WebKitHitTestResult*) = 0;
+
+    virtual void contextMenuDismissed()
+    {
+        quitMainLoop();
+    }
+
+    GtkMenu* getPopupMenu()
+    {
+        GOwnPtr&lt;GList&gt; toplevels(gtk_window_list_toplevels());
+        for (GList* iter = toplevels.get(); iter; iter = g_list_next(iter)) {
+            if (!GTK_IS_WINDOW(iter-&gt;data))
+                continue;
+
+            GtkWidget* child = gtk_bin_get_child(GTK_BIN(iter-&gt;data));
+            if (!GTK_IS_MENU(child))
+                continue;
+
+            if (gtk_menu_get_attach_widget(GTK_MENU(child)) == GTK_WIDGET(m_webView))
+                return GTK_MENU(child);
+        }
+        g_assert_not_reached();
+        return 0;
+    }
+
+    bool shouldShowInputMethodsMenu()
+    {
+        GtkSettings* settings = gtk_widget_get_settings(GTK_WIDGET(m_webView));
+        if (!settings)
+            return true;
+
+        gboolean showInputMethodMenu;
+        g_object_get(settings, &quot;gtk-show-input-method-menu&quot;, &amp;showInputMethodMenu, NULL);
+        return showInputMethodMenu;
+    }
+
+    void checkActionState(GtkAction* action, unsigned state)
+    {
+        if (state &amp; Visible)
+            g_assert(gtk_action_get_visible(action));
+        else
+            g_assert(!gtk_action_get_visible(action));
+
+        if (state &amp; Enabled)
+            g_assert(gtk_action_get_sensitive(action));
+        else
+            g_assert(!gtk_action_get_sensitive(action));
+
+        if (GTK_IS_TOGGLE_ACTION(action)) {
+            if (state &amp; Checked)
+                g_assert(gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
+            else
+                g_assert(!gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)));
+        }
+    }
+
+    GList* checkCurrentItemIsStockActionAndGetNext(GList* items, WebKitContextMenuAction stockAction, unsigned state)
+    {
+        g_assert(items);
+        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
+
+        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
+
+        GtkAction* action = webkit_context_menu_item_get_action(item);
+        g_assert(GTK_IS_ACTION(action));
+
+        g_assert_cmpint(webkit_context_menu_item_get_stock_action(item), ==, stockAction);
+
+        checkActionState(action, state);
+
+        return g_list_next(items);
+    }
+
+    GList* checkCurrentItemIsCustomActionAndGetNext(GList* items, const char* label, unsigned state)
+    {
+        g_assert(items);
+        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
+
+        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
+
+        GtkAction* action = webkit_context_menu_item_get_action(item);
+        g_assert(GTK_IS_ACTION(action));
+
+        g_assert_cmpint(webkit_context_menu_item_get_stock_action(item), ==, WEBKIT_CONTEXT_MENU_ACTION_CUSTOM);
+        g_assert_cmpstr(gtk_action_get_label(action), ==, label);
+
+        checkActionState(action, state);
+
+        return g_list_next(items);
+    }
+
+    GList* checkCurrentItemIsSubMenuAndGetNext(GList* items, const char* label, unsigned state, GList** subMenuIter)
+    {
+        g_assert(items);
+        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
+
+        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(item));
+
+        GtkAction* action = webkit_context_menu_item_get_action(item);
+        g_assert(GTK_IS_ACTION(action));
+
+        g_assert_cmpstr(gtk_action_get_label(action), ==, label);
+        checkActionState(action, state);
+
+        WebKitContextMenu* subMenu = webkit_context_menu_item_get_submenu(item);
+        g_assert(WEBKIT_IS_CONTEXT_MENU(subMenu));
+        if (subMenuIter)
+            *subMenuIter = webkit_context_menu_get_items(subMenu);
+
+        return g_list_next(items);
+    }
+
+    GList* checkCurrentItemIsSeparatorAndGetNext(GList* items)
+    {
+        g_assert(items);
+        g_assert(WEBKIT_IS_CONTEXT_MENU_ITEM(items-&gt;data));
+
+        WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(items-&gt;data);
+        g_assert(webkit_context_menu_item_is_separator(item));
+
+        return g_list_next(items);
+    }
+
+    static gboolean doRightClickIdleCallback(ContextMenuTest* test)
+    {
+        test-&gt;clickMouseButton(test-&gt;m_menuPositionX, test-&gt;m_menuPositionY, 3);
+        return FALSE;
+    }
+
+    void showContextMenuAtPositionAndWaitUntilFinished(int x, int y)
+    {
+        m_menuPositionX = x;
+        m_menuPositionY = y;
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(doRightClickIdleCallback), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void showContextMenuAndWaitUntilFinished()
+    {
+        showContextMenuAtPositionAndWaitUntilFinished(0, 0);
+    }
+
+    static gboolean simulateEscKeyIdleCallback(ContextMenuTest* test)
+    {
+        test-&gt;keyStroke(GDK_KEY_Escape);
+        return FALSE;
+    }
+
+    void dismissContextMenuAndWaitUntilFinished()
+    {
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(simulateEscKeyIdleCallback), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    double m_menuPositionX;
+    double m_menuPositionY;
+};
+
+class ContextMenuDefaultTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuDefaultTest);
+
+    enum DefaultMenuType {
+        Navigation,
+        Link,
+        Image,
+        LinkImage,
+        Video,
+        Audio,
+        Editable
+    };
+
+    ContextMenuDefaultTest()
+        : m_expectedMenuType(Navigation)
+    {
+    }
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent* event, WebKitHitTestResult* hitTestResult)
+    {
+        GList* iter = webkit_context_menu_get_items(contextMenu);
+
+        switch (m_expectedMenuType) {
+        case Navigation:
+            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD, Visible | Enabled);
+            break;
+        case Link:
+            g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD, Visible | Enabled);
+            break;
+        case Image:
+            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD, Visible | Enabled);
+            break;
+        case LinkImage:
+            g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD, Visible | Enabled);
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD, Visible | Enabled);
+            break;
+        case Video:
+            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS, Visible | Enabled | Checked);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN, Visible);
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK, Visible | Enabled);
+            break;
+        case Audio:
+            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS, Visible | Enabled | Checked);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN, Visible);
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK, Visible | Enabled);
+            break;
+        case Editable:
+            g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+            g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+            g_assert(webkit_hit_test_result_context_is_editable(hitTestResult));
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_CUT, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY, Visible);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_PASTE, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_DELETE, Visible);
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL, Visible | Enabled);
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            if (shouldShowInputMethodsMenu())
+                iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS, Visible | Enabled);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_UNICODE, Visible | Enabled);
+            break;
+        default:
+            g_assert_not_reached();
+        }
+
+        if (webkit_settings_get_enable_developer_extras(webkit_web_view_get_settings(m_webView))) {
+            iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+            iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT, Visible | Enabled);
+        }
+        g_assert(!iter);
+
+        quitMainLoop();
+
+        return true;
+    }
+
+    DefaultMenuType m_expectedMenuType;
+};
+
+static void testContextMenuDefaultMenu(ContextMenuDefaultTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    const char* linksHTML =
+        &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot; &lt;a style='position:absolute; left:1; top:1' href='http://www.webkitgtk.org' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&quot;
+        &quot; &lt;img style='position:absolute; left:1; top:10' src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&quot;
+        &quot; &lt;a style='position:absolute; left:1; top:20' href='http://www.webkitgtk.org/logo' title='WebKitGTK+ Logo'&gt;&lt;img src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&lt;/a&gt;&quot;
+        &quot; &lt;input style='position:absolute; left:1; top:30' size='10'&gt;&lt;/input&gt;&quot;
+        &quot; &lt;video style='position:absolute; left:1; top:50' width='300' height='300' controls='controls' preload='none'&gt;&lt;source src='movie.ogg' type='video/ogg' /&gt;&lt;/video&gt;&quot;
+        &quot; &lt;audio style='position:absolute; left:1; top:60' width='50' height='20' controls='controls' preload='none'&gt;&lt;source src='track.mp3' type='audio/mp3' /&gt;&lt;/audio&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(linksHTML, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    // Context menu for document.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Navigation;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(0, 0);
+
+    // Context menu for link.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Link;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 1);
+
+    // Context menu for image.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Image;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 10);
+
+    // Enable developer extras now, so that inspector element
+    // will be shown in the default context menu.
+    webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
+
+    // Context menu for image link.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::LinkImage;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 20);
+
+    // Context menu for video.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Video;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 50);
+
+    // Context menu for audio.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Audio;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(1, 60);
+
+    // Context menu for editable.
+    test-&gt;m_expectedMenuType = ContextMenuDefaultTest::Editable;
+    test-&gt;showContextMenuAtPositionAndWaitUntilFinished(5, 35);
+}
+
+class ContextMenuCustomTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuCustomTest);
+
+    ContextMenuCustomTest()
+        : m_itemToActivateLabel(0)
+        , m_activated(false)
+        , m_toggled(false)
+    {
+    }
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult* hitTestResult)
+    {
+        // Append our custom item to the default menu.
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new(m_action.get()));
+        quitMainLoop();
+
+        return false;
+    }
+
+    GtkMenuItem* getMenuItem(GtkMenu* menu, const gchar* itemLabel)
+    {
+        GOwnPtr&lt;GList&gt; items(gtk_container_get_children(GTK_CONTAINER(menu)));
+        for (GList* iter = items.get(); iter; iter = g_list_next(iter)) {
+            GtkMenuItem* child = GTK_MENU_ITEM(iter-&gt;data);
+            if (g_str_equal(itemLabel, gtk_menu_item_get_label(child)))
+                return child;
+        }
+        g_assert_not_reached();
+        return 0;
+    }
+
+    void activateMenuItem()
+    {
+        g_assert(m_itemToActivateLabel);
+        GtkMenu* menu = getPopupMenu();
+        GtkMenuItem* item = getMenuItem(menu, m_itemToActivateLabel);
+        gtk_menu_shell_activate_item(GTK_MENU_SHELL(menu), GTK_WIDGET(item), TRUE);
+        m_itemToActivateLabel = 0;
+    }
+
+    static gboolean activateMenuItemIdleCallback(gpointer userData)
+    {
+        ContextMenuCustomTest* test = static_cast&lt;ContextMenuCustomTest*&gt;(userData);
+        test-&gt;activateMenuItem();
+        return FALSE;
+    }
+
+    void activateCustomMenuItemAndWaitUntilActivated(const char* actionLabel)
+    {
+        m_activated = m_toggled = false;
+        m_itemToActivateLabel = actionLabel;
+        g_idle_add(activateMenuItemIdleCallback, this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void toggleCustomMenuItemAndWaitUntilToggled(const char* actionLabel)
+    {
+        activateCustomMenuItemAndWaitUntilActivated(actionLabel);
+    }
+
+    static void actionActivatedCallback(GtkAction*, ContextMenuCustomTest* test)
+    {
+        test-&gt;m_activated = true;
+    }
+
+    static void actionToggledCallback(GtkAction*, ContextMenuCustomTest* test)
+    {
+        test-&gt;m_toggled = true;
+    }
+
+    void setAction(GtkAction* action)
+    {
+        m_action = action;
+        if (GTK_IS_TOGGLE_ACTION(action))
+            g_signal_connect(action, &quot;toggled&quot;, G_CALLBACK(actionToggledCallback), this);
+        else
+            g_signal_connect(action, &quot;activate&quot;, G_CALLBACK(actionActivatedCallback), this);
+    }
+
+    GRefPtr&lt;GtkAction&gt; m_action;
+    const char* m_itemToActivateLabel;
+    bool m_activated;
+    bool m_toggled;
+};
+
+static void testContextMenuPopulateMenu(ContextMenuCustomTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    // Create a custom menu item.
+    GRefPtr&lt;GtkAction&gt; action = adoptGRef(gtk_action_new(&quot;WebKitGTK+CustomAction&quot;, &quot;Custom _Action&quot;, 0, 0));
+    test-&gt;setAction(action.get());
+    test-&gt;showContextMenuAndWaitUntilFinished();
+    test-&gt;activateCustomMenuItemAndWaitUntilActivated(gtk_action_get_label(action.get()));
+    g_assert(test-&gt;m_activated);
+    g_assert(!test-&gt;m_toggled);
+
+    // Create a custom toggle menu item.
+    GRefPtr&lt;GtkAction&gt; toggleAction = adoptGRef(GTK_ACTION(gtk_toggle_action_new(&quot;WebKitGTK+CustomToggleAction&quot;, &quot;Custom _Toggle Action&quot;, 0, 0)));
+    test-&gt;setAction(toggleAction.get());
+    test-&gt;showContextMenuAndWaitUntilFinished();
+    test-&gt;toggleCustomMenuItemAndWaitUntilToggled(gtk_action_get_label(toggleAction.get()));
+    g_assert(!test-&gt;m_activated);
+    g_assert(test-&gt;m_toggled);
+}
+
+class ContextMenuCustomFullTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuCustomFullTest);
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
+    {
+        // Clear proposed menu and build our own.
+        webkit_context_menu_remove_all(contextMenu);
+        g_assert_cmpint(webkit_context_menu_get_n_items(contextMenu), ==, 0);
+
+        // Add actions from stock.
+        webkit_context_menu_prepend(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_BACK));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD));
+        webkit_context_menu_insert(contextMenu, webkit_context_menu_item_new_separator(), 2);
+
+        // Add custom actions.
+        GRefPtr&lt;GtkAction&gt; action = adoptGRef(gtk_action_new(&quot;WebKitGTK+CustomAction&quot;, &quot;Custom _Action&quot;, 0, 0));
+        gtk_action_set_sensitive(action.get(), FALSE);
+        webkit_context_menu_insert(contextMenu, webkit_context_menu_item_new(action.get()), -1);
+        GRefPtr&lt;GtkAction&gt; toggleAction = adoptGRef(GTK_ACTION(gtk_toggle_action_new(&quot;WebKitGTK+CustomToggleAction&quot;, &quot;Custom _Toggle Action&quot;, 0, 0)));
+        gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(toggleAction.get()), TRUE);
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new(toggleAction.get()));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+
+        // Add a submenu.
+        GRefPtr&lt;WebKitContextMenu&gt; subMenu = adoptGRef(webkit_context_menu_new());
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(subMenu.get()));
+        webkit_context_menu_insert(subMenu.get(), webkit_context_menu_item_new_from_stock_action_with_label(WEBKIT_CONTEXT_MENU_ACTION_STOP, &quot;Stop Load&quot;), 0);
+        webkit_context_menu_insert(subMenu.get(), webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_RELOAD), -1);
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_with_submenu(&quot;Load options&quot;, subMenu.get()));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+
+        // Move Load submenu before custom actions.
+        webkit_context_menu_move_item(contextMenu, webkit_context_menu_last(contextMenu), 3);
+        webkit_context_menu_move_item(contextMenu, webkit_context_menu_last(contextMenu), 3);
+
+        // If last item is a separator, remove it.
+        if (webkit_context_menu_item_is_separator(webkit_context_menu_last(contextMenu)))
+            webkit_context_menu_remove(contextMenu, webkit_context_menu_last(contextMenu));
+
+        // Check the menu.
+        GList* iter = webkit_context_menu_get_items(contextMenu);
+
+        iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK, Visible | Enabled);
+        iter = checkCurrentItemIsStockActionAndGetNext(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD, Visible | Enabled);
+        iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+
+        GList* subMenuIter = 0;
+        iter = checkCurrentItemIsSubMenuAndGetNext(iter, &quot;Load options&quot;, Visible | Enabled, &amp;subMenuIter);
+        subMenuIter = checkCurrentItemIsStockActionAndGetNext(subMenuIter, WEBKIT_CONTEXT_MENU_ACTION_STOP, Visible | Enabled);
+        subMenuIter = checkCurrentItemIsStockActionAndGetNext(subMenuIter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD, Visible | Enabled);
+        iter = checkCurrentItemIsSeparatorAndGetNext(iter);
+
+        iter = checkCurrentItemIsCustomActionAndGetNext(iter, &quot;Custom _Action&quot;, Visible);
+        iter = checkCurrentItemIsCustomActionAndGetNext(iter, &quot;Custom _Toggle Action&quot;, Visible | Enabled | Checked);
+        g_assert(!iter);
+
+        quitMainLoop();
+
+        return true;
+    }
+};
+
+static void testContextMenuCustomMenu(ContextMenuCustomFullTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;showContextMenuAndWaitUntilFinished();
+}
+
+class ContextMenuDisabledTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuDisabledTest);
+
+    enum DisableMode {
+        IgnoreClicks,
+        IgnoreDefaultMenu
+    };
+
+    static gboolean buttonPressEventCallback(GtkWidget*, GdkEvent* event, ContextMenuDisabledTest* test)
+    {
+        if (event-&gt;button.button != 3)
+            return FALSE;
+        return test-&gt;rightButtonPressed();
+    }
+
+    ContextMenuDisabledTest()
+        : m_disableMode(IgnoreClicks)
+    {
+        g_signal_connect(m_webView, &quot;button-press-event&quot;, G_CALLBACK(buttonPressEventCallback), this);
+    }
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
+    {
+        if (m_disableMode == IgnoreClicks)
+            g_assert_not_reached();
+        else
+            quitMainLoop();
+
+        return true;
+    }
+
+    bool rightButtonPressed()
+    {
+        if (m_disableMode == IgnoreClicks) {
+            quitMainLoopAfterProcessingPendingEvents();
+            return true;
+        }
+        return false;
+    }
+
+    DisableMode m_disableMode;
+};
+
+static void testContextMenuDisableMenu(ContextMenuDisabledTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;m_disableMode = ContextMenuDisabledTest::IgnoreDefaultMenu;
+    test-&gt;showContextMenuAndWaitUntilFinished();
+
+    test-&gt;m_disableMode = ContextMenuDisabledTest::IgnoreClicks;
+    test-&gt;showContextMenuAndWaitUntilFinished();
+}
+
+class ContextMenuSubmenuTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuSubmenuTest);
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
+    {
+        size_t menuSize = webkit_context_menu_get_n_items(contextMenu);
+        GRefPtr&lt;WebKitContextMenu&gt; subMenu = adoptGRef(webkit_context_menu_new());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_with_submenu(&quot;SubMenuItem&quot;, subMenu.get()));
+        g_assert_cmpuint(webkit_context_menu_get_n_items(contextMenu), ==, menuSize + 1);
+
+        GRefPtr&lt;WebKitContextMenu&gt; subMenu2 = adoptGRef(webkit_context_menu_new());
+        GRefPtr&lt;WebKitContextMenuItem&gt; item = webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK);
+
+        // Add submenu to newly created item.
+        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
+        webkit_context_menu_item_set_submenu(item.get(), subMenu2.get());
+        g_assert(webkit_context_menu_item_get_submenu(item.get()) == subMenu2.get());
+
+        // Replace the submenu.
+        webkit_context_menu_item_set_submenu(item.get(), 0);
+        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
+
+        // Try to add a submenu already added to another item.
+        removeLogFatalFlag(G_LOG_LEVEL_WARNING);
+        webkit_context_menu_item_set_submenu(item.get(), subMenu.get());
+        addLogFatalFlag(G_LOG_LEVEL_WARNING);
+        g_assert(!webkit_context_menu_item_get_submenu(item.get()));
+
+        // A removed submenu shouldn't have a parent.
+        webkit_context_menu_item_set_submenu(item.get(), subMenu2.get());
+        g_assert(webkit_context_menu_item_get_submenu(item.get()) == subMenu2.get());
+
+        quitMainLoop();
+
+        return true;
+    }
+};
+
+static void testContextMenuSubMenu(ContextMenuSubmenuTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;showContextMenuAndWaitUntilFinished();
+}
+
+class ContextMenuDismissedTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuDismissedTest);
+
+    ContextMenuDismissedTest()
+        : m_dismissed(false)
+    {
+    }
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
+    {
+        quitMainLoop();
+        // Show the default context menu.
+        return false;
+    }
+
+    void contextMenuDismissed()
+    {
+        m_dismissed = true;
+        ContextMenuTest::contextMenuDismissed();
+    }
+
+    void showContextMenuAndWaitUntilDismissed()
+    {
+        showContextMenuAndWaitUntilFinished();
+        dismissContextMenuAndWaitUntilFinished();
+    }
+
+    bool m_dismissed;
+};
+
+static void testContextMenuDismissed(ContextMenuDismissedTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;showContextMenuAndWaitUntilDismissed();
+    g_assert(test-&gt;m_dismissed);
+}
+
+class ContextMenuSmartSeparatorsTest: public ContextMenuTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ContextMenuSmartSeparatorsTest);
+
+    bool contextMenu(WebKitContextMenu* contextMenu, GdkEvent*, WebKitHitTestResult*)
+    {
+        webkit_context_menu_remove_all(contextMenu);
+
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_BACK));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_COPY));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_from_stock_action(WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT));
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+        webkit_context_menu_append(contextMenu, webkit_context_menu_item_new_separator());
+
+        quitMainLoop();
+
+        return false;
+    }
+
+    GtkMenu* showContextMenuAndGetGtkMenu()
+    {
+        showContextMenuAndWaitUntilFinished();
+        return getPopupMenu();
+    }
+};
+
+static void testContextMenuSmartSeparators(ContextMenuSmartSeparatorsTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ Context menu tests&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    GtkMenu* menu = test-&gt;showContextMenuAndGetGtkMenu();
+    g_assert(menu);
+
+    // Leading and trailing separators are not added to the context menu.
+    GOwnPtr&lt;GList&gt; menuItems(gtk_container_get_children(GTK_CONTAINER(menu)));
+    g_assert_cmpuint(g_list_length(menuItems.get()), ==, 6);
+    GtkWidget* item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+
+    // Hiding a menu item between two separators hides the following separator.
+    GtkAction* action = gtk_activatable_get_related_action(GTK_ACTIVATABLE(g_list_nth_data(menuItems.get(), 3)));
+    gtk_action_set_visible(action, FALSE);
+    menuItems.set(gtk_container_get_children(GTK_CONTAINER(menu)));
+    g_assert_cmpuint(g_list_length(menuItems.get()), ==, 6);
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    gtk_action_set_visible(action, TRUE);
+
+    // Showing an action between two separators shows the hidden separator.
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+
+    // Trailing separators are hidden too.
+    action = gtk_activatable_get_related_action(GTK_ACTIVATABLE(g_list_nth_data(menuItems.get(), 5)));
+    gtk_action_set_visible(action, FALSE);
+    menuItems.set(gtk_container_get_children(GTK_CONTAINER(menu)));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 0));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 1));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 2));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 3));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 4));
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
+    item = GTK_WIDGET(g_list_nth_data(menuItems.get(), 5));
+    g_assert(!GTK_IS_SEPARATOR_MENU_ITEM(item) &amp;&amp; !gtk_widget_get_visible(item));
+}
+
+void beforeAll()
+{
+    ContextMenuDefaultTest::add(&quot;WebKitWebView&quot;, &quot;default-menu&quot;, testContextMenuDefaultMenu);
+    ContextMenuCustomTest::add(&quot;WebKitWebView&quot;, &quot;populate-menu&quot;, testContextMenuPopulateMenu);
+    ContextMenuCustomFullTest::add(&quot;WebKitWebView&quot;, &quot;custom-menu&quot;, testContextMenuCustomMenu);
+    ContextMenuDisabledTest::add(&quot;WebKitWebView&quot;, &quot;disable-menu&quot;, testContextMenuDisableMenu);
+    ContextMenuSubmenuTest::add(&quot;WebKitWebView&quot;, &quot;submenu&quot;, testContextMenuSubMenu);
+    ContextMenuDismissedTest::add(&quot;WebKitWebView&quot;, &quot;menu-dismissed&quot;, testContextMenuDismissed);
+    ContextMenuSmartSeparatorsTest::add(&quot;WebKitWebView&quot;, &quot;smart-separators&quot;, testContextMenuSmartSeparators);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestCookieManagercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestCookieManagercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,331 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;glib/gstdio.h&gt;
+
+static WebKitTestServer* kServer;
+static char* kTempDirectory;
+
+static const char* kFirstPartyDomain = &quot;127.0.0.1&quot;;
+static const char* kThirdPartyDomain = &quot;localhost&quot;;
+static const char* kIndexHtmlFormat =
+    &quot;&lt;html&gt;&lt;body&gt;&quot;
+    &quot; &lt;p&gt;WebKitGTK+ Cookie Manager test&lt;/p&gt;&quot;
+    &quot; &lt;img src='http://localhost:%u/image.png' width=5 height=5&gt;&lt;/img&gt;&quot;
+    &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+class CookieManagerTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(CookieManagerTest);
+
+    static void cookiesChangedCallback(WebKitCookieManager*, CookieManagerTest* test)
+    {
+        test-&gt;m_cookiesChanged = true;
+        if (test-&gt;m_finishLoopWhenCookiesChange)
+            g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    CookieManagerTest()
+        : WebViewTest()
+        , m_cookieManager(webkit_web_context_get_cookie_manager(webkit_web_view_get_context(m_webView)))
+        , m_acceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY)
+        , m_domains(0)
+        , m_cookiesChanged(false)
+        , m_finishLoopWhenCookiesChange(false)
+    {
+        g_signal_connect(m_cookieManager, &quot;changed&quot;, G_CALLBACK(cookiesChangedCallback), this);
+    }
+
+    ~CookieManagerTest()
+    {
+        g_strfreev(m_domains);
+        g_signal_handlers_disconnect_matched(m_cookieManager, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+        if (m_cookiesTextFile)
+            g_unlink(m_cookiesTextFile.get());
+        if (m_cookiesSQLiteFile)
+            g_unlink(m_cookiesSQLiteFile.get());
+    }
+
+    void setPersistentStorage(WebKitCookiePersistentStorage storage)
+    {
+        const char* filename = 0;
+        switch (storage) {
+        case WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT:
+            if (!m_cookiesTextFile)
+                m_cookiesTextFile.set(g_build_filename(kTempDirectory, &quot;cookies.txt&quot;, NULL));
+            filename = m_cookiesTextFile.get();
+            break;
+        case WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE:
+            if (!m_cookiesSQLiteFile)
+                m_cookiesSQLiteFile.set(g_build_filename(kTempDirectory, &quot;cookies.db&quot;, NULL));
+            filename = m_cookiesSQLiteFile.get();
+            break;
+        default:
+            g_assert_not_reached();
+        }
+        webkit_cookie_manager_set_persistent_storage(m_cookieManager, filename, storage);
+    }
+
+    static void getAcceptPolicyReadyCallback(GObject* object, GAsyncResult* result, gpointer userData)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        WebKitCookieAcceptPolicy policy = webkit_cookie_manager_get_accept_policy_finish(WEBKIT_COOKIE_MANAGER(object), result, &amp;error.outPtr());
+        g_assert(!error.get());
+
+        CookieManagerTest* test = static_cast&lt;CookieManagerTest*&gt;(userData);
+        test-&gt;m_acceptPolicy = policy;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    WebKitCookieAcceptPolicy getAcceptPolicy()
+    {
+        m_acceptPolicy = WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY;
+        webkit_cookie_manager_get_accept_policy(m_cookieManager, 0, getAcceptPolicyReadyCallback, this);
+        g_main_loop_run(m_mainLoop);
+
+        return m_acceptPolicy;
+    }
+
+    void setAcceptPolicy(WebKitCookieAcceptPolicy policy)
+    {
+        webkit_cookie_manager_set_accept_policy(m_cookieManager, policy);
+    }
+
+    static void getDomainsReadyCallback(GObject* object, GAsyncResult* result, gpointer userData)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        char** domains = webkit_cookie_manager_get_domains_with_cookies_finish(WEBKIT_COOKIE_MANAGER(object), result, &amp;error.outPtr());
+        g_assert(!error.get());
+
+        CookieManagerTest* test = static_cast&lt;CookieManagerTest*&gt;(userData);
+        test-&gt;m_domains = domains;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    char** getDomains()
+    {
+        g_strfreev(m_domains);
+        m_domains = 0;
+        webkit_cookie_manager_get_domains_with_cookies(m_cookieManager, 0, getDomainsReadyCallback, this);
+        g_main_loop_run(m_mainLoop);
+
+        return m_domains;
+    }
+
+    bool hasDomain(const char* domain)
+    {
+        if (!m_domains)
+            return false;
+
+        for (size_t i = 0; m_domains[i]; ++i)
+            if (g_str_equal(m_domains[i], domain))
+                return true;
+        return false;
+    }
+
+    void deleteCookiesForDomain(const char* domain)
+    {
+        webkit_cookie_manager_delete_cookies_for_domain(m_cookieManager, domain);
+    }
+
+    void deleteAllCookies()
+    {
+        webkit_cookie_manager_delete_all_cookies(m_cookieManager);
+    }
+
+    void waitUntilCookiesChanged()
+    {
+        m_cookiesChanged = false;
+        m_finishLoopWhenCookiesChange = true;
+        g_main_loop_run(m_mainLoop);
+        m_finishLoopWhenCookiesChange = false;
+    }
+
+    WebKitCookieManager* m_cookieManager;
+    WebKitCookieAcceptPolicy m_acceptPolicy;
+    char** m_domains;
+    bool m_cookiesChanged;
+    bool m_finishLoopWhenCookiesChange;
+    GOwnPtr&lt;char&gt; m_cookiesTextFile;
+    GOwnPtr&lt;char&gt; m_cookiesSQLiteFile;
+};
+
+static void testCookieManagerAcceptPolicy(CookieManagerTest* test, gconstpointer)
+{
+    // Default policy is NO_THIRD_PARTY.
+    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    char** domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 1);
+    g_assert_cmpstr(domains[0], ==, kFirstPartyDomain);
+    test-&gt;deleteAllCookies();
+
+    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 2);
+    g_assert(test-&gt;hasDomain(kFirstPartyDomain));
+    g_assert(test-&gt;hasDomain(kThirdPartyDomain));
+    test-&gt;deleteAllCookies();
+
+    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_NEVER);
+    g_assert_cmpint(test-&gt;getAcceptPolicy(), ==, WEBKIT_COOKIE_POLICY_ACCEPT_NEVER);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 0);
+}
+
+static void testCookieManagerDeleteCookies(CookieManagerTest* test, gconstpointer)
+{
+    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 2);
+
+    // Delete first party cookies.
+    test-&gt;deleteCookiesForDomain(kFirstPartyDomain);
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 1);
+
+    // Delete third party cookies.
+    test-&gt;deleteCookiesForDomain(kThirdPartyDomain);
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 2);
+
+    // Delete all cookies.
+    test-&gt;deleteAllCookies();
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
+}
+
+static void testCookieManagerCookiesChanged(CookieManagerTest* test, gconstpointer)
+{
+    g_assert(!test-&gt;m_cookiesChanged);
+    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_cookiesChanged);
+
+    test-&gt;deleteCookiesForDomain(kFirstPartyDomain);
+    test-&gt;waitUntilCookiesChanged();
+    g_assert(test-&gt;m_cookiesChanged);
+
+    test-&gt;deleteAllCookies();
+    test-&gt;waitUntilCookiesChanged();
+    g_assert(test-&gt;m_cookiesChanged);
+}
+
+static void testCookieManagerPersistentStorage(CookieManagerTest* test, gconstpointer)
+{
+    test-&gt;setAcceptPolicy(WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS);
+
+    // Text storage using a new file.
+    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
+    char** domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 0);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_cookiesChanged);
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 2);
+
+
+    // SQLite storage using a new file.
+    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 0);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/index.html&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_cookiesChanged);
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 2);
+
+    // Text storage using an existing file.
+    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT);
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 2);
+    test-&gt;deleteAllCookies();
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
+
+    // SQLite storage with an existing file.
+    test-&gt;setPersistentStorage(WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);
+    domains = test-&gt;getDomains();
+    g_assert(domains);
+    g_assert_cmpint(g_strv_length(domains), ==, 2);
+    test-&gt;deleteAllCookies();
+    g_assert_cmpint(g_strv_length(test-&gt;getDomains()), ==, 0);
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+    if (g_str_equal(path, &quot;/index.html&quot;)) {
+        char* indexHtml = g_strdup_printf(kIndexHtmlFormat, soup_server_get_port(server));
+        soup_message_headers_replace(message-&gt;response_headers, &quot;Set-Cookie&quot;, &quot;foo=bar; Max-Age=60&quot;);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, indexHtml, strlen(indexHtml));
+    } else if (g_str_equal(path, &quot;/image.png&quot;))
+        soup_message_headers_replace(message-&gt;response_headers, &quot;Set-Cookie&quot;, &quot;baz=qux; Max-Age=60&quot;);
+    else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
+    g_assert(kTempDirectory);
+
+    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;accept-policy&quot;, testCookieManagerAcceptPolicy);
+    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;delete-cookies&quot;, testCookieManagerDeleteCookies);
+    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;cookies-changed&quot;, testCookieManagerCookiesChanged);
+    CookieManagerTest::add(&quot;WebKitCookieManager&quot;, &quot;persistent-storage&quot;, testCookieManagerPersistentStorage);
+}
+
+void afterAll()
+{
+    delete kServer;
+    g_rmdir(kTempDirectory);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDOMDOMWindowcpp"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMDOMWindow.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,152 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTestRunner.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+#define HTML_DOCUMENT &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;style type='text/css'&gt;#test { font-size: 16px; }&lt;/style&gt;&lt;body&gt;&lt;p id='test'&gt;test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+
+typedef struct {
+    gboolean loaded;
+    gboolean clicked;
+    WebProcessTestRunner* testRunner;
+    WebViewTest* test;
+} DomDomWindowTestStatus;
+
+static DomDomWindowTestStatus status;
+
+static void signalsNotifyCallback(const gchar *key, const gchar *value, gconstpointer)
+{
+    if (g_str_equal(key, &quot;ready&quot;)) {
+        // The document was already loaded in the webprocess, and its &quot;load&quot;
+        // signal couldn't be captured on time (was issued before the test
+        // started). We load it again to force a new &quot;load&quot; signal in the
+        // webprocess, which will be captured this time
+        status.test-&gt;loadHtml(HTML_DOCUMENT, 0);
+    }
+
+    if (g_str_equal(key, &quot;loaded&quot;)) {
+        status.loaded = TRUE;
+        status.test-&gt;showInWindowAndWaitUntilMapped();
+
+        // Click in a known location where the text is
+        status.test-&gt;clickMouseButton(20, 18, 1, 0);
+    }
+
+    if (g_str_equal(key, &quot;clicked&quot;))
+        status.clicked = TRUE;
+
+    if (g_str_equal(key, &quot;finish&quot;)) {
+        status.test = 0;
+        status.testRunner-&gt;finishTest(status.loaded &amp;&amp; status.clicked);
+    }
+}
+
+static void dispatchEventNotifyCallback(const gchar *key, const gchar *value, gconstpointer)
+{
+    if (g_str_equal(key, &quot;ready&quot;)) {
+        // The document was already loaded in the webprocess, and its &quot;load&quot;
+        // signal couldn't be captured on time (was issued before the test
+        // started). We load it again to force a new &quot;load&quot; signal in the
+        // webprocess, which will be captured this time
+        status.test-&gt;loadHtml(HTML_DOCUMENT, 0);
+    }
+
+    if (g_str_equal(key, &quot;loaded&quot;))
+        status.loaded = TRUE;
+
+    if (g_str_equal(key, &quot;clicked&quot;))
+        status.clicked = TRUE;
+
+    if (g_str_equal(key, &quot;finish&quot;)) {
+        status.test = 0;
+        status.testRunner-&gt;finishTest(status.loaded &amp;&amp; status.clicked);
+    }
+}
+
+static void testWebKitDOMDOMWindowSignals(WebViewTest* test, gconstpointer)
+{
+    status.loaded = FALSE;
+    status.clicked = FALSE;
+    status.test = test;
+
+    status.testRunner-&gt;setNotifyCallback(G_CALLBACK(signalsNotifyCallback), 0);
+
+    // The HTML document will we loaded later, when the test is &quot;ready&quot; because
+    // we want to test the &quot;load&quot; signal
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(status.test-&gt;m_webView)));
+    status.testRunner-&gt;runTestAndWait(&quot;WebKitDOMDOMWindow&quot;, &quot;signals&quot;, g_variant_builder_end(&amp;builder));
+    g_assert(status.testRunner-&gt;getTestResult());
+}
+
+static void testWebKitDOMDOMWindowDispatchEvent(WebViewTest* test, gconstpointer)
+{
+    status.loaded = FALSE;
+    status.clicked = FALSE;
+    status.test = test;
+
+    status.testRunner-&gt;setNotifyCallback(G_CALLBACK(dispatchEventNotifyCallback), 0);
+
+    // The HTML document will we loaded later, when the test is &quot;ready&quot; because
+    // we want to test the &quot;load&quot; signal
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(status.test-&gt;m_webView)));
+    status.testRunner-&gt;runTestAndWait(&quot;WebKitDOMDOMWindow&quot;, &quot;dispatch-event&quot;, g_variant_builder_end(&amp;builder));
+    g_assert(status.testRunner-&gt;getTestResult());
+}
+
+static void testWebKitDOMDOMWindowGetComputedStyle(WebViewTest* test, gconstpointer)
+{
+    status.loaded = FALSE;
+    status.clicked = FALSE;
+    status.test = test;
+
+    static const char* testHTML = HTML_DOCUMENT;
+    status.test-&gt;loadHtml(testHTML, 0);
+    status.test-&gt;waitUntilLoadFinished();
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(status.test-&gt;m_webView)));
+    g_assert(status.testRunner-&gt;runTest(&quot;WebKitDOMDOMWindow&quot;, &quot;get-computed-style&quot;, g_variant_builder_end(&amp;builder)));
+}
+
+void beforeAll()
+{
+    status.testRunner = new WebProcessTestRunner();
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+
+    WebViewTest::add(&quot;WebKitDOMDOMWindow&quot;, &quot;signals&quot;, testWebKitDOMDOMWindowSignals);
+    WebViewTest::add(&quot;WebKitDOMDOMWindow&quot;, &quot;dispatch-event&quot;, testWebKitDOMDOMWindowDispatchEvent);
+    WebViewTest::add(&quot;WebKitDOMDOMWindow&quot;, &quot;get-computed-style&quot;, testWebKitDOMDOMWindowGetComputedStyle);
+}
+
+void afterAll()
+{
+    delete status.testRunner;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDOMNodecppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDOMNodecpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDOMNode.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTestRunner.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+static WebProcessTestRunner* testRunner;
+
+static void testWebKitDOMNodeHierarchyNavigation(WebViewTest* test, gconstpointer)
+{
+    static const char* testHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;1&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;&lt;p&gt;3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(testHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
+    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;hierarchy-navigation&quot;, g_variant_builder_end(&amp;builder)));
+}
+
+static void testWebKitDOMNodeInsertion(WebViewTest* test, gconstpointer)
+{
+    static const char* testHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(testHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
+    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;insertion&quot;, g_variant_builder_end(&amp;builder)));
+}
+
+static void testWebKitDOMNodeTagNames(WebViewTest* test, gconstpointer)
+{
+    static const char* testHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&quot;
+        &quot;&lt;video id='video' preload='none'&gt;&quot;
+        &quot;    &lt;source src='movie.ogg' type='video/ogg'&gt;&quot;
+        &quot;        Your browser does not support the video tag.&quot;
+        &quot;&lt;/video&gt;&quot;
+        &quot;&lt;video id='video2' preload='none'&gt;&quot;
+        &quot;     &lt;source src='movie.ogg' type='video/ogg'&gt;&quot;
+        &quot;        Your browser does not support the video tag.&quot;
+        &quot;&lt;/video&gt;&quot;
+        &quot;&lt;input type='hidden' id='test' name='finish' value='false'&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(testHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
+    g_assert(testRunner-&gt;runTest(&quot;WebKitDOMNode&quot;, &quot;tag-names&quot;, g_variant_builder_end(&amp;builder)));
+}
+
+void beforeAll()
+{
+    testRunner = new WebProcessTestRunner();
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+
+    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;hierarchy-navigation&quot;, testWebKitDOMNodeHierarchyNavigation);
+    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;insertion&quot;, testWebKitDOMNodeInsertion);
+    WebViewTest::add(&quot;WebKitDOMNode&quot;, &quot;tag-names&quot;, testWebKitDOMNodeTagNames);
+}
+
+void afterAll()
+{
+    delete testRunner;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestDownloadscppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestDownloadscpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,522 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+static char* kTempDirectory;
+
+class DownloadTest: public Test {
+public:
+    MAKE_GLIB_TEST_FIXTURE(DownloadTest);
+
+    enum DownloadEvent {
+        Started,
+        ReceivedResponse,
+        CreatedDestination,
+        ReceivedData,
+        Failed,
+        Finished
+    };
+
+    static void receivedResponseCallback(WebKitDownload* download, GParamSpec*, DownloadTest* test)
+    {
+        g_assert(webkit_download_get_response(download));
+        test-&gt;receivedResponse(download);
+    }
+
+    static gboolean createdDestinationCallback(WebKitDownload* download, const gchar* destination, DownloadTest* test)
+    {
+        g_assert(webkit_download_get_destination(download));
+        g_assert_cmpstr(webkit_download_get_destination(download), ==, destination);
+        test-&gt;createdDestination(download, destination);
+        return TRUE;
+    }
+
+    static gboolean receivedDataCallback(WebKitDownload* download, guint64 dataLength, DownloadTest* test)
+    {
+        test-&gt;receivedData(download, dataLength);
+        return TRUE;
+    }
+
+    static gboolean finishedCallback(WebKitDownload* download, DownloadTest* test)
+    {
+        test-&gt;finished(download);
+        return TRUE;
+    }
+
+    static gboolean failedCallback(WebKitDownload* download, GError* error, DownloadTest* test)
+    {
+        g_assert(error);
+        test-&gt;failed(download, error);
+        return TRUE;
+    }
+
+    static gboolean decideDestinationCallback(WebKitDownload* download, const gchar* suggestedFilename, DownloadTest* test)
+    {
+        g_assert(suggestedFilename);
+        test-&gt;decideDestination(download, suggestedFilename);
+        return TRUE;
+    }
+
+    static void downloadStartedCallback(WebKitWebContext* context, WebKitDownload* download, DownloadTest* test)
+    {
+        g_assert(webkit_download_get_request(download));
+        test-&gt;started(download);
+        g_signal_connect(download, &quot;notify::response&quot;, G_CALLBACK(receivedResponseCallback), test);
+        g_signal_connect(download, &quot;created-destination&quot;, G_CALLBACK(createdDestinationCallback), test);
+        g_signal_connect(download, &quot;received-data&quot;, G_CALLBACK(receivedDataCallback), test);
+        g_signal_connect(download, &quot;finished&quot;, G_CALLBACK(finishedCallback), test);
+        g_signal_connect(download, &quot;failed&quot;, G_CALLBACK(failedCallback), test);
+        g_signal_connect(download, &quot;decide-destination&quot;, G_CALLBACK(decideDestinationCallback), test);
+    }
+
+    DownloadTest()
+        : m_webContext(webkit_web_context_get_default())
+        , m_mainLoop(g_main_loop_new(0, TRUE))
+        , m_downloadSize(0)
+    {
+        g_signal_connect(m_webContext, &quot;download-started&quot;, G_CALLBACK(downloadStartedCallback), this);
+    }
+
+    ~DownloadTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webContext, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+        g_main_loop_unref(m_mainLoop);
+    }
+
+    virtual void started(WebKitDownload* download)
+    {
+        m_downloadEvents.append(Started);
+    }
+
+    virtual void receivedResponse(WebKitDownload* download)
+    {
+        m_downloadEvents.append(ReceivedResponse);
+    }
+
+    virtual void createdDestination(WebKitDownload* download, const char* destination)
+    {
+        m_downloadEvents.append(CreatedDestination);
+    }
+
+    virtual void receivedData(WebKitDownload* download, guint64 dataLength)
+    {
+        m_downloadSize += dataLength;
+        if (!m_downloadEvents.contains(ReceivedData))
+            m_downloadEvents.append(ReceivedData);
+    }
+
+    virtual void finished(WebKitDownload* download)
+    {
+        g_assert_cmpuint(m_downloadSize, ==, webkit_download_get_received_data_length(download));
+        m_downloadEvents.append(Finished);
+        g_main_loop_quit(m_mainLoop);
+    }
+
+    virtual void failed(WebKitDownload* download, GError* error)
+    {
+        m_downloadEvents.append(Failed);
+    }
+
+    virtual void decideDestination(WebKitDownload* download, const gchar* suggestedFilename)
+    {
+        GOwnPtr&lt;char&gt; destination(g_build_filename(kTempDirectory, suggestedFilename, NULL));
+        GOwnPtr&lt;char&gt; destinationURI(g_filename_to_uri(destination.get(), 0, 0));
+        webkit_download_set_destination(download, destinationURI.get());
+    }
+
+    WebKitDownload* downloadURIAndWaitUntilFinishes(const CString&amp; requestURI)
+    {
+        WebKitDownload* download = webkit_web_context_download_uri(m_webContext, requestURI.data());
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(download));
+
+        WebKitURIRequest* request = webkit_download_get_request(download);
+        g_assert(request);
+        ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, requestURI);
+
+        g_main_loop_run(m_mainLoop);
+
+        return download;
+    }
+
+    void checkDestinationAndDeleteFile(WebKitDownload* download, const char* expectedName)
+    {
+        if (!webkit_download_get_destination(download))
+            return;
+        GRefPtr&lt;GFile&gt; destFile = adoptGRef(g_file_new_for_uri(webkit_download_get_destination(download)));
+        GOwnPtr&lt;char&gt; destBasename(g_file_get_basename(destFile.get()));
+        g_assert_cmpstr(destBasename.get(), ==, expectedName);
+
+        g_file_delete(destFile.get(), 0, 0);
+    }
+
+    WebKitWebContext* m_webContext;
+    GMainLoop* m_mainLoop;
+    Vector&lt;DownloadEvent&gt; m_downloadEvents;
+    guint64 m_downloadSize;
+};
+
+static void testDownloadLocalFile(DownloadTest* test, gconstpointer)
+{
+    GOwnPtr&lt;char&gt; sourcePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;test.pdf&quot;, NULL));
+    GRefPtr&lt;GFile&gt; source = adoptGRef(g_file_new_for_path(sourcePath.get()));
+    GRefPtr&lt;GFileInfo&gt; sourceInfo = adoptGRef(g_file_query_info(source.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
+    GOwnPtr&lt;char&gt; sourceURI(g_file_get_uri(source.get()));
+    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(sourceURI.get()));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
+    g_assert_cmpint(events.size(), ==, 5);
+    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::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-&gt;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);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;test.pdf&quot;);
+}
+
+class DownloadErrorTest: public DownloadTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(DownloadErrorTest);
+
+    DownloadErrorTest()
+        : m_expectedError(WEBKIT_DOWNLOAD_ERROR_NETWORK)
+    {
+    }
+
+    void receivedResponse(WebKitDownload* download)
+    {
+        DownloadTest::receivedResponse(download);
+        if (m_expectedError == WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER)
+            webkit_download_cancel(download);
+    }
+
+    void createdDestination(WebKitDownload* download, const char* destination)
+    {
+        g_assert_not_reached();
+    }
+
+    void failed(WebKitDownload* download, GError* error)
+    {
+        g_assert(g_error_matches(error, WEBKIT_DOWNLOAD_ERROR, m_expectedError));
+        DownloadTest::failed(download, error);
+    }
+
+    void decideDestination(WebKitDownload* download, const gchar* suggestedFilename)
+    {
+        if (m_expectedError != WEBKIT_DOWNLOAD_ERROR_DESTINATION) {
+            DownloadTest::decideDestination(download, suggestedFilename);
+            return;
+        }
+        webkit_download_set_destination(download, &quot;file:///foo/bar&quot;);
+    }
+
+    WebKitDownloadError m_expectedError;
+};
+
+static void testDownloadLocalFileError(DownloadErrorTest* test, gconstpointer)
+{
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_NETWORK;
+    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(&quot;file:///foo/bar&quot;));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[2], ==, DownloadTest::Finished);
+    events.clear();
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_DESTINATION;
+    GOwnPtr&lt;char&gt; path(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;test.pdf&quot;, NULL));
+    GRefPtr&lt;GFile&gt; file = adoptGRef(g_file_new_for_path(path.get()));
+    GOwnPtr&lt;char&gt; uri(g_file_get_uri(file.get()));
+    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(uri.get()));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
+    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
+    events.clear();
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;bar&quot;);
+
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
+    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(uri.get()));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
+    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
+    events.clear();
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;test.pdf&quot;);
+}
+
+static WebKitTestServer* kServer;
+static const char* kServerSuggestedFilename = &quot;webkit-downloaded-file&quot;;
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    GOwnPtr&lt;char&gt; filePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), path, NULL));
+    char* contents;
+    gsize contentsLength;
+    if (!g_file_get_contents(filePath.get(), &amp;contents, &amp;contentsLength, 0)) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+        soup_message_body_complete(message-&gt;response_body);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+
+    GOwnPtr&lt;char&gt; contentDisposition(g_strdup_printf(&quot;filename=%s&quot;, kServerSuggestedFilename));
+    soup_message_headers_append(message-&gt;response_headers, &quot;Content-Disposition&quot;, contentDisposition.get());
+    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, contentsLength);
+
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+static void testDownloadRemoteFile(DownloadTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
+    g_assert_cmpint(events.size(), ==, 5);
+    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::Finished);
+    events.clear();
+
+    WebKitURIRequest* request = webkit_download_get_request(download.get());
+    g_assert(request);
+    ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, kServer-&gt;getURIForPath(&quot;/test.pdf&quot;));
+
+    g_assert(webkit_download_get_destination(download.get()));
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), ==, 1);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), kServerSuggestedFilename);
+}
+
+static void testDownloadRemoteFileError(DownloadErrorTest* test, gconstpointer)
+{
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_NETWORK;
+    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/foo&quot;)));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    Vector&lt;DownloadTest::DownloadEvent&gt;&amp; events = test-&gt;m_downloadEvents;
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
+    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
+    events.clear();
+    WebKitURIResponse* response = webkit_download_get_response(download.get());
+    g_assert_cmpuint(webkit_uri_response_get_status_code(response), ==, 404);
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_DESTINATION;
+    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
+    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
+    events.clear();
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), &quot;bar&quot;);
+
+    test-&gt;m_expectedError = WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
+    download = adoptGRef(test-&gt;downloadURIAndWaitUntilFinishes(kServer-&gt;getURIForPath(&quot;/test.pdf&quot;)));
+    g_assert(!webkit_download_get_web_view(download.get()));
+
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, DownloadTest::Started);
+    g_assert_cmpint(events[1], ==, DownloadTest::ReceivedResponse);
+    g_assert_cmpint(events[2], ==, DownloadTest::Failed);
+    g_assert_cmpint(events[3], ==, DownloadTest::Finished);
+    events.clear();
+    g_assert_cmpfloat(webkit_download_get_estimated_progress(download.get()), &lt;, 1);
+    test-&gt;checkDestinationAndDeleteFile(download.get(), kServerSuggestedFilename);
+}
+
+class WebViewDownloadTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(WebViewDownloadTest);
+
+    static void downloadStartedCallback(WebKitWebContext* context, WebKitDownload* download, WebViewDownloadTest* test)
+    {
+        test-&gt;m_download = download;
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(download));
+        test-&gt;quitMainLoop();
+    }
+
+    WebViewDownloadTest()
+    {
+        g_signal_connect(webkit_web_view_get_context(m_webView), &quot;download-started&quot;, G_CALLBACK(downloadStartedCallback), this);
+    }
+
+    ~WebViewDownloadTest()
+    {
+        g_signal_handlers_disconnect_matched(webkit_web_view_get_context(m_webView), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void waitUntilDownloadStarted()
+    {
+        m_download = 0;
+        g_main_loop_run(m_mainLoop);
+        g_assert(m_download.get());
+    }
+
+    static gboolean downloadDecideDestinationCallback(WebKitDownload* download, const gchar* suggestedFilename, WebViewDownloadTest* test)
+    {
+        GOwnPtr&lt;char&gt; destination(g_build_filename(kTempDirectory, suggestedFilename, NULL));
+        GOwnPtr&lt;char&gt; destinationURI(g_filename_to_uri(destination.get(), 0, 0));
+        webkit_download_set_destination(download, destinationURI.get());
+        return TRUE;
+    }
+
+    static void downloadFinishedCallback(WebKitDownload* download, WebViewDownloadTest* test)
+    {
+        test-&gt;quitMainLoop();
+    }
+
+    void waitUntilDownloadFinished()
+    {
+        g_signal_connect(m_download.get(), &quot;decide-destination&quot;, G_CALLBACK(downloadDecideDestinationCallback), this);
+        g_signal_connect(m_download.get(), &quot;finished&quot;, G_CALLBACK(downloadFinishedCallback), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GRefPtr&lt;WebKitDownload&gt; m_download;
+};
+
+static void testWebViewDownloadURI(WebViewDownloadTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitDownload&gt; download = adoptGRef(webkit_web_view_download_uri(test-&gt;m_webView, kServer-&gt;getURIForPath(&quot;/test.pdf&quot;).data()));
+    test-&gt;waitUntilDownloadStarted();
+    g_assert(test-&gt;m_webView == webkit_download_get_web_view(download.get()));
+    test-&gt;waitUntilDownloadFinished();
+
+    GRefPtr&lt;GFile&gt; downloadFile = adoptGRef(g_file_new_for_uri(webkit_download_get_destination(download.get())));
+    GRefPtr&lt;GFileInfo&gt; downloadFileInfo = adoptGRef(g_file_query_info(downloadFile.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
+    g_assert_cmpint(g_file_info_get_size(downloadFileInfo.get()), &gt;, 0);
+    g_file_delete(downloadFile.get(), 0, 0);
+}
+
+class PolicyResponseDownloadTest: public WebViewDownloadTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(PolicyResponseDownloadTest);
+
+    static gboolean decidePolicyCallback(WebKitWebView* webView, WebKitPolicyDecision* decision, WebKitPolicyDecisionType type, PolicyResponseDownloadTest* test)
+    {
+        if (type != WEBKIT_POLICY_DECISION_TYPE_RESPONSE)
+            return FALSE;
+
+        webkit_policy_decision_download(decision);
+        return TRUE;
+    }
+
+    PolicyResponseDownloadTest()
+    {
+        g_signal_connect(m_webView, &quot;decide-policy&quot;, G_CALLBACK(decidePolicyCallback), this);
+    }
+
+    ~PolicyResponseDownloadTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void cancelDownloadAndWaitUntilFinished()
+    {
+        webkit_download_cancel(m_download.get());
+        waitUntilDownloadFinished();
+        m_download = 0;
+    }
+};
+
+static void testPolicyResponseDownload(PolicyResponseDownloadTest* test, gconstpointer)
+{
+    // Test that a download started by the the policy checker contains the web view.
+    CString requestURI = kServer-&gt;getURIForPath(&quot;/test.pdf&quot;).data();
+    test-&gt;loadURI(requestURI.data());
+    test-&gt;waitUntilDownloadStarted();
+
+    WebKitURIRequest* request = webkit_download_get_request(test-&gt;m_download.get());
+    g_assert(request);
+    ASSERT_CMP_CSTRING(webkit_uri_request_get_uri(request), ==, requestURI);
+
+    g_assert(test-&gt;m_webView == webkit_download_get_web_view(test-&gt;m_download.get()));
+    test-&gt;cancelDownloadAndWaitUntilFinished();
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
+    g_assert(kTempDirectory);
+
+    DownloadTest::add(&quot;Downloads&quot;, &quot;local-file&quot;, testDownloadLocalFile);
+    DownloadErrorTest::add(&quot;Downloads&quot;, &quot;local-file-error&quot;, testDownloadLocalFileError);
+    DownloadTest::add(&quot;Downloads&quot;, &quot;remote-file&quot;, testDownloadRemoteFile);
+    DownloadErrorTest::add(&quot;Downloads&quot;, &quot;remote-file-error&quot;, testDownloadRemoteFileError);
+    WebViewDownloadTest::add(&quot;WebKitWebView&quot;, &quot;download-uri&quot;, testWebViewDownloadURI);
+    PolicyResponseDownloadTest::add(&quot;Downloads&quot;, &quot;policy-decision-download&quot;, testPolicyResponseDownload);
+}
+
+void afterAll()
+{
+    delete kServer;
+    g_rmdir(kTempDirectory);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestFramecppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestFramecpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestFrame.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTestRunner.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+static WebProcessTestRunner* testRunner;
+
+static void webkitFrameTestRun(WebViewTest* test, const char* testName)
+{
+    static const char* testHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(testHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&amp;builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&amp;builder, &quot;{sv}&quot;, &quot;pageID&quot;, g_variant_new_uint64(webkit_web_view_get_page_id(test-&gt;m_webView)));
+    g_assert(testRunner-&gt;runTest(&quot;WebKitFrame&quot;, testName, g_variant_builder_end(&amp;builder)));
+}
+
+static void testWebKitFrameMainFrame(WebViewTest* test, gconstpointer)
+{
+    webkitFrameTestRun(test, &quot;main-frame&quot;);
+}
+
+static void testWebKitFrameURI(WebViewTest* test, gconstpointer)
+{
+    webkitFrameTestRun(test, &quot;uri&quot;);
+}
+
+static void testWebKitFrameJavaScriptContext(WebViewTest* test, gconstpointer)
+{
+    webkitFrameTestRun(test, &quot;javascript-context&quot;);
+}
+
+void beforeAll()
+{
+    testRunner = new WebProcessTestRunner();
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+
+    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;main-frame&quot;, testWebKitFrameMainFrame);
+    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;uri&quot;, testWebKitFrameURI);
+    WebViewTest::add(&quot;WebKitFrame&quot;, &quot;javascript-context&quot;, testWebKitFrameJavaScriptContext);
+}
+
+void afterAll()
+{
+    delete testRunner;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestInspectorcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspector.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,356 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+class InspectorTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(InspectorTest);
+
+    enum InspectorEvents {
+        OpenWindow,
+        BringToFront,
+        Closed,
+        Attach,
+        Detach
+    };
+
+    static gboolean openWindowCallback(WebKitWebInspector*, InspectorTest* test)
+    {
+        return test-&gt;openWindow();
+    }
+
+    static gboolean bringToFrontCallback(WebKitWebInspector*, InspectorTest* test)
+    {
+        return test-&gt;bringToFront();
+    }
+
+    static void closedCallback(WebKitWebInspector*, InspectorTest* test)
+    {
+        return test-&gt;closed();
+    }
+
+    static gboolean attachCallback(WebKitWebInspector*, InspectorTest* test)
+    {
+        return test-&gt;attach();
+    }
+
+    static gboolean detachCallback(WebKitWebInspector*, InspectorTest* test)
+    {
+        return test-&gt;detach();
+    }
+
+    static const unsigned gMinimumAttachedInspectorWidth = 750;
+    static const unsigned gMinimumAttachedInspectorHeight = 250;
+
+    InspectorTest()
+        : WebViewTest()
+        , m_inspector(webkit_web_view_get_inspector(m_webView))
+    {
+        webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(m_webView), TRUE);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_inspector));
+        g_signal_connect(m_inspector, &quot;open-window&quot;, G_CALLBACK(openWindowCallback), this);
+        g_signal_connect(m_inspector, &quot;bring-to-front&quot;, G_CALLBACK(bringToFrontCallback), this);
+        g_signal_connect(m_inspector, &quot;closed&quot;, G_CALLBACK(closedCallback), this);
+        g_signal_connect(m_inspector, &quot;attach&quot;, G_CALLBACK(attachCallback), this);
+        g_signal_connect(m_inspector, &quot;detach&quot;, G_CALLBACK(detachCallback), this);
+    }
+
+    ~InspectorTest()
+    {
+        g_signal_handlers_disconnect_matched(m_inspector, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    virtual bool openWindow()
+    {
+        m_events.append(OpenWindow);
+        g_main_loop_quit(m_mainLoop);
+        return TRUE;
+    }
+
+    virtual bool bringToFront()
+    {
+        m_events.append(BringToFront);
+        g_main_loop_quit(m_mainLoop);
+        return FALSE;
+    }
+
+    virtual void closed()
+    {
+        m_events.append(Closed);
+    }
+
+    virtual bool attach()
+    {
+        m_events.append(Attach);
+        return TRUE;
+    }
+
+    virtual bool detach()
+    {
+        m_events.append(Detach);
+        return TRUE;
+    }
+
+
+    static gboolean showIdle(InspectorTest* test)
+    {
+        webkit_web_inspector_show(test-&gt;m_inspector);
+        return FALSE;
+    }
+
+    void show()
+    {
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(showIdle), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void resizeViewAndAttach()
+    {
+        // Resize the view to make room for the inspector.
+        resizeView(gMinimumAttachedInspectorWidth, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
+        webkit_web_inspector_attach(m_inspector);
+    }
+
+    static gboolean detachIdle(InspectorTest* test)
+    {
+        webkit_web_inspector_detach(test-&gt;m_inspector);
+        return FALSE;
+    }
+
+    void detachAndWaitUntilWindowOpened()
+    {
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(detachIdle), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void close()
+    {
+        webkit_web_inspector_close(m_inspector);
+    }
+
+    WebKitWebInspector* m_inspector;
+    Vector&lt;InspectorEvents&gt; m_events;
+};
+
+static void testInspectorDefault(InspectorTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+    test-&gt;resizeView(200, 200);
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;show();
+    // We don't add the view to a container, so consume the weak ref with GRefPtr.
+    GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(test-&gt;m_inspector);
+    g_assert(inspectorView.get());
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(inspectorView.get()));
+    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), ==, 0);
+    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow);
+    test-&gt;m_events.clear();
+
+    test-&gt;show();
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::BringToFront);
+    test-&gt;m_events.clear();
+
+    test-&gt;resizeViewAndAttach();
+    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), &gt;=, InspectorTest::gMinimumAttachedInspectorHeight);
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::Attach);
+    test-&gt;m_events.clear();
+
+    test-&gt;detachAndWaitUntilWindowOpened();
+    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 2);
+    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
+    g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow);
+    test-&gt;m_events.clear();
+
+    test-&gt;close();
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::Closed);
+    test-&gt;m_events.clear();
+}
+
+class CustomInspectorTest: public InspectorTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(CustomInspectorTest);
+
+    CustomInspectorTest()
+        : InspectorTest()
+        , m_inspectorWindow(0)
+    {
+    }
+
+    ~CustomInspectorTest()
+    {
+        if (m_inspectorWindow)
+            gtk_widget_destroy(m_inspectorWindow);
+    }
+
+    bool openWindow()
+    {
+        g_assert(!m_inspectorWindow);
+        m_inspectorWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        WebKitWebViewBase* inspectorView = webkit_web_inspector_get_web_view(m_inspector);
+        g_assert(inspectorView);
+        gtk_container_add(GTK_CONTAINER(m_inspectorWindow), GTK_WIDGET(inspectorView));
+        gtk_widget_show_all(m_inspectorWindow);
+
+        return InspectorTest::openWindow();
+    }
+
+    void closed()
+    {
+        if (m_inspectorWindow) {
+            gtk_widget_destroy(m_inspectorWindow);
+            m_inspectorWindow = 0;
+        }
+
+        return InspectorTest::closed();
+    }
+
+    bool attach()
+    {
+        GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(m_inspector);
+        if (m_inspectorWindow) {
+            gtk_container_remove(GTK_CONTAINER(m_inspectorWindow), GTK_WIDGET(inspectorView.get()));
+            gtk_widget_destroy(m_inspectorWindow);
+            m_inspectorWindow = 0;
+        }
+
+        GtkWidget* pane;
+        if (gtk_bin_get_child(GTK_BIN(m_parentWindow)) == GTK_WIDGET(m_webView)) {
+            GRefPtr&lt;WebKitWebView&gt; inspectedView = m_webView;
+            gtk_container_remove(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
+            pane = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
+            gtk_paned_add1(GTK_PANED(pane), GTK_WIDGET(m_webView));
+            gtk_container_add(GTK_CONTAINER(m_parentWindow), pane);
+            gtk_widget_show_all(pane);
+        } else
+            pane = gtk_bin_get_child(GTK_BIN(m_parentWindow));
+        gtk_paned_set_position(GTK_PANED(pane), webkit_web_inspector_get_attached_height(m_inspector));
+        gtk_paned_add2(GTK_PANED(pane), GTK_WIDGET(inspectorView.get()));
+
+        return InspectorTest::attach();
+    }
+
+    bool detach()
+    {
+        GRefPtr&lt;WebKitWebViewBase&gt; inspectorView = webkit_web_inspector_get_web_view(m_inspector);
+        GtkWidget* pane = gtk_bin_get_child(GTK_BIN(m_parentWindow));
+        g_assert(GTK_IS_PANED(pane));
+        gtk_container_remove(GTK_CONTAINER(pane), GTK_WIDGET(inspectorView.get()));
+        return InspectorTest::detach();
+    }
+
+    void destroyWindow()
+    {
+        g_assert(m_inspectorWindow);
+        gtk_widget_destroy(m_inspectorWindow);
+        m_inspectorWindow = 0;
+    }
+
+    GtkWidget* m_inspectorWindow;
+};
+
+static void testInspectorManualAttachDetach(CustomInspectorTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+    test-&gt;resizeView(200, 200);
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;show();
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test-&gt;m_inspector)));
+    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::OpenWindow);
+    test-&gt;m_events.clear();
+
+    test-&gt;resizeViewAndAttach();
+    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    g_assert_cmpuint(webkit_web_inspector_get_attached_height(test-&gt;m_inspector), &gt;=, InspectorTest::gMinimumAttachedInspectorHeight);
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::Attach);
+    test-&gt;m_events.clear();
+
+    test-&gt;detachAndWaitUntilWindowOpened();
+    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 2);
+    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
+    g_assert_cmpint(events[1], ==, InspectorTest::OpenWindow);
+    test-&gt;m_events.clear();
+
+    test-&gt;resizeViewAndAttach();
+    g_assert(webkit_web_inspector_is_attached(test-&gt;m_inspector));
+    test-&gt;m_events.clear();
+    test-&gt;close();
+    events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 2);
+    g_assert_cmpint(events[0], ==, InspectorTest::Detach);
+    g_assert_cmpint(events[1], ==, InspectorTest::Closed);
+    test-&gt;m_events.clear();
+}
+
+static void testInspectorCustomContainerDestroyed(CustomInspectorTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+    test-&gt;resizeView(200, 200);
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;WebKitGTK+ Inspector test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;show();
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webkit_web_inspector_get_web_view(test-&gt;m_inspector)));
+    g_assert(!webkit_web_inspector_is_attached(test-&gt;m_inspector));
+
+    test-&gt;m_events.clear();
+    test-&gt;destroyWindow();
+    Vector&lt;InspectorTest::InspectorEvents&gt;&amp; events = test-&gt;m_events;
+    g_assert_cmpint(events.size(), ==, 1);
+    g_assert_cmpint(events[0], ==, InspectorTest::Closed);
+    test-&gt;m_events.clear();
+}
+
+void beforeAll()
+{
+    InspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;default&quot;, testInspectorDefault);
+    CustomInspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;manual-attach-detach&quot;, testInspectorManualAttachDetach);
+    CustomInspectorTest::add(&quot;WebKitWebInspector&quot;, &quot;custom-container-destroyed&quot;, testInspectorCustomContainerDestroyed);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestInspectorServercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestInspectorServercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,294 @@
</span><ins>+/*
+ * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+// Name of the test server application creating the webView object.
+static const char* gTestServerAppName = &quot;InspectorTestServer&quot;;
+
+// Max seconds to wait for the test server before inspecting it.
+static const int gMaxWaitForChild = 5;
+
+// The PID for the test server running, so we can kill it if needed.
+static GPid gChildProcessPid = 0;
+
+// Whether the child has replied and it's ready.
+static bool gChildIsReady = false;
+
+static void stopTestServer()
+{
+    // Do nothing if there's no server running.
+    if (!gChildProcessPid)
+        return;
+
+    g_spawn_close_pid(gChildProcessPid);
+    kill(gChildProcessPid, SIGTERM);
+    gChildProcessPid = 0;
+}
+
+static void sigAbortHandler(int sigNum)
+{
+    // Just stop the test server if SIGABRT was received.
+    stopTestServer();
+}
+
+static gpointer testServerMonitorThreadFunc(gpointer)
+{
+    // Wait for the specified timeout to happen.
+    g_usleep(gMaxWaitForChild * G_USEC_PER_SEC);
+
+    // Kill the child process if not ready yet.
+    if (!gChildIsReady)
+        stopTestServer();
+
+    g_thread_exit(0);
+    return 0;
+}
+
+static void startTestServerMonitor()
+{
+    gChildIsReady = false;
+    g_thread_new(&quot;TestServerMonitor&quot;, testServerMonitorThreadFunc, 0);
+}
+
+static void startTestServer()
+{
+    // Prepare argv[] for spawning the server process.
+    GOwnPtr&lt;char&gt; testServerPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;TestWebKitAPI&quot;, &quot;WebKit2Gtk&quot;, gTestServerAppName, NULL));
+
+    // We install a handler to ensure that we kill the child process
+    // if the parent dies because of whatever the reason is.
+    signal(SIGABRT, sigAbortHandler);
+
+    char* testServerArgv[2];
+    testServerArgv[0] = testServerPath.get();
+    testServerArgv[1] = 0;
+
+    // Spawn the server, getting its stdout file descriptor to set a
+    // communication channel, so we know when it's ready.
+    int childStdout = 0;
+    g_assert(g_spawn_async_with_pipes(0, testServerArgv, 0, static_cast&lt;GSpawnFlags&gt;(0), 0, 0,
+        &amp;gChildProcessPid, 0, &amp;childStdout, 0, 0));
+
+    // Start monitoring the test server (in a separate thread) to
+    // ensure we don't block on the child process more than a timeout.
+    startTestServerMonitor();
+
+    char msg[2];
+    GIOChannel* ioChannel = g_io_channel_unix_new(childStdout);
+    if (g_io_channel_read_chars(ioChannel, msg, 2, 0, 0) == G_IO_STATUS_NORMAL) {
+        // Check whether the server sent a message saying it's ready
+        // and store the result globally, so the monitor can see it.
+        gChildIsReady = msg[0] == 'O' &amp;&amp; msg[1] == 'K';
+    }
+    g_io_channel_unref(ioChannel);
+    close(childStdout);
+
+    // The timeout was reached and the server is not ready yet, so
+    // stop it inmediately, and let the unit tests fail.
+    if (!gChildIsReady)
+        stopTestServer();
+}
+
+class InspectorServerTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(InspectorServerTest);
+
+    InspectorServerTest()
+        : WebViewTest()
+    {
+    }
+
+    bool getPageList()
+    {
+        loadHtml(&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n&quot;
+            &quot;var pages;\n&quot;
+            &quot;var xhr = new XMLHttpRequest;\n&quot;
+            &quot;xhr.open(\&quot;GET\&quot;, \&quot;/pagelist.json\&quot;);\n&quot;
+            &quot;xhr.onload = function(e) {\n&quot;
+                &quot;if (xhr.status == 200) {\n&quot;
+                    &quot;pages = JSON.parse(xhr.responseText);\n&quot;
+                    &quot;document.title = \&quot;OK\&quot;;\n&quot;
+                &quot;} else \n&quot;
+                    &quot;document.title = \&quot;FAIL\&quot;;\n&quot;
+                &quot;}\n&quot;
+            &quot;xhr.send();\n&quot;
+            &quot;&lt;/script&gt;\n&quot;,
+            &quot;http://127.0.0.1:2999/&quot;);
+
+        waitUntilTitleChanged();
+
+        if (!strcmp(webkit_web_view_get_title(m_webView), &quot;OK&quot;))
+            return true;
+
+        return false;
+    }
+
+    ~InspectorServerTest()
+    {
+    }
+};
+
+// Test to get inspector server page list from the test server.
+// Should contain only one entry pointing to http://127.0.0.1:2999/webinspector/Main.html?page=1
+static void testInspectorServerPageList(InspectorServerTest* test, gconstpointer)
+{
+    GOwnPtr&lt;GError&gt; error;
+
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+    g_assert(test-&gt;getPageList());
+
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages.length;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert_cmpint(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 1);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].id;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    int pageId = WebViewTest::javascriptResultToNumber(javascriptResult);
+
+    GOwnPtr&lt;char&gt; valueString;
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].url;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;http://127.0.0.1:2999/&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].inspectorUrl;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    String validInspectorURL = String(&quot;/Main.html?page=&quot;) + String::number(pageId);
+    ASSERT_CMP_CSTRING(valueString.get(), ==, validInspectorURL.utf8());
+}
+
+// Test sending a raw remote debugging message through our web socket server.
+// For this specific message see: http://code.google.com/chrome/devtools/docs/protocol/tot/runtime.html#command-evaluate
+static void testRemoteDebuggingMessage(InspectorServerTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+
+    test-&gt;loadHtml(&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n&quot;
+        &quot;var socket = new WebSocket('ws://127.0.0.1:2999/devtools/page/1');\n&quot;
+        &quot;socket.onmessage = function(message) {\n&quot;
+            &quot;var response = JSON.parse(message.data);\n&quot;
+            &quot;if (response.id === 1)\n&quot;
+                &quot;document.title = response.result.result.value;\n&quot;
+            &quot;else\n&quot;
+                &quot;document.title = \&quot;FAIL\&quot;;\n&quot;
+            &quot;}\n&quot;
+            &quot;socket.onopen = function() {\n&quot;
+            &quot;socket.send('{\&quot;id\&quot;: 1, \&quot;method\&quot;: \&quot;Runtime.evaluate\&quot;, \&quot;params\&quot;: {\&quot;expression\&quot;: \&quot;2 + 2\&quot; } }');\n&quot;
+        &quot;}\n&quot;
+        &quot;&lt;/script&gt;&quot;,
+        &quot;http://127.0.0.1:2999/&quot;);
+    test-&gt;waitUntilTitleChanged();
+
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, &quot;4&quot;);
+}
+
+static void openRemoteDebuggingSession(InspectorServerTest* test, gconstpointer)
+{
+    // To test the whole pipeline this exploits a behavior of the inspector front-end which won't provide the page address as title unless the
+    // debugging session was established correctly through web socket.
+    // In our case page URL should be http://127.0.0.1:2999/
+    // So this test case will fail if:
+    // - The page list didn't return a valid inspector URL
+    // - Or the front-end couldn't be loaded through the inspector HTTP server
+    // - Or the web socket connection couldn't be established between the front-end and the page through the inspector server
+    // Let's see if this test isn't raising too many false positives, in which case we should use a better predicate if available.
+
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+
+    g_assert(test-&gt;getPageList());
+
+    GOwnPtr&lt;GError&gt; error;
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;pages[0].inspectorUrl;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+
+    String resolvedURL = String(&quot;http://127.0.0.1:2999/&quot;) + String::fromUTF8(WebViewTest::javascriptResultToCString(javascriptResult));
+    test-&gt;loadURI(resolvedURL.utf8().data());
+    test-&gt;waitUntilLoadFinished();
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementsByTagName('li')[0].title&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+
+    GOwnPtr&lt;char&gt; title(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(title.get(), ==, &quot;http://127.0.0.1:2999/&quot;);
+}
+
+static void sendIncompleteRequest(InspectorServerTest* test, gconstpointer)
+{
+    GOwnPtr&lt;GError&gt; error;
+
+    // Connect to the inspector server.
+    GRefPtr&lt;GSocketClient&gt; client = adoptGRef(g_socket_client_new());
+    GRefPtr&lt;GSocketConnection&gt; connection = adoptGRef(g_socket_client_connect_to_host(client.get(), &quot;127.0.0.1&quot;, 2999, 0, &amp;error.outPtr()));
+    g_assert_no_error(error.get());
+
+    // Send incomplete request (missing blank line after headers) and check if inspector server
+    // replies. The server should not reply to an incomplete request and the test should timeout
+    // on read.
+    GOutputStream* ostream = g_io_stream_get_output_stream(G_IO_STREAM(connection.get()));
+    // Request missing blank line after headers.
+    const gchar* incompleteRequest = &quot;GET /devtools/page/1 HTTP/1.1\r\nHost: Localhost\r\n&quot;;
+    g_output_stream_write(ostream, incompleteRequest, strlen(incompleteRequest), 0, &amp;error.outPtr());
+    g_assert_no_error(error.get());
+
+    GInputStream* istream = g_io_stream_get_input_stream(G_IO_STREAM(connection.get()));
+    char response[16];
+    memset(response, 0, sizeof(response));
+    GRefPtr&lt;GCancellable&gt; cancel = adoptGRef(g_cancellable_new());
+    g_input_stream_read_async(istream, response, sizeof(response) - 1, G_PRIORITY_DEFAULT, cancel.get(), 0, 0);
+    // Give a chance for the server to reply.
+    test-&gt;wait(1);
+    g_cancellable_cancel(cancel.get());
+    // If we got any answer it means the server replied to an incomplete request, lets fail.
+    g_assert(response[0] == '\0');
+}
+
+void beforeAll()
+{
+    // Overwrite WEBKIT_INSPECTOR_SERVER variable with default IP address but different port to avoid conflict with the test inspector server page.
+    g_setenv(&quot;WEBKIT_INSPECTOR_SERVER&quot;, &quot;127.0.0.1:2998&quot;, TRUE);
+
+    startTestServer();
+    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-page-list&quot;, testInspectorServerPageList);
+    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-remote-debugging-message&quot;, testRemoteDebuggingMessage);
+    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-open-debugging-session&quot;, openRemoteDebuggingSession);
+    InspectorServerTest::add(&quot;WebKitWebInspectorServer&quot;, &quot;test-incomplete-request&quot;, sendIncompleteRequest);
+
+}
+
+void afterAll()
+{
+    stopTestServer();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestLoaderClientcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestLoaderClientcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,465 @@
</span><ins>+/*
+ * Copyright (C) 2009, 2010 Gustavo Noronha Silva
+ * Copyright (C) 2009, 2011 Igalia S.L.
+ * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;LoadTrackingTest.h&quot;
+#include &quot;WebKitTestBus.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+static WebKitTestBus* bus;
+static WebKitTestServer* kServer;
+
+const char* kDNTHeaderNotPresent = &quot;DNT header not present&quot;;
+
+static void testLoadingStatus(LoadTrackingTest* test, gconstpointer data)
+{
+    test-&gt;setRedirectURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(events[1], ==, LoadTrackingTest::ProvisionalLoadReceivedServerRedirect);
+    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(events[3], ==, LoadTrackingTest::LoadFinished);
+}
+
+static void testLoadingError(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/error&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(events[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
+    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFinished);
+}
+
+static void assertNormalLoadHappened(Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events)
+{
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(events[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFinished);
+}
+
+static void testLoadHtml(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;Hello WebKit-GTK+&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+static void testLoadAlternateHTML(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadAlternateHTML(&quot;&lt;html&gt;&lt;body&gt;Alternate page&lt;/body&gt;&lt;/html&gt;&quot;, &quot;http://error-page.foo/&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+static void testLoadPlainText(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadPlainText(&quot;Hello WebKit-GTK+&quot;);
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+static void testLoadRequest(LoadTrackingTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitURIRequest&gt; request(webkit_uri_request_new(kServer-&gt;getURIForPath(&quot;/normal&quot;).data()));
+    test-&gt;loadRequest(request.get());
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+class LoadStopTrackingTest : public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(LoadStopTrackingTest);
+
+    virtual void loadCommitted()
+    {
+        LoadTrackingTest::loadCommitted();
+        webkit_web_view_stop_loading(m_webView);
+    }
+    virtual void loadFailed(const gchar* failingURI, GError* error)
+    {
+        g_assert(g_error_matches(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED));
+        LoadTrackingTest::loadFailed(failingURI, error);
+    }
+};
+
+static void testLoadCancelled(LoadStopTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/cancelled&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    Vector&lt;LoadTrackingTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(events[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(events[2], ==, LoadTrackingTest::LoadFailed);
+    g_assert_cmpint(events[3], ==, LoadTrackingTest::LoadFinished);
+}
+
+static void testWebViewTitle(LoadTrackingTest* test, gconstpointer)
+{
+    g_assert(!webkit_web_view_get_title(test-&gt;m_webView));
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Welcome to WebKit-GTK+!&lt;/title&gt;&lt;/head&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, &quot;Welcome to WebKit-GTK+!&quot;);
+}
+
+static void testWebViewReload(LoadTrackingTest* test, gconstpointer)
+{
+    // Check that nothing happens when there's nothing to reload.
+    test-&gt;reload();
+    test-&gt;wait(0.25); // Wait for a quarter of a second.
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+
+    test-&gt;reload();
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+static void testLoadProgress(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpfloat(test-&gt;m_estimatedProgress, ==, 1);
+}
+
+static void testWebViewHistoryLoad(LoadTrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal2&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+
+    // Check that load process is the same for pages loaded from history cache.
+    test-&gt;goBack();
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+
+    test-&gt;goForward();
+    test-&gt;waitUntilLoadFinished();
+    assertNormalLoadHappened(test-&gt;m_loadEvents);
+}
+
+class ViewURITrackingTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ViewURITrackingTest);
+
+    static void uriChanged(GObject*, GParamSpec*, ViewURITrackingTest* test)
+    {
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), !=, webkit_web_view_get_uri(test-&gt;m_webView));
+        test-&gt;m_activeURI = webkit_web_view_get_uri(test-&gt;m_webView);
+    }
+
+    ViewURITrackingTest()
+        : m_activeURI(webkit_web_view_get_uri(m_webView))
+    {
+        g_assert(m_activeURI.isNull());
+        g_signal_connect(m_webView, &quot;notify::uri&quot;, G_CALLBACK(uriChanged), this);
+    }
+
+    void provisionalLoadStarted()
+    {
+        checkActiveURI(&quot;/redirect&quot;);
+    }
+
+    void provisionalLoadReceivedServerRedirect()
+    {
+        checkActiveURI(&quot;/normal&quot;);
+    }
+
+    void loadCommitted()
+    {
+        checkActiveURI(&quot;/normal&quot;);
+    }
+
+    void loadFinished()
+    {
+        checkActiveURI(&quot;/normal&quot;);
+        LoadTrackingTest::loadFinished();
+    }
+
+    CString m_activeURI;
+
+private:
+    void checkActiveURI(const char* uri)
+    {
+        ASSERT_CMP_CSTRING(m_activeURI, ==, kServer-&gt;getURIForPath(uri));
+    }
+};
+
+static void testWebViewActiveURI(ViewURITrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+}
+
+class ViewIsLoadingTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ViewIsLoadingTest);
+
+    static void isLoadingChanged(GObject*, GParamSpec*, ViewIsLoadingTest* test)
+    {
+        if (webkit_web_view_is_loading(test-&gt;m_webView))
+            test-&gt;beginLoad();
+        else
+            test-&gt;endLoad();
+    }
+
+    ViewIsLoadingTest()
+    {
+        g_signal_connect(m_webView, &quot;notify::is-loading&quot;, G_CALLBACK(isLoadingChanged), this);
+    }
+
+    void beginLoad()
+    {
+        // New load, load-started hasn't been emitted yet.
+        g_assert(m_loadEvents.isEmpty());
+        g_assert_cmpstr(webkit_web_view_get_uri(m_webView), ==, m_activeURI.data());
+    }
+
+    void endLoad()
+    {
+        // Load finish, load-finished and load-failed haven't been emitted yet.
+        g_assert(!m_loadEvents.isEmpty());
+        g_assert(!m_loadEvents.contains(LoadTrackingTest::LoadFinished));
+        g_assert(!m_loadEvents.contains(LoadTrackingTest::LoadFailed));
+    }
+};
+
+static void testWebViewIsLoading(ViewIsLoadingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;reload();
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/error&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/normal2&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;goBack();
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;goForward();
+    test-&gt;waitUntilLoadFinished();
+}
+
+class WebPageURITest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(WebPageURITest);
+
+    static void webPageURIChangedCallback(GDBusConnection*, const char*, const char*, const char*, const char*, GVariant* result, WebPageURITest* test)
+    {
+        const char* uri;
+        g_variant_get(result, &quot;(&amp;s)&quot;, &amp;uri);
+        test-&gt;m_webPageURIs.append(uri);
+    }
+
+    static void webViewURIChanged(GObject*, GParamSpec*, WebPageURITest* test)
+    {
+        test-&gt;m_webViewURIs.append(webkit_web_view_get_uri(test-&gt;m_webView));
+    }
+
+    WebPageURITest()
+    {
+        GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
+            &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, m_mainLoop));
+        m_uriChangedSignalID = g_dbus_connection_signal_subscribe(
+            g_dbus_proxy_get_connection(proxy.get()),
+            0,
+            &quot;org.webkit.gtk.WebExtensionTest&quot;,
+            &quot;URIChanged&quot;,
+            &quot;/org/webkit/gtk/WebExtensionTest&quot;,
+            0,
+            G_DBUS_SIGNAL_FLAGS_NONE,
+            reinterpret_cast&lt;GDBusSignalCallback&gt;(webPageURIChangedCallback),
+            this,
+            0);
+        g_assert(m_uriChangedSignalID);
+
+        g_signal_connect(m_webView, &quot;notify::uri&quot;, G_CALLBACK(webViewURIChanged), this);
+    }
+
+    ~WebPageURITest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+        g_dbus_connection_signal_unsubscribe(bus-&gt;connection(), m_uriChangedSignalID);
+    }
+
+    unsigned m_uriChangedSignalID;
+    Vector&lt;CString&gt; m_webPageURIs;
+    Vector&lt;CString&gt; m_webViewURIs;
+};
+
+static void testWebPageURI(WebPageURITest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirect&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_webPageURIs.size(), ==, test-&gt;m_webViewURIs.size());
+    for (size_t i = 0; i &lt; test-&gt;m_webPageURIs.size(); ++i)
+        ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[i], ==, test-&gt;m_webViewURIs[i]);
+
+    g_assert_cmpint(test-&gt;m_webPageURIs.size(), ==, 2);
+    ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[0], ==, kServer-&gt;getURIForPath(&quot;/redirect&quot;));
+    ASSERT_CMP_CSTRING(test-&gt;m_webPageURIs[1], ==, kServer-&gt;getURIForPath(&quot;/normal&quot;));
+
+}
+
+static void testURIRequestHTTPHeaders(WebViewTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitURIRequest&gt; uriRequest = adoptGRef(webkit_uri_request_new(&quot;file:///foo/bar&quot;));
+    g_assert(uriRequest.get());
+    g_assert_cmpstr(webkit_uri_request_get_uri(uriRequest.get()), ==, &quot;file:///foo/bar&quot;);
+    g_assert(!webkit_uri_request_get_http_headers(uriRequest.get()));
+
+    // Load a request with no Do Not Track header.
+    webkit_uri_request_set_uri(uriRequest.get(), kServer-&gt;getURIForPath(&quot;/do-not-track-header&quot;).data());
+    test-&gt;loadRequest(uriRequest.get());
+    test-&gt;waitUntilLoadFinished();
+
+    size_t mainResourceDataSize = 0;
+    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpint(mainResourceDataSize, ==, strlen(kDNTHeaderNotPresent));
+    g_assert(!strncmp(mainResourceData, kDNTHeaderNotPresent, mainResourceDataSize));
+
+    // Add the Do Not Track header and load the request again.
+    SoupMessageHeaders* headers = webkit_uri_request_get_http_headers(uriRequest.get());
+    g_assert(headers);
+    soup_message_headers_append(headers, &quot;DNT&quot;, &quot;1&quot;);
+    test-&gt;loadRequest(uriRequest.get());
+    test-&gt;waitUntilLoadFinished();
+
+    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpint(mainResourceDataSize, ==, 1);
+    g_assert(!strncmp(mainResourceData, &quot;1&quot;, mainResourceDataSize));
+
+    // Load a URI for which the web extension will add the Do Not Track header.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/add-do-not-track-header&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpint(mainResourceDataSize, ==, 1);
+    g_assert(!strncmp(mainResourceData, &quot;1&quot;, mainResourceDataSize));
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    static const char* responseString = &quot;&lt;html&gt;&lt;body&gt;Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&quot;
+        &quot;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+
+    if (g_str_has_prefix(path, &quot;/normal&quot;))
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
+    else if (g_str_equal(path, &quot;/error&quot;))
+        soup_message_set_status(message, SOUP_STATUS_CANT_CONNECT);
+    else if (g_str_equal(path, &quot;/redirect&quot;)) {
+        soup_message_set_status(message, SOUP_STATUS_MOVED_PERMANENTLY);
+        soup_message_headers_append(message-&gt;response_headers, &quot;Location&quot;, &quot;/normal&quot;);
+    } else if (g_str_equal(path, &quot;/cancelled&quot;)) {
+        soup_message_headers_set_encoding(message-&gt;response_headers, SOUP_ENCODING_CHUNKED);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
+        soup_server_unpause_message(server, message);
+        return;
+    } else if (g_str_equal(path, &quot;/do-not-track-header&quot;) || g_str_equal(path, &quot;/add-do-not-track-header&quot;)) {
+        const char* doNotTrack = soup_message_headers_get_one(message-&gt;request_headers, &quot;DNT&quot;);
+        if (doNotTrack)
+            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, doNotTrack, strlen(doNotTrack));
+        else
+            soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kDNTHeaderNotPresent, strlen(kDNTHeaderNotPresent));
+        soup_message_set_status(message, SOUP_STATUS_OK);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+void beforeAll()
+{
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+    bus = new WebKitTestBus();
+    if (!bus-&gt;run())
+        return;
+
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;loading-status&quot;, testLoadingStatus);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;loading-error&quot;, testLoadingError);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-html&quot;, testLoadHtml);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-alternate-html&quot;, testLoadAlternateHTML);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-plain-text&quot;, testLoadPlainText);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;load-request&quot;, testLoadRequest);
+    LoadStopTrackingTest::add(&quot;WebKitWebView&quot;, &quot;stop-loading&quot;, testLoadCancelled);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;title&quot;, testWebViewTitle);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;progress&quot;, testLoadProgress);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;reload&quot;, testWebViewReload);
+    LoadTrackingTest::add(&quot;WebKitWebView&quot;, &quot;history-load&quot;, testWebViewHistoryLoad);
+
+    // This test checks that web view notify::uri signal is correctly emitted
+    // and the uri is already updated when loader client signals are emitted.
+    ViewURITrackingTest::add(&quot;WebKitWebView&quot;, &quot;active-uri&quot;, testWebViewActiveURI);
+
+    ViewIsLoadingTest::add(&quot;WebKitWebView&quot;, &quot;is-loading&quot;, testWebViewIsLoading);
+    WebPageURITest::add(&quot;WebKitWebPage&quot;, &quot;get-uri&quot;, testWebPageURI);
+    WebViewTest::add(&quot;WebKitURIRequest&quot;, &quot;http-headers&quot;, testURIRequestHTTPHeaders);
+}
+
+void afterAll()
+{
+    delete bus;
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestPrintingcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestPrintingcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestPrinting.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,209 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+#ifdef HAVE_GTK_UNIX_PRINTING
+#include &lt;gtk/gtkunixprint.h&gt;
+#endif
+
+static char* kTempDirectory;
+
+static void testPrintOperationPrintSettings(WebViewTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitPrintOperation&gt; printOperation = adoptGRef(webkit_print_operation_new(test-&gt;m_webView));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printOperation.get()));
+
+    g_assert(!webkit_print_operation_get_print_settings(printOperation.get()));
+    g_assert(!webkit_print_operation_get_page_setup(printOperation.get()));
+
+    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printSettings.get()));
+
+    GRefPtr&lt;GtkPageSetup&gt; pageSetup = adoptGRef(gtk_page_setup_new());
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(pageSetup.get()));
+
+    webkit_print_operation_set_print_settings(printOperation.get(), printSettings.get());
+    webkit_print_operation_set_page_setup(printOperation.get(), pageSetup.get());
+
+    g_assert(webkit_print_operation_get_print_settings(printOperation.get()) == printSettings.get());
+    g_assert(webkit_print_operation_get_page_setup(printOperation.get()) == pageSetup.get());
+}
+
+static gboolean webViewPrintCallback(WebKitWebView* webView, WebKitPrintOperation* printOperation, WebViewTest* test)
+{
+    g_assert(webView == test-&gt;m_webView);
+
+    g_assert(WEBKIT_IS_PRINT_OPERATION(printOperation));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(printOperation));
+
+    g_assert(!webkit_print_operation_get_print_settings(printOperation));
+    g_assert(!webkit_print_operation_get_page_setup(printOperation));
+
+    g_main_loop_quit(test-&gt;m_mainLoop);
+
+    return TRUE;
+}
+
+static void testWebViewPrint(WebViewTest* test, gconstpointer)
+{
+    g_signal_connect(test-&gt;m_webView, &quot;print&quot;, G_CALLBACK(webViewPrintCallback), test);
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onLoad=\&quot;print();\&quot;&gt;WebKitGTK+ printing test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    g_main_loop_run(test-&gt;m_mainLoop);
+}
+
+#ifdef HAVE_GTK_UNIX_PRINTING
+class PrintTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(PrintTest);
+
+    static void printFinishedCallback(WebKitPrintOperation*, PrintTest* test)
+    {
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    static void printFailedCallback(WebKitPrintOperation*, GError* error, PrintTest* test)
+    {
+        g_assert(test-&gt;m_expectedError);
+        g_assert(error);
+        g_assert(g_error_matches(error, WEBKIT_PRINT_ERROR, test-&gt;m_expectedError));
+    }
+
+    PrintTest()
+        : m_expectedError(0)
+    {
+        m_printOperation = adoptGRef(webkit_print_operation_new(m_webView));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_printOperation.get()));
+        g_signal_connect(m_printOperation.get(), &quot;finished&quot;, G_CALLBACK(printFinishedCallback), this);
+        g_signal_connect(m_printOperation.get(), &quot;failed&quot;, G_CALLBACK(printFailedCallback), this);
+    }
+
+    static gboolean testPrintOperationPrintPrinter(GtkPrinter* printer, gpointer userData)
+    {
+        if (strcmp(gtk_printer_get_name(printer), &quot;Print to File&quot;))
+            return FALSE;
+
+        GtkPrinter** foundPrinter = static_cast&lt;GtkPrinter**&gt;(userData);
+        *foundPrinter = static_cast&lt;GtkPrinter*&gt;(g_object_ref(printer));
+        return TRUE;
+    }
+
+    GtkPrinter* findPrintToFilePrinter()
+    {
+        GtkPrinter* printer = 0;
+        gtk_enumerate_printers(testPrintOperationPrintPrinter, &amp;printer, 0, TRUE);
+        return printer;
+    }
+
+    void waitUntilPrintFinished()
+    {
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GRefPtr&lt;WebKitPrintOperation&gt; m_printOperation;
+    unsigned m_expectedError;
+};
+
+static void testPrintOperationPrint(PrintTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ printing test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GRefPtr&lt;GtkPrinter&gt; printer = adoptGRef(test-&gt;findPrintToFilePrinter());
+    if (!printer) {
+        g_message(&quot;%s&quot;, &quot;Cannot test WebKitPrintOperation/print: no suitable printer found&quot;);
+        return;
+    }
+
+    GOwnPtr&lt;char&gt; outputFilename(g_build_filename(kTempDirectory, &quot;webkit-print.pdf&quot;, NULL));
+    GRefPtr&lt;GFile&gt; outputFile = adoptGRef(g_file_new_for_path(outputFilename.get()));
+    GOwnPtr&lt;char&gt; outputURI(g_file_get_uri(outputFile.get()));
+
+    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
+    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
+    gtk_print_settings_set(printSettings.get(), GTK_PRINT_SETTINGS_OUTPUT_URI, outputURI.get());
+
+    webkit_print_operation_set_print_settings(test-&gt;m_printOperation.get(), printSettings.get());
+    webkit_print_operation_print(test-&gt;m_printOperation.get());
+    test-&gt;waitUntilPrintFinished();
+
+    GRefPtr&lt;GFileInfo&gt; fileInfo = adoptGRef(g_file_query_info(outputFile.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE &quot;,&quot; G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+        static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
+    g_assert(fileInfo.get());
+    g_assert_cmpint(g_file_info_get_size(fileInfo.get()), &gt;, 0);
+    g_assert_cmpstr(g_file_info_get_content_type(fileInfo.get()), ==, &quot;application/pdf&quot;);
+
+    g_file_delete(outputFile.get(), 0, 0);
+}
+
+static void testPrintOperationErrors(PrintTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;WebKitGTK+ printing errors test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GRefPtr&lt;GtkPrinter&gt; printer = adoptGRef(test-&gt;findPrintToFilePrinter());
+    if (!printer) {
+        g_message(&quot;%s&quot;, &quot;Cannot test WebKitPrintOperation/print: no suitable printer found&quot;);
+        return;
+    }
+
+    // General Error: invalid filename.
+    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_GENERAL;
+    GRefPtr&lt;GtkPrintSettings&gt; printSettings = adoptGRef(gtk_print_settings_new());
+    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
+    gtk_print_settings_set(printSettings.get(), GTK_PRINT_SETTINGS_OUTPUT_URI, &quot;file:///foo/bar&quot;);
+    webkit_print_operation_set_print_settings(test-&gt;m_printOperation.get(), printSettings.get());
+    webkit_print_operation_print(test-&gt;m_printOperation.get());
+    test-&gt;waitUntilPrintFinished();
+
+    // Printer not found error.
+    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
+    gtk_print_settings_set_printer(printSettings.get(), &quot;The fake WebKit printer&quot;);
+    webkit_print_operation_print(test-&gt;m_printOperation.get());
+    test-&gt;waitUntilPrintFinished();
+
+    // No pages to print: print even pages for a single page document.
+    test-&gt;m_expectedError = WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE;
+    gtk_print_settings_set_printer(printSettings.get(), gtk_printer_get_name(printer.get()));
+    gtk_print_settings_set_page_set(printSettings.get(), GTK_PAGE_SET_EVEN);
+    webkit_print_operation_print(test-&gt;m_printOperation.get());
+    test-&gt;waitUntilPrintFinished();
+}
+#endif // HAVE_GTK_UNIX_PRINTING
+
+void beforeAll()
+{
+    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
+    g_assert(kTempDirectory);
+
+    WebViewTest::add(&quot;WebKitPrintOperation&quot;, &quot;printing-settings&quot;, testPrintOperationPrintSettings);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;print&quot;, testWebViewPrint);
+#ifdef HAVE_GTK_UNIX_PRINTING
+    PrintTest::add(&quot;WebKitPrintOperation&quot;, &quot;print&quot;, testPrintOperationPrint);
+    PrintTest::add(&quot;WebKitPrintOperation&quot;, &quot;print-errors&quot;, testPrintOperationErrors);
+#endif
+}
+
+void afterAll()
+{
+    g_rmdir(kTempDirectory);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestResourcescppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestResourcescpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,738 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static WebKitTestServer* kServer;
+
+static const char* kIndexHtml =
+    &quot;&lt;html&gt;&lt;head&gt;&quot;
+    &quot; &lt;link rel='stylesheet' href='/style.css' type='text/css'&gt;&quot;
+    &quot; &lt;script language='javascript' src='/javascript.js'&gt;&lt;/script&gt;&quot;
+    &quot;&lt;/head&gt;&lt;body&gt;WebKitGTK+ resources test&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* kStyleCSS =
+    &quot;body {&quot;
+    &quot;    margin: 0px;&quot;
+    &quot;    padding: 0px;&quot;
+    &quot;    font-family: sans-serif;&quot;
+    &quot;    background: url(/blank.ico) 0 0 no-repeat;&quot;
+    &quot;    color: black;&quot;
+    &quot;}&quot;;
+
+static const char* kJavascript = &quot;function foo () { var a = 1; }&quot;;
+
+class ResourcesTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ResourcesTest);
+
+    static void resourceSentRequestCallback(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse, ResourcesTest* test)
+    {
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+        if (redirectResponse)
+            test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(redirectResponse));
+        test-&gt;resourceSentRequest(resource, request, redirectResponse);
+    }
+
+    static void resourceReceivedResponseCallback(WebKitWebResource* resource, GParamSpec*, ResourcesTest* test)
+    {
+        g_assert(webkit_web_resource_get_response(resource));
+        test-&gt;resourceReceivedResponse(resource);
+    }
+
+    static void resourceReceivedDataCallback(WebKitWebResource* resource, guint64 bytesReceived, ResourcesTest* test)
+    {
+        test-&gt;resourceReceivedData(resource, bytesReceived);
+    }
+
+    static void resourceFinishedCallback(WebKitWebResource* resource, ResourcesTest* test)
+    {
+        test-&gt;resourceFinished(resource);
+    }
+
+    static void resourceFailedCallback(WebKitWebResource* resource, GError* error, ResourcesTest* test)
+    {
+        g_assert(error);
+        test-&gt;resourceFailed(resource, error);
+    }
+
+    static void resourceLoadStartedCallback(WebKitWebView* webView, WebKitWebResource* resource, WebKitURIRequest* request, ResourcesTest* test)
+    {
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(resource));
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+
+        // Ignore favicons.
+        if (g_str_has_suffix(webkit_uri_request_get_uri(request), &quot;favicon.ico&quot;))
+            return;
+
+        test-&gt;resourceLoadStarted(resource, request);
+        g_signal_connect(resource, &quot;sent-request&quot;, G_CALLBACK(resourceSentRequestCallback), test);
+        g_signal_connect(resource, &quot;notify::response&quot;, G_CALLBACK(resourceReceivedResponseCallback), test);
+        g_signal_connect(resource, &quot;received-data&quot;, G_CALLBACK(resourceReceivedDataCallback), test);
+        g_signal_connect(resource, &quot;finished&quot;, G_CALLBACK(resourceFinishedCallback), test);
+        g_signal_connect(resource, &quot;failed&quot;, G_CALLBACK(resourceFailedCallback), test);
+    }
+
+    void clearSubresources()
+    {
+        g_list_free_full(m_subresources, reinterpret_cast&lt;GDestroyNotify&gt;(g_object_unref));
+        m_subresources = 0;
+    }
+
+    ResourcesTest()
+        : WebViewTest()
+        , m_resourcesLoaded(0)
+        , m_resourcesToLoad(0)
+        , m_resourceDataSize(0)
+        , m_subresources(0)
+    {
+        g_signal_connect(m_webView, &quot;resource-load-started&quot;, G_CALLBACK(resourceLoadStartedCallback), this);
+    }
+
+    ~ResourcesTest()
+    {
+        clearSubresources();
+    }
+
+    virtual void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
+    {
+    }
+
+    virtual void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
+    {
+    }
+
+    virtual void resourceReceivedResponse(WebKitWebResource* resource)
+    {
+    }
+
+    virtual void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
+    {
+    }
+
+    virtual void resourceFinished(WebKitWebResource* resource)
+    {
+        g_signal_handlers_disconnect_matched(resource, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+        if (webkit_web_view_get_main_resource(m_webView) != resource)
+            m_subresources = g_list_prepend(m_subresources, g_object_ref(resource));
+        if (++m_resourcesLoaded == m_resourcesToLoad)
+            g_main_loop_quit(m_mainLoop);
+    }
+
+    virtual void resourceFailed(WebKitWebResource* resource, GError* error)
+    {
+        g_assert_not_reached();
+    }
+
+    void waitUntilResourcesLoaded(size_t resourcesCount)
+    {
+        m_resourcesLoaded = 0;
+        m_resourcesToLoad = resourcesCount;
+        clearSubresources();
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GList* subresources()
+    {
+        return m_subresources;
+    }
+
+    static void resourceGetDataCallback(GObject* object, GAsyncResult* result, gpointer userData)
+    {
+        size_t dataSize;
+        GOwnPtr&lt;GError&gt; error;
+        unsigned char* data = webkit_web_resource_get_data_finish(WEBKIT_WEB_RESOURCE(object), result, &amp;dataSize, &amp;error.outPtr());
+        g_assert(!error.get());
+        g_assert(data);
+        g_assert_cmpint(dataSize, &gt;, 0);
+
+        ResourcesTest* test = static_cast&lt;ResourcesTest*&gt;(userData);
+        test-&gt;m_resourceData.set(reinterpret_cast&lt;char*&gt;(data));
+        test-&gt;m_resourceDataSize = dataSize;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    void checkResourceData(WebKitWebResource* resource)
+    {
+        m_resourceDataSize = 0;
+        webkit_web_resource_get_data(resource, 0, resourceGetDataCallback, this);
+        g_main_loop_run(m_mainLoop);
+
+        const char* uri = webkit_web_resource_get_uri(resource);
+        if (uri == kServer-&gt;getURIForPath(&quot;/&quot;)) {
+            g_assert_cmpint(m_resourceDataSize, ==, strlen(kIndexHtml));
+            g_assert(!strncmp(m_resourceData.get(), kIndexHtml, m_resourceDataSize));
+        } else if (uri == kServer-&gt;getURIForPath(&quot;/style.css&quot;)) {
+            g_assert_cmpint(m_resourceDataSize, ==, strlen(kStyleCSS));
+            g_assert(!strncmp(m_resourceData.get(), kStyleCSS, m_resourceDataSize));
+        } else if (uri == kServer-&gt;getURIForPath(&quot;/javascript.js&quot;)) {
+            g_assert_cmpint(m_resourceDataSize, ==, strlen(kJavascript));
+            g_assert(!strncmp(m_resourceData.get(), kJavascript, m_resourceDataSize));
+        } else
+            g_assert_not_reached();
+        m_resourceData.clear();
+    }
+
+    size_t m_resourcesLoaded;
+    size_t m_resourcesToLoad;
+    GOwnPtr&lt;char&gt; m_resourceData;
+    size_t m_resourceDataSize;
+    GList* m_subresources;
+};
+
+static void testWebViewResources(ResourcesTest* test, gconstpointer)
+{
+    // Nothing loaded yet, there shoulnd't be resources.
+    g_assert(!webkit_web_view_get_main_resource(test-&gt;m_webView));
+    g_assert(!test-&gt;subresources());
+
+    // Load simple page without subresources.
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;Testing WebKitGTK+&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_view_get_uri(test-&gt;m_webView), ==, webkit_web_resource_get_uri(resource));
+    g_assert(!test-&gt;subresources());
+
+    // Load simple page with subresources.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilResourcesLoaded(4);
+
+    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_view_get_uri(test-&gt;m_webView), ==, webkit_web_resource_get_uri(resource));
+    GList* subresources = test-&gt;subresources();
+    g_assert(subresources);
+    g_assert_cmpint(g_list_length(subresources), ==, 3);
+
+#if 0
+    // Load the same URI again.
+    // FIXME: we need a workaround for bug https://bugs.webkit.org/show_bug.cgi?id=78510.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilResourcesLoaded(4);
+#endif
+
+    // Reload.
+    webkit_web_view_reload_bypass_cache(test-&gt;m_webView);
+    test-&gt;waitUntilResourcesLoaded(4);
+}
+
+class SingleResourceLoadTest: public ResourcesTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SingleResourceLoadTest);
+
+    enum LoadEvents {
+        Started,
+        SentRequest,
+        Redirected,
+        ReceivedResponse,
+        ReceivedData,
+        Finished,
+        Failed
+    };
+
+    SingleResourceLoadTest()
+        : ResourcesTest()
+        , m_resourceDataReceived(0)
+    {
+        m_resourcesToLoad = 2;
+    }
+
+    void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
+    {
+        if (resource == webkit_web_view_get_main_resource(m_webView))
+            return;
+
+        m_resourceDataReceived = 0;
+        m_resource = resource;
+        m_loadEvents.append(Started);
+    }
+
+    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
+    {
+        if (resource != m_resource)
+            return;
+
+        if (redirectResponse)
+            m_loadEvents.append(Redirected);
+        else
+            m_loadEvents.append(SentRequest);
+    }
+
+    void resourceReceivedResponse(WebKitWebResource* resource)
+    {
+        if (resource != m_resource)
+            return;
+
+        m_loadEvents.append(ReceivedResponse);
+    }
+
+    void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
+    {
+        if (resource != m_resource)
+            return;
+
+        m_resourceDataReceived += bytesReceived;
+        if (!m_loadEvents.contains(ReceivedData))
+            m_loadEvents.append(ReceivedData);
+    }
+
+    void resourceFinished(WebKitWebResource* resource)
+    {
+        if (resource != m_resource) {
+            ResourcesTest::resourceFinished(resource);
+            return;
+        }
+
+        if (!m_loadEvents.contains(Failed)) {
+            WebKitURIResponse* response = webkit_web_resource_get_response(m_resource.get());
+            g_assert(response);
+            g_assert_cmpint(webkit_uri_response_get_content_length(response), ==, m_resourceDataReceived);
+        }
+        m_loadEvents.append(Finished);
+        ResourcesTest::resourceFinished(resource);
+    }
+
+    void resourceFailed(WebKitWebResource* resource, GError* error)
+    {
+        if (resource == m_resource)
+            m_loadEvents.append(Failed);
+    }
+
+    void waitUntilResourceLoadFinished()
+    {
+        m_resource = 0;
+        m_resourcesLoaded = 0;
+        g_main_loop_run(m_mainLoop);
+    }
+
+    WebKitURIResponse* waitUntilResourceLoadFinishedAndReturnURIResponse()
+    {
+        waitUntilResourceLoadFinished();
+        g_assert(m_resource);
+        return webkit_web_resource_get_response(m_resource.get());
+    }
+
+    GRefPtr&lt;WebKitWebResource&gt; m_resource;
+    Vector&lt;LoadEvents&gt; m_loadEvents;
+    guint64 m_resourceDataReceived;
+};
+
+static void testWebResourceLoading(SingleResourceLoadTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+    g_assert(test-&gt;m_resource);
+    Vector&lt;SingleResourceLoadTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
+    g_assert_cmpint(events.size(), ==, 5);
+    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
+    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
+    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::ReceivedResponse);
+    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedData);
+    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::Finished);
+    events.clear();
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+    g_assert(test-&gt;m_resource);
+    g_assert_cmpint(events.size(), ==, 6);
+    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
+    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
+    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Redirected);
+    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedResponse);
+    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::ReceivedData);
+    g_assert_cmpint(events[5], ==, SingleResourceLoadTest::Finished);
+    events.clear();
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/invalid-css.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+    g_assert(test-&gt;m_resource);
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
+    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
+    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Failed);
+    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::Finished);
+    events.clear();
+}
+
+static void testWebResourceResponse(SingleResourceLoadTest* test, gconstpointer)
+{
+    // No cached resource: First load.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
+    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
+
+    // No cached resource: Second load.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
+
+    // No cached resource: Reload.
+    webkit_web_view_reload(test-&gt;m_webView);
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
+
+    // Cached resource: First load.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
+
+    // Cached resource: Second load.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_OK);
+
+    // Cached resource: Reload.
+    webkit_web_view_reload(test-&gt;m_webView);
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpint(webkit_uri_response_get_status_code(response), ==, SOUP_STATUS_NOT_MODIFIED);
+}
+
+static void testWebResourceMimeType(SingleResourceLoadTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
+    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;text/javascript&quot;);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;image/vnd.microsoft.icon&quot;);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, &quot;text/css&quot;);
+}
+
+static void testWebResourceSuggestedFilename(SingleResourceLoadTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/javascript.html&quot;).data());
+    WebKitURIResponse* response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert_cmpstr(webkit_uri_response_get_suggested_filename(response), ==, &quot;JavaScript.js&quot;);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/image.html&quot;).data());
+    response = test-&gt;waitUntilResourceLoadFinishedAndReturnURIResponse();
+    g_assert(!webkit_uri_response_get_suggested_filename(response));
+}
+
+class ResourceURITrackingTest: public SingleResourceLoadTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ResourceURITrackingTest);
+
+    ResourceURITrackingTest()
+        : SingleResourceLoadTest()
+    {
+    }
+
+    static void uriChanged(WebKitWebResource* resource, GParamSpec*, ResourceURITrackingTest* test)
+    {
+        g_assert(resource == test-&gt;m_resource.get());
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), !=, webkit_web_resource_get_uri(test-&gt;m_resource.get()));
+        test-&gt;m_activeURI = webkit_web_resource_get_uri(test-&gt;m_resource.get());
+    }
+
+    void resourceLoadStarted(WebKitWebResource* resource, WebKitURIRequest* request)
+    {
+        if (resource == webkit_web_view_get_main_resource(m_webView))
+            return;
+
+        m_resource = resource;
+        m_activeURI = webkit_web_resource_get_uri(resource);
+        checkActiveURI(&quot;/redirected.css&quot;);
+        g_assert_cmpstr(m_activeURI.data(), ==, webkit_uri_request_get_uri(request));
+        g_signal_connect(resource, &quot;notify::uri&quot;, G_CALLBACK(uriChanged), this);
+    }
+
+    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
+    {
+        if (resource != m_resource)
+            return;
+
+        if (redirectResponse)
+            checkActiveURI(&quot;/simple-style.css&quot;);
+        else
+            checkActiveURI(&quot;/redirected.css&quot;);
+        g_assert_cmpstr(m_activeURI.data(), ==, webkit_uri_request_get_uri(request));
+    }
+
+    void resourceReceivedResponse(WebKitWebResource* resource)
+    {
+        if (resource != m_resource)
+            return;
+
+        checkActiveURI(&quot;/simple-style.css&quot;);
+    }
+
+    void resourceReceivedData(WebKitWebResource* resource, guint64 bytesReceived)
+    {
+    }
+
+    void resourceFinished(WebKitWebResource* resource)
+    {
+        if (resource == m_resource)
+            checkActiveURI(&quot;/simple-style.css&quot;);
+        ResourcesTest::resourceFinished(resource);
+    }
+
+    void resourceFailed(WebKitWebResource*, GError*)
+    {
+        g_assert_not_reached();
+    }
+
+    CString m_activeURI;
+
+private:
+    void checkActiveURI(const char* uri)
+    {
+        ASSERT_CMP_CSTRING(m_activeURI, ==, kServer-&gt;getURIForPath(uri));
+    }
+};
+
+static void testWebResourceActiveURI(ResourceURITrackingTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/redirected-css.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+}
+
+static void testWebResourceGetData(ResourcesTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    // FIXME: this should be 4 instead of 3, but we don't get the css image resource
+    // due to bug https://bugs.webkit.org/show_bug.cgi?id=78510.
+    test-&gt;waitUntilResourcesLoaded(3);
+
+    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    test-&gt;checkResourceData(resource);
+
+    GList* subresources = test-&gt;subresources();
+    for (GList* item = subresources; item; item = g_list_next(item))
+        test-&gt;checkResourceData(WEBKIT_WEB_RESOURCE(item-&gt;data));
+}
+
+static void testWebViewResourcesHistoryCache(SingleResourceLoadTest* test, gconstpointer)
+{
+    CString javascriptURI = kServer-&gt;getURIForPath(&quot;/javascript.html&quot;);
+    test-&gt;loadURI(javascriptURI.data());
+    test-&gt;waitUntilResourceLoadFinished();
+    WebKitWebResource* resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, javascriptURI.data());
+
+    CString simpleStyleCSSURI = kServer-&gt;getURIForPath(&quot;/simple-style-css.html&quot;);
+    test-&gt;loadURI(simpleStyleCSSURI.data());
+    test-&gt;waitUntilResourceLoadFinished();
+    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, simpleStyleCSSURI.data());
+
+    test-&gt;goBack();
+    test-&gt;waitUntilResourceLoadFinished();
+    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, javascriptURI.data());
+
+    test-&gt;goForward();
+    test-&gt;waitUntilResourceLoadFinished();
+    resource = webkit_web_view_get_main_resource(test-&gt;m_webView);
+    g_assert(resource);
+    g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, simpleStyleCSSURI.data());
+}
+
+class SendRequestTest: public SingleResourceLoadTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SendRequestTest);
+
+    void resourceSentRequest(WebKitWebResource* resource, WebKitURIRequest* request, WebKitURIResponse* redirectResponse)
+    {
+        if (resource != m_resource)
+            return;
+
+        g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, m_expectedNewResourceURI.data());
+        g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, webkit_web_resource_get_uri(resource));
+
+        SingleResourceLoadTest::resourceSentRequest(resource, request, redirectResponse);
+    }
+
+    void resourceFailed(WebKitWebResource* resource, GError* error)
+    {
+        if (resource != m_resource)
+            return;
+
+        g_assert_cmpstr(webkit_web_resource_get_uri(resource), ==, m_expectedCancelledResourceURI.data());
+        g_assert_error(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED);
+
+        SingleResourceLoadTest::resourceFailed(resource, error);
+    }
+
+    void setExpectedNewResourceURI(const CString&amp; uri)
+    {
+        m_expectedNewResourceURI = uri;
+    }
+
+    void setExpectedCancelledResourceURI(const CString&amp; uri)
+    {
+        m_expectedCancelledResourceURI = uri;
+    }
+
+    CString m_expectedNewResourceURI;
+    CString m_expectedCancelledResourceURI;
+};
+
+static void testWebResourceSendRequest(SendRequestTest* test, gconstpointer)
+{
+    test-&gt;setExpectedNewResourceURI(kServer-&gt;getURIForPath(&quot;/javascript.js&quot;));
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;relative-javascript.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+    g_assert(test-&gt;m_resource);
+
+    Vector&lt;SingleResourceLoadTest::LoadEvents&gt;&amp; events = test-&gt;m_loadEvents;
+    g_assert_cmpint(events.size(), ==, 5);
+    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
+    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::SentRequest);
+    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::ReceivedResponse);
+    g_assert_cmpint(events[3], ==, SingleResourceLoadTest::ReceivedData);
+    g_assert_cmpint(events[4], ==, SingleResourceLoadTest::Finished);
+    events.clear();
+
+    // Cancel request.
+    test-&gt;setExpectedCancelledResourceURI(kServer-&gt;getURIForPath(&quot;/cancel-this.js&quot;));
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/resource-to-cancel.html&quot;).data());
+    test-&gt;waitUntilResourceLoadFinished();
+    g_assert(test-&gt;m_resource);
+
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, SingleResourceLoadTest::Started);
+    g_assert_cmpint(events[1], ==, SingleResourceLoadTest::Failed);
+    g_assert_cmpint(events[2], ==, SingleResourceLoadTest::Finished);
+    events.clear();
+}
+
+static void addCacheHTTPHeadersToResponse(SoupMessage* message)
+{
+    // The actual date doesn't really matter.
+    SoupDate* soupDate = soup_date_new_from_now(0);
+    GOwnPtr&lt;char&gt; date(soup_date_to_string(soupDate, SOUP_DATE_HTTP));
+    soup_message_headers_append(message-&gt;response_headers, &quot;Last-Modified&quot;, date.get());
+    soup_date_free(soupDate);
+    soup_message_headers_append(message-&gt;response_headers, &quot;Cache-control&quot;, &quot;public, max-age=31536000&quot;);
+    soupDate = soup_date_new_from_now(3600);
+    date.set(soup_date_to_string(soupDate, SOUP_DATE_HTTP));
+    soup_message_headers_append(message-&gt;response_headers, &quot;Expires&quot;, date.get());
+    soup_date_free(soupDate);
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+
+    if (soup_message_headers_get_one(message-&gt;request_headers, &quot;If-Modified-Since&quot;)) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_MODIFIED);
+        soup_message_body_complete(message-&gt;response_body);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/&quot;)) {
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kIndexHtml, strlen(kIndexHtml));
+    } else if (g_str_equal(path, &quot;/javascript.html&quot;)) {
+        static const char* javascriptHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='/javascript.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, javascriptHtml, strlen(javascriptHtml));
+    } else if (g_str_equal(path, &quot;/image.html&quot;)) {
+        static const char* imageHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;img src='/blank.ico'&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, imageHTML, strlen(imageHTML));
+    } else if (g_str_equal(path, &quot;/redirected-css.html&quot;)) {
+        static const char* redirectedCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/redirected.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, redirectedCSSHtml, strlen(redirectedCSSHtml));
+    } else if (g_str_equal(path, &quot;/invalid-css.html&quot;)) {
+        static const char* invalidCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/invalid.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, invalidCSSHtml, strlen(invalidCSSHtml));
+    } else if (g_str_equal(path, &quot;/simple-style-css.html&quot;)) {
+        static const char* simpleStyleCSSHtml = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='stylesheet' href='/simple-style.css' type='text/css'&gt;&lt;/head&gt;&lt;body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, simpleStyleCSSHtml, strlen(simpleStyleCSSHtml));
+    } else if (g_str_equal(path, &quot;/style.css&quot;)) {
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kStyleCSS, strlen(kStyleCSS));
+        addCacheHTTPHeadersToResponse(message);
+        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/css&quot;);
+    } else if (g_str_equal(path, &quot;/javascript.js&quot;)) {
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kJavascript, strlen(kJavascript));
+        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/javascript&quot;);
+        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Disposition&quot;, &quot;filename=JavaScript.js&quot;);
+    } else if (g_str_equal(path, &quot;/relative-javascript.html&quot;)) {
+        static const char* javascriptRelativeHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='remove-this/javascript.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, javascriptRelativeHTML, strlen(javascriptRelativeHTML));
+    } else if (g_str_equal(path, &quot;/resource-to-cancel.html&quot;)) {
+        static const char* resourceToCancelHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;script language='javascript' src='cancel-this.js'&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, resourceToCancelHTML, strlen(resourceToCancelHTML));
+    } else if (g_str_equal(path, &quot;/blank.ico&quot;)) {
+        GOwnPtr&lt;char&gt; filePath(g_build_filename(Test::getWebKit1TestResoucesDir().data(), path, NULL));
+        char* contents;
+        gsize contentsLength;
+        g_file_get_contents(filePath.get(), &amp;contents, &amp;contentsLength, 0);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, contentsLength);
+        addCacheHTTPHeadersToResponse(message);
+        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;image/vnd.microsoft.icon&quot;);
+    } else if (g_str_equal(path, &quot;/simple-style.css&quot;)) {
+        static const char* simpleCSS =
+            &quot;body {&quot;
+            &quot;    margin: 0px;&quot;
+            &quot;    padding: 0px;&quot;
+            &quot;}&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, simpleCSS, strlen(simpleCSS));
+        soup_message_headers_append(message-&gt;response_headers, &quot;Content-Type&quot;, &quot;text/css&quot;);
+    } else if (g_str_equal(path, &quot;/redirected.css&quot;)) {
+        soup_message_set_status(message, SOUP_STATUS_MOVED_PERMANENTLY);
+        soup_message_headers_append(message-&gt;response_headers, &quot;Location&quot;, &quot;/simple-style.css&quot;);
+    } else if (g_str_equal(path, &quot;/invalid.css&quot;))
+        soup_message_set_status(message, SOUP_STATUS_CANT_CONNECT);
+    else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+
+    ResourcesTest::add(&quot;WebKitWebView&quot;, &quot;resources&quot;, testWebViewResources);
+    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;loading&quot;, testWebResourceLoading);
+    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;response&quot;, testWebResourceResponse);
+    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;mime-type&quot;, testWebResourceMimeType);
+    SingleResourceLoadTest::add(&quot;WebKitWebResource&quot;, &quot;suggested-filename&quot;, testWebResourceSuggestedFilename);
+    ResourceURITrackingTest::add(&quot;WebKitWebResource&quot;, &quot;active-uri&quot;, testWebResourceActiveURI);
+    ResourcesTest::add(&quot;WebKitWebResource&quot;, &quot;get-data&quot;, testWebResourceGetData);
+    SingleResourceLoadTest::add(&quot;WebKitWebView&quot;, &quot;history-cache&quot;, testWebViewResourcesHistoryCache);
+    SendRequestTest::add(&quot;WebKitWebPage&quot;, &quot;send-request&quot;, testWebResourceSendRequest);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestSSLcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestSSLcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,201 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;LoadTrackingTest.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &lt;gtk/gtk.h&gt;
+
+static WebKitTestServer* kHttpsServer;
+static WebKitTestServer* kHttpServer;
+
+static const char* indexHTML = &quot;&lt;html&gt;&lt;body&gt;Testing WebKit2GTK+ SSL&lt;/body&gt;&lt;/htmll&gt;&quot;;
+static const char* insecureContentHTML = &quot;&lt;html&gt;&lt;script src=\&quot;%s\&quot;&gt;&lt;/script&gt;&lt;body&gt;&lt;p&gt;Text + image &lt;img src=\&quot;%s\&quot; align=\&quot;right\&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+class SSLTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SSLTest);
+
+    SSLTest()
+        : m_tlsErrors(static_cast&lt;GTlsCertificateFlags&gt;(0))
+    {
+    }
+
+    virtual void provisionalLoadFailed(const gchar* failingURI, GError* error)
+    {
+        g_assert_error(error, SOUP_HTTP_ERROR, SOUP_STATUS_SSL_FAILED);
+        LoadTrackingTest::provisionalLoadFailed(failingURI, error);
+    }
+
+    virtual void loadCommitted()
+    {
+        GTlsCertificate* certificate = 0;
+        webkit_web_view_get_tls_info(m_webView, &amp;certificate, &amp;m_tlsErrors);
+        m_certificate = certificate;
+        LoadTrackingTest::loadCommitted();
+    }
+
+    void waitUntilLoadFinished()
+    {
+        m_certificate = 0;
+        m_tlsErrors = static_cast&lt;GTlsCertificateFlags&gt;(0);
+        LoadTrackingTest::waitUntilLoadFinished();
+    }
+
+    GRefPtr&lt;GTlsCertificate&gt; m_certificate;
+    GTlsCertificateFlags m_tlsErrors;
+};
+
+static void testSSL(SSLTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_certificate);
+    // We always expect errors because we are using a self-signed certificate,
+    // but only G_TLS_CERTIFICATE_UNKNOWN_CA flags should be present.
+    g_assert(test-&gt;m_tlsErrors);
+    g_assert_cmpuint(test-&gt;m_tlsErrors, ==, G_TLS_CERTIFICATE_UNKNOWN_CA);
+
+    // Non HTTPS loads shouldn't have a certificate nor errors.
+    test-&gt;loadHtml(indexHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+    g_assert(!test-&gt;m_certificate);
+    g_assert(!test-&gt;m_tlsErrors);
+}
+
+class InsecureContentTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(InsecureContentTest);
+
+    InsecureContentTest()
+        : m_insecureContentRun(false)
+        , m_insecureContentDisplayed(false)
+    {
+        g_signal_connect(m_webView, &quot;insecure-content-detected&quot;, G_CALLBACK(insecureContentDetectedCallback), this);
+    }
+
+    static void insecureContentDetectedCallback(WebKitWebView* webView, WebKitInsecureContentEvent event, InsecureContentTest* test)
+    {
+        g_assert(webView == test-&gt;m_webView);
+
+        if (event == WEBKIT_INSECURE_CONTENT_RUN)
+            test-&gt;m_insecureContentRun = true;
+
+        if (event == WEBKIT_INSECURE_CONTENT_DISPLAYED)
+            test-&gt;m_insecureContentDisplayed = true;
+    }
+
+    bool m_insecureContentRun;
+    bool m_insecureContentDisplayed;
+};
+
+static void testInsecureContent(InsecureContentTest* test, gconstpointer)
+{
+    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/insecure-content/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(test-&gt;m_insecureContentRun);
+    g_assert(test-&gt;m_insecureContentDisplayed);
+}
+
+static void testTLSErrorsPolicy(SSLTest* test, gconstpointer)
+{
+    WebKitWebContext* context = webkit_web_view_get_context(test-&gt;m_webView);
+    // TLS errors are ignored by default.
+    g_assert(webkit_web_context_get_tls_errors_policy(context) == WEBKIT_TLS_ERRORS_POLICY_IGNORE);
+    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(!test-&gt;m_loadFailed);
+
+    webkit_web_context_set_tls_errors_policy(context, WEBKIT_TLS_ERRORS_POLICY_FAIL);
+    test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_loadFailed);
+    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
+    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::LoadCommitted));
+}
+
+static void httpsServerCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/&quot;)) {
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, indexHTML, strlen(indexHTML));
+        soup_message_body_complete(message-&gt;response_body);
+    } else if (g_str_equal(path, &quot;/insecure-content/&quot;)) {
+        GOwnPtr&lt;char&gt; responseHTML(g_strdup_printf(insecureContentHTML, kHttpServer-&gt;getURIForPath(&quot;/test-script&quot;).data(), kHttpServer-&gt;getURIForPath(&quot;/test-image&quot;).data()));
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, responseHTML.get(), strlen(responseHTML.get()));
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_complete(message-&gt;response_body);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+}
+
+static void httpServerCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/test-script&quot;)) {
+        GOwnPtr&lt;char&gt; pathToFile(g_build_filename(Test::getResourcesDir().data(), &quot;link-title.js&quot;, NULL));
+        char* contents;
+        gsize length;
+        g_file_get_contents(pathToFile.get(), &amp;contents, &amp;length, 0);
+
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_complete(message-&gt;response_body);
+    } else if (g_str_equal(path, &quot;/test-image&quot;)) {
+        GOwnPtr&lt;char&gt; pathToFile(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;blank.ico&quot;, NULL));
+        char* contents;
+        gsize length;
+        g_file_get_contents(pathToFile.get(), &amp;contents, &amp;length, 0);
+
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_complete(message-&gt;response_body);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+}
+
+void beforeAll()
+{
+    kHttpsServer = new WebKitTestServer(WebKitTestServer::ServerHTTPS);
+    kHttpsServer-&gt;run(httpsServerCallback);
+
+    kHttpServer = new WebKitTestServer(WebKitTestServer::ServerHTTP);
+    kHttpServer-&gt;run(httpServerCallback);
+
+    SSLTest::add(&quot;WebKitWebView&quot;, &quot;ssl&quot;, testSSL);
+    InsecureContentTest::add(&quot;WebKitWebView&quot;, &quot;insecure-content&quot;, testInsecureContent);
+    SSLTest::add(&quot;WebKitWebContext&quot;, &quot;tls-errors-policy&quot;, testTLSErrorsPolicy);
+}
+
+void afterAll()
+{
+    delete kHttpsServer;
+    delete kHttpServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestUIClientcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestUIClientcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestUIClient.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,679 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+
+static const char* kAlertDialogMessage = &quot;WebKitGTK+ alert dialog message&quot;;
+static const char* kConfirmDialogMessage = &quot;WebKitGTK+ confirm dialog message&quot;;
+static const char* kPromptDialogMessage = &quot;WebKitGTK+ prompt dialog message&quot;;
+static const char* kPromptDialogReturnedText = &quot;WebKitGTK+ prompt dialog returned text&quot;;
+
+class UIClientTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(UIClientTest);
+
+    enum WebViewEvents {
+        Create,
+        ReadyToShow,
+        RunAsModal,
+        Close
+    };
+
+    class WindowProperties {
+    public:
+        WindowProperties()
+            : m_isNull(true)
+            , m_toolbarVisible(true)
+            , m_statusbarVisible(true)
+            , m_scrollbarsVisible(true)
+            , m_menubarVisible(true)
+            , m_locationbarVisible(true)
+            , m_resizable(true)
+            , m_fullscreen(false)
+        {
+            memset(&amp;m_geometry, 0, sizeof(GdkRectangle));
+        }
+
+        WindowProperties(WebKitWindowProperties* windowProperties)
+            : m_isNull(false)
+            , m_toolbarVisible(webkit_window_properties_get_toolbar_visible(windowProperties))
+            , m_statusbarVisible(webkit_window_properties_get_statusbar_visible(windowProperties))
+            , m_scrollbarsVisible(webkit_window_properties_get_scrollbars_visible(windowProperties))
+            , m_menubarVisible(webkit_window_properties_get_menubar_visible(windowProperties))
+            , m_locationbarVisible(webkit_window_properties_get_locationbar_visible(windowProperties))
+            , m_resizable(webkit_window_properties_get_resizable(windowProperties))
+            , m_fullscreen(webkit_window_properties_get_fullscreen(windowProperties))
+        {
+            webkit_window_properties_get_geometry(windowProperties, &amp;m_geometry);
+        }
+
+        WindowProperties(GdkRectangle* geometry, bool toolbarVisible, bool statusbarVisible, bool scrollbarsVisible, bool menubarVisible, bool locationbarVisible, bool resizable, bool fullscreen)
+            : m_isNull(false)
+            , m_geometry(*geometry)
+            , m_toolbarVisible(toolbarVisible)
+            , m_statusbarVisible(statusbarVisible)
+            , m_scrollbarsVisible(scrollbarsVisible)
+            , m_menubarVisible(menubarVisible)
+            , m_locationbarVisible(locationbarVisible)
+            , m_resizable(resizable)
+            , m_fullscreen(fullscreen)
+        {
+        }
+
+        bool isNull() const { return m_isNull; }
+
+        void assertEqual(const WindowProperties&amp; other) const
+        {
+            g_assert_cmpint(m_geometry.x, ==, other.m_geometry.x);
+            g_assert_cmpint(m_geometry.y, ==, other.m_geometry.y);
+            g_assert_cmpint(m_geometry.width, ==, other.m_geometry.width);
+            g_assert_cmpint(m_geometry.height, ==, other.m_geometry.height);
+            g_assert_cmpint(static_cast&lt;int&gt;(m_toolbarVisible), ==, static_cast&lt;int&gt;(other.m_toolbarVisible));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_statusbarVisible), ==, static_cast&lt;int&gt;(other.m_statusbarVisible));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_scrollbarsVisible), ==, static_cast&lt;int&gt;(other.m_scrollbarsVisible));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_menubarVisible), ==, static_cast&lt;int&gt;(other.m_menubarVisible));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_locationbarVisible), ==, static_cast&lt;int&gt;(other.m_locationbarVisible));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_resizable), ==, static_cast&lt;int&gt;(other.m_resizable));
+            g_assert_cmpint(static_cast&lt;int&gt;(m_fullscreen), ==, static_cast&lt;int&gt;(other.m_fullscreen));
+        }
+
+    private:
+        bool m_isNull;
+
+        GdkRectangle m_geometry;
+
+        bool m_toolbarVisible;
+        bool m_statusbarVisible;
+        bool m_scrollbarsVisible;
+        bool m_menubarVisible;
+        bool m_locationbarVisible;
+
+        bool m_resizable;
+        bool m_fullscreen;
+    };
+
+    static void windowPropertiesNotifyCallback(GObject*, GParamSpec* paramSpec, UIClientTest* test)
+    {
+        test-&gt;m_windowPropertiesChanged.add(g_param_spec_get_name(paramSpec));
+    }
+
+    static GtkWidget* viewCreateCallback(WebKitWebView* webView, UIClientTest* test)
+    {
+        return test-&gt;viewCreate(webView);
+    }
+
+    static void viewReadyToShowCallback(WebKitWebView* webView, UIClientTest* test)
+    {
+        test-&gt;viewReadyToShow(webView);
+    }
+
+    static void viewCloseCallback(WebKitWebView* webView, UIClientTest* test)
+    {
+        test-&gt;viewClose(webView);
+    }
+
+    void scriptAlert(WebKitScriptDialog* dialog)
+    {
+        switch (m_scriptDialogType) {
+        case WEBKIT_SCRIPT_DIALOG_ALERT:
+            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kAlertDialogMessage);
+            break;
+        case WEBKIT_SCRIPT_DIALOG_CONFIRM:
+            g_assert(m_scriptDialogConfirmed);
+            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, &quot;confirmed&quot;);
+
+            break;
+        case WEBKIT_SCRIPT_DIALOG_PROMPT:
+            g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kPromptDialogReturnedText);
+            break;
+        }
+
+        g_main_loop_quit(m_mainLoop);
+    }
+
+    void scriptConfirm(WebKitScriptDialog* dialog)
+    {
+        g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kConfirmDialogMessage);
+        m_scriptDialogConfirmed = !m_scriptDialogConfirmed;
+        webkit_script_dialog_confirm_set_confirmed(dialog, m_scriptDialogConfirmed);
+    }
+
+    void scriptPrompt(WebKitScriptDialog* dialog)
+    {
+        g_assert_cmpstr(webkit_script_dialog_get_message(dialog), ==, kPromptDialogMessage);
+        g_assert_cmpstr(webkit_script_dialog_prompt_get_default_text(dialog), ==, &quot;default&quot;);
+        webkit_script_dialog_prompt_set_text(dialog, kPromptDialogReturnedText);
+    }
+
+    static gboolean scriptDialog(WebKitWebView*, WebKitScriptDialog* dialog, UIClientTest* test)
+    {
+        switch (webkit_script_dialog_get_dialog_type(dialog)) {
+        case WEBKIT_SCRIPT_DIALOG_ALERT:
+            test-&gt;scriptAlert(dialog);
+            break;
+        case WEBKIT_SCRIPT_DIALOG_CONFIRM:
+            test-&gt;scriptConfirm(dialog);
+            break;
+        case WEBKIT_SCRIPT_DIALOG_PROMPT:
+            test-&gt;scriptPrompt(dialog);
+            break;
+        }
+
+        return TRUE;
+    }
+
+    static void mouseTargetChanged(WebKitWebView*, WebKitHitTestResult* hitTestResult, guint modifiers, UIClientTest* test)
+    {
+        g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(hitTestResult));
+
+        test-&gt;m_mouseTargetHitTestResult = hitTestResult;
+        test-&gt;m_mouseTargetModifiers = modifiers;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    static gboolean permissionRequested(WebKitWebView*, WebKitPermissionRequest* request, UIClientTest* test)
+    {
+        g_assert(WEBKIT_IS_PERMISSION_REQUEST(request));
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+
+        if (test-&gt;m_allowPermissionRequests)
+            webkit_permission_request_allow(request);
+        else
+            webkit_permission_request_deny(request);
+
+        return TRUE;
+    }
+
+    UIClientTest()
+        : m_scriptDialogType(WEBKIT_SCRIPT_DIALOG_ALERT)
+        , m_scriptDialogConfirmed(true)
+        , m_allowPermissionRequests(false)
+        , m_mouseTargetModifiers(0)
+    {
+        webkit_settings_set_javascript_can_open_windows_automatically(webkit_web_view_get_settings(m_webView), TRUE);
+        g_signal_connect(m_webView, &quot;create&quot;, G_CALLBACK(viewCreateCallback), this);
+        g_signal_connect(m_webView, &quot;script-dialog&quot;, G_CALLBACK(scriptDialog), this);
+        g_signal_connect(m_webView, &quot;mouse-target-changed&quot;, G_CALLBACK(mouseTargetChanged), this);
+        g_signal_connect(m_webView, &quot;permission-request&quot;, G_CALLBACK(permissionRequested), this);
+    }
+
+    ~UIClientTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void waitUntilMainLoopFinishes()
+    {
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void setExpectedWindowProperties(const WindowProperties&amp; windowProperties)
+    {
+        m_windowProperties = windowProperties;
+    }
+
+    WebKitHitTestResult* moveMouseAndWaitUntilMouseTargetChanged(int x, int y, unsigned mouseModifiers = 0)
+    {
+        mouseMoveTo(x, y, mouseModifiers);
+        g_main_loop_run(m_mainLoop);
+        return m_mouseTargetHitTestResult.get();
+    }
+
+    virtual GtkWidget* viewCreate(WebKitWebView* webView)
+    {
+        g_assert(webView == m_webView);
+
+        GtkWidget* newWebView = webkit_web_view_new_with_context(webkit_web_view_get_context(webView));
+        g_object_ref_sink(newWebView);
+
+        m_webViewEvents.append(Create);
+
+        WebKitWindowProperties* windowProperties = webkit_web_view_get_window_properties(WEBKIT_WEB_VIEW(newWebView));
+        g_assert(windowProperties);
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(windowProperties));
+        m_windowPropertiesChanged.clear();
+
+        g_signal_connect(windowProperties, &quot;notify&quot;, G_CALLBACK(windowPropertiesNotifyCallback), this);
+        g_signal_connect(newWebView, &quot;ready-to-show&quot;, G_CALLBACK(viewReadyToShowCallback), this);
+        g_signal_connect(newWebView, &quot;close&quot;, G_CALLBACK(viewCloseCallback), this);
+
+        return newWebView;
+    }
+
+    virtual void viewReadyToShow(WebKitWebView* webView)
+    {
+        g_assert(webView != m_webView);
+
+        WebKitWindowProperties* windowProperties = webkit_web_view_get_window_properties(webView);
+        g_assert(windowProperties);
+        if (!m_windowProperties.isNull())
+            WindowProperties(windowProperties).assertEqual(m_windowProperties);
+
+        m_webViewEvents.append(ReadyToShow);
+    }
+
+    virtual void viewClose(WebKitWebView* webView)
+    {
+        g_assert(webView != m_webView);
+
+        m_webViewEvents.append(Close);
+        g_object_unref(webView);
+
+        g_main_loop_quit(m_mainLoop);
+    }
+
+    Vector&lt;WebViewEvents&gt; m_webViewEvents;
+    WebKitScriptDialogType m_scriptDialogType;
+    bool m_scriptDialogConfirmed;
+    bool m_allowPermissionRequests;
+    WindowProperties m_windowProperties;
+    HashSet&lt;WTF::String&gt; m_windowPropertiesChanged;
+    GRefPtr&lt;WebKitHitTestResult&gt; m_mouseTargetHitTestResult;
+    unsigned m_mouseTargetModifiers;
+};
+
+static void testWebViewCreateReadyClose(UIClientTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onLoad=\&quot;window.open().close();\&quot;&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilMainLoopFinishes();
+
+    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, UIClientTest::Create);
+    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
+    g_assert_cmpint(events[2], ==, UIClientTest::Close);
+}
+
+static gboolean checkMimeTypeForFilter(GtkFileFilter* filter, const gchar* mimeType)
+{
+    GtkFileFilterInfo filterInfo;
+    filterInfo.contains = GTK_FILE_FILTER_MIME_TYPE;
+    filterInfo.mime_type = mimeType;
+    return gtk_file_filter_filter(filter, &amp;filterInfo);
+}
+
+class ModalDialogsTest: public UIClientTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(ModalDialogsTest);
+
+    static void dialogRunAsModalCallback(WebKitWebView* webView, ModalDialogsTest* test)
+    {
+        g_assert(webView != test-&gt;m_webView);
+        test-&gt;m_webViewEvents.append(RunAsModal);
+    }
+
+    GtkWidget* viewCreate(WebKitWebView* webView)
+    {
+        g_assert(webView == m_webView);
+
+        GtkWidget* newWebView = UIClientTest::viewCreate(webView);
+        g_signal_connect(newWebView, &quot;run-as-modal&quot;, G_CALLBACK(dialogRunAsModalCallback), this);
+        return newWebView;
+    }
+
+    void viewReadyToShow(WebKitWebView* webView)
+    {
+        g_assert(webView != m_webView);
+        m_webViewEvents.append(ReadyToShow);
+    }
+};
+
+static void testWebViewAllowModalDialogs(ModalDialogsTest* test, gconstpointer)
+{
+    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
+    webkit_settings_set_allow_modal_dialogs(settings, TRUE);
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onload=\&quot;window.showModalDialog('data:text/html,&lt;html&gt;&lt;body/&gt;&lt;script&gt;window.close();&lt;/script&gt;&lt;/html&gt;')\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilMainLoopFinishes();
+
+    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
+    g_assert_cmpint(events.size(), ==, 4);
+    g_assert_cmpint(events[0], ==, UIClientTest::Create);
+    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
+    g_assert_cmpint(events[2], ==, UIClientTest::RunAsModal);
+    g_assert_cmpint(events[3], ==, UIClientTest::Close);
+}
+
+static void testWebViewDisallowModalDialogs(ModalDialogsTest* test, gconstpointer)
+{
+    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
+    webkit_settings_set_allow_modal_dialogs(settings, FALSE);
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body onload=\&quot;window.showModalDialog('data:text/html,&lt;html&gt;&lt;body/&gt;&lt;script&gt;window.close();&lt;/script&gt;&lt;/html&gt;')\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    // We need to use a timeout here because the viewClose() function
+    // won't ever be called as the dialog won't be created.
+    test-&gt;wait(1);
+
+    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
+    g_assert_cmpint(events.size(), ==, 0);
+}
+
+static void testWebViewJavaScriptDialogs(UIClientTest* test, gconstpointer)
+{
+    static const char* htmlOnLoadFormat = &quot;&lt;html&gt;&lt;body onLoad=\&quot;%s\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    static const char* jsAlertFormat = &quot;alert('%s')&quot;;
+    static const char* jsConfirmFormat = &quot;do { confirmed = confirm('%s'); } while (!confirmed); alert('confirmed');&quot;;
+    static const char* jsPromptFormat = &quot;alert(prompt('%s', 'default'));&quot;;
+
+    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_ALERT;
+    GOwnPtr&lt;char&gt; alertDialogMessage(g_strdup_printf(jsAlertFormat, kAlertDialogMessage));
+    GOwnPtr&lt;char&gt; alertHTML(g_strdup_printf(htmlOnLoadFormat, alertDialogMessage.get()));
+    test-&gt;loadHtml(alertHTML.get(), 0);
+    test-&gt;waitUntilMainLoopFinishes();
+
+    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_CONFIRM;
+    GOwnPtr&lt;char&gt; confirmDialogMessage(g_strdup_printf(jsConfirmFormat, kConfirmDialogMessage));
+    GOwnPtr&lt;char&gt; confirmHTML(g_strdup_printf(htmlOnLoadFormat, confirmDialogMessage.get()));
+    test-&gt;loadHtml(confirmHTML.get(), 0);
+    test-&gt;waitUntilMainLoopFinishes();
+
+    test-&gt;m_scriptDialogType = WEBKIT_SCRIPT_DIALOG_PROMPT;
+    GOwnPtr&lt;char&gt; promptDialogMessage(g_strdup_printf(jsPromptFormat, kPromptDialogMessage));
+    GOwnPtr&lt;char&gt; promptHTML(g_strdup_printf(htmlOnLoadFormat, promptDialogMessage.get()));
+    test-&gt;loadHtml(promptHTML.get(), 0);
+    test-&gt;waitUntilMainLoopFinishes();
+}
+
+static void testWebViewWindowProperties(UIClientTest* test, gconstpointer)
+{
+    static const char* windowProrpertiesString = &quot;left=100,top=150,width=400,height=400,location=no,menubar=no,status=no,toolbar=no,scrollbars=no&quot;;
+    GdkRectangle geometry = { 100, 150, 400, 400 };
+    test-&gt;setExpectedWindowProperties(UIClientTest::WindowProperties(&amp;geometry, false, false, false, false, false, true, false));
+
+    GOwnPtr&lt;char&gt; htmlString(g_strdup_printf(&quot;&lt;html&gt;&lt;body onLoad=\&quot;window.open('', '', '%s').close();\&quot;&gt;&lt;/body&gt;&lt;/html&gt;&quot;, windowProrpertiesString));
+    test-&gt;loadHtml(htmlString.get(), 0);
+    test-&gt;waitUntilMainLoopFinishes();
+
+    static const char* propertiesChanged[] = {
+        &quot;geometry&quot;, &quot;locationbar-visible&quot;, &quot;menubar-visible&quot;, &quot;statusbar-visible&quot;, &quot;toolbar-visible&quot;, &quot;scrollbars-visible&quot;
+    };
+    for (size_t i = 0; i &lt; G_N_ELEMENTS(propertiesChanged); ++i)
+        g_assert(test-&gt;m_windowPropertiesChanged.contains(propertiesChanged[i]));
+
+    Vector&lt;UIClientTest::WebViewEvents&gt;&amp; events = test-&gt;m_webViewEvents;
+    g_assert_cmpint(events.size(), ==, 3);
+    g_assert_cmpint(events[0], ==, UIClientTest::Create);
+    g_assert_cmpint(events[1], ==, UIClientTest::ReadyToShow);
+    g_assert_cmpint(events[2], ==, UIClientTest::Close);
+}
+
+static void testWebViewMouseTarget(UIClientTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped(GTK_WINDOW_TOPLEVEL);
+
+    const char* linksHoveredHTML =
+        &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot; &lt;a style='position:absolute; left:1; top:1' href='http://www.webkitgtk.org' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&quot;
+        &quot; &lt;img style='position:absolute; left:1; top:10' src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&quot;
+        &quot; &lt;a style='position:absolute; left:1; top:20' href='http://www.webkitgtk.org/logo' title='WebKitGTK+ Logo'&gt;&lt;img src='0xdeadbeef' width=5 height=5&gt;&lt;/img&gt;&lt;/a&gt;&quot;
+        &quot; &lt;input style='position:absolute; left:1; top:30' size='10'&gt;&lt;/input&gt;&quot;
+        &quot; &lt;div style='position:absolute; left:1; top:50; width:30; height:30; overflow:scroll'&gt;&amp;nbsp;&lt;/div&gt;&quot;
+        &quot; &lt;video style='position:absolute; left:1; top:100' width='300' height='300' controls='controls' preload='none'&gt;&lt;source src='movie.ogg' type='video/ogg' /&gt;&lt;/video&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    test-&gt;loadHtml(linksHoveredHTML, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    // Move over link.
+    WebKitHitTestResult* hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 1);
+    g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert_cmpstr(webkit_hit_test_result_get_link_uri(hitTestResult), ==, &quot;http://www.webkitgtk.org/&quot;);
+    g_assert_cmpstr(webkit_hit_test_result_get_link_title(hitTestResult), ==, &quot;WebKitGTK+ Title&quot;);
+    g_assert_cmpstr(webkit_hit_test_result_get_link_label(hitTestResult), ==, &quot;WebKitGTK+ Website&quot;);
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+
+    // Move out of the link.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(0, 0);
+    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+
+    // Move over image with GDK_CONTROL_MASK.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 10, GDK_CONTROL_MASK);
+    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
+    g_assert_cmpstr(webkit_hit_test_result_get_image_uri(hitTestResult), ==, &quot;file:///0xdeadbeef&quot;);
+    g_assert(test-&gt;m_mouseTargetModifiers &amp; GDK_CONTROL_MASK);
+
+    // Move over image link.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 20);
+    g_assert(webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
+    g_assert_cmpstr(webkit_hit_test_result_get_link_uri(hitTestResult), ==, &quot;http://www.webkitgtk.org/logo&quot;);
+    g_assert_cmpstr(webkit_hit_test_result_get_image_uri(hitTestResult), ==, &quot;file:///0xdeadbeef&quot;);
+    g_assert_cmpstr(webkit_hit_test_result_get_link_title(hitTestResult), ==, &quot;WebKitGTK+ Logo&quot;);
+    g_assert(!webkit_hit_test_result_get_link_label(hitTestResult));
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+
+    // Move over media.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(1, 100);
+    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
+    g_assert_cmpstr(webkit_hit_test_result_get_media_uri(hitTestResult), ==, &quot;file:///movie.ogg&quot;);
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+
+    // Mover over input.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(5, 35);
+    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_scrollbar(hitTestResult));
+    g_assert(webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+
+    // Move over scrollbar.
+    hitTestResult = test-&gt;moveMouseAndWaitUntilMouseTargetChanged(5, 75);
+    g_assert(!webkit_hit_test_result_context_is_link(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_image(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_media(hitTestResult));
+    g_assert(!webkit_hit_test_result_context_is_editable(hitTestResult));
+    g_assert(webkit_hit_test_result_context_is_scrollbar(hitTestResult));
+    g_assert(!test-&gt;m_mouseTargetModifiers);
+}
+
+static void testWebViewPermissionRequests(UIClientTest* test, gconstpointer)
+{
+    // Some versions of geoclue give a runtime warning because it tries
+    // to register the error quark twice. See https://bugs.webkit.org/show_bug.cgi?id=89858.
+    // Make warnings non-fatal for this test to make it pass.
+    test-&gt;removeLogFatalFlag(G_LOG_LEVEL_WARNING);
+    test-&gt;showInWindowAndWaitUntilMapped();
+    static const char* geolocationRequestHTML =
+        &quot;&lt;html&gt;&quot;
+        &quot;  &lt;script&gt;&quot;
+        &quot;  function runTest()&quot;
+        &quot;  {&quot;
+        &quot;    navigator.geolocation.getCurrentPosition(function(p) { document.title = \&quot;OK\&quot; },&quot;
+        &quot;                                             function(e) { document.title = e.code });&quot;
+        &quot;  }&quot;
+        &quot;  &lt;/script&gt;&quot;
+        &quot;  &lt;body onload='runTest();'&gt;&lt;/body&gt;&quot;
+        &quot;&lt;/html&gt;&quot;;
+
+    // Test denying a permission request.
+    test-&gt;m_allowPermissionRequests = false;
+    test-&gt;loadHtml(geolocationRequestHTML, 0);
+    test-&gt;waitUntilTitleChanged();
+
+    // According to the Geolocation API specification, '1' is the
+    // error code returned for the PERMISSION_DENIED error.
+    // http://dev.w3.org/geo/api/spec-source.html#position_error_interface
+    const gchar* result = webkit_web_view_get_title(test-&gt;m_webView);
+    g_assert_cmpstr(result, ==, &quot;1&quot;);
+
+    // Test allowing a permission request.
+    test-&gt;m_allowPermissionRequests = true;
+    test-&gt;loadHtml(geolocationRequestHTML, 0);
+    test-&gt;waitUntilTitleChanged();
+
+    // Check that we did not get the PERMISSION_DENIED error now.
+    result = webkit_web_view_get_title(test-&gt;m_webView);
+    g_assert_cmpstr(result, !=, &quot;1&quot;);
+    test-&gt;addLogFatalFlag(G_LOG_LEVEL_WARNING);
+}
+
+class FileChooserTest: public UIClientTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(FileChooserTest);
+
+    FileChooserTest()
+    {
+        g_signal_connect(m_webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCallback), this);
+    }
+
+    static gboolean runFileChooserCallback(WebKitWebView*, WebKitFileChooserRequest* request, FileChooserTest* test)
+    {
+        test-&gt;runFileChooser(request);
+        return TRUE;
+    }
+
+    void runFileChooser(WebKitFileChooserRequest* request)
+    {
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+        m_fileChooserRequest = request;
+        g_main_loop_quit(m_mainLoop);
+    }
+
+    WebKitFileChooserRequest* clickMouseButtonAndWaitForFileChooserRequest(int x, int y)
+    {
+        clickMouseButton(x, y);
+        g_main_loop_run(m_mainLoop);
+        return m_fileChooserRequest.get();
+    }
+
+private:
+    GRefPtr&lt;WebKitFileChooserRequest&gt; m_fileChooserRequest;
+};
+
+static void testWebViewFileChooserRequest(FileChooserTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+    static const char* fileChooserHTMLFormat = &quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute;left:0;top:0;margin:0;padding:0' type='file' %s/&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    // Multiple selections not allowed, no MIME filtering.
+    GOwnPtr&lt;char&gt; simpleFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;&quot;));
+    test-&gt;loadHtml(simpleFileUploadHTML.get(), 0);
+    test-&gt;waitUntilLoadFinished();
+    WebKitFileChooserRequest* fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
+    g_assert(!webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
+
+    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
+    g_assert(!mimeTypes);
+    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
+    g_assert(!filter);
+    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
+    g_assert(!selectedFiles);
+    webkit_file_chooser_request_cancel(fileChooserRequest);
+
+    // Multiple selections allowed, no MIME filtering, some pre-selected files.
+    GOwnPtr&lt;char&gt; multipleSelectionFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;multiple&quot;));
+    test-&gt;loadHtml(multipleSelectionFileUploadHTML.get(), 0);
+    test-&gt;waitUntilLoadFinished();
+    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
+    g_assert(webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
+
+    mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
+    g_assert(!mimeTypes);
+    filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
+    g_assert(!filter);
+    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
+    g_assert(!selectedFiles);
+
+    // Select some files.
+    const gchar* filesToSelect[4] = { &quot;/foo&quot;, &quot;/foo/bar&quot;, &quot;/foo/bar/baz&quot;, 0 };
+    webkit_file_chooser_request_select_files(fileChooserRequest, filesToSelect);
+
+    // Check the files that have been just selected.
+    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
+    g_assert(selectedFiles);
+    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
+    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
+    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
+    g_assert(!selectedFiles[3]);
+
+    // Perform another request to check if the list of files selected
+    // in the previous step appears now as part of the new request.
+    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
+    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
+    g_assert(selectedFiles);
+    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
+    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
+    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
+    g_assert(!selectedFiles[3]);
+    webkit_file_chooser_request_cancel(fileChooserRequest);
+
+    // Multiple selections not allowed, only accept images, audio and video files..
+    GOwnPtr&lt;char&gt; mimeFilteredFileUploadHTML(g_strdup_printf(fileChooserHTMLFormat, &quot;accept='audio/*,video/*,image/*'&quot;));
+    test-&gt;loadHtml(mimeFilteredFileUploadHTML.get(), 0);
+    test-&gt;waitUntilLoadFinished();
+    fileChooserRequest = test-&gt;clickMouseButtonAndWaitForFileChooserRequest(5, 5);
+    g_assert(!webkit_file_chooser_request_get_select_multiple(fileChooserRequest));
+
+    mimeTypes = webkit_file_chooser_request_get_mime_types(fileChooserRequest);
+    g_assert(mimeTypes);
+    g_assert_cmpstr(mimeTypes[0], ==, &quot;audio/*&quot;);
+    g_assert_cmpstr(mimeTypes[1], ==, &quot;video/*&quot;);
+    g_assert_cmpstr(mimeTypes[2], ==, &quot;image/*&quot;);
+    g_assert(!mimeTypes[3]);
+
+    filter = webkit_file_chooser_request_get_mime_types_filter(fileChooserRequest);
+    g_assert(GTK_IS_FILE_FILTER(filter));
+    g_assert(checkMimeTypeForFilter(filter, &quot;audio/*&quot;));
+    g_assert(checkMimeTypeForFilter(filter, &quot;video/*&quot;));
+    g_assert(checkMimeTypeForFilter(filter, &quot;image/*&quot;));
+
+    selectedFiles = webkit_file_chooser_request_get_selected_files(fileChooserRequest);
+    g_assert(!selectedFiles);
+    webkit_file_chooser_request_cancel(fileChooserRequest);
+}
+
+void beforeAll()
+{
+    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;create-ready-close&quot;, testWebViewCreateReadyClose);
+    ModalDialogsTest::add(&quot;WebKitWebView&quot;, &quot;allow-modal-dialogs&quot;, testWebViewAllowModalDialogs);
+    ModalDialogsTest::add(&quot;WebKitWebView&quot;, &quot;disallow-modal-dialogs&quot;, testWebViewDisallowModalDialogs);
+    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;javascript-dialogs&quot;, testWebViewJavaScriptDialogs);
+    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;window-properties&quot;, testWebViewWindowProperties);
+    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;mouse-target&quot;, testWebViewMouseTarget);
+    UIClientTest::add(&quot;WebKitWebView&quot;, &quot;permission-requests&quot;, testWebViewPermissionRequests);
+    FileChooserTest::add(&quot;WebKitWebView&quot;, &quot;file-chooser-request&quot;, testWebViewFileChooserRequest);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebExtensionscppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebExtensionscpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,195 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestBus.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static WebKitTestBus* bus;
+
+static void testWebExtensionGetTitle(WebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;WebKitGTK+ Web Extensions Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot; , &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
+    GRefPtr&lt;GVariant&gt; result = adoptGRef(g_dbus_proxy_call_sync(
+        proxy.get(),
+        &quot;GetTitle&quot;,
+        g_variant_new(&quot;(t)&quot;, webkit_web_view_get_page_id(test-&gt;m_webView)),
+        G_DBUS_CALL_FLAGS_NONE,
+        -1, 0, 0));
+    g_assert(result);
+
+    const char* title;
+    g_variant_get(result.get(), &quot;(&amp;s)&quot;, &amp;title);
+    g_assert_cmpstr(title, ==, &quot;WebKitGTK+ Web Extensions Test&quot;);
+}
+
+static void documentLoadedCallback(GDBusConnection*, const char*, const char*, const char*, const char*, GVariant*, WebViewTest* test)
+{
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+static void testDocumentLoadedSignal(WebViewTest* test, gconstpointer)
+{
+    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
+    GDBusConnection* connection = g_dbus_proxy_get_connection(proxy.get());
+    guint id = g_dbus_connection_signal_subscribe(connection,
+        0,
+        &quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;DocumentLoaded&quot;,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
+        0,
+        G_DBUS_SIGNAL_FLAGS_NONE,
+        reinterpret_cast&lt;GDBusSignalCallback&gt;(documentLoadedCallback),
+        test,
+        0);
+    g_assert(id);
+
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;WebKitGTK+ Web Extensions Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    g_main_loop_run(test-&gt;m_mainLoop);
+    g_dbus_connection_signal_unsubscribe(connection, id);
+}
+
+static gboolean webProcessCrashedCallback(WebKitWebView*, WebViewTest* test)
+{
+    test-&gt;quitMainLoop();
+
+    return FALSE;
+}
+
+static void testWebKitWebViewProcessCrashed(WebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    g_signal_connect(test-&gt;m_webView, &quot;web-process-crashed&quot;,
+        G_CALLBACK(webProcessCrashedCallback), test);
+
+    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;, &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
+
+    GRefPtr&lt;GVariant&gt; result = adoptGRef(g_dbus_proxy_call_sync(
+        proxy.get(),
+        &quot;AbortProcess&quot;,
+        0,
+        G_DBUS_CALL_FLAGS_NONE,
+        -1, 0, 0));
+    g_assert(!result);
+    g_main_loop_run(test-&gt;m_mainLoop);
+}
+
+static void testWebExtensionWindowObjectCleared(WebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;header&gt;&lt;/header&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GOwnPtr&lt;GError&gt; error;
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.echo('Foo');&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;Foo&quot;);
+}
+
+static gboolean scriptDialogCallback(WebKitWebView*, WebKitScriptDialog* dialog, char** result)
+{
+    g_assert_cmpuint(webkit_script_dialog_get_dialog_type(dialog), ==, WEBKIT_SCRIPT_DIALOG_ALERT);
+    g_assert(!*result);
+    *result = g_strdup(webkit_script_dialog_get_message(dialog));
+    return TRUE;
+}
+
+static void runJavaScriptInIsolatedWorldFinishedCallback(GDBusProxy* proxy, GAsyncResult* result, WebViewTest* test)
+{
+    g_dbus_proxy_call_finish(proxy, result, 0);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+static void testWebExtensionIsolatedWorld(WebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;header&gt;&lt;/header&gt;&lt;body&gt;&lt;div id='console'&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GOwnPtr&lt;char&gt; result;
+    gulong scriptDialogID = g_signal_connect(test-&gt;m_webView, &quot;script-dialog&quot;, G_CALLBACK(scriptDialogCallback), &amp;result.outPtr());
+
+    static const char* mainWorldScript =
+        &quot;top.foo = 'Foo';\n&quot;
+        &quot;document.getElementById('console').innerHTML = top.foo;\n&quot;
+        &quot;window.open = function () { alert('Main World'); }\n&quot;
+        &quot;document.open(1, 2, 3);&quot;;
+    test-&gt;runJavaScriptAndWaitUntilFinished(mainWorldScript, 0);
+    g_assert_cmpstr(result.get(), ==, &quot;Main World&quot;);
+    result.clear();
+
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.getElementById('console').innerHTML&quot;, 0);
+    g_assert(javascriptResult);
+    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;Foo&quot;);
+
+    static const char* isolatedWorldScript =
+        &quot;document.getElementById('console').innerHTML = top.foo;\n&quot;
+        &quot;window.open = function () { alert('Isolated World'); }\n&quot;
+        &quot;document.open(1, 2, 3);&quot;;
+    GRefPtr&lt;GDBusProxy&gt; proxy = adoptGRef(bus-&gt;createProxy(&quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot; , &quot;org.webkit.gtk.WebExtensionTest&quot;, test-&gt;m_mainLoop));
+    g_dbus_proxy_call(proxy.get(),
+        &quot;RunJavaScriptInIsolatedWorld&quot;,
+        g_variant_new(&quot;(t&amp;s)&quot;, webkit_web_view_get_page_id(test-&gt;m_webView), isolatedWorldScript),
+        G_DBUS_CALL_FLAGS_NONE,
+        -1, 0,
+        reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptInIsolatedWorldFinishedCallback),
+        test);
+    g_main_loop_run(test-&gt;m_mainLoop);
+    g_assert_cmpstr(result.get(), ==, &quot;Isolated World&quot;);
+    result.clear();
+
+    // Check that 'top.foo' defined in main world is not visible in isolated world.
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.getElementById('console').innerHTML&quot;, 0);
+    g_assert(javascriptResult);
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;undefined&quot;);
+
+    g_signal_handler_disconnect(test-&gt;m_webView, scriptDialogID);
+}
+
+void beforeAll()
+{
+    webkit_web_context_set_web_extensions_directory(webkit_web_context_get_default(), WEBKIT_TEST_WEB_EXTENSIONS_DIR);
+    bus = new WebKitTestBus();
+    if (!bus-&gt;run())
+        return;
+
+    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;dom-document-title&quot;, testWebExtensionGetTitle);
+    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;document-loaded-signal&quot;, testDocumentLoadedSignal);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;web-process-crashed&quot;, testWebKitWebViewProcessCrashed);
+    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;window-object-cleared&quot;, testWebExtensionWindowObjectCleared);
+    WebViewTest::add(&quot;WebKitWebExtension&quot;, &quot;isolated-world&quot;, testWebExtensionIsolatedWorld);
+}
+
+void afterAll()
+{
+    delete bus;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitAccessibilitycppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitAccessibilitycpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,224 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;TestMain.h&quot;
+#include &quot;WebViewTest.h&quot;
+
+// The libatspi headers don't use G_BEGIN_DECLS
+extern &quot;C&quot; {
+#include &lt;atspi/atspi.h&gt;
+}
+
+#include &lt;errno.h&gt;
+#include &lt;fcntl.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;signal.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+// Name of the test server application creating the webView object.
+static const char* kTestServerAppName = &quot;AccessibilityTestServer&quot;;
+
+// Max seconds to wait for the test server before inspecting it.
+static const int kMaxWaitForChild = 5;
+
+// The PID for the test server running, so we can kill it if needed.
+static GPid kChildProcessPid = 0;
+
+// Whether the child has replied and it's ready.
+static bool kChildIsReady = false;
+
+static void stopTestServer()
+{
+    // Do nothing if there's no server running.
+    if (!kChildProcessPid)
+        return;
+
+    g_spawn_close_pid(kChildProcessPid);
+    kill(kChildProcessPid, SIGTERM);
+    kChildProcessPid = 0;
+}
+
+static void sigAbortHandler(int sigNum)
+{
+    // Just stop the test server if SIGABRT was received.
+    stopTestServer();
+}
+
+static gpointer testServerMonitorThreadFunc(gpointer)
+{
+    // Wait for the specified timeout to happen.
+    g_usleep(kMaxWaitForChild * G_USEC_PER_SEC);
+
+    // Kill the child process if not ready yet.
+    if (!kChildIsReady)
+        stopTestServer();
+
+    g_thread_exit(0);
+    return 0;
+}
+
+static void startTestServerMonitor()
+{
+    kChildIsReady = false;
+    g_thread_new(&quot;TestServerMonitor&quot;, testServerMonitorThreadFunc, 0);
+}
+
+static void startTestServer()
+{
+    // Prepare argv[] for spawning the server process.
+    GOwnPtr&lt;char&gt; testServerPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;TestWebKitAPI&quot;, &quot;WebKit2Gtk&quot;, kTestServerAppName, NULL));
+
+    char* testServerArgv[2];
+    testServerArgv[0] = testServerPath.get();
+    testServerArgv[1] = 0;
+
+    // Spawn the server, getting its stdout file descriptor to set a
+    // communication channel, so we know when it's ready.
+    int childStdout = 0;
+    if (!g_spawn_async_with_pipes(0, testServerArgv, 0, static_cast&lt;GSpawnFlags&gt;(0), 0, 0, &amp;kChildProcessPid, 0, &amp;childStdout, 0, 0)) {
+        close(childStdout);
+        return;
+    }
+
+    // Start monitoring the test server (in a separate thread) to
+    // ensure we don't block on the child process more than a timeout.
+    startTestServerMonitor();
+
+    char msg[2];
+    GIOChannel* ioChannel = g_io_channel_unix_new(childStdout);
+    if (g_io_channel_read_chars(ioChannel, msg, 2, 0, 0) == G_IO_STATUS_NORMAL) {
+        // Check whether the server sent a message saying it's ready
+        // and store the result globally, so the monitor can see it.
+        kChildIsReady = msg[0] == 'O' &amp;&amp; msg[1] == 'K';
+    }
+    g_io_channel_unref(ioChannel);
+    close(childStdout);
+
+    // The timeout was reached and the server is not ready yet, so
+    // stop it inmediately, and let the unit tests fail.
+    if (!kChildIsReady)
+        stopTestServer();
+}
+
+static void checkAtspiAccessible(AtspiAccessible* accessible, const char* targetName, AtspiRole targetRole)
+{
+    g_assert(ATSPI_IS_ACCESSIBLE(accessible));
+
+    GOwnPtr&lt;char&gt; name(atspi_accessible_get_name(accessible, 0));
+    g_assert_cmpstr(targetName, ==, name.get());
+    g_assert_cmpint(targetRole, ==, atspi_accessible_get_role(accessible, 0));
+}
+
+static GRefPtr&lt;AtspiAccessible&gt; findTestServerApplication()
+{
+    // Only one desktop is supported by ATSPI at the moment.
+    GRefPtr&lt;AtspiAccessible&gt; desktop = adoptGRef(atspi_get_desktop(0));
+
+    // Look for the server application in the list of apps.
+    GRefPtr&lt;AtspiAccessible&gt; current;
+    int childCount = atspi_accessible_get_child_count(desktop.get(), 0);
+    for (int i = 0; i &lt; childCount; i++) {
+        current = adoptGRef(atspi_accessible_get_child_at_index(desktop.get(), i, 0));
+        if (!g_strcmp0(atspi_accessible_get_name(current.get(), 0), kTestServerAppName))
+            return current;
+    }
+
+    return 0;
+}
+
+static void testAtspiBasicHierarchy(WebViewTest* test, gconstpointer)
+{
+    // The test server's accessibility object (UI Process).
+    GRefPtr&lt;AtspiAccessible&gt; testServerApp = findTestServerApplication();
+    g_assert(ATSPI_IS_ACCESSIBLE(testServerApp.get()));
+    checkAtspiAccessible(testServerApp.get(), &quot;AccessibilityTestServer&quot;, ATSPI_ROLE_APPLICATION);
+
+    // The main window's accessibility object (UI Process).
+    GRefPtr&lt;AtspiAccessible&gt; currentParent = testServerApp;
+    GRefPtr&lt;AtspiAccessible&gt; currentChild = adoptGRef(atspi_accessible_get_child_at_index(currentParent.get(), 0, 0));
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FRAME);
+
+    // The WebView's accessibility object (UI Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FILLER);
+
+    // The WebPage's accessibility object (Web Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_FILLER);
+
+    // HTML root element's accessible element (Web Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+
+    // HTML body's accessible element (Web Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_DOCUMENT_WEB);
+
+    // HTML H1's accessible element (Web Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;This is a test&quot;, ATSPI_ROLE_HEADING);
+
+    // HTML first paragraph's accessible element (Web Process).
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 1, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_PARAGRAPH);
+
+    // HTML second paragraph's accessible element (Web Process).
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 2, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;&quot;, ATSPI_ROLE_PARAGRAPH);
+
+    // HTML link's accessible element (Web Process).
+    currentParent = currentChild;
+    currentChild = atspi_accessible_get_child_at_index(currentParent.get(), 0, 0);
+    g_assert(ATSPI_IS_ACCESSIBLE(currentChild.get()));
+    checkAtspiAccessible(currentChild.get(), &quot;a link&quot;, ATSPI_ROLE_LINK);
+}
+
+void beforeAll()
+{
+    // We install a handler to ensure that we kill the child process
+    // if the parent dies because of whatever the reason is.
+    signal(SIGABRT, sigAbortHandler);
+
+    // Start the accessibility test server and load the tests.
+    startTestServer();
+    WebViewTest::add(&quot;WebKitAccessibility&quot;, &quot;atspi-basic-hierarchy&quot;, testAtspiBasicHierarchy);
+}
+
+void afterAll()
+{
+    // Ensure we stop the server.
+    stopTestServer();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitFaviconDatabasecppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFaviconDatabasecpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,274 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+static WebKitTestServer* kServer;
+static char* kTempDirectory;
+
+class FaviconDatabaseTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(FaviconDatabaseTest);
+
+    FaviconDatabaseTest()
+        : m_webContext(webkit_web_context_get_default())
+        , m_favicon(0)
+        , m_error(0)
+        , m_faviconNotificationReceived(false)
+    {
+        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
+        g_signal_connect(database, &quot;favicon-changed&quot;, G_CALLBACK(faviconChangedCallback), this);
+    }
+
+    ~FaviconDatabaseTest()
+    {
+        if (m_favicon)
+            cairo_surface_destroy(m_favicon);
+
+        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
+        g_signal_handlers_disconnect_matched(database, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    static void faviconChangedCallback(WebKitFaviconDatabase* database, const char* pageURI, const char* faviconURI, FaviconDatabaseTest* test)
+    {
+        if (!g_strcmp0(webkit_web_view_get_uri(test-&gt;m_webView), pageURI))
+            test-&gt;m_faviconURI = faviconURI;
+    }
+
+    static void viewFaviconChangedCallback(WebKitWebView* webView, GParamSpec* pspec, gpointer data)
+    {
+        FaviconDatabaseTest* test = static_cast&lt;FaviconDatabaseTest*&gt;(data);
+        g_assert(test-&gt;m_webView == webView);
+        test-&gt;m_faviconNotificationReceived = true;
+        test-&gt;quitMainLoop();
+    }
+
+    static void getFaviconCallback(GObject* sourceObject, GAsyncResult* result, void* data)
+    {
+        FaviconDatabaseTest* test = static_cast&lt;FaviconDatabaseTest*&gt;(data);
+        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
+        test-&gt;m_favicon = webkit_favicon_database_get_favicon_finish(database, result, &amp;test-&gt;m_error.outPtr());
+        test-&gt;quitMainLoop();
+    }
+
+    void waitUntilFaviconChanged()
+    {
+        m_faviconNotificationReceived = false;
+        unsigned long handlerID = g_signal_connect(m_webView, &quot;notify::favicon&quot;, G_CALLBACK(viewFaviconChangedCallback), this);
+        g_main_loop_run(m_mainLoop);
+        g_signal_handler_disconnect(m_webView, handlerID);
+    }
+
+    void getFaviconForPageURIAndWaitUntilReady(const char* pageURI)
+    {
+        m_error.clear();
+        if (m_favicon) {
+            cairo_surface_destroy(m_favicon);
+            m_favicon = 0;
+        }
+
+        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
+        webkit_favicon_database_get_favicon(database, pageURI, 0, getFaviconCallback, this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    WebKitWebContext* m_webContext;
+    cairo_surface_t* m_favicon;
+    CString m_faviconURI;
+    GOwnPtr&lt;GError&gt; m_error;
+    bool m_faviconNotificationReceived;
+};
+
+static void
+serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable* query, SoupClientContext* context, void* data)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+        soup_message_body_complete(message-&gt;response_body);
+        return;
+    }
+
+    char* contents;
+    gsize length;
+    if (g_str_equal(path, &quot;/icon/favicon.ico&quot;)) {
+        GOwnPtr&lt;char&gt; pathToFavicon(g_build_filename(Test::getWebKit1TestResoucesDir().data(), &quot;blank.ico&quot;, NULL));
+        g_file_get_contents(pathToFavicon.get(), &amp;contents, &amp;length, 0);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    } else if (g_str_equal(path, &quot;/nofavicon&quot;)) {
+        static const char* noFaviconHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, noFaviconHTML, strlen(noFaviconHTML));
+    } else {
+        static const char* contentsHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;link rel='icon' href='/icon/favicon.ico' type='image/x-ico; charset=binary'&gt;&lt;/head&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, contentsHTML, strlen(contentsHTML));
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+static void testNotInitialized(FaviconDatabaseTest* test)
+{
+    // Try to retrieve a valid favicon from a not initialized database.
+    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
+    g_assert(!test-&gt;m_favicon);
+    g_assert(test-&gt;m_error);
+    g_assert_cmpint(test-&gt;m_error-&gt;code, ==, WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED);
+}
+
+static void testSetDirectory(FaviconDatabaseTest* test)
+{
+    webkit_web_context_set_favicon_database_directory(test-&gt;m_webContext, kTempDirectory);
+    g_assert_cmpstr(kTempDirectory, ==, webkit_web_context_get_favicon_database_directory(test-&gt;m_webContext));
+}
+
+static void testClearDatabase(FaviconDatabaseTest* test)
+{
+    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
+    webkit_favicon_database_clear(database);
+
+    GOwnPtr&lt;char&gt; iconURI(webkit_favicon_database_get_favicon_uri(database, kServer-&gt;getURIForPath(&quot;/foo&quot;).data()));
+    g_assert(!iconURI);
+}
+
+static void testGetFavicon(FaviconDatabaseTest* test)
+{
+    // We need to load the page first to ensure the icon data will be
+    // in the database in case there's an associated favicon.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
+    test-&gt;waitUntilFaviconChanged();
+    CString faviconURI = kServer-&gt;getURIForPath(&quot;/icon/favicon.ico&quot;);
+
+    // Check the API retrieving a valid favicon.
+    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
+    g_assert(test-&gt;m_favicon);
+    g_assert_cmpstr(test-&gt;m_faviconURI.data(), ==, faviconURI.data());
+    g_assert(!test-&gt;m_error);
+
+    // Check that width and height match those from blank.ico (16x16 favicon).
+    g_assert_cmpint(cairo_image_surface_get_width(test-&gt;m_favicon), ==, 16);
+    g_assert_cmpint(cairo_image_surface_get_height(test-&gt;m_favicon), ==, 16);
+
+    // Check that another page with the same favicon return the same icon.
+    cairo_surface_t* favicon = cairo_surface_reference(test-&gt;m_favicon);
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/bar&quot;).data());
+    // It's a new page in the database, so favicon will change twice, first to reset it
+    // and then when the icon is loaded.
+    test-&gt;waitUntilFaviconChanged();
+    test-&gt;waitUntilFaviconChanged();
+    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/bar&quot;).data());
+    g_assert(test-&gt;m_favicon);
+    g_assert_cmpstr(test-&gt;m_faviconURI.data(), ==, faviconURI.data());
+    g_assert(test-&gt;m_favicon == favicon);
+    g_assert(!test-&gt;m_error);
+    cairo_surface_destroy(favicon);
+
+    // Check the API retrieving an invalid favicon.
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/nofavicon&quot;).data());
+    test-&gt;waitUntilFaviconChanged();
+
+    test-&gt;getFaviconForPageURIAndWaitUntilReady(kServer-&gt;getURIForPath(&quot;/nofavicon&quot;).data());
+    g_assert(!test-&gt;m_favicon);
+    g_assert(test-&gt;m_error);
+}
+
+static void testGetFaviconURI(FaviconDatabaseTest* test)
+{
+    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test-&gt;m_webContext);
+
+    CString baseURI = kServer-&gt;getURIForPath(&quot;/foo&quot;);
+    GOwnPtr&lt;char&gt; iconURI(webkit_favicon_database_get_favicon_uri(database, baseURI.data()));
+    ASSERT_CMP_CSTRING(iconURI.get(), ==, kServer-&gt;getURIForPath(&quot;/icon/favicon.ico&quot;));
+}
+
+static void testWebViewFavicon(FaviconDatabaseTest* test)
+{
+    test-&gt;m_faviconURI = CString();
+
+    cairo_surface_t* iconFromWebView = webkit_web_view_get_favicon(test-&gt;m_webView);
+    g_assert(!iconFromWebView);
+
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/foo&quot;).data());
+    test-&gt;waitUntilFaviconChanged();
+    g_assert(test-&gt;m_faviconNotificationReceived);
+    // The icon is known and hasn't changed in the database, so notify::favicon is emitted
+    // but WebKitFaviconDatabase::icon-changed isn't.
+    g_assert(test-&gt;m_faviconURI.isNull());
+
+    iconFromWebView = webkit_web_view_get_favicon(test-&gt;m_webView);
+    g_assert(iconFromWebView);
+    g_assert_cmpuint(cairo_image_surface_get_width(iconFromWebView), ==, 16);
+    g_assert_cmpuint(cairo_image_surface_get_height(iconFromWebView), ==, 16);
+}
+
+static void testFaviconDatabase(FaviconDatabaseTest* test, gconstpointer)
+{
+    // These tests depend on this order to run properly so we declare them in a single one.
+    // See https://bugs.webkit.org/show_bug.cgi?id=111434.
+    testNotInitialized(test);
+    testSetDirectory(test);
+    testGetFavicon(test);
+    testGetFaviconURI(test);
+    testWebViewFavicon(test);
+    testClearDatabase(test);
+}
+
+void beforeAll()
+{
+    // Start a soup server for testing.
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    kTempDirectory = g_dir_make_tmp(&quot;WebKit2Tests-XXXXXX&quot;, 0);
+    g_assert(kTempDirectory);
+
+    // Add tests to the suite.
+    FaviconDatabaseTest::add(&quot;WebKitFaviconDatabase&quot;, &quot;favicon-database-test&quot;, testFaviconDatabase);
+}
+
+static void webkitFaviconDatabaseFinalizedCallback(gpointer, GObject*)
+{
+    if (!g_file_test(kTempDirectory, G_FILE_TEST_IS_DIR))
+        return;
+
+    GOwnPtr&lt;char&gt; filename(g_build_filename(kTempDirectory, &quot;WebpageIcons.db&quot;, NULL));
+    g_unlink(filename.get());
+
+    g_rmdir(kTempDirectory);
+}
+
+void afterAll()
+{
+    delete kServer;
+
+    // Delete the temporary files after the IconDatabase has been
+    // closed, that is, once WebKitFaviconDatabase is being destroyed.
+    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(webkit_web_context_get_default());
+    g_object_weak_ref(G_OBJECT(database), webkitFaviconDatabaseFinalizedCallback, 0);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitFindControllercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitFindControllercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFindController.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,335 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;LoadTrackingTest.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static const char* testString = &quot;&lt;html&gt;&lt;body&gt;first testing second testing secondHalf&lt;/body&gt;&lt;/html&gt;&quot;;
+
+class FindControllerTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(FindControllerTest);
+
+    FindControllerTest()
+        : m_findController(webkit_web_view_get_find_controller(m_webView))
+        , m_runFindUntilCompletion(false)
+    {
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_findController.get()));
+    }
+
+    ~FindControllerTest()
+    {
+        if (m_findController)
+            g_signal_handlers_disconnect_matched(m_findController.get(), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void find(const char* searchText, guint32 findOptions, guint maxMatchCount)
+    {
+        g_signal_connect(m_findController.get(), &quot;found-text&quot;, G_CALLBACK(foundTextCallback), this);
+        g_signal_connect(m_findController.get(), &quot;failed-to-find-text&quot;, G_CALLBACK(failedToFindTextCallback), this);
+        webkit_find_controller_search(m_findController.get(), searchText, findOptions, maxMatchCount);
+    }
+
+    void count(const char* searchText, guint32 findOptions, guint maxMatchCount)
+    {
+        g_signal_connect(m_findController.get(), &quot;counted-matches&quot;, G_CALLBACK(countedMatchesCallback), this);
+        webkit_find_controller_count_matches(m_findController.get(), searchText, findOptions, maxMatchCount);
+    }
+
+    void waitUntilFindFinished()
+    {
+        m_runFindUntilCompletion = true;
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GRefPtr&lt;WebKitFindController&gt; m_findController;
+    bool m_textFound;
+    unsigned m_matchCount;
+
+private:
+    bool m_runFindUntilCompletion;
+
+    static void foundTextCallback(WebKitFindController*, guint matchCount, FindControllerTest* test)
+    {
+        test-&gt;m_textFound = true;
+        test-&gt;m_matchCount = matchCount;
+        if (test-&gt;m_runFindUntilCompletion)
+            g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    static void failedToFindTextCallback(WebKitFindController*, FindControllerTest* test)
+    {
+        test-&gt;m_textFound = false;
+        if (test-&gt;m_runFindUntilCompletion)
+            g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    static void countedMatchesCallback(WebKitFindController*, guint matchCount, FindControllerTest* test)
+    {
+        test-&gt;m_matchCount = matchCount;
+        if (test-&gt;m_runFindUntilCompletion)
+            g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+};
+
+static void testFindControllerTextFound(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+}
+
+static void testFindControllerTextNotFound(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;notFound&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_textFound);
+}
+
+static void testFindControllerMatchCount(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_matchCount == 2);
+    g_assert(test-&gt;m_textFound);
+}
+
+static void testFindControllerMaxMatchCount(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_matchCount == G_MAXUINT);
+    g_assert(test-&gt;m_textFound);
+}
+
+static void testFindControllerNext(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+    g_assert(test-&gt;m_matchCount == 2);
+
+    webkit_find_controller_search_next(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+    g_assert(test-&gt;m_matchCount == 1);
+    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
+
+    webkit_find_controller_search_next(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_textFound);
+    g_assert(test-&gt;m_matchCount == 1);
+    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
+}
+
+static void testFindControllerPrevious(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_matchCount == 2);
+    g_assert(test-&gt;m_textFound);
+
+    webkit_find_controller_search_next(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+    g_assert(test-&gt;m_matchCount == 1);
+    g_assert(!(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS));
+
+    webkit_find_controller_search_previous(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+    g_assert(test-&gt;m_matchCount == 1);
+    g_assert(webkit_find_controller_get_options(test-&gt;m_findController.get()) &amp; WEBKIT_FIND_OPTIONS_BACKWARDS);
+}
+
+static void testFindControllerCountedMatches(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;count(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_matchCount == 2);
+
+    test-&gt;count(&quot;first&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_matchCount == 1);
+
+    test-&gt;count(&quot;notFound&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_matchCount);
+}
+
+static void testFindControllerOptions(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;find(&quot;Testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_textFound);
+
+    test-&gt;find(&quot;Testing&quot;, WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+
+    test-&gt;find(&quot;esting&quot;, WEBKIT_FIND_OPTIONS_NONE, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+
+    test-&gt;find(&quot;esting&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_textFound);
+
+    test-&gt;find(&quot;Half&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(!test-&gt;m_textFound);
+
+    test-&gt;find(&quot;Half&quot;, WEBKIT_FIND_OPTIONS_AT_WORD_STARTS | WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, 2);
+    test-&gt;waitUntilFindFinished();
+
+    g_assert(test-&gt;m_textFound);
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_WRAP_AROUND, 3);
+    test-&gt;waitUntilFindFinished();
+    g_assert(test-&gt;m_textFound);
+
+    webkit_find_controller_search_next(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+    g_assert(test-&gt;m_textFound);
+
+    webkit_find_controller_search_next(test-&gt;m_findController.get());
+    test-&gt;waitUntilFindFinished();
+    g_assert(test-&gt;m_textFound);
+}
+
+static void testFindControllerHide(FindControllerTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(testString, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    cairo_surface_t* originalSurface = cairo_surface_reference(
+        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
+    g_assert(originalSurface);
+
+    test-&gt;find(&quot;testing&quot;, WEBKIT_FIND_OPTIONS_NONE, 1);
+    test-&gt;waitUntilFindFinished();
+    g_assert(test-&gt;m_textFound);
+
+    cairo_surface_t* highlightSurface = cairo_surface_reference(
+        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
+    g_assert(highlightSurface);
+    g_assert(!Test::cairoSurfacesEqual(originalSurface, highlightSurface));
+
+    WebKitFindController* findController = webkit_web_view_get_find_controller(test-&gt;m_webView);
+    webkit_find_controller_search_finish(findController);
+    webkit_web_view_execute_editing_command(test-&gt;m_webView, &quot;Unselect&quot;);
+
+    cairo_surface_t* unhighlightSurface = cairo_surface_reference(
+        test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE));
+    g_assert(unhighlightSurface);
+    g_assert(Test::cairoSurfacesEqual(originalSurface, unhighlightSurface));
+
+    cairo_surface_destroy(originalSurface);
+    cairo_surface_destroy(highlightSurface);
+    cairo_surface_destroy(unhighlightSurface);
+}
+
+static void testFindControllerInstance(FindControllerTest* test, gconstpointer)
+{
+    WebKitFindController* findController1 = webkit_web_view_get_find_controller(test-&gt;m_webView);
+    WebKitFindController* findController2 = webkit_web_view_get_find_controller(test-&gt;m_webView);
+
+    g_assert(findController1 == findController2);
+}
+
+static void testFindControllerGetters(FindControllerTest* test, gconstpointer)
+{
+    const char* searchText = &quot;testing&quot;;
+    guint maxMatchCount = 1;
+    guint32 findOptions = WEBKIT_FIND_OPTIONS_WRAP_AROUND | WEBKIT_FIND_OPTIONS_AT_WORD_STARTS;
+    WebKitFindController* findController = webkit_web_view_get_find_controller(test-&gt;m_webView);
+
+    webkit_find_controller_search(findController, searchText, findOptions, maxMatchCount);
+    g_assert(webkit_find_controller_get_web_view(findController) == test-&gt;m_webView);
+    g_assert(!g_strcmp0(webkit_find_controller_get_search_text(findController), searchText));
+    g_assert(webkit_find_controller_get_max_match_count(findController) == maxMatchCount);
+    g_assert(webkit_find_controller_get_options(findController) == findOptions);
+}
+
+void beforeAll()
+{
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;getters&quot;, testFindControllerGetters);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;instance&quot;, testFindControllerInstance);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;text-found&quot;, testFindControllerTextFound);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;text-not-found&quot;, testFindControllerTextNotFound);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;match-count&quot;, testFindControllerMatchCount);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;max-match-count&quot;, testFindControllerMaxMatchCount);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;next&quot;, testFindControllerNext);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;previous&quot;, testFindControllerPrevious);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;counted-matches&quot;, testFindControllerCountedMatches);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;options&quot;, testFindControllerOptions);
+    FindControllerTest::add(&quot;WebKitFindController&quot;, &quot;hide&quot;, testFindControllerHide);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitPolicyClientcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitPolicyClientcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,257 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;LoadTrackingTest.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+static WebKitTestServer* kServer;
+
+class PolicyClientTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(PolicyClientTest);
+
+    enum PolicyDecisionResponse {
+        Use,
+        Ignore,
+        Download,
+        None
+    };
+
+    PolicyClientTest()
+        : LoadTrackingTest()
+        , m_policyDecisionResponse(None)
+        , m_policyDecisionTypeFilter(0)
+        , m_respondToPolicyDecisionAsynchronously(false)
+        , m_haltMainLoopAfterMakingDecision(false)
+    {
+        g_signal_connect(m_webView, &quot;decide-policy&quot;, G_CALLBACK(decidePolicyCallback), this);
+    }
+
+    static gboolean quitMainLoopLater(GMainLoop* loop)
+    {
+        g_main_loop_quit(loop);
+        return FALSE;
+    }
+
+    static void respondToPolicyDecision(PolicyClientTest* test, WebKitPolicyDecision* decision)
+    {
+        switch (test-&gt;m_policyDecisionResponse) {
+        case Use:
+            webkit_policy_decision_use(decision);
+            break;
+        case Ignore:
+            webkit_policy_decision_ignore(decision);
+            break;
+        case Download:
+            webkit_policy_decision_download(decision);
+            break;
+        case None:
+            break;
+        }
+
+        if (test-&gt;m_haltMainLoopAfterMakingDecision)
+            g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(quitMainLoopLater), test-&gt;m_mainLoop);
+    }
+
+    static gboolean respondToPolicyDecisionLater(PolicyClientTest* test)
+    {
+        respondToPolicyDecision(test, test-&gt;m_previousPolicyDecision.get());
+        test-&gt;m_previousPolicyDecision = 0;
+        return FALSE;
+    }
+
+    static gboolean decidePolicyCallback(WebKitWebView* webView, WebKitPolicyDecision* decision, WebKitPolicyDecisionType type, PolicyClientTest* test)
+    {
+        if (test-&gt;m_policyDecisionTypeFilter != type)
+            return FALSE;
+
+        test-&gt;m_previousPolicyDecision = decision;
+        if (test-&gt;m_respondToPolicyDecisionAsynchronously) {
+            g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(respondToPolicyDecisionLater), test);
+            return TRUE;
+        }
+
+        respondToPolicyDecision(test, decision);
+
+        // We return FALSE here to ensure that the default policy decision
+        // handler doesn't override whatever we use here.
+        return FALSE;
+    }
+
+    PolicyDecisionResponse m_policyDecisionResponse;
+    int m_policyDecisionTypeFilter;
+    bool m_respondToPolicyDecisionAsynchronously;
+    bool m_haltMainLoopAfterMakingDecision;
+    GRefPtr&lt;WebKitPolicyDecision&gt; m_previousPolicyDecision;
+};
+
+static void testNavigationPolicy(PolicyClientTest* test, gconstpointer)
+{
+    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION;
+
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
+    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+
+    // Ideally we'd like to have a more intensive test here, but it's still pretty tricky
+    // to trigger different types of navigations with the GTK+ WebKit2 API.
+    WebKitNavigationPolicyDecision* decision = WEBKIT_NAVIGATION_POLICY_DECISION(test-&gt;m_previousPolicyDecision.get());
+    g_assert_cmpint(webkit_navigation_policy_decision_get_navigation_type(decision), ==, WEBKIT_NAVIGATION_TYPE_OTHER);
+    g_assert_cmpint(webkit_navigation_policy_decision_get_mouse_button(decision), ==, 0);
+    g_assert_cmpint(webkit_navigation_policy_decision_get_modifiers(decision), ==, 0);
+    g_assert_cmpstr(webkit_navigation_policy_decision_get_frame_name(decision), ==, 0);
+    WebKitURIRequest* request = webkit_navigation_policy_decision_get_request(decision);
+    g_assert_cmpstr(webkit_uri_request_get_uri(request), ==, &quot;http://webkitgtk.org/&quot;);
+
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
+    test-&gt;m_respondToPolicyDecisionAsynchronously = true;
+    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+
+    // If we are waiting until load completion, it will never complete if we ignore the
+    // navigation. So we tell the main loop to quit sometime later.
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
+    test-&gt;m_respondToPolicyDecisionAsynchronously = false;
+    test-&gt;m_haltMainLoopAfterMakingDecision = true;
+    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 0);
+
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
+    test-&gt;loadHtml(&quot;&lt;html/&gt;&quot;, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 0);
+}
+
+static void testResponsePolicy(PolicyClientTest* test, gconstpointer)
+{
+    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_RESPONSE;
+
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+
+    test-&gt;m_respondToPolicyDecisionAsynchronously = true;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadCommitted);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+
+    test-&gt;m_respondToPolicyDecisionAsynchronously = false;
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert_cmpint(test-&gt;m_loadEvents.size(), ==, 3);
+    g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::ProvisionalLoadFailed);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
+}
+
+struct CreateCallbackData {
+    bool triedToOpenWindow;
+    GMainLoop* mainLoop;
+};
+
+static WebKitWebView* createCallback(WebKitWebView* webView, CreateCallbackData* data)
+{
+    data-&gt;triedToOpenWindow = true;
+    g_main_loop_quit(data-&gt;mainLoop);
+    return 0;
+}
+
+static void testNewWindowPolicy(PolicyClientTest* test, gconstpointer)
+{
+    static const char* windowOpeningHTML =
+        &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;    &lt;a id=\&quot;link\&quot; href=\&quot;http://www.google.com\&quot; target=\&quot;_blank\&quot;&gt;Link&lt;/a&gt;&quot;
+        &quot;    &lt;script&gt;&quot;
+        &quot;        var event = document.createEvent('MouseEvents');&quot;
+        &quot;        event.initEvent('click', true, false);&quot;
+        &quot;        document.getElementById('link').dispatchEvent(event);&quot;
+        &quot;    &lt;/script&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;m_policyDecisionTypeFilter = WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION;
+    webkit_settings_set_javascript_can_open_windows_automatically(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
+
+    CreateCallbackData data;
+    data.triedToOpenWindow = false;
+    data.mainLoop = test-&gt;m_mainLoop;
+
+    g_signal_connect(test-&gt;m_webView, &quot;create&quot;, G_CALLBACK(createCallback), &amp;data);
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Use;
+    test-&gt;loadHtml(windowOpeningHTML, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;wait(1);
+    g_assert(data.triedToOpenWindow);
+
+    WebKitNavigationPolicyDecision* decision = WEBKIT_NAVIGATION_POLICY_DECISION(test-&gt;m_previousPolicyDecision.get());
+    g_assert_cmpstr(webkit_navigation_policy_decision_get_frame_name(decision), ==, &quot;_blank&quot;);
+
+    // Using a short timeout is a bit ugly here, but it's hard to get around because if we block
+    // the new window signal we cannot halt the main loop in the create callback. If we
+    // halt the main loop in the policy decision, the create callback never executes.
+    data.triedToOpenWindow = false;
+    test-&gt;m_policyDecisionResponse = PolicyClientTest::Ignore;
+    test-&gt;loadHtml(windowOpeningHTML, &quot;http://webkitgtk.org/&quot;);
+    test-&gt;wait(.2);
+    g_assert(!data.triedToOpenWindow);
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/&quot;)) {
+        static const char* responseString = &quot;&lt;html&gt;&lt;body&gt;Testing!&lt;/body&gt;&lt;/html&gt;&quot;;
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, responseString, strlen(responseString));
+        soup_message_body_complete(message-&gt;response_body);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;navigation-policy&quot;, testNavigationPolicy);
+    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;response-policy&quot;, testResponsePolicy);
+    PolicyClientTest::add(&quot;WebKitPolicyClient&quot;, &quot;new-window-policy&quot;, testNewWindowPolicy);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitSettingscppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitSettingscpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,356 @@
</span><ins>+/*
+ * Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, 
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, 
+ * this list of conditions and the following disclaimer in the documentation and/or 
+ * other materials provided with the distribution.
+ *
+ * Neither the name of Motorola Mobility, Inc. nor the names of its contributors may 
+ * be used to endorse or promote products derived from this software without 
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;TestMain.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static WebKitTestServer* gServer;
+
+static void testWebKitSettings(Test*, gconstpointer)
+{
+    WebKitSettings* settings = webkit_settings_new();
+
+    // JavaScript is enabled by default.
+    g_assert(webkit_settings_get_enable_javascript(settings));
+    webkit_settings_set_enable_javascript(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_javascript(settings));
+
+    // By default auto-load-image is true.
+    g_assert(webkit_settings_get_auto_load_images(settings));
+    webkit_settings_set_auto_load_images(settings, FALSE);
+    g_assert(!webkit_settings_get_auto_load_images(settings));
+
+    // load-icons-ignoring-image-load-setting is false by default.
+    g_assert(!webkit_settings_get_load_icons_ignoring_image_load_setting(settings));
+    webkit_settings_set_load_icons_ignoring_image_load_setting(settings, TRUE);
+    g_assert(webkit_settings_get_load_icons_ignoring_image_load_setting(settings));
+    
+    // Offline application cache is true by default.
+    g_assert(webkit_settings_get_enable_offline_web_application_cache(settings));
+    webkit_settings_set_enable_offline_web_application_cache(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_offline_web_application_cache(settings));
+
+    // Local storage is enable by default.
+    g_assert(webkit_settings_get_enable_html5_local_storage(settings));
+    webkit_settings_set_enable_html5_local_storage(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_html5_local_storage(settings));
+
+    // HTML5 database is enabled by default.
+    g_assert(webkit_settings_get_enable_html5_database(settings));
+    webkit_settings_set_enable_html5_database(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_html5_database(settings));
+
+    // XSS Auditor is enabled by default.
+    g_assert(webkit_settings_get_enable_xss_auditor(settings));
+    webkit_settings_set_enable_xss_auditor(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_xss_auditor(settings));
+
+    // Frame flattening is disabled by default.
+    g_assert(!webkit_settings_get_enable_frame_flattening(settings));
+    webkit_settings_set_enable_frame_flattening(settings, TRUE);
+    g_assert(webkit_settings_get_enable_frame_flattening(settings));
+
+    // Plugins are enabled by default.
+    g_assert(webkit_settings_get_enable_plugins(settings));
+    webkit_settings_set_enable_plugins(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_plugins(settings));
+
+    // Java is enabled by default.
+    g_assert(webkit_settings_get_enable_java(settings));
+    webkit_settings_set_enable_java(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_java(settings));
+
+    // By default, JavaScript can open windows automatically is disabled.
+    g_assert(!webkit_settings_get_javascript_can_open_windows_automatically(settings));
+    webkit_settings_set_javascript_can_open_windows_automatically(settings, TRUE);
+    g_assert(webkit_settings_get_javascript_can_open_windows_automatically(settings));
+
+    // By default hyper link auditing is disabled.
+    g_assert(!webkit_settings_get_enable_hyperlink_auditing(settings));
+    webkit_settings_set_enable_hyperlink_auditing(settings, TRUE);
+    g_assert(webkit_settings_get_enable_hyperlink_auditing(settings));
+
+    // Default font family is &quot;sans-serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_default_font_family(settings), ==, &quot;sans-serif&quot;);
+    webkit_settings_set_default_font_family(settings, &quot;monospace&quot;);
+    g_assert_cmpstr(webkit_settings_get_default_font_family(settings), ==, &quot;monospace&quot;);
+
+    // Default monospace font family font family is &quot;monospace&quot;.
+    g_assert_cmpstr(webkit_settings_get_monospace_font_family(settings), ==, &quot;monospace&quot;);
+    webkit_settings_set_monospace_font_family(settings, &quot;sans-serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_monospace_font_family(settings), ==, &quot;sans-serif&quot;);
+
+    // Default serif font family is &quot;serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_serif_font_family(settings), ==, &quot;serif&quot;);
+    webkit_settings_set_serif_font_family(settings, &quot;sans-serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_serif_font_family(settings), ==, &quot;sans-serif&quot;);
+
+    // Default sans serif font family is &quot;sans-serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_sans_serif_font_family(settings), ==, &quot;sans-serif&quot;);
+    webkit_settings_set_sans_serif_font_family(settings, &quot;serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_sans_serif_font_family(settings), ==, &quot;serif&quot;);
+
+    // Default cursive font family &quot;serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_cursive_font_family(settings), ==, &quot;serif&quot;);
+    webkit_settings_set_cursive_font_family(settings, &quot;sans-serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_cursive_font_family(settings), ==, &quot;sans-serif&quot;);
+
+    // Default fantasy font family is &quot;serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_fantasy_font_family(settings), ==, &quot;serif&quot;);
+    webkit_settings_set_fantasy_font_family(settings, &quot;sans-serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_fantasy_font_family(settings), ==, &quot;sans-serif&quot;);
+
+    // Default pictograph font family is &quot;serif&quot;.
+    g_assert_cmpstr(webkit_settings_get_pictograph_font_family(settings), ==, &quot;serif&quot;);
+    webkit_settings_set_pictograph_font_family(settings, &quot;sans-serif&quot;);
+    g_assert_cmpstr(webkit_settings_get_pictograph_font_family(settings), ==, &quot;sans-serif&quot;);
+
+    // Default font size is 16.
+    g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 16);
+    webkit_settings_set_default_font_size(settings, 14);
+    g_assert_cmpuint(webkit_settings_get_default_font_size(settings), ==, 14);
+
+    // Default monospace font size is 13.
+    g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 13);
+    webkit_settings_set_default_monospace_font_size(settings, 10);
+    g_assert_cmpuint(webkit_settings_get_default_monospace_font_size(settings), ==, 10);
+
+    // Default minimum font size is 0.
+    g_assert_cmpuint(webkit_settings_get_minimum_font_size(settings), ==, 0);
+    webkit_settings_set_minimum_font_size(settings, 7);
+    g_assert_cmpuint(webkit_settings_get_minimum_font_size(settings), ==, 7);
+
+    // Default charset is &quot;iso-8859-1&quot;.
+    g_assert_cmpstr(webkit_settings_get_default_charset(settings), ==, &quot;iso-8859-1&quot;);
+    webkit_settings_set_default_charset(settings, &quot;utf8&quot;);
+    g_assert_cmpstr(webkit_settings_get_default_charset(settings), ==, &quot;utf8&quot;);
+
+    g_assert(!webkit_settings_get_enable_private_browsing(settings));
+    webkit_settings_set_enable_private_browsing(settings, TRUE);
+    g_assert(webkit_settings_get_enable_private_browsing(settings));
+
+    g_assert(!webkit_settings_get_enable_developer_extras(settings));
+    webkit_settings_set_enable_developer_extras(settings, TRUE);
+    g_assert(webkit_settings_get_enable_developer_extras(settings));
+
+    g_assert(webkit_settings_get_enable_resizable_text_areas(settings));
+    webkit_settings_set_enable_resizable_text_areas(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_resizable_text_areas(settings));
+
+    g_assert(webkit_settings_get_enable_tabs_to_links(settings));
+    webkit_settings_set_enable_tabs_to_links(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_tabs_to_links(settings));
+
+    g_assert(!webkit_settings_get_enable_dns_prefetching(settings));
+    webkit_settings_set_enable_dns_prefetching(settings, TRUE);
+    g_assert(webkit_settings_get_enable_dns_prefetching(settings));
+
+    // Caret browsing is disabled by default.
+    g_assert(!webkit_settings_get_enable_caret_browsing(settings));
+    webkit_settings_set_enable_caret_browsing(settings, TRUE);
+    g_assert(webkit_settings_get_enable_caret_browsing(settings));
+
+    // Fullscreen JavaScript API is disabled by default.
+    g_assert(!webkit_settings_get_enable_fullscreen(settings));
+    webkit_settings_set_enable_fullscreen(settings, TRUE);
+    g_assert(webkit_settings_get_enable_fullscreen(settings));
+
+    // Print backgrounds is enabled by default
+    g_assert(webkit_settings_get_print_backgrounds(settings));
+    webkit_settings_set_print_backgrounds(settings, FALSE);
+    g_assert(!webkit_settings_get_print_backgrounds(settings));
+
+    // WebAudio is disabled by default.
+    g_assert(!webkit_settings_get_enable_webaudio(settings));
+    webkit_settings_set_enable_webaudio(settings, TRUE);
+    g_assert(webkit_settings_get_enable_webaudio(settings));
+
+    // WebGL is disabled by default.
+    g_assert(!webkit_settings_get_enable_webgl(settings));
+    webkit_settings_set_enable_webgl(settings, TRUE);
+    g_assert(webkit_settings_get_enable_webgl(settings));
+
+    // Allow Modal Dialogs is disabled by default.
+    g_assert(!webkit_settings_get_allow_modal_dialogs(settings));
+    webkit_settings_set_allow_modal_dialogs(settings, TRUE);
+    g_assert(webkit_settings_get_allow_modal_dialogs(settings));
+
+    // Zoom text only is disabled by default.
+    g_assert(!webkit_settings_get_zoom_text_only(settings));
+    webkit_settings_set_zoom_text_only(settings, TRUE);
+    g_assert(webkit_settings_get_zoom_text_only(settings));
+
+    // By default, JavaScript cannot access the clipboard.
+    g_assert(!webkit_settings_get_javascript_can_access_clipboard(settings));
+    webkit_settings_set_javascript_can_access_clipboard(settings, TRUE);
+    g_assert(webkit_settings_get_javascript_can_access_clipboard(settings));
+
+    // By default, media playback doesn't require user gestures.
+    g_assert(!webkit_settings_get_media_playback_requires_user_gesture(settings));
+    webkit_settings_set_media_playback_requires_user_gesture(settings, TRUE);
+    g_assert(webkit_settings_get_media_playback_requires_user_gesture(settings));
+
+    // By default, inline media playback is allowed
+    g_assert(webkit_settings_get_media_playback_allows_inline(settings));
+    webkit_settings_set_media_playback_allows_inline(settings, FALSE);
+    g_assert(!webkit_settings_get_media_playback_allows_inline(settings));
+
+    // By default, debug indicators are disabled.
+    g_assert(!webkit_settings_get_draw_compositing_indicators(settings));
+    webkit_settings_set_draw_compositing_indicators(settings, TRUE);
+    g_assert(webkit_settings_get_draw_compositing_indicators(settings));
+
+    // By default, site specific quirks are disabled.
+    g_assert(!webkit_settings_get_enable_site_specific_quirks(settings));
+    webkit_settings_set_enable_site_specific_quirks(settings, TRUE);
+    g_assert(webkit_settings_get_enable_site_specific_quirks(settings));
+
+    // By default, page cache is enabled.
+    g_assert(webkit_settings_get_enable_page_cache(settings));
+    webkit_settings_set_enable_page_cache(settings, FALSE);
+    g_assert(!webkit_settings_get_enable_page_cache(settings));
+
+    // By default, smooth scrolling is disabled.
+    g_assert(!webkit_settings_get_enable_smooth_scrolling(settings));
+    webkit_settings_set_enable_smooth_scrolling(settings, TRUE);
+    g_assert(webkit_settings_get_enable_smooth_scrolling(settings));
+
+    // By default, accelerated 2D canvas is disabled.
+    g_assert(!webkit_settings_get_enable_accelerated_2d_canvas(settings));
+    webkit_settings_set_enable_accelerated_2d_canvas(settings, TRUE);
+    g_assert(webkit_settings_get_enable_accelerated_2d_canvas(settings));
+
+    // By default, writing of console messages to stdout is disabled.
+    g_assert(!webkit_settings_get_enable_write_console_messages_to_stdout(settings));
+    webkit_settings_set_enable_write_console_messages_to_stdout(settings, TRUE);
+    g_assert(webkit_settings_get_enable_write_console_messages_to_stdout(settings));
+
+    g_object_unref(G_OBJECT(settings));
+}
+
+void testWebKitSettingsNewWithSettings(Test* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitSettings&gt; settings = adoptGRef(webkit_settings_new_with_settings(
+        &quot;enable-javascript&quot;, FALSE,
+        &quot;auto-load-images&quot;, FALSE,
+        &quot;load-icons-ignoring-image-load-setting&quot;, TRUE,
+        nullptr));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(settings.get()));
+    g_assert(!webkit_settings_get_enable_javascript(settings.get()));
+    g_assert(!webkit_settings_get_auto_load_images(settings.get()));
+    g_assert(webkit_settings_get_load_icons_ignoring_image_load_setting(settings.get()));
+}
+
+static CString convertWebViewMainResourceDataToCString(WebViewTest* test)
+{
+    size_t mainResourceDataSize = 0;
+    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    return CString(mainResourceData, mainResourceDataSize);
+}
+
+static void assertThatUserAgentIsSentInHeaders(WebViewTest* test, const CString&amp; userAgent)
+{
+    test-&gt;loadURI(gServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    ASSERT_CMP_CSTRING(convertWebViewMainResourceDataToCString(test), ==, userAgent);
+}
+
+static void testWebKitSettingsUserAgent(WebViewTest* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitSettings&gt; settings = adoptGRef(webkit_settings_new());
+    CString defaultUserAgent = webkit_settings_get_user_agent(settings.get());
+    webkit_web_view_set_settings(test-&gt;m_webView, settings.get());
+
+    g_assert(g_strstr_len(defaultUserAgent.data(), -1, &quot;AppleWebKit&quot;));
+    g_assert(g_strstr_len(defaultUserAgent.data(), -1, &quot;Safari&quot;));
+
+    webkit_settings_set_user_agent(settings.get(), 0);
+    g_assert_cmpstr(defaultUserAgent.data(), ==, webkit_settings_get_user_agent(settings.get()));
+    assertThatUserAgentIsSentInHeaders(test, defaultUserAgent.data());
+
+    webkit_settings_set_user_agent(settings.get(), &quot;&quot;);
+    g_assert_cmpstr(defaultUserAgent.data(), ==, webkit_settings_get_user_agent(settings.get()));
+
+    const char* funkyUserAgent = &quot;Funky!&quot;;
+    webkit_settings_set_user_agent(settings.get(), funkyUserAgent);
+    g_assert_cmpstr(funkyUserAgent, ==, webkit_settings_get_user_agent(settings.get()));
+    assertThatUserAgentIsSentInHeaders(test, funkyUserAgent);
+
+    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebKitGTK+&quot;, 0);
+    const char* userAgentWithNullVersion = webkit_settings_get_user_agent(settings.get());
+    g_assert_cmpstr(g_strstr_len(userAgentWithNullVersion, -1, defaultUserAgent.data()), ==, userAgentWithNullVersion);
+    g_assert(g_strstr_len(userAgentWithNullVersion, -1, &quot;WebKitGTK+&quot;));
+
+    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebKitGTK+&quot;, &quot;&quot;);
+    g_assert_cmpstr(webkit_settings_get_user_agent(settings.get()), ==, userAgentWithNullVersion);
+
+    webkit_settings_set_user_agent_with_application_details(settings.get(), &quot;WebCatGTK+&quot;, &quot;3.4.5&quot;);
+    const char* newUserAgent = webkit_settings_get_user_agent(settings.get());
+    g_assert(g_strstr_len(newUserAgent, -1, &quot;3.4.5&quot;));
+    g_assert(g_strstr_len(newUserAgent, -1, &quot;WebCatGTK+&quot;));
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/&quot;)) {
+        const char* userAgent = soup_message_headers_get_one(message-&gt;request_headers, &quot;User-Agent&quot;);
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, userAgent, strlen(userAgent));
+        soup_message_body_complete(message-&gt;response_body);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+}
+
+void beforeAll()
+{
+    gServer = new WebKitTestServer();
+    gServer-&gt;run(serverCallback);
+
+    Test::add(&quot;WebKitSettings&quot;, &quot;webkit-settings&quot;, testWebKitSettings);
+    Test::add(&quot;WebKitSettings&quot;, &quot;new-with-settings&quot;, testWebKitSettingsNewWithSettings);
+    WebViewTest::add(&quot;WebKitSettings&quot;, &quot;user-agent&quot;, testWebKitSettingsUserAgent);
+}
+
+void afterAll()
+{
+    delete gServer;
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitVersioncppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitVersioncpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitVersion.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitVersion.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;TestMain.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+
+
+static void testWebKitVersion(Test*, gconstpointer)
+{
+    g_assert_cmpuint(webkit_get_major_version(), ==, WEBKIT_MAJOR_VERSION);
+    g_assert_cmpuint(webkit_get_minor_version(), ==, WEBKIT_MINOR_VERSION);
+    g_assert_cmpuint(webkit_get_micro_version(), ==, WEBKIT_MICRO_VERSION);
+}
+
+static void testWebKitCheckVersion(Test*, gconstpointer)
+{
+    g_assert(WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION));
+    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION + 1, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION));
+    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION + 1, WEBKIT_MICRO_VERSION));
+    g_assert(!WEBKIT_CHECK_VERSION(WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION + 1));
+}
+
+void beforeAll()
+{
+    Test::add(&quot;WebKitVersion&quot;, &quot;version&quot;, testWebKitVersion);
+    Test::add(&quot;WebKitVersion&quot;, &quot;check-version&quot;, testWebKitCheckVersion);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebContextcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebContextcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,425 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;LoadTrackingTest.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+
+static WebKitTestServer* kServer;
+
+static void testWebContextDefault(Test* test, gconstpointer)
+{
+    // Check there's a single instance of the default web context.
+    g_assert(webkit_web_context_get_default() == webkit_web_context_get_default());
+}
+
+class PluginsTest: public Test {
+public:
+    MAKE_GLIB_TEST_FIXTURE(PluginsTest);
+
+    PluginsTest()
+        : m_context(webkit_web_context_get_default())
+        , m_mainLoop(g_main_loop_new(0, TRUE))
+        , m_plugins(0)
+    {
+        webkit_web_context_set_additional_plugins_directory(m_context, WEBKIT_TEST_PLUGIN_DIR);
+    }
+
+    ~PluginsTest()
+    {
+        g_main_loop_unref(m_mainLoop);
+        g_list_free_full(m_plugins, g_object_unref);
+    }
+
+    static void getPluginsAsyncReadyCallback(GObject*, GAsyncResult* result, PluginsTest* test)
+    {
+        test-&gt;m_plugins = webkit_web_context_get_plugins_finish(test-&gt;m_context, result, 0);
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    GList* getPlugins()
+    {
+        g_list_free_full(m_plugins, g_object_unref);
+        webkit_web_context_get_plugins(m_context, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(getPluginsAsyncReadyCallback), this);
+        g_main_loop_run(m_mainLoop);
+        return m_plugins;
+    }
+
+    WebKitWebContext* m_context;
+    GMainLoop* m_mainLoop;
+    GList* m_plugins;
+};
+
+static void testWebContextGetPlugins(PluginsTest* test, gconstpointer)
+{
+    GList* plugins = test-&gt;getPlugins();
+    g_assert(plugins);
+
+    GRefPtr&lt;WebKitPlugin&gt; testPlugin;
+    for (GList* item = plugins; item; item = g_list_next(item)) {
+        WebKitPlugin* plugin = WEBKIT_PLUGIN(item-&gt;data);
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(plugin));
+        if (!g_strcmp0(webkit_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;)) {
+            testPlugin = plugin;
+            break;
+        }
+    }
+    g_assert(WEBKIT_IS_PLUGIN(testPlugin.get()));
+
+    GOwnPtr&lt;char&gt; pluginPath(g_build_filename(WEBKIT_TEST_PLUGIN_DIR, &quot;libtestnetscapeplugin.so&quot;, NULL));
+    g_assert_cmpstr(webkit_plugin_get_path(testPlugin.get()), ==, pluginPath.get());
+    g_assert_cmpstr(webkit_plugin_get_description(testPlugin.get()), ==, &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;);
+    GList* mimeInfoList = webkit_plugin_get_mime_info_list(testPlugin.get());
+    g_assert(mimeInfoList);
+    g_assert_cmpuint(g_list_length(mimeInfoList), ==, 2);
+
+    WebKitMimeInfo* mimeInfo = static_cast&lt;WebKitMimeInfo*&gt;(mimeInfoList-&gt;data);
+    g_assert_cmpstr(webkit_mime_info_get_mime_type(mimeInfo), ==, &quot;image/png&quot;);
+    g_assert_cmpstr(webkit_mime_info_get_description(mimeInfo), ==, &quot;png image&quot;);
+    const gchar* const* extensions = webkit_mime_info_get_extensions(mimeInfo);
+    g_assert(extensions);
+    g_assert_cmpstr(extensions[0], ==, &quot;png&quot;);
+
+    mimeInfoList = g_list_next(mimeInfoList);
+    mimeInfo = static_cast&lt;WebKitMimeInfo*&gt;(mimeInfoList-&gt;data);
+    g_assert_cmpstr(webkit_mime_info_get_mime_type(mimeInfo), ==, &quot;application/x-webkit-test-netscape&quot;);
+    g_assert_cmpstr(webkit_mime_info_get_description(mimeInfo), ==, &quot;test netscape content&quot;);
+    extensions = webkit_mime_info_get_extensions(mimeInfo);
+    g_assert(extensions);
+    g_assert_cmpstr(extensions[0], ==, &quot;testnetscape&quot;);
+}
+
+static const char* kBarHTML = &quot;&lt;html&gt;&lt;body&gt;Bar&lt;/body&gt;&lt;/html&gt;&quot;;
+static const char* kEchoHTMLFormat = &quot;&lt;html&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;&quot;;
+static const char* errorDomain = &quot;test&quot;;
+static const int errorCode = 10;
+static const char* errorMessage = &quot;Error message.&quot;;
+
+class URISchemeTest: public LoadTrackingTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(URISchemeTest);
+
+    struct URISchemeHandler {
+        URISchemeHandler()
+            : replyLength(0)
+        {
+        }
+
+        URISchemeHandler(const char* reply, int replyLength, const char* mimeType)
+            : reply(reply)
+            , replyLength(replyLength)
+            , mimeType(mimeType)
+        {
+        }
+
+        CString reply;
+        int replyLength;
+        CString mimeType;
+    };
+
+    static void uriSchemeRequestCallback(WebKitURISchemeRequest* request, gpointer userData)
+    {
+        URISchemeTest* test = static_cast&lt;URISchemeTest*&gt;(userData);
+        test-&gt;m_uriSchemeRequest = request;
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+
+        g_assert(webkit_uri_scheme_request_get_web_view(request) == test-&gt;m_webView);
+
+        GRefPtr&lt;GInputStream&gt; inputStream = adoptGRef(g_memory_input_stream_new());
+        test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(inputStream.get()));
+
+        const char* scheme = webkit_uri_scheme_request_get_scheme(request);
+        g_assert(scheme);
+        g_assert(test-&gt;m_handlersMap.contains(String::fromUTF8(scheme)));
+
+        if (!g_strcmp0(scheme, &quot;error&quot;)) {
+            GOwnPtr&lt;GError&gt; error(g_error_new_literal(g_quark_from_string(errorDomain), errorCode, errorMessage));
+            webkit_uri_scheme_request_finish_error(request, error.get());
+            return;
+        }
+
+        const URISchemeHandler&amp; handler = test-&gt;m_handlersMap.get(String::fromUTF8(scheme));
+
+        if (!g_strcmp0(scheme, &quot;echo&quot;)) {
+            char* replyHTML = g_strdup_printf(handler.reply.data(), webkit_uri_scheme_request_get_path(request));
+            g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(inputStream.get()), replyHTML, strlen(replyHTML), g_free);
+        } else if (!g_strcmp0(scheme, &quot;closed&quot;))
+            g_input_stream_close(inputStream.get(), 0, 0);
+        else if (!handler.reply.isNull())
+            g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(inputStream.get()), handler.reply.data(), handler.reply.length(), 0);
+
+        webkit_uri_scheme_request_finish(request, inputStream.get(), handler.replyLength, handler.mimeType.data());
+    }
+
+    void registerURISchemeHandler(const char* scheme, const char* reply, int replyLength, const char* mimeType)
+    {
+        m_handlersMap.set(String::fromUTF8(scheme), URISchemeHandler(reply, replyLength, mimeType));
+        webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), scheme, uriSchemeRequestCallback, this, 0);
+    }
+
+    GRefPtr&lt;WebKitURISchemeRequest&gt; m_uriSchemeRequest;
+    HashMap&lt;String, URISchemeHandler&gt; m_handlersMap;
+};
+
+static void testWebContextURIScheme(URISchemeTest* test, gconstpointer)
+{
+    test-&gt;registerURISchemeHandler(&quot;foo&quot;, kBarHTML, strlen(kBarHTML), &quot;text/html&quot;);
+    test-&gt;loadURI(&quot;foo:blank&quot;);
+    test-&gt;waitUntilLoadFinished();
+    size_t mainResourceDataSize = 0;
+    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpint(mainResourceDataSize, ==, strlen(kBarHTML));
+    g_assert(!strncmp(mainResourceData, kBarHTML, mainResourceDataSize));
+
+    test-&gt;registerURISchemeHandler(&quot;echo&quot;, kEchoHTMLFormat, -1, &quot;text/html&quot;);
+    test-&gt;loadURI(&quot;echo:hello world&quot;);
+    test-&gt;waitUntilLoadFinished();
+    GOwnPtr&lt;char&gt; echoHTML(g_strdup_printf(kEchoHTMLFormat, webkit_uri_scheme_request_get_path(test-&gt;m_uriSchemeRequest.get())));
+    mainResourceDataSize = 0;
+    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpint(mainResourceDataSize, ==, strlen(echoHTML.get()));
+    g_assert(!strncmp(mainResourceData, echoHTML.get(), mainResourceDataSize));
+
+    test-&gt;registerURISchemeHandler(&quot;nomime&quot;, kBarHTML, -1, 0);
+    test-&gt;m_loadEvents.clear();
+    test-&gt;loadURI(&quot;nomime:foo bar&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
+
+    test-&gt;registerURISchemeHandler(&quot;empty&quot;, 0, 0, &quot;text/html&quot;);
+    test-&gt;m_loadEvents.clear();
+    test-&gt;loadURI(&quot;empty:nothing&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
+    g_assert(!test-&gt;m_loadEvents.contains(LoadTrackingTest::LoadFailed));
+
+    test-&gt;registerURISchemeHandler(&quot;error&quot;, 0, 0, 0);
+    test-&gt;m_loadEvents.clear();
+    test-&gt;loadURI(&quot;error:error&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
+    g_assert(test-&gt;m_loadFailed);
+    g_assert_error(test-&gt;m_error.get(), g_quark_from_string(errorDomain), errorCode);
+    g_assert_cmpstr(test-&gt;m_error-&gt;message, ==, errorMessage);
+
+    test-&gt;registerURISchemeHandler(&quot;closed&quot;, 0, 0, 0);
+    test-&gt;m_loadEvents.clear();
+    test-&gt;loadURI(&quot;closed:input-stream&quot;);
+    test-&gt;waitUntilLoadFinished();
+    g_assert(test-&gt;m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));
+    g_assert(test-&gt;m_loadFailed);
+    g_assert_error(test-&gt;m_error.get(), G_IO_ERROR, G_IO_ERROR_CLOSED);
+}
+
+static void testWebContextSpellChecker(Test* test, gconstpointer)
+{
+    WebKitWebContext* webContext = webkit_web_context_get_default();
+
+    // Check what happens if no spell checking language has been set.
+    const gchar* const* currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
+    g_assert(!currentLanguage);
+
+    // Set the language to a specific one.
+    GRefPtr&lt;GPtrArray&gt; languages = adoptGRef(g_ptr_array_new());
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en_US&quot;)));
+    g_ptr_array_add(languages.get(), 0);
+    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
+    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
+    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 1);
+    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
+
+    // Set the language string to list of valid languages.
+    g_ptr_array_remove_index_fast(languages.get(), languages-&gt;len - 1);
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en_GB&quot;)));
+    g_ptr_array_add(languages.get(), 0);
+    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
+    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
+    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 2);
+    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
+    g_assert_cmpstr(currentLanguage[1], ==, &quot;en_GB&quot;);
+
+    // Try passing a wrong language along with good ones.
+    g_ptr_array_remove_index_fast(languages.get(), languages-&gt;len - 1);
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;bd_WR&quot;)));
+    g_ptr_array_add(languages.get(), 0);
+    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
+    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
+    g_assert_cmpuint(g_strv_length(const_cast&lt;char**&gt;(currentLanguage)), ==, 2);
+    g_assert_cmpstr(currentLanguage[0], ==, &quot;en_US&quot;);
+    g_assert_cmpstr(currentLanguage[1], ==, &quot;en_GB&quot;);
+
+    // Try passing a list with only wrong languages.
+    languages = adoptGRef(g_ptr_array_new());
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;bd_WR&quot;)));
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;wr_BD&quot;)));
+    g_ptr_array_add(languages.get(), 0);
+    webkit_web_context_set_spell_checking_languages(webContext, reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
+    currentLanguage = webkit_web_context_get_spell_checking_languages(webContext);
+    g_assert(!currentLanguage);
+
+    // Check disabling and re-enabling spell checking.
+    webkit_web_context_set_spell_checking_enabled(webContext, FALSE);
+    g_assert(!webkit_web_context_get_spell_checking_enabled(webContext));
+    webkit_web_context_set_spell_checking_enabled(webContext, TRUE);
+    g_assert(webkit_web_context_get_spell_checking_enabled(webContext));
+}
+
+static void testWebContextLanguages(WebViewTest* test, gconstpointer)
+{
+    static const char* expectedDefaultLanguage = &quot;en&quot;;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    size_t mainResourceDataSize = 0;
+    const char* mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpuint(mainResourceDataSize, ==, strlen(expectedDefaultLanguage));
+    g_assert(!strncmp(mainResourceData, expectedDefaultLanguage, mainResourceDataSize));
+
+    GRefPtr&lt;GPtrArray&gt; languages = adoptGRef(g_ptr_array_new());
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;en&quot;)));
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;ES_es&quot;)));
+    g_ptr_array_add(languages.get(), const_cast&lt;gpointer&gt;(static_cast&lt;const void*&gt;(&quot;dE&quot;)));
+    g_ptr_array_add(languages.get(), 0);
+    webkit_web_context_set_preferred_languages(webkit_web_context_get_default(), reinterpret_cast&lt;const char* const*&gt;(languages-&gt;pdata));
+
+    static const char* expectedLanguages = &quot;en, es-es;q=0.90, de;q=0.80&quot;;
+    test-&gt;loadURI(kServer-&gt;getURIForPath(&quot;/&quot;).data());
+    test-&gt;waitUntilLoadFinished();
+    mainResourceDataSize = 0;
+    mainResourceData = test-&gt;mainResourceData(mainResourceDataSize);
+    g_assert_cmpuint(mainResourceDataSize, ==, strlen(expectedLanguages));
+    g_assert(!strncmp(mainResourceData, expectedLanguages, mainResourceDataSize));
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    if (g_str_equal(path, &quot;/&quot;)) {
+        const char* acceptLanguage = soup_message_headers_get_one(message-&gt;request_headers, &quot;Accept-Language&quot;);
+        soup_message_set_status(message, SOUP_STATUS_OK);
+        soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_COPY, acceptLanguage, strlen(acceptLanguage));
+        soup_message_body_complete(message-&gt;response_body);
+    } else
+        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+}
+
+class SecurityPolicyTest: public Test {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SecurityPolicyTest);
+
+    enum SecurityPolicy {
+        Local = 1 &lt;&lt; 1,
+        NoAccess = 1 &lt;&lt; 2,
+        DisplayIsolated = 1 &lt;&lt; 3,
+        Secure = 1 &lt;&lt; 4,
+        CORSEnabled = 1 &lt;&lt; 5,
+        EmptyDocument = 1 &lt;&lt; 6
+    };
+
+    SecurityPolicyTest()
+        : m_manager(webkit_web_context_get_security_manager(webkit_web_context_get_default()))
+    {
+    }
+
+    void verifyThatSchemeMatchesPolicy(const char* scheme, unsigned policy)
+    {
+        if (policy &amp; Local)
+            g_assert(webkit_security_manager_uri_scheme_is_local(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_local(m_manager, scheme));
+        if (policy &amp; NoAccess)
+            g_assert(webkit_security_manager_uri_scheme_is_no_access(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_no_access(m_manager, scheme));
+        if (policy &amp; DisplayIsolated)
+            g_assert(webkit_security_manager_uri_scheme_is_display_isolated(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_display_isolated(m_manager, scheme));
+        if (policy &amp; Secure)
+            g_assert(webkit_security_manager_uri_scheme_is_secure(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_secure(m_manager, scheme));
+        if (policy &amp; CORSEnabled)
+            g_assert(webkit_security_manager_uri_scheme_is_cors_enabled(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_cors_enabled(m_manager, scheme));
+        if (policy &amp; EmptyDocument)
+            g_assert(webkit_security_manager_uri_scheme_is_empty_document(m_manager, scheme));
+        else
+            g_assert(!webkit_security_manager_uri_scheme_is_empty_document(m_manager, scheme));
+    }
+
+    WebKitSecurityManager* m_manager;
+};
+
+static void testWebContextSecurityPolicy(SecurityPolicyTest* test, gconstpointer)
+{
+    // VerifyThatSchemeMatchesPolicy default policy for well known schemes.
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;http&quot;, SecurityPolicyTest::CORSEnabled);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;https&quot;, SecurityPolicyTest::CORSEnabled | SecurityPolicyTest::Secure);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;file&quot;, SecurityPolicyTest::Local);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;data&quot;, SecurityPolicyTest::NoAccess | SecurityPolicyTest::Secure);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;about&quot;, SecurityPolicyTest::NoAccess | SecurityPolicyTest::Secure | SecurityPolicyTest::EmptyDocument);
+
+    // Custom scheme.
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, 0);
+
+    webkit_security_manager_register_uri_scheme_as_local(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local);
+    webkit_security_manager_register_uri_scheme_as_no_access(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess);
+    webkit_security_manager_register_uri_scheme_as_display_isolated(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated);
+    webkit_security_manager_register_uri_scheme_as_secure(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure);
+    webkit_security_manager_register_uri_scheme_as_cors_enabled(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure
+        | SecurityPolicyTest::CORSEnabled);
+    webkit_security_manager_register_uri_scheme_as_empty_document(test-&gt;m_manager, &quot;foo&quot;);
+    test-&gt;verifyThatSchemeMatchesPolicy(&quot;foo&quot;, SecurityPolicyTest::Local | SecurityPolicyTest::NoAccess | SecurityPolicyTest::DisplayIsolated | SecurityPolicyTest::Secure
+        | SecurityPolicyTest::CORSEnabled | SecurityPolicyTest::EmptyDocument);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    Test::add(&quot;WebKitWebContext&quot;, &quot;default-context&quot;, testWebContextDefault);
+    PluginsTest::add(&quot;WebKitWebContext&quot;, &quot;get-plugins&quot;, testWebContextGetPlugins);
+    URISchemeTest::add(&quot;WebKitWebContext&quot;, &quot;uri-scheme&quot;, testWebContextURIScheme);
+    Test::add(&quot;WebKitWebContext&quot;, &quot;spell-checker&quot;, testWebContextSpellChecker);
+    WebViewTest::add(&quot;WebKitWebContext&quot;, &quot;languages&quot;, testWebContextLanguages);
+    SecurityPolicyTest::add(&quot;WebKitSecurityManager&quot;, &quot;security-policy&quot;, testWebContextSecurityPolicy);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,608 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;JavaScriptCore/JSStringRef.h&gt;
+#include &lt;JavaScriptCore/JSValueRef.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static void testWebViewDefaultContext(WebViewTest* test, gconstpointer)
+{
+    g_assert(webkit_web_view_get_context(test-&gt;m_webView) == webkit_web_context_get_default());
+
+    // Check that a web view created with g_object_new has the default context.
+    GRefPtr&lt;WebKitWebView&gt; webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, NULL));
+    g_assert(webkit_web_view_get_context(webView.get()) == webkit_web_context_get_default());
+}
+
+static void testWebViewCustomCharset(WebViewTest* test, gconstpointer)
+{
+    g_assert(!webkit_web_view_get_custom_charset(test-&gt;m_webView));
+    webkit_web_view_set_custom_charset(test-&gt;m_webView, &quot;utf8&quot;);
+    g_assert_cmpstr(webkit_web_view_get_custom_charset(test-&gt;m_webView), ==, &quot;utf8&quot;);
+    // Go back to the default charset.
+    webkit_web_view_set_custom_charset(test-&gt;m_webView, 0);
+    g_assert(!webkit_web_view_get_custom_charset(test-&gt;m_webView));
+}
+
+static void testWebViewSettings(WebViewTest* test, gconstpointer)
+{
+    WebKitSettings* defaultSettings = webkit_web_view_get_settings(test-&gt;m_webView);
+    g_assert(defaultSettings);
+    g_assert(webkit_settings_get_enable_javascript(defaultSettings));
+
+    GRefPtr&lt;WebKitSettings&gt; newSettings = adoptGRef(webkit_settings_new());
+    g_object_set(G_OBJECT(newSettings.get()), &quot;enable-javascript&quot;, FALSE, NULL);
+    webkit_web_view_set_settings(test-&gt;m_webView, newSettings.get());
+
+    WebKitSettings* settings = webkit_web_view_get_settings(test-&gt;m_webView);
+    g_assert(settings != defaultSettings);
+    g_assert(!webkit_settings_get_enable_javascript(settings));
+
+    GRefPtr&lt;GtkWidget&gt; webView2 = webkit_web_view_new();
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(webView2.get()));
+    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), settings);
+    g_assert(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get())) == settings);
+
+    GRefPtr&lt;WebKitSettings&gt; newSettings2 = adoptGRef(webkit_settings_new());
+    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView2.get()), newSettings2.get());
+    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView2.get()));
+    g_assert(settings == newSettings2.get());
+    g_assert(webkit_settings_get_enable_javascript(settings));
+}
+
+static void testWebViewZoomLevel(WebViewTest* test, gconstpointer)
+{
+    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 1);
+    webkit_web_view_set_zoom_level(test-&gt;m_webView, 2.5);
+    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 2.5);
+
+    webkit_settings_set_zoom_text_only(webkit_web_view_get_settings(test-&gt;m_webView), TRUE);
+    // The zoom level shouldn't change when zoom-text-only setting changes.
+    g_assert_cmpfloat(webkit_web_view_get_zoom_level(test-&gt;m_webView), ==, 2.5);
+}
+
+static void testWebViewRunJavaScript(WebViewTest* test, gconstpointer)
+{
+    static const char* html = &quot;&lt;html&gt;&lt;body&gt;&lt;a id='WebKitLink' href='http://www.webkitgtk.org/' title='WebKitGTK+ Title'&gt;WebKitGTK+ Website&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(html, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    GOwnPtr&lt;GError&gt; error;
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').title;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Title&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').href;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;http://www.webkitgtk.org/&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.getElementById('WebKitLink').textContent&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Website&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = 25;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert_cmpfloat(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 25);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = 2.5;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert_cmpfloat(WebViewTest::javascriptResultToNumber(javascriptResult), ==, 2.5);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = true&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = false&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult));
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;a = null&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(WebViewTest::javascriptResultIsNull(javascriptResult));
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;function Foo() { a = 25; } Foo();&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(WebViewTest::javascriptResultIsUndefined(javascriptResult));
+
+    javascriptResult = test-&gt;runJavaScriptFromGResourceAndWaitUntilFinished(&quot;/org/webkit/webkit2gtk/tests/link-title.js&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;WebKitGTK+ Title&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptFromGResourceAndWaitUntilFinished(&quot;/wrong/path/to/resource.js&quot;, &amp;error.outPtr());
+    g_assert(!javascriptResult);
+    g_assert_error(error.get(), G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
+    error.clear();
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;foo();&quot;, &amp;error.outPtr());
+    g_assert(!javascriptResult);
+    g_assert_error(error.get(), WEBKIT_JAVASCRIPT_ERROR, WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED);
+}
+
+class FullScreenClientTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(FullScreenClientTest);
+
+    enum FullScreenEvent {
+        None,
+        Enter,
+        Leave
+    };
+
+    static gboolean viewEnterFullScreenCallback(WebKitWebView*, FullScreenClientTest* test)
+    {
+        test-&gt;m_event = Enter;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+        return FALSE;
+    }
+
+    static gboolean viewLeaveFullScreenCallback(WebKitWebView*, FullScreenClientTest* test)
+    {
+        test-&gt;m_event = Leave;
+        g_main_loop_quit(test-&gt;m_mainLoop);
+        return FALSE;
+    }
+
+    FullScreenClientTest()
+        : m_event(None)
+    {
+        webkit_settings_set_enable_fullscreen(webkit_web_view_get_settings(m_webView), TRUE);
+        g_signal_connect(m_webView, &quot;enter-fullscreen&quot;, G_CALLBACK(viewEnterFullScreenCallback), this);
+        g_signal_connect(m_webView, &quot;leave-fullscreen&quot;, G_CALLBACK(viewLeaveFullScreenCallback), this);
+    }
+
+    ~FullScreenClientTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void requestFullScreenAndWaitUntilEnteredFullScreen()
+    {
+        m_event = None;
+        webkit_web_view_run_javascript(m_webView, &quot;document.documentElement.webkitRequestFullScreen();&quot;, 0, 0, 0);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    static gboolean leaveFullScreenIdle(FullScreenClientTest* test)
+    {
+        test-&gt;keyStroke(GDK_KEY_Escape);
+        return FALSE;
+    }
+
+    void leaveFullScreenAndWaitUntilLeftFullScreen()
+    {
+        m_event = None;
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(leaveFullScreenIdle), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    FullScreenEvent m_event;
+};
+
+static void testWebViewFullScreen(FullScreenClientTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;FullScreen test&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+    test-&gt;requestFullScreenAndWaitUntilEnteredFullScreen();
+    g_assert_cmpint(test-&gt;m_event, ==, FullScreenClientTest::Enter);
+    test-&gt;leaveFullScreenAndWaitUntilLeftFullScreen();
+    g_assert_cmpint(test-&gt;m_event, ==, FullScreenClientTest::Leave);
+}
+
+static void testWebViewCanShowMIMEType(WebViewTest* test, gconstpointer)
+{
+    // Supported MIME types.
+    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/html&quot;));
+    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/plain&quot;));
+    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;image/jpeg&quot;));
+
+    // Unsupported MIME types.
+    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;text/vcard&quot;));
+    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/pdf&quot;));
+    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/zip&quot;));
+    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/octet-stream&quot;));
+
+    // Plugins are only supported when enabled.
+    webkit_web_context_set_additional_plugins_directory(webkit_web_view_get_context(test-&gt;m_webView), WEBKIT_TEST_PLUGIN_DIR);
+    g_assert(webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/x-webkit-test-netscape&quot;));
+    webkit_settings_set_enable_plugins(webkit_web_view_get_settings(test-&gt;m_webView), FALSE);
+    g_assert(!webkit_web_view_can_show_mime_type(test-&gt;m_webView, &quot;application/x-webkit-test-netscape&quot;));
+}
+
+class FormClientTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(FormClientTest);
+
+    static void submitFormCallback(WebKitWebView*, WebKitFormSubmissionRequest* request, FormClientTest* test)
+    {
+        test-&gt;submitForm(request);
+    }
+
+    FormClientTest()
+        : m_submitPositionX(0)
+        , m_submitPositionY(0)
+    {
+        g_signal_connect(m_webView, &quot;submit-form&quot;, G_CALLBACK(submitFormCallback), this);
+    }
+
+    ~FormClientTest()
+    {
+        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+    }
+
+    void submitForm(WebKitFormSubmissionRequest* request)
+    {
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
+        m_request = request;
+        webkit_form_submission_request_submit(request);
+        quitMainLoop();
+    }
+
+    GHashTable* waitUntilFormSubmittedAndGetTextFields()
+    {
+        g_main_loop_run(m_mainLoop);
+        return webkit_form_submission_request_get_text_fields(m_request.get());
+    }
+
+    static gboolean doClickIdleCallback(FormClientTest* test)
+    {
+        test-&gt;clickMouseButton(test-&gt;m_submitPositionX, test-&gt;m_submitPositionY, 1);
+        return FALSE;
+    }
+
+    void submitFormAtPosition(int x, int y)
+    {
+        m_submitPositionX = x;
+        m_submitPositionY = y;
+        g_idle_add(reinterpret_cast&lt;GSourceFunc&gt;(doClickIdleCallback), this);
+    }
+
+    int m_submitPositionX;
+    int m_submitPositionY;
+    GRefPtr&lt;WebKitFormSubmissionRequest&gt; m_request;
+};
+
+static void testWebViewSubmitForm(FormClientTest* test, gconstpointer)
+{
+    test-&gt;showInWindowAndWaitUntilMapped();
+
+    const char* formHTML =
+        &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot; &lt;form action='#'&gt;&quot;
+        &quot;  &lt;input type='text' name='text1' value='value1'&gt;&quot;
+        &quot;  &lt;input type='text' name='text2' value='value2'&gt;&quot;
+        &quot;  &lt;input type='password' name='password' value='secret'&gt;&quot;
+        &quot;  &lt;textarea cols='5' rows='5' name='textarea'&gt;Text&lt;/textarea&gt;&quot;
+        &quot;  &lt;input type='hidden' name='hidden1' value='hidden1'&gt;&quot;
+        &quot;  &lt;input type='submit' value='Submit' style='position:absolute; left:1; top:1' size='10'&gt;&quot;
+        &quot; &lt;/form&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    test-&gt;loadHtml(formHTML, &quot;file:///&quot;);
+    test-&gt;waitUntilLoadFinished();
+
+    test-&gt;submitFormAtPosition(5, 5);
+    GHashTable* values = test-&gt;waitUntilFormSubmittedAndGetTextFields();
+    g_assert(values);
+    g_assert_cmpuint(g_hash_table_size(values), ==, 3);
+    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;text1&quot;)), ==, &quot;value1&quot;);
+    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;text2&quot;)), ==, &quot;value2&quot;);
+    g_assert_cmpstr(static_cast&lt;char*&gt;(g_hash_table_lookup(values, &quot;password&quot;)), ==, &quot;secret&quot;);
+}
+
+class SaveWebViewTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SaveWebViewTest);
+
+    SaveWebViewTest()
+        : m_tempDirectory(g_dir_make_tmp(&quot;WebKit2SaveViewTest-XXXXXX&quot;, 0))
+    {
+    }
+
+    ~SaveWebViewTest()
+    {
+        if (G_IS_FILE(m_file.get()))
+            g_file_delete(m_file.get(), 0, 0);
+
+        if (G_IS_INPUT_STREAM(m_inputStream.get()))
+            g_input_stream_close(m_inputStream.get(), 0, 0);
+
+        if (m_tempDirectory)
+            g_rmdir(m_tempDirectory.get());
+    }
+
+    static void webViewSavedToStreamCallback(GObject* object, GAsyncResult* result, SaveWebViewTest* test)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        test-&gt;m_inputStream = adoptGRef(webkit_web_view_save_finish(test-&gt;m_webView, result, &amp;error.outPtr()));
+        g_assert(G_IS_INPUT_STREAM(test-&gt;m_inputStream.get()));
+        g_assert(!error);
+
+        test-&gt;quitMainLoop();
+    }
+
+    static void webViewSavedToFileCallback(GObject* object, GAsyncResult* result, SaveWebViewTest* test)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        g_assert(webkit_web_view_save_to_file_finish(test-&gt;m_webView, result, &amp;error.outPtr()));
+        g_assert(!error);
+
+        test-&gt;quitMainLoop();
+    }
+
+    void saveAndWaitForStream()
+    {
+        webkit_web_view_save(m_webView, WEBKIT_SAVE_MODE_MHTML, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(webViewSavedToStreamCallback), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    void saveAndWaitForFile()
+    {
+        m_saveDestinationFilePath.set(g_build_filename(m_tempDirectory.get(), &quot;testWebViewSaveResult.mht&quot;, NULL));
+        m_file = adoptGRef(g_file_new_for_path(m_saveDestinationFilePath.get()));
+        webkit_web_view_save_to_file(m_webView, m_file.get(), WEBKIT_SAVE_MODE_MHTML, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(webViewSavedToFileCallback), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GOwnPtr&lt;char&gt; m_tempDirectory;
+    GOwnPtr&lt;char&gt; m_saveDestinationFilePath;
+    GRefPtr&lt;GInputStream&gt; m_inputStream;
+    GRefPtr&lt;GFile&gt; m_file;
+};
+
+static void testWebViewSave(SaveWebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&quot;
+        &quot;&lt;body&gt;&quot;
+        &quot;  &lt;p&gt;A paragraph with plain text&lt;/p&gt;&quot;
+        &quot;  &lt;p&gt;&quot;
+        &quot;    A red box: &lt;img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AYWDTMVwnSZnwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFklEQVQI12P8z8DAwMDAxMDAwMDAAAANHQEDK+mmyAAAAABJRU5ErkJggg=='&gt;&lt;/br&gt;&quot;
+        &quot;    A blue box: &lt;img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AYWDTMvBHhALQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFklEQVQI12Nk4PnPwMDAxMDAwMDAAAALrwEPPIs1pgAAAABJRU5ErkJggg=='&gt;&quot;
+        &quot;  &lt;/p&gt;&quot;
+        &quot;&lt;/body&gt;&quot;
+        &quot;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    // Write to a file and to an input stream.
+    test-&gt;saveAndWaitForFile();
+    test-&gt;saveAndWaitForStream();
+
+    // We should have exactly the same amount of bytes in the file
+    // than those coming from the GInputStream. We don't compare the
+    // strings read since the 'Date' field and the boundaries will be
+    // different on each case. MHTML functionality will be tested by
+    // Layout tests, so checking the amount of bytes is enough.
+    GOwnPtr&lt;GError&gt; error;
+    gchar buffer[512] = { 0 };
+    gssize readBytes = 0;
+    gssize totalBytesFromStream = 0;
+    while (readBytes = g_input_stream_read(test-&gt;m_inputStream.get(), &amp;buffer, 512, 0, &amp;error.outPtr())) {
+        g_assert(!error);
+        totalBytesFromStream += readBytes;
+    }
+
+    // Check that the file exists and that it contains the same amount of bytes.
+    GRefPtr&lt;GFileInfo&gt; fileInfo = adoptGRef(g_file_query_info(test-&gt;m_file.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE, static_cast&lt;GFileQueryInfoFlags&gt;(0), 0, 0));
+    g_assert_cmpint(g_file_info_get_size(fileInfo.get()), ==, totalBytesFromStream);
+}
+
+static void testWebViewMode(WebViewTest* test, gconstpointer)
+{
+    static const char* indexHTML = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Test Web View Mode&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    // Web mode.
+    g_assert_cmpuint(webkit_web_view_get_view_mode(test-&gt;m_webView), ==, WEBKIT_VIEW_MODE_WEB);
+    test-&gt;loadHtml(indexHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.body.textContent;&quot;, 0);
+    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;Test Web View Mode&quot;);
+
+    // Source mode.
+    webkit_web_view_set_view_mode(test-&gt;m_webView, WEBKIT_VIEW_MODE_SOURCE);
+    test-&gt;loadHtml(indexHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;window.document.body.textContent;&quot;, 0);
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, indexHTML);
+}
+
+// To test page visibility API. Currently only 'visible' and 'hidden' states are implemented fully in WebCore.
+// See also http://www.w3.org/TR/2011/WD-page-visibility-20110602/ and https://developers.google.com/chrome/whitepapers/pagevisibility
+static void testWebViewPageVisibility(WebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;title&gt;&lt;/title&gt;&quot;
+        &quot;&lt;body&gt;&lt;p&gt;Test Web Page Visibility&lt;/p&gt;&quot;
+        &quot;&lt;script&gt;&quot;
+        &quot;document.addEventListener(\&quot;visibilitychange\&quot;, onVisibilityChange, false);&quot;
+        &quot;function onVisibilityChange() {&quot;
+        &quot;    document.title = document.visibilityState;&quot;
+        &quot;}&quot;
+        &quot;&lt;/script&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;,
+        0);
+
+    // Wait untill the page is loaded. Initial visibility should be 'hidden'.
+    test-&gt;waitUntilLoadFinished();
+
+    GOwnPtr&lt;GError&gt; error;
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    GOwnPtr&lt;char&gt; valueString(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;hidden&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
+
+    // Show the page. The visibility should be updated to 'visible'.
+    test-&gt;showInWindow();
+    test-&gt;waitUntilTitleChanged();
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;visible&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(!WebViewTest::javascriptResultToBoolean(javascriptResult));
+
+    // Hide the page. The visibility should be updated to 'hidden'.
+    gtk_widget_hide(GTK_WIDGET(test-&gt;m_webView));
+    test-&gt;waitUntilTitleChanged();
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.visibilityState;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
+    g_assert_cmpstr(valueString.get(), ==, &quot;hidden&quot;);
+
+    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.hidden;&quot;, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+    g_assert(WebViewTest::javascriptResultToBoolean(javascriptResult));
+}
+
+class SnapshotWebViewTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(SnapshotWebViewTest);
+
+    static void onSnapshotCancelledReady(WebKitWebView* web_view, GAsyncResult* res, SnapshotWebViewTest* test)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        test-&gt;m_surface = webkit_web_view_get_snapshot_finish(web_view, res, &amp;error.outPtr());
+        g_assert(!test-&gt;m_surface);
+        g_assert_error(error.get(), G_IO_ERROR, G_IO_ERROR_CANCELLED);
+        test-&gt;quitMainLoop();
+    }
+
+    gboolean getSnapshotAndCancel()
+    {
+        if (m_surface)
+            cairo_surface_destroy(m_surface);
+        m_surface = 0;
+        GRefPtr&lt;GCancellable&gt; cancellable = adoptGRef(g_cancellable_new());
+        webkit_web_view_get_snapshot(m_webView, WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE, cancellable.get(), reinterpret_cast&lt;GAsyncReadyCallback&gt;(onSnapshotCancelledReady), this);
+        g_cancellable_cancel(cancellable.get());
+        g_main_loop_run(m_mainLoop);
+
+        return true;
+    }
+
+};
+
+static void testWebViewSnapshot(SnapshotWebViewTest* test, gconstpointer)
+{
+    test-&gt;loadHtml(&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Whatever&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    // WebView not visible.
+    cairo_surface_t* surface1 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
+    g_assert(!surface1);
+
+    // Show surface, resize to 50x50, try again.
+    test-&gt;showInWindowAndWaitUntilMapped();
+    test-&gt;resizeView(50, 50);
+    surface1 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
+    g_assert(surface1);
+
+    // obtained surface should be at the most 50x50. Store the size
+    // for comparison later.
+    int width = cairo_image_surface_get_width(surface1);
+    int height = cairo_image_surface_get_height(surface1);
+    g_assert_cmpint(width, &lt;=, 50);
+    g_assert_cmpint(height, &lt;=, 50);
+
+    // Select all text in the WebView, request a snapshot ignoring selection.
+    test-&gt;selectAll();
+    surface1 = cairo_surface_reference(test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE));
+    g_assert(surface1);
+    g_assert_cmpint(cairo_image_surface_get_width(surface1), ==, width);
+    g_assert_cmpint(cairo_image_surface_get_height(surface1), ==, height);
+
+    // Create identical surface.
+    cairo_surface_t* surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE);
+    g_assert(surface2);
+
+    // Compare these two, they should be identical.
+    g_assert(Test::cairoSurfacesEqual(surface1, surface2));
+
+    // Request a new snapshot, including the selection this time. The
+    // size should be the same but the result must be different to the
+    // one previously obtained.
+    surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING);
+    g_assert(surface2);
+    g_assert_cmpint(cairo_image_surface_get_width(surface2), ==, width);
+    g_assert_cmpint(cairo_image_surface_get_height(surface2), ==, height);
+    g_assert(!Test::cairoSurfacesEqual(surface1, surface2));
+
+    // Request a snapshot of the whole document in the WebView. The
+    // result should be different from the size obtained previously.
+    surface2 = test-&gt;getSnapshotAndWaitUntilReady(WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT, WEBKIT_SNAPSHOT_OPTIONS_NONE);
+    g_assert(surface2);
+    g_assert_cmpint(cairo_image_surface_get_width(surface2),  &gt;, width);
+    g_assert_cmpint(cairo_image_surface_get_height(surface2), &gt;, height);
+    g_assert(!Test::cairoSurfacesEqual(surface1, surface2));
+
+    cairo_surface_destroy(surface1);
+
+    g_assert(test-&gt;getSnapshotAndCancel());
+}
+
+void beforeAll()
+{
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;default-context&quot;, testWebViewDefaultContext);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;custom-charset&quot;, testWebViewCustomCharset);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;settings&quot;, testWebViewSettings);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;zoom-level&quot;, testWebViewZoomLevel);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;run-javascript&quot;, testWebViewRunJavaScript);
+    FullScreenClientTest::add(&quot;WebKitWebView&quot;, &quot;fullscreen&quot;, testWebViewFullScreen);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;can-show-mime-type&quot;, testWebViewCanShowMIMEType);
+    FormClientTest::add(&quot;WebKitWebView&quot;, &quot;submit-form&quot;, testWebViewSubmitForm);
+    SaveWebViewTest::add(&quot;WebKitWebView&quot;, &quot;save&quot;, testWebViewSave);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;view-mode&quot;, testWebViewMode);
+    SnapshotWebViewTest::add(&quot;WebKitWebView&quot;, &quot;snapshot&quot;, testWebViewSnapshot);
+    WebViewTest::add(&quot;WebKitWebView&quot;, &quot;page-visibility&quot;, testWebViewPageVisibility);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebKitWebViewGroupcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebKitWebViewGroupcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,206 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebKitTestServer.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;cstdarg&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+static WebKitTestServer* kServer;
+
+// These are all here so that they can be changed easily, if necessary.
+static const char* kStyleSheetHTML = &quot;&lt;html&gt;&lt;div id=\&quot;styledElement\&quot;&gt;Sweet stylez!&lt;/div&gt;&lt;/html&gt;&quot;;
+static const char* kInjectedStyleSheet = &quot;#styledElement { font-weight: bold; }&quot;;
+static const char* kStyleSheetTestScript = &quot;getComputedStyle(document.getElementById('styledElement'))['font-weight']&quot;;
+static const char* kStyleSheetTestScriptResult = &quot;bold&quot;;
+
+static void testWebViewGroupDefault(Test* test, gconstpointer)
+{
+    // Default group is shared by all WebViews by default.
+    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_assert(webkit_web_view_get_group(webView1.get()) == webkit_web_view_get_group(webView2.get()));
+
+    // Settings are shared by all web view in the same group.
+    g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_get_settings(webView2.get()));
+    g_assert(webkit_web_view_get_settings(webView1.get()) == webkit_web_view_group_get_settings(webkit_web_view_get_group(webView2.get())));
+}
+
+static void testWebViewGroupNewGroup(Test* test, gconstpointer)
+{
+    // Passing 0 as group name generates the name automatically.
+    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(0));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
+    g_assert(webkit_web_view_group_get_name(viewGroup1.get()));
+
+    // New group with a given name.
+    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup2 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup2&quot;));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup2.get()));
+    g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), ==, &quot;TestGroup2&quot;);
+    g_assert_cmpstr(webkit_web_view_group_get_name(viewGroup2.get()), !=, webkit_web_view_group_get_name(viewGroup1.get()));
+
+    // Every group has its own settings.
+    g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) != webkit_web_view_group_get_settings(viewGroup2.get()));
+}
+
+static void testWebViewNewWithGroup(Test* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup1&quot;));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
+    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
+    g_assert(webkit_web_view_get_group(webView1.get()) == viewGroup1.get());
+
+    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_assert(webkit_web_view_get_group(webView2.get()) != viewGroup1.get());
+
+    // Settings should be different for views in different groups.
+    g_assert(webkit_web_view_get_settings(webView1.get()) != webkit_web_view_get_settings(webView2.get()));
+}
+
+static void testWebViewGroupSettings(Test* test, gconstpointer)
+{
+    GRefPtr&lt;WebKitWebViewGroup&gt; viewGroup1 = adoptGRef(webkit_web_view_group_new(&quot;TestGroup1&quot;));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(viewGroup1.get()));
+    GRefPtr&lt;WebKitSettings&gt; newSettings = adoptGRef(webkit_settings_new_with_settings(&quot;enable-javascript&quot;, FALSE, nullptr));
+    test-&gt;assertObjectIsDeletedWhenTestFinishes(G_OBJECT(newSettings.get()));
+    webkit_web_view_group_set_settings(viewGroup1.get(), newSettings.get());
+    g_assert(webkit_web_view_group_get_settings(viewGroup1.get()) == newSettings.get());
+
+    GRefPtr&lt;WebKitWebView&gt; webView1 = WEBKIT_WEB_VIEW(webkit_web_view_new_with_group(viewGroup1.get()));
+    GRefPtr&lt;WebKitWebView&gt; webView2 = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    WebKitSettings* webView1Settings = webkit_web_view_get_settings(webView1.get());
+    WebKitSettings* webView2Settings = webkit_web_view_get_settings(webView2.get());
+    g_assert(webView1Settings != webView2Settings);
+    g_assert(webkit_settings_get_enable_javascript(webView1Settings) != webkit_settings_get_enable_javascript(webView2Settings));
+
+    webkit_web_view_set_settings(webView1.get(), webView2Settings);
+    g_assert(webkit_web_view_get_settings(webView1.get()) == webView2Settings);
+    g_assert(webkit_web_view_group_get_settings(webkit_web_view_get_group(webView1.get())) == webView2Settings);
+}
+
+static bool isStyleSheetInjectedForURLAtPath(WebViewTest* test, const char* path)
+{
+    test-&gt;loadURI(kServer-&gt;getURIForPath(path).data());
+    test-&gt;waitUntilLoadFinished();
+
+    GOwnPtr&lt;GError&gt; error;
+    WebKitJavascriptResult* javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(kStyleSheetTestScript, &amp;error.outPtr());
+    g_assert(javascriptResult);
+    g_assert(!error.get());
+
+    GOwnPtr&lt;char&gt; resultString(WebViewTest::javascriptResultToCString(javascriptResult));
+    return !g_strcmp0(resultString.get(), kStyleSheetTestScriptResult);
+}
+
+static void fillURLListFromPaths(char** list, const char* path, ...)
+{
+    va_list argumentList;
+    va_start(argumentList, path);
+
+    int i = 0;
+    while (path) {
+        // FIXME: We must use a wildcard for the host here until http://wkbug.com/112476 is fixed.
+        // Until that time patterns with port numbers in them will not properly match URLs with port numbers.
+        list[i++] = g_strdup_printf(&quot;http://*/%s*&quot;, path);
+        path = va_arg(argumentList, const char*);
+    }
+}
+
+static void removeOldInjectedStyleSheetsAndResetLists(WebKitWebViewGroup* group, char** whitelist, char** blacklist)
+{
+    webkit_web_view_group_remove_all_user_style_sheets(group);
+
+    while (*whitelist) {
+        g_free(*whitelist);
+        *whitelist = 0;
+        whitelist++;
+    }
+
+    while (*blacklist) {
+        g_free(*blacklist);
+        *blacklist = 0;
+        blacklist++;
+    }
+}
+
+static void testWebViewGroupInjectedStyleSheet(WebViewTest* test, gconstpointer)
+{
+    WebKitWebViewGroup* group = webkit_web_view_get_group(test-&gt;m_webView);
+    char* whitelist[3] = { 0, 0, 0 };
+    char* blacklist[3] = { 0, 0, 0 };
+
+    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
+
+    // Without a whitelist or a blacklist all URLs should have the injected style sheet.
+    static const char* randomPath = &quot;somerandompath&quot;;
+    g_assert(!isStyleSheetInjectedForURLAtPath(test, randomPath));
+    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, 0, 0, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
+    g_assert(isStyleSheetInjectedForURLAtPath(test, randomPath));
+
+    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
+
+    fillURLListFromPaths(blacklist, randomPath, 0);
+    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, 0, blacklist, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
+    g_assert(!isStyleSheetInjectedForURLAtPath(test, randomPath));
+    g_assert(isStyleSheetInjectedForURLAtPath(test, &quot;someotherrandompath&quot;));
+
+    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
+
+    static const char* inTheWhiteList = &quot;inthewhitelist&quot;;
+    static const char* notInWhitelist = &quot;notinthewhitelist&quot;;
+    static const char* inTheWhiteListAndBlackList = &quot;inthewhitelistandblacklist&quot;;
+
+    fillURLListFromPaths(whitelist, inTheWhiteList, inTheWhiteListAndBlackList, 0);
+    fillURLListFromPaths(blacklist, inTheWhiteListAndBlackList, 0);
+    webkit_web_view_group_add_user_style_sheet(group, kInjectedStyleSheet, 0, whitelist, blacklist, WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
+    g_assert(isStyleSheetInjectedForURLAtPath(test, inTheWhiteList));
+    g_assert(!isStyleSheetInjectedForURLAtPath(test, inTheWhiteListAndBlackList));
+    g_assert(!isStyleSheetInjectedForURLAtPath(test, notInWhitelist));
+
+    // It's important to clean up the environment before other tests.
+    removeOldInjectedStyleSheetsAndResetLists(group, whitelist, blacklist);
+}
+
+static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
+{
+    soup_message_set_status(message, SOUP_STATUS_OK);
+    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_STATIC, kStyleSheetHTML, strlen(kStyleSheetHTML));
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+void beforeAll()
+{
+    kServer = new WebKitTestServer();
+    kServer-&gt;run(serverCallback);
+
+    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;default-group&quot;, testWebViewGroupDefault);
+    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;new-group&quot;, testWebViewGroupNewGroup);
+    Test::add(&quot;WebKitWebView&quot;, &quot;new-with-group&quot;, testWebViewNewWithGroup);
+    Test::add(&quot;WebKitWebViewGroup&quot;, &quot;settings&quot;, testWebViewGroupSettings);
+    WebViewTest::add(&quot;WebKitWebViewGroup&quot;, &quot;injected-style-sheet&quot;, testWebViewGroupInjectedStyleSheet);
+}
+
+void afterAll()
+{
+    delete kServer;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkTestWebViewEditorcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestWebViewEditorcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestWebViewEditor.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,202 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+class EditorTest: public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(EditorTest);
+
+    static const unsigned kClipboardWaitTimeout = 50;
+    static const unsigned kClipboardWaitMaxTries = 2;
+
+    EditorTest()
+        : m_clipboard(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD))
+        , m_canExecuteEditingCommand(false)
+        , m_triesCount(0)
+    {
+        gtk_clipboard_clear(m_clipboard);
+    }
+
+    static void canExecuteEditingCommandReadyCallback(GObject*, GAsyncResult* result, EditorTest* test)
+    {
+        GOwnPtr&lt;GError&gt; error;
+        test-&gt;m_canExecuteEditingCommand = webkit_web_view_can_execute_editing_command_finish(test-&gt;m_webView, result, &amp;error.outPtr());
+        g_assert(!error.get());
+        g_main_loop_quit(test-&gt;m_mainLoop);
+    }
+
+    bool canExecuteEditingCommand(const char* command)
+    {
+        m_canExecuteEditingCommand = false;
+        webkit_web_view_can_execute_editing_command(m_webView, command, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(canExecuteEditingCommandReadyCallback), this);
+        g_main_loop_run(m_mainLoop);
+        return m_canExecuteEditingCommand;
+    }
+
+    static gboolean waitForClipboardText(EditorTest* test)
+    {
+        test-&gt;m_triesCount++;
+        if (gtk_clipboard_wait_is_text_available(test-&gt;m_clipboard) || test-&gt;m_triesCount &gt; kClipboardWaitMaxTries) {
+            g_main_loop_quit(test-&gt;m_mainLoop);
+            return FALSE;
+        }
+
+        return TRUE;
+    }
+
+    void copyClipboard()
+    {
+        webkit_web_view_execute_editing_command(m_webView, WEBKIT_EDITING_COMMAND_COPY);
+        // There's no way to know when the selection has been copied to
+        // the clipboard, so use a timeout source to query the clipboard.
+        m_triesCount = 0;
+        g_timeout_add(kClipboardWaitTimeout, reinterpret_cast&lt;GSourceFunc&gt;(waitForClipboardText), this);
+        g_main_loop_run(m_mainLoop);
+    }
+
+    GtkClipboard* m_clipboard;
+    bool m_canExecuteEditingCommand;
+    size_t m_triesCount;
+};
+
+static void testWebViewEditorCutCopyPasteNonEditable(EditorTest* test, gconstpointer)
+{
+    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;false\&quot;&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    // Nothing loaded yet.
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
+
+    test-&gt;loadHtml(selectedSpanHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
+    // It's not possible to cut and paste when content is not editable
+    // even if there's a selection.
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
+
+    test-&gt;copyClipboard();
+    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
+}
+
+static void testWebViewEditorCutCopyPasteEditable(EditorTest* test, gconstpointer)
+{
+    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;true\&quot;&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;document.getSelection().selectAllChildren(document.getElementById('mainspan'));\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    // Nothing loaded yet.
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
+    g_assert(!test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
+
+    test-&gt;loadHtml(selectedSpanHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    // There's a selection.
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_CUT));
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_COPY));
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_PASTE));
+
+    test-&gt;copyClipboard();
+    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
+}
+
+static void testWebViewEditorSelectAllNonEditable(EditorTest* test, gconstpointer)
+{
+    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;false\&quot;&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
+
+    test-&gt;loadHtml(selectedSpanHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
+
+    test-&gt;copyClipboard();
+    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+
+    // Initially only the subspan is selected.
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
+
+    webkit_web_view_execute_editing_command(test-&gt;m_webView, WEBKIT_EDITING_COMMAND_SELECT_ALL);
+    test-&gt;copyClipboard();
+    clipboardText.set(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+
+    // The mainspan should be selected after calling SELECT_ALL.
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
+}
+
+static void testWebViewEditorSelectAllEditable(EditorTest* test, gconstpointer)
+{
+    static const char* selectedSpanHTML = &quot;&lt;html&gt;&lt;body contentEditable=\&quot;true\&quot;&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span id=\&quot;subspan\&quot;&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;document.getSelection().selectAllChildren(document.getElementById('subspan'));\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
+
+    test-&gt;loadHtml(selectedSpanHTML, 0);
+    test-&gt;waitUntilLoadFinished();
+
+    g_assert(test-&gt;canExecuteEditingCommand(WEBKIT_EDITING_COMMAND_SELECT_ALL));
+
+    test-&gt;copyClipboard();
+    GOwnPtr&lt;char&gt; clipboardText(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+
+    // Initially only the subspan is selected.
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;make Jack a dull&quot;);
+
+    webkit_web_view_execute_editing_command(test-&gt;m_webView, WEBKIT_EDITING_COMMAND_SELECT_ALL);
+    test-&gt;copyClipboard();
+    clipboardText.set(gtk_clipboard_wait_for_text(test-&gt;m_clipboard));
+
+    // The mainspan should be selected after calling SELECT_ALL.
+    g_assert_cmpstr(clipboardText.get(), ==, &quot;All work and no play make Jack a dull boy.&quot;);
+}
+
+void beforeAll()
+{
+    EditorTest::add(&quot;WebKitWebView&quot;, &quot;cut-copy-paste/non-editable&quot;, testWebViewEditorCutCopyPasteNonEditable);
+    EditorTest::add(&quot;WebKitWebView&quot;, &quot;cut-copy-paste/editable&quot;, testWebViewEditorCutCopyPasteEditable);
+    EditorTest::add(&quot;WebKitWebView&quot;, &quot;select-all/non-editable&quot;, testWebViewEditorSelectAllNonEditable);
+    EditorTest::add(&quot;WebKitWebView&quot;, &quot;select-all/editable&quot;, testWebViewEditorSelectAllEditable);
+}
+
+void afterAll()
+{
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebExtensionTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebExtensionTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,266 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
+#include &lt;gio/gio.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit2/webkit-web-extension.h&gt;
+#include &lt;wtf/Deque.h&gt;
+#include &lt;wtf/OwnPtr.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+static const char introspectionXML[] =
+    &quot;&lt;node&gt;&quot;
+    &quot; &lt;interface name='org.webkit.gtk.WebExtensionTest'&gt;&quot;
+    &quot;  &lt;method name='GetTitle'&gt;&quot;
+    &quot;   &lt;arg type='t' name='pageID' direction='in'/&gt;&quot;
+    &quot;   &lt;arg type='s' name='title' direction='out'/&gt;&quot;
+    &quot;  &lt;/method&gt;&quot;
+    &quot;  &lt;method name='AbortProcess'&gt;&quot;
+    &quot;  &lt;/method&gt;&quot;
+    &quot;  &lt;method name='RunJavaScriptInIsolatedWorld'&gt;&quot;
+    &quot;   &lt;arg type='t' name='pageID' direction='in'/&gt;&quot;
+    &quot;   &lt;arg type='s' name='script' direction='in'/&gt;&quot;
+    &quot;  &lt;/method&gt;&quot;
+    &quot;  &lt;signal name='DocumentLoaded'/&gt;&quot;
+    &quot;  &lt;signal name='URIChanged'&gt;&quot;
+    &quot;   &lt;arg type='s' name='uri' direction='out'/&gt;&quot;
+    &quot;  &lt;/signal&gt;&quot;
+    &quot; &lt;/interface&gt;&quot;
+    &quot;&lt;/node&gt;&quot;;
+
+typedef enum {
+    DocumentLoadedSignal,
+    URIChangedSignal,
+} DelayedSignalType;
+
+struct DelayedSignal {
+    DelayedSignal(DelayedSignalType type)
+        : type(type)
+    {
+    }
+
+    DelayedSignal(DelayedSignalType type, const char* uri)
+        : type(type)
+        , uri(uri)
+    {
+    }
+
+    DelayedSignalType type;
+    CString uri;
+};
+
+Deque&lt;OwnPtr&lt;DelayedSignal&gt;&gt; delayedSignalsQueue;
+
+static void emitDocumentLoaded(GDBusConnection* connection)
+{
+    bool ok = g_dbus_connection_emit_signal(
+        connection,
+        0,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
+        &quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;DocumentLoaded&quot;,
+        0,
+        0);
+    g_assert(ok);
+}
+
+static void documentLoadedCallback(WebKitWebPage*, WebKitWebExtension* extension)
+{
+    gpointer data = g_object_get_data(G_OBJECT(extension), &quot;dbus-connection&quot;);
+    if (data)
+        emitDocumentLoaded(G_DBUS_CONNECTION(data));
+    else
+        delayedSignalsQueue.append(adoptPtr(new DelayedSignal(DocumentLoadedSignal)));
+}
+
+static void emitURIChanged(GDBusConnection* connection, const char* uri)
+{
+    bool ok = g_dbus_connection_emit_signal(
+        connection,
+        0,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
+        &quot;org.webkit.gtk.WebExtensionTest&quot;,
+        &quot;URIChanged&quot;,
+        g_variant_new(&quot;(s)&quot;, uri),
+        0);
+    g_assert(ok);
+}
+
+static void uriChangedCallback(WebKitWebPage* webPage, GParamSpec* pspec, WebKitWebExtension* extension)
+{
+    gpointer data = g_object_get_data(G_OBJECT(extension), &quot;dbus-connection&quot;);
+    if (data)
+        emitURIChanged(G_DBUS_CONNECTION(data), webkit_web_page_get_uri(webPage));
+    else
+        delayedSignalsQueue.append(adoptPtr(new DelayedSignal(URIChangedSignal, webkit_web_page_get_uri(webPage))));
+}
+
+static gboolean sendRequestCallback(WebKitWebPage*, WebKitURIRequest* request, WebKitURIResponse*, gpointer)
+{
+    const char* requestURI = webkit_uri_request_get_uri(request);
+    g_assert(requestURI);
+
+    if (const char* suffix = g_strrstr(requestURI, &quot;/remove-this/javascript.js&quot;)) {
+        GOwnPtr&lt;char&gt; prefix(g_strndup(requestURI, strlen(requestURI) - strlen(suffix)));
+        GOwnPtr&lt;char&gt; newURI(g_strdup_printf(&quot;%s/javascript.js&quot;, prefix.get()));
+        webkit_uri_request_set_uri(request, newURI.get());
+    } else if (g_str_has_suffix(requestURI, &quot;/add-do-not-track-header&quot;)) {
+        SoupMessageHeaders* headers = webkit_uri_request_get_http_headers(request);
+        g_assert(headers);
+        soup_message_headers_append(headers, &quot;DNT&quot;, &quot;1&quot;);
+    } else if (g_str_has_suffix(requestURI, &quot;/cancel-this.js&quot;))
+        return TRUE;
+
+    return FALSE;
+}
+
+static void pageCreatedCallback(WebKitWebExtension* extension, WebKitWebPage* webPage, gpointer)
+{
+    g_signal_connect(webPage, &quot;document-loaded&quot;, G_CALLBACK(documentLoadedCallback), extension);
+    g_signal_connect(webPage, &quot;notify::uri&quot;, G_CALLBACK(uriChangedCallback), extension);
+    g_signal_connect(webPage, &quot;send-request&quot;, G_CALLBACK(sendRequestCallback), 0);
+}
+
+static JSValueRef echoCallback(JSContextRef jsContext, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef*)
+{
+    if (argumentCount &lt;= 0)
+        return JSValueMakeUndefined(jsContext);
+
+    JSRetainPtr&lt;JSStringRef&gt; string(Adopt, JSValueToStringCopy(jsContext, arguments[0], 0));
+    return JSValueMakeString(jsContext, string.get());
+}
+
+static void windowObjectCleared(WebKitScriptWorld* world, WebKitWebPage* page, WebKitFrame* frame, gpointer)
+{
+    JSGlobalContextRef jsContext = webkit_frame_get_javascript_context_for_script_world(frame, world);
+    g_assert(jsContext);
+    JSObjectRef globalObject = JSContextGetGlobalObject(jsContext);
+    g_assert(globalObject);
+
+    JSRetainPtr&lt;JSStringRef&gt; functionName(Adopt, JSStringCreateWithUTF8CString(&quot;echo&quot;));
+    JSObjectRef function = JSObjectMakeFunctionWithCallback(jsContext, functionName.get(), echoCallback);
+    JSObjectSetProperty(jsContext, globalObject, functionName.get(), function, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly, 0);
+}
+
+static WebKitWebPage* getWebPage(WebKitWebExtension* extension, uint64_t pageID, GDBusMethodInvocation* invocation)
+{
+    WebKitWebPage* page = webkit_web_extension_get_page(extension, pageID);
+    if (!page) {
+        g_dbus_method_invocation_return_error(
+            invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
+            &quot;Invalid page ID: %&quot; G_GUINT64_FORMAT, pageID);
+        return 0;
+    }
+
+    g_assert_cmpuint(webkit_web_page_get_id(page), ==, pageID);
+    return page;
+}
+
+static void methodCallCallback(GDBusConnection* connection, const char* sender, const char* objectPath, const char* interfaceName, const char* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData)
+{
+    if (g_strcmp0(interfaceName, &quot;org.webkit.gtk.WebExtensionTest&quot;))
+        return;
+
+    if (!g_strcmp0(methodName, &quot;GetTitle&quot;)) {
+        uint64_t pageID;
+        g_variant_get(parameters, &quot;(t)&quot;, &amp;pageID);
+        WebKitWebPage* page = getWebPage(WEBKIT_WEB_EXTENSION(userData), pageID, invocation);
+        if (!page)
+            return;
+
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        GOwnPtr&lt;char&gt; title(webkit_dom_document_get_title(document));
+        g_dbus_method_invocation_return_value(invocation, g_variant_new(&quot;(s)&quot;, title.get()));
+    } else if (!g_strcmp0(methodName, &quot;RunJavaScriptInIsolatedWorld&quot;)) {
+        uint64_t pageID;
+        const char* script;
+        g_variant_get(parameters, &quot;(t&amp;s)&quot;, &amp;pageID, &amp;script);
+        WebKitWebPage* page = getWebPage(WEBKIT_WEB_EXTENSION(userData), pageID, invocation);
+        if (!page)
+            return;
+
+        GRefPtr&lt;WebKitScriptWorld&gt; world = adoptGRef(webkit_script_world_new());
+        g_assert(webkit_script_world_get_default() != world.get());
+        WebKitFrame* frame = webkit_web_page_get_main_frame(page);
+        JSGlobalContextRef jsContext = webkit_frame_get_javascript_context_for_script_world(frame, world.get());
+        JSRetainPtr&lt;JSStringRef&gt; jsScript(Adopt, JSStringCreateWithUTF8CString(script));
+        JSEvaluateScript(jsContext, jsScript.get(), 0, 0, 0, 0);
+        g_dbus_method_invocation_return_value(invocation, 0);
+    } else if (!g_strcmp0(methodName, &quot;AbortProcess&quot;))
+        abort();
+}
+
+static const GDBusInterfaceVTable interfaceVirtualTable = {
+    methodCallCallback, 0, 0, { 0, }
+};
+
+static void busAcquiredCallback(GDBusConnection* connection, const char* name, gpointer userData)
+{
+    static GDBusNodeInfo* introspectionData = 0;
+    if (!introspectionData)
+        introspectionData = g_dbus_node_info_new_for_xml(introspectionXML, 0);
+
+    GOwnPtr&lt;GError&gt; error;
+    unsigned registrationID = g_dbus_connection_register_object(
+        connection,
+        &quot;/org/webkit/gtk/WebExtensionTest&quot;,
+        introspectionData-&gt;interfaces[0],
+        &amp;interfaceVirtualTable,
+        g_object_ref(userData),
+        static_cast&lt;GDestroyNotify&gt;(g_object_unref),
+        &amp;error.outPtr());
+    if (!registrationID)
+        g_warning(&quot;Failed to register object: %s\n&quot;, error-&gt;message);
+
+    g_object_set_data(G_OBJECT(userData), &quot;dbus-connection&quot;, connection);
+    while (delayedSignalsQueue.size()) {
+        OwnPtr&lt;DelayedSignal&gt; delayedSignal = delayedSignalsQueue.takeFirst();
+        switch (delayedSignal-&gt;type) {
+        case DocumentLoadedSignal:
+            emitDocumentLoaded(connection);
+            break;
+        case URIChangedSignal:
+            emitURIChanged(connection, delayedSignal-&gt;uri.data());
+            break;
+        }
+    }
+}
+
+extern &quot;C&quot; void webkit_web_extension_initialize(WebKitWebExtension* extension)
+{
+    g_signal_connect(extension, &quot;page-created&quot;, G_CALLBACK(pageCreatedCallback), extension);
+    g_signal_connect(webkit_script_world_get_default(), &quot;window-object-cleared&quot;, G_CALLBACK(windowObjectCleared), 0);
+
+    g_bus_own_name(
+        G_BUS_TYPE_SESSION,
+        &quot;org.webkit.gtk.WebExtensionTest&quot;,
+        G_BUS_NAME_OWNER_FLAGS_NONE,
+        busAcquiredCallback,
+        0, 0,
+        g_object_ref(extension),
+        static_cast&lt;GDestroyNotify&gt;(g_object_unref));
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebProcessTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebProcessTest.h&quot;
+
+#include &lt;gio/gio.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+typedef HashMap&lt;String, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt;&gt; TestsMap;
+static TestsMap&amp; testsMap()
+{
+    DEFINE_STATIC_LOCAL(TestsMap, s_testsMap, ());
+    return s_testsMap;
+}
+
+void WebProcessTest::add(const String&amp; testName, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt; closure)
+{
+    testsMap().add(testName, closure);
+}
+
+PassOwnPtr&lt;WebProcessTest&gt; WebProcessTest::create(const String&amp; testName)
+{
+    g_assert(testsMap().contains(testName));
+    return testsMap().get(testName)();
+}
+
+static const char introspectionXML[] =
+    &quot;&lt;node&gt;&quot;
+    &quot; &lt;interface name='org.webkit.gtk.WebProcessTest'&gt;&quot;
+    &quot;  &lt;method name='RunTest'&gt;&quot;
+    &quot;   &lt;arg type='s' name='path' direction='in'/&gt;&quot;
+    &quot;   &lt;arg type='a{sv}' name='args' direction='in'/&gt;&quot;
+    &quot;   &lt;arg type='b' name='result' direction='out'/&gt;&quot;
+    &quot;  &lt;/method&gt;&quot;
+    &quot; &lt;/interface&gt;&quot;
+    &quot;&lt;/node&gt;&quot;;
+
+static void methodCallCallback(GDBusConnection* connection, const char* sender, const char* objectPath, const char* interfaceName, const char* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData)
+{
+    if (g_strcmp0(interfaceName, &quot;org.webkit.gtk.WebProcessTest&quot;))
+        return;
+
+    if (!g_strcmp0(methodName, &quot;RunTest&quot;)) {
+        const char* testPath;
+        GVariant* args;
+        g_variant_get(parameters, &quot;(&amp;s@a{sv})&quot;, &amp;testPath, &amp;args);
+        OwnPtr&lt;WebProcessTest&gt; test = WebProcessTest::create(String::fromUTF8(testPath));
+        bool result = test-&gt;runTest(g_strrstr(testPath, &quot;/&quot;) + 1, WEBKIT_WEB_EXTENSION(userData), args);
+        g_variant_unref(args);
+
+        g_dbus_method_invocation_return_value(invocation, g_variant_new(&quot;(b)&quot;, result));
+    } else
+        g_assert_not_reached();
+}
+
+static const GDBusInterfaceVTable interfaceVirtualTable = {
+    methodCallCallback, 0, 0, { 0, }
+};
+
+static void busAcquiredCallback(GDBusConnection* connection, const char* name, gpointer userData)
+{
+    static GDBusNodeInfo* introspectionData = 0;
+    if (!introspectionData)
+        introspectionData = g_dbus_node_info_new_for_xml(introspectionXML, 0);
+
+    GOwnPtr&lt;GError&gt; error;
+    unsigned registrationID = g_dbus_connection_register_object(
+        connection,
+        &quot;/org/webkit/gtk/WebProcessTest&quot;,
+        introspectionData-&gt;interfaces[0],
+        &amp;interfaceVirtualTable,
+        g_object_ref(userData),
+        static_cast&lt;GDestroyNotify&gt;(g_object_unref),
+        &amp;error.outPtr());
+    if (!registrationID)
+        g_warning(&quot;Failed to register object: %s\n&quot;, error-&gt;message);
+}
+
+extern &quot;C&quot; void webkit_web_extension_initialize(WebKitWebExtension* extension)
+{
+    g_bus_own_name(
+        G_BUS_TYPE_SESSION,
+        &quot;org.webkit.gtk.WebProcessTest&quot;,
+        G_BUS_NAME_OWNER_FLAGS_NONE,
+        busAcquiredCallback,
+        0, 0,
+        g_object_ref(extension),
+        static_cast&lt;GDestroyNotify&gt;(g_object_unref));
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2GtkWebProcessTesthfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTesth"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &lt;webkit2/webkit-web-extension.h&gt;
+#include &lt;wtf/Functional.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+class WebProcessTest {
+public:
+    virtual ~WebProcessTest() { }
+    virtual bool runTest(const char* testName, WebKitWebExtension*, GVariant* args) = 0;
+
+    static void add(const String&amp; testName, Function&lt;PassOwnPtr&lt;WebProcessTest&gt;()&gt;);
+    static PassOwnPtr&lt;WebProcessTest&gt; create(const String&amp; testName);
+};
+
+#define REGISTER_TEST(ClassName, TestName) \
+    WebProcessTest::add(String::fromUTF8(TestName), WTF::bind(&amp;ClassName::create))
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourceslinktitlejsfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceslinktitlejs"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/link-title.js) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+window.document.getElementById('WebKitLink').title;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourcestestcertpemfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestcertpem"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-cert.pem) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-cert.pem        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+-----BEGIN CERTIFICATE-----
+MIIB9jCCAV+gAwIBAgIJALeuXBo+vwz9MA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
+BAMMCTEyNy4wLjAuMTAeFw0xMjA3MTIxMjQ4MjRaFw0yMjA3MTAxMjQ4MjRaMBQx
+EjAQBgNVBAMMCTEyNy4wLjAuMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+0TUzOQxHBIKDD2mkuq+tU92mQvDZg73B0G+Nhr2T2G6MbcLqIwjg1QYtBZWJ83tZ
+xMMEfiweHLF85Z9ohavAgxJlKG7YmvZO79KkFpmjV2W5CVRm0eYMPnzmxNCoaYqo
+DLl0zsH6KZOLPKu/fX4eDX9XpAP1f83hWB1UFBmHKN8CAwEAAaNQME4wHQYDVR0O
+BBYEFDHv5ZQ1BdmhzTsDUEoY55EXyUdKMB8GA1UdIwQYMBaAFDHv5ZQ1BdmhzTsD
+UEoY55EXyUdKMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAh3qMBx7v
+jSodMf3OyTqTLE7deLnmnCeBVpgzxRZEoizcGqYcjiqO27i5N5Z6KVQsnITnLiyC
+mUtuR5KnF69uTKUw4m/ugZe5whjig5Mq2l410KVK6EeG4tdLlfXR+wi4U5K4KjP6
+p4nchQUXLa2zcbJn+VBexJn6/9wdhr+DUGY=
+-----END CERTIFICATE-----
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourcestestkeypemfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourcestestkeypem"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/test-key.pem) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/test-key.pem        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+-----BEGIN PRIVATE KEY-----
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANE1MzkMRwSCgw9p
+pLqvrVPdpkLw2YO9wdBvjYa9k9hujG3C6iMI4NUGLQWVifN7WcTDBH4sHhyxfOWf
+aIWrwIMSZShu2Jr2Tu/SpBaZo1dluQlUZtHmDD585sTQqGmKqAy5dM7B+imTizyr
+v31+Hg1/V6QD9X/N4VgdVBQZhyjfAgMBAAECgYB2QwOUsRsIMprRwJ9tJNfvO7G7
+z5i1/zOrlxPC4jHMPBnIBlICwgcOhLI4oOLdr5H8R12n0VqoT7DRwP396iwlJipF
+iO1heDMn/8z8LPGwkCK/+ck04rMDksxWIdMwYKBXt9ahnJ/xRLzQ1/3AJiAGnoe5
+/QLXQweofd4mmfsjKQJBAO2CwT7uMP6nMjXgtVMJq5QP8UbeCS1sEOPJJbHuDxJB
+/HePQHBjq4kzG6CL4oO7T+5fDv4g+fIIHzuXerZ0imsCQQDhfmiTIc9OucEIfg6/
+ms0JiKSmWc+qoiOCtrILuQvFoNwJRciQANqeJs6wpaDvevSUvBLGfG/7b3HvaE5X
+iqBdAkBEQIvp2qcHtuJN60oQF7pPrRknxUyb2e8sljQX4pJAK+gyL19ULMAxiBdL
+Vod8VYqNtJFpY+6Pp9fZ1xjzb6ALAkEA4JzrDAw0lQXA+3WduUw4ixOadr2ldyG0
+36KebcDwsfZO18m0Q4UmPz0Gy7zgN0wxzuochaw0W6+iPUiYKOlEXQJBAMWQrPlu
+rrinoZS2f8doJ9BNNUa+RNpMug6UXc55qoUJlyiXEh+tu4AaMOtxuGIyC0sAcuw6
+XdAPVPXKd7Mne70=
+-----END PRIVATE KEY-----
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKit2Gtkresourceswebkit2gtktestsgresourcexmlfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsresourceswebkit2gtktestsgresourcexml"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;gresources&gt;
+  &lt;gresource prefix=&quot;/org/webkit/webkit2gtk/tests/&quot;&gt;
+    &lt;file alias=&quot;link-title.js&quot;&gt;Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/link-title.js&lt;/file&gt;
+  &lt;/gresource&gt;
+&lt;/gresources&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcesblankicofromrev162335releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcesblankico"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/blank.ico) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/blank.ico        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+\xB0( \xFF\xFF\xFF
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestesthtmlfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesthtml"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.html) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
+&lt;body&gt;test&lt;/body&gt;
+&lt;/html&gt;&gt;&lt;/head&gt;
+&lt;body&gt;test&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestestoggfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestogg"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.ogg) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.ogg        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,341 @@
</span><ins>+OggSlrU,q\xA2vorbisD\xACq\xB8OggSlrD}g&gt;-\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFvorbisXiph.Org libVorbis I 20090709vorbis)BCV1L ŀАU`$)\x93fI)\xA5\x94\xA1(y\x98\x94HI)\xA5\x94\xC50\x89\x98\x94\x89\xC5c\x8C1\xC6c\x8C1\xC6c\x8C 4d\x80(        \x8E\xA3\xE6Ij\xCE9g'\x8Er\xA09iN8\xA7 \x8AQ\xE09        \xC2\xF5&amp;cn\xA6\xB4\xA6kn\xCE)% +Y@H!\x85RH!\x85b\x88!\x86b\x88!\x87r\xC8!\xA7\x9Cr
+*\xA8\xA0\x82
+2\xC8 \x83L2餓N:騣\x8E:\xEA(\xB4\xD0B -\xB4\xD2JL1\xD5Vc\xAE\xBD]|s\xCE9\xE7\x9Cs\xCE9\xE7\x9Cs\xCE        BCV BdB!\x85R\x88)\xA6\x98r
+2ȀАU \x80G\x91I\xB1˱\xCD\xD1$O\xF2,Q5\xD13ESTMUUUUu]Wve\xD7vu\xD7v}Y\x98\x85[\xB8}Y\xB8\x85[؅]\xF7\x85a\x86a\x86a\x86a\xF8}\xDF\xF7}\xDF\xF7} 4d \xA0#9\x96\xE3)\xA2&quot;\xA2\xE29\xA2\x84\x86\xACd         \x92&quot;)\x92\xA3I\xA6fj\xAEi\x9B\xB6h\xAB\xB6m˲,˲ \x84\x86\xAC\xA0i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9A\xA6i\x9AfY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY\x96eY@h\xC8*@@\xC7q\xC7q$ER$\xC7r, +Y\xC8@R,\xC5r4Gs4\xC7s&lt;\xC7s&lt;GtDɔL\xCD\xF4L +Y@1\xC5q\xC9\xD1$OR-\xD3r5Ws=\xD7sM\xD7u]WUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x81АU!\x9Df\x96j\x803\x90a 4d\x80\xA1C  +Y\x88\xA1\xE4 \x9AК\xF3\xCD9\x9A堩\x9B\xD3\xC1\x89T\x9B'\xB9\xA9\x98\x9Bs\xCE9\xE7\x9Cl\xCE\xE3\x9Cs\xCE)ʙŠ\x99Кs\xCEI \x9A\xA5\xA0\x99Кs\xCEy\x9B\xAD\xA9Қs\xCE\xE7\x9C\xC6a\x9Cs\xCEiҚ\xA9\xD9X\x9Bs\xCEYК樹\x9BsΉ\x94\x9B'\xB5\xB9T\x9Bs\xCE9\xE7\x9Cs\xCE9\xE7\x9CsΩ^\x9C\xCE\xC19\xE1\x9CsΉڛk\xB9        ]\x9Cs\xCE\xF9d\x9C\xEE\xCD        \xE1\x9Cs\xCE9\xE7\x9Cs\xCE9\xE7\x9Cs\xCE        BCV@a\xD8Ɲ\x82 }\x8Eb!\xA6!\x93t\x8F\x93\xA01\xC8)\xA4\x8D\x8EFJ\xA9\x83PR'\xA5t\x82АU \x84RH!\x85RH!\x85RH!\x86b\x88!\xA7\x9Cr
+*\xA8\xA4\x92\x8A*\xCA(\xB3\xCC2\xCB,\xB3\xCC2ˬ\xC3\xCE:\xEB\xB0\xC3C 1\xB4\xD2J,5\xD5Vc\x8D\xB5\xE6\x9Es\xAE9Hk\xA5\xB5\xD6Z+\xA5\x94RJ)\xA5 4d@ d\x90A\x85RH!\x86\x98r\xCA)\xA7\xA0\x82
+ +Y\xF0$\xCF\xD1\xD1\xD1\xD1\xCF\xF1Q%Q%\xD12-S3=UTUWvmY\x97u۷\x85]\xD8u\xDF\xD7}\xDF׍_\x86eY\x96eY\x96eY\x96eY\x96eY\x96e        BCV B!\x84RH!\x85\x94b\x8C1ǜ\x83NB        \x81АU \x80GqǑɑ$K\xB2$M\xD2,\xCD\xF24O\xF34\xD1EQ4MS]\xD1u\xD3eS6]\xD35e\xD3Ue\xD5veٶe[\xB7}Y\xB6}\xDF\xF7}\xDF\xF7}\xDF\xF7}\xDF\xF7}\xDF\xD7u 4d \xA0#9\x92&quot;)\x92&quot;9\x8E\xE3H\x92\x84\x86\xACd\xA0(\x8E\xE28\x8E#I\x92$Y\x92&amp;y\x96g\x89\x9A\xA9\x99\x9E驢
+\x84\x86\xAC\xA0h\x8A\xA7\x98\x8A\xA7\x88\x8A爎(\x89\x96i\x89\x9A\xAA\xB9\xA2lʮ뺮뺮뺮뺮뺮뺮뺮뺮뺮뺮뺮\xEB\xBA@h\xC8*@@Gr$Gr$ER$Er$ +Y\xC8\xC01CR$Dz,M\xF34O\xF34\xD1=\xD13=UtE +Y\xC0\x90 K\xB1\xCD\xD1$QR-\xD5R5\xD5R-UT=UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xD54M\xD34\x81А\x95䤦\xD4zb\x909\x89AhI\xC4\xC5\:霣\\x8C\x87\x90#FI\xED!S\xCC\xB5\x98\xD0I\x85\xD4\xE2ZjsT\x8B\x8D\xADdHA-\xB6\xC6R!\xE5\xA8BCV\xA1\xC7MKI\xD3M\xCD\xC0\xD14@=@EM4Q4QM\xD1T\xD14@E\xC03E@4UM4Q4QMQ5O4@E@4M@TMB\xA1!+\x808\x87\xE3@\x92 I\xF04\x80cY\xF0&lt;xL\xE0X&lt;\x9A\xD3@\xF24x&lt;\xA6        \x904\x9Eσi y&lt;\x9E\xD3H\x9Eσ\xE7\xC14\xF0L\xA6        фj&lt;ӄi\xC24a\xAA\x80\x80\x80\xCA@\xA1!+\x808\x87\xA3H8\x92dY\xA0H\x92e\x80eY\x9E\x92ey\x80\x80\x80\xCA@\xA1!+\x80(\x87\xA2Xp\xCB\x8EcY@\x92, `YMx@\x80\x80\x804%(4d%\xE0p\xCB\xD24Q\xE48\x96\xA5i\xA2\xC8q,K\xD3D\x91ei\x9A\xA6\x89&quot;4K\xD3D\x9E\xE7y\xA6        \xCF\xF3&lt;ӄ(\x8A\xA2iQ4M6hJ,Ph\xC8J $\xC0\xE18\x96\xE5y\xA2(\x8A\xA6i\x9A\xAA\xCAq,\xCB\xF3DQMSU]\x97\xE3X\x96牢(\x9A\xA6\xAA\xBA.\xCB\xD24\xCFEQ4MUu]h\x9A牢(\x9A\xA6\xAA\xBA.4MM\xD34UUU]\x9A扦i\x9A\xAA\xAA\xAA\xAE \xCFE\xD34MUu]\xD7\xA2h\x9A\xA6\xA9\xAA\xAE\xEB\xBA@M\xD34U\xD5u]\x88\xA2h\x9A\xA6\xAA\xBA\xAE\xEB\xD34MUU]וe\x80i\xAA\xAA\xAA\xBA\xAE,TUU]וe\xA0\xAA\xAA꺮+\xCB\xD7u]ٕeYຮ+˲,\xE0\xC0 \xC0:ɨ\xB2M\xB8\xF0\xB2&quot;\x88\x8CaJ1\xA5 cB
+\xA1aLBH!dRR*)\xA5
+B*%\x95RAH\xA5\xA4R2J-\xA5\x96R!\x95\x92J\xA9 \xA4RR)\x808\x80X\x85\x86\xAC\xF2c\x94b\xCC9\xE7$BJ1\xE6\x9Cs!\xA5s\xCE9\xA9c\xCE9眔\x921\xE7\x9CsNJɘs\xCE9'\xA5d\xCC9眓R:\xE7\x9CsJ)\xA5t\xCE9礔RB\xE8\x9CsRJ)\x9Ds\xCE9@6\x8AlN0Th\xC8J \xC0\xE08\x96\xA5i\x9E'\x8A\xA6iI\x92\xA6y\x9E'\x9A\xA6ij\x92\xA4i\x9E'\x8A\xA6i\x9A&lt;\xCF\xF3DQMSUy\x9E牢(\x9A\xA6\xAAr]QM\xD34MU%ˢ(\x8A\xA6\xA9\xAA\xAA
+\xD34M\xD3TUU\x85i\x9A\xA6i\xAA\xAA\xEB¶UUU]\xD7ua۪\xAA\xAA\xAE\xEB\xBA\xC0u]\xD7ue\xB8\xAE뺮, Op*\xB0au\x84\x93\xA2\xB1\xC0BCV\x841)\x84R!\xA4BH)\x85\x90\x80\x80\xCA@\xA1!+\x80p\x80\x8C1\xC6c\x8C16\x8Ca\x8C1\xC6c\x8C1q
+c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6c\x8C1\xC6\xD8Zk\xAD\xB5V΅@Y\x84\x8D3\xAC$\x9D\x8E\xB2        \x8CA\x881\xE8$\x94\x92JJB\x8C9(%\x95\x96Z\x8A\xADB\x881\xA5\xA4\xD4Zl1\xCF9\xA1\xA4\x94Z\x8A)\xB6\xE29礤\xD4Z\x8C1\xC6Z\ !\xA5\x94Z\x8B-\xB6\x9Bl!\xA4\x94Rk1\xC6Zc3J\xB5\x94Z\x8B1\xC6k,J\xB9\x94Rk\xB1\xC5k\x8DE(\x9B[k1\xC6Zk\xAD5)\xE5sK\xB1\xD5Zc\xAC\xB5&amp;\xA3\x8C\x921\xC6Zk\xAC\xB5\xD6&quot;\x94R2\xC6S\xAC\xB5֚\x840\xC6\xF7c\xAC1\xE7Z\x93\xC2\xF8S-\xB1\xD5ZkRJ)#d\x8D\xA9\xC6ZsNJ        e\x8C\x8D-Քs\xCE@=8@%A'Ua\xA3        \x80BCV\xB9BJ1Ƙs\xCE9\xE7\x9CsR\xA4s\xCC9\xE7 \x84B!\xA41Ƙs\xCEA!\x84BHc\xCC9\xE7 \x84B\xA1\x84\x92Rʘs\xCEA!\x84RJ)%\xA5\xD49\xE7 \x84B(\xA5\x94RJJ\xA9s\xCEA!\x84RJ)\xA5\x94\x94R!\x84B\xA5\x94RJ))\xA5\x94B!\x84J)\xA5\x94RRJ)\x85B\xA5\x94RJ)\xA5\xA4\x94R
+!\x84J)\xA5\x94RJI)\xA5B        \xA5\x94RJ)\xA5\x94\x92RJ)\xA5J)\xA5\x94RJ)%\xA5\x94RJ\xA5\x94RJ)\xA5\x94RJJ)\xA5\x94J)\xA5\x94RJ)\xA5\x94\x94RJ)\x95RJ)\xA5\x94RJ))\xA5\x94RJ\xA9\x94RJ)\xA5\x94RRJ)\xA5\x94R)\xA5\x94RJ)\xA5\xA4\x94RJ)\xA5RJ)\xA5\x94RJI)\xA5\x94RJ\xA5\x94RJ)\xA5\x94\x92RJ)\xA5\x94R*\xA5\x94RJ)\xA5\xA0\x80#*-\xC4N3\xAE&lt;G2L@\x85\x86\xAC\xC8\xB1\xB4\xD6Z\xAB\x8Cr\xCAII\xADCF栤\xD8I!\xB5XKe A\xCAIJ\x9D\x82)\xA9\x85\x8C*\xA5\x98\x93\x96B˘R b+1t\x8C1G9\xE5TB\xC7\x822@\x81\x81 8@H\x90
+ \xC3E@@.!\xA3\xC0\xA0pL8'\x9D6A\x88OggSlr[ID+\x91\xCC\x89\x88\xC5 1\xA1(*\xA6\x80\xC5\x86|\xC8\xD0\xD8H\xBB\xB8\x80.\\xD0\xC5]BB\x82X@        88\xE1\x86'\xDE\xF0\x84\x9C\xA0ST\xEA@\xE0 \xD9&quot;&quot;\xA2\x99\xE3\xE8\xF0\xF8        !)19A;\xF8HR\x80\x88\x88h\xE68:&lt;&gt;@BDFHJLNP@OggS@'lr\xE3C\ZS\xFFp\xFFs\xFFz\xFF\x86\xFF\x83\xFF\x82\xFF\x87\xFF\x8A\xFF|\xFF\x82\xFF\xE4\xD1L\x8E\xC5j- \xB2\xC1xWD36s\xC2N\xF8\x8BYkh
+p]6_\x80\x87\xB8\xA2\xB5\xAD(hUѡ\xB8\xEC\x9E\xED\xB0\xE8\xD4]\xCD΄\x95\x92\ \xB9)\xB1T\h\xD0k$ \xABa+,\xAF\x9FA\xA4ԪX\xABU +\xFCA`\xC7,J\xC1\x93\xFE\xEF;:!\x81\xE0\xB3\xDEJ&amp;\x99\xE9\x96()\xA45#*\xD6F \xE1̌jET$n{\xDD\xCB*\xF4r\xE9\xF3E\xB7\xA7\xF6R\xC2Q]\xC0\xA2a1x\xAD ELE\xC5D\xCA@\xC4\xC1\xFA{\x8C\xE2@!\xA4)\xF5ƾ9\xE3 +\xB2\xBE \xE9\xB3\xF6%H3\x95\x8E\xB0M0\x81H\xA9\x80\xFC&quot;F\xC48\x9F\xB1Uk\xD0\xC1&quot;ʮ\xAC\xED2De\xAA\xB2X)FԂ\x9CB۱+-\xF5#C\x81/eDk\xB0\x88\xADQ\x91\x9C\xDD\xD9!\x9AT\xA1\xC1s FiA;4\x8BA\xC3H`\xFC\x90EjdfY*rK\x95\xCCQ\xF3CU\xAD҉'\x9E\x83I\xB0Skh$ #x-\x89޵\xD1\xDB`\x8D +\x82\xC4 +q\x98(\xF18a~\xA7\x82;\xE8+ Q\xEB\x8E\x8D*\xA8V\x87\xAAՉ\xB6\x82\xAAD\xC4C\x8B\x91\xB1&amp;Q\x90\x8Fk\xFA\xD3n\x90Ɗ +Z&amp;h\x87j\xA6&quot; A\x90h\xA8D\xE1D(\xC6X\xE0\xAAn]jb()ք\x85fe\x86\xF6\x9AP\xC5DT\x88\xA7 \x97\x92\xAAwp\x8Eŝ!\xD1Z\x83\xC1\x80\x80ZB \xAE\x98\xA6Z\xA0r\xA0\xA1 +XMV{\xB2KÑ$\x8B8HZ3$\x91#\x95\xC42\xA8\xC6\xB2\x9B\xA2\x97\xE0\xA6h\xBA.9@\x9C}qYrW.\x81NA\x80\xE3\xD4D\xDBw\xA4\x9A        DF9j\xC0\xA0r\x86E\x83A
+\xC9&quot;\xB1\x99\x84e\x81\xA4,\xEFmV\x888Ah        -\x83\xC2PE\xD5
+p{\x91!j\xA2\x88@\xC1\xB4\x80A\xB7P08\xDA\xC7vE\xD0\x82 b@  \xAC\x85\x8C*\xEC\xC3p\x95\x81\x82hl&gt;\x94Z\x91\xC08O\x88\x81D\xA3\xF7\x8D&amp;[7fJ        \x81Lvs\xCCڬ5\xD4̧?\xDD)~0;u\xE13\xD1G\xEF\x8D\xEB
+R\xB3\xAF͙NQ%J\x8D\x89a\x94i9 \x92\xAD\x96\x8A\x98\x95ű\xA4\xB2-\xB3\x96a
+ڪ\xA01\xAEbB\x81D\xA8 E\xCC\xB0\xE3A\xC5\xA6ҍ&amp;0\xAA\xC5\xD2-h\xB1\x88Gad\xC9x\x82t +\x9A\xBAk\xB2Ȫ4V\x92\x96\xA10\xC0$@\x83X\\xD0ݚ\xF5&amp;\x846\x8EBaD\xC4$\xE2Y\x8Bs\xC6\xCB*c TZ        c\x93LI\xAB\x90]\xA3\x82\xB35}\xAE촺\x-\xBBL)i\x92pHЄ\xC4 \xDCxp\xAE==\xC6t\x86^r\xF0#M\x99\xE08\xEC\xDE`\x87\xE5\x86l\xF0\xF0\xBC0chPH2e\xC7Z\x85\xC60\xD6-`\xADX\x85F@ \x801\xA0\xB3&lt;\x88@(\xA0j\xC0`t\x83\xAA\xD4؈\xAA\x8C +` \xBE\xEF\x9D:[\xB4*\xE8~\x842d`\xE2\xC0\xBChkQ,V D\x88?k8bX(o\xC0r\xA0\xB3
+~(\x8CF&quot; 3A\x86\xC4\xE8P\x9DF\xC0`0\xBA\x{34F0419}\xB37|\xEB\xAD\xE6C[_\x81\x9C\x9E\x8E\x9C0\x83\x80ة1M5M\xABboh\xBD\x9D\xADQ\xA2\xB8\xF84\xDEb\xE7\x94\xB3W5\x8C̗\x85\xA5\x84\x99\x8AX\x92\x99Z
+\x997ܰ\x82 \xAAK;.0E\xC1:\xDDhAV`\xA2\xA4A1\xED3\x97\x8A\x9D(&amp;\xC0\x90]z\xD5\xD4@E\xDCa\xE8t\x92v\xA0\x8E\x90\x84\x9B \xAB&quot;\xB1\x8AhCQ)\xC0 \xA4|\x82E1&quot;\xA5U}
+i\xD3G\xD1-E\x93 A'DVBQ\xC32\xE4d\x99\x9A\x9A\xB5Œ\xA0\xC6\xC4YۑXc*\xAB\x85\xD6B\x86\x88\xA5\xA7l\x9Av/N'\xA3\x9E\xED\xF51&gt;\xEC\x8E[b
+9qZ\xE2\xB2a
+\x9A\x86*\x80X^pO\xD7\xC8\xA6;\xB45\xB6\xD6[i$\xA1I\x95\x86\x82\xD8X&quot;X\xE5fD\xD0\x80\xE84*\x82 +\x88\xA2\xA8\xB0\xEF\xE8\x92v\xEB\xC4,`\x9DX@D (\x85\xB1\xC0 +F\xC2(\x82h@\x802\xB0 k( \x84\xF4AԎ?|\x80\x9A\xE2@\x98\xA0Y \x9E(t\xC5\x9E\x81 \xD2q\xA2\xD0D\xA4\xE3;7\x81a\x8D}\xF8\x8E\xFAֆ\xA9u:q\xD8\xED~2\x83\x9C\xAA\x95\xC5\xF6j\x9A\x8E\x82\xCF\xF1F-\xB5\x8F\xEC\xB0s\xE3\xC5\xDEjX\xEDƌR\xB1\xC1F\xAB\x96V\xACf[\x8E\xB6Z#\xA2\xF6c\xCA
+\x86Z\xB8S(R\x8B\x8Bbb\xC4\xD0dHȺ&quot;,JЄ\x82\xA9D\xB0h\xADZ\x84\xC1ZH\x82Zf,\x8D\xB5\xDAZH\xB1\x80\x87t\xD0m4#B\xE2\xB5\xE8\x80r\x81L\x99\x82\x85\xC5T6\x8D&gt;g\xCCad\x84\xD4!\xCE/\xD9l F\x93\xB2\xC5\xD4j\xA8\xA9l5\xA8\x89j\x8C\xA2Xt\xB7$\xA1W\x92b)\xD6IT\xF4\xC0L\xC3\xDF\xFB\xD4ճL\xC2P\x8C2U\xE1p\xB0\xBD]Csl \xEB\x89i\xA25i5\xE0\x914 \xE0\x9DL\xCF\xC2\xD8$\x8D\xB0\xC9Q\x84X\x894&amp;\xAC\xA4E\xD6$        XP0vCd!~O\x90gPk\x82\x99bQA +\x82 `\xC0\x88cF UP\xEB 
+\xD6LTDL \x850\x81X\x90l\xAC\x9D\xA0X\x8C\xA01\xD4BE\x8C\x8DX\xF5\栅8h\xC0\xE0 \x80\xA0\xB4:^(4́!aE\xF3`Â\x80\x85\xF1\x95\x80kE\xC2hg\xF8\xB6\x99Fu\xBF \xEC\xD3\xE9b b\xA7&amp;\xD8\xD8\xD8\xDA\xA6\xD5 f\xC1;װ7\xCCZ\xAES +\x96\xB4R\x8CԺd\x8B\xC5H\x92\x8C=\xD6\xECr\xEB&quot;9\xC9HY\xA0f\x9A        &quot;\xF4\xA1*\xD4Np\xD8vHCK,6H!BR\x88\xE9\xB2\xA1\xC2IJ\xE9P5j`4l\x97z\x9Ab\x95i &quot;\x92R@\x92\x91Pq\xDCG\xE9L\xEC\x9AISKC\x88\xDDT\xA4I\xC80v\x90m\x90V'\xB4G\x9DSDIc\xB51\x94`E\xD5t\x8D \x83\x9B,Q\x86erdI 1\xB0Rc\xA1P3b
+O\xF6\xE5e\xCE\xEC\xB5+k\xFExjP\xC2Ӵ\xE1)\xBC\xE14{\xA3g\x82l\x8DU$T\x89x\x92\x92\xA9\xCFh}&lt;\xB5\x8D t\xAD\xC50^\xAA\xA0`\x93\xE0\xEA\x80q\xC6a\xB0 @\xA1p\xD6 \xA8UD\xADY 
+b]\x95\\xC0
+\xB0gހ\x80\xA3- 6\x80\x96c        \x86\xA26$\xA0\xA0\xD6E\xD0`\xDB\xA21\xA0\xA35\xB5\x86\xAAj\xB9ڊAoB\xF0 \xC5=\x96\xE0E'(\xCEj`(\xCEn`t\xB7w\x8C\xFED\xCE6\x84\x9B +\x91\xB7\xA8\x86\xD9S`\xCET\xAEX@\xDC][5쬪^\xEC10\xED\x8C\xECl\xB2\xB3^b\x8Eq\xA6-J\xA9Uӊ +\xD6 \xD3\xCC`\x8A\x94\xAA\xA2A1\xD8P\xDA\xC8\xD4%aEBLhaل\x93M\xC9\xC8        J&quot;\x88P%\x9B \x8Am\x9Bd\xB0D&quot;j\xA8I\xBAI\x8D\xA3@@\x97\x9AyM\x8D-0ZfZ\xA4Դd@\x88u\xCFa\x91
+gD\xA9'\xD2
+\x9A\x802\xE0\x94\x94\xD0\x8A\xEAi\xC3\xCA\xFE첳J Zq#\xA0 D\x9A\x9C\xA29/T        4cV +)i\xB1\x84\xA5.\x82\x9A\xC63^\xC6M\x99l\xE9\xA7e\x874n\xC1d\x92\xC5 \xCCmx1\xB0ܾ\xA2Ӡ*\xA2(Ү\xC9B\xE0\xC8ZqcR!\xA7\x93Fwxk\xA0        \x94T\x84 A \x940\x85C\xF7&quot;\x80F\xD8(\xE8\xABZAD\xA4Ё\xE0\xFCC\ZĠ\xE8\xA1k
+c1:uBVt  +*Z\xC0
+0\x8D\x82\x88Ĩ:Qp~\xB0\xB0\x80E\xC224\xA0=\x80\x84X\x8C-\xA4\xD6^(\xD4\xC9\x9E\xC0xP(\xA3&lt;@&lt;~W\x95\xB5EDJ\x82\xD8\xDA1\x87o;aۘ\xB3s\xA6b\x8B\xFBd\xED\x8D\xB1j\x8DJ\xA2ab\x93`\xAB1+\xA2\xC1 \x83\xA5\x8D1Z\xC6&amp;\xEA%\x89\xA9t.b\xCA\xCAj\xA5C\xD4@\xF2ʂ\xEDPaQ0j\xC7f\xB0\x87@*B\x83        %la/\xD9^%d\xDCX@ ʙ\x8EȄ\xAE^\x8C\xB5\xC8 QV\x9C\x99
+\x8E^0        \xB6(\xACdA\xBA\xEC!\xC2L'239\xE4\xDAe!\xADfC\xB2RwH\x85\xB5\x8C\xC9        '\xA2\x83)\xA7ɴ
+#\xA6i =\x8C(Hi&quot;7Ȍ\xA6\x84-\xDC\xEEZx\x90\xD4b
+AC\xB7\xA1V\xA4#E\xAAz\xA4\xF6˔\xE20adL\xAA\xB3,\xA0\x9A2IŒ\xB2\xC4-\xB1g\x87 
+j5 ͹L(\xCE\\xE0\xA01)rm\xCB#w\xD0i\x80V[\xC0\xCCh
+L\x82@!\xD8T\xC1@m- \x88V'\x88\x80N\xACQDD +`66\x96\xF0
+\x921\xB2\xA2\xD3X\x81\xB5:\xAC\xEAB\xD0!h@l0\xA20\x88\xD0a,bEU +`-BV4\xFCU(\x82\x8C\x80\xF0f0\xB0g\xB1\x8E\xDE7\xC4.\x91@\xC4ĢoȌDB\x85\xBF\xEAJuBH\xDB\xF0\xEDM\xB5a\x9DN\xE6\xEE(w4]fv\xAA\xA8\xD5o\x8D\xCDƨ\xE3Z\xEB\xC3Xc\x8B\xB1\x93,\xC7~\xB0\xA5-\xB3\xDA`]\xA4\xAC\x9B\xA2Mfb\xA9hG\x8BR+hijPŰr\xD5m\xA4djR!\xEE@iࠦe\xB0\xA8\xD4R\x8C\xC7!\x92Ƕ*\xD3C\x98\xB0&quot;U\xA7\xF7\xD0Sc\x96\xEAn\x90\xA5\xDAٔݞ,\xAF\xAE\xB7\x81\x9B \x9F`)
+\x80DSD\xA4\xB1^2\xD0!B +͙\xE6I\xE6mG\xC5~\xDB\xD3\xFB\x86\xDB\xC70#\xE8LX+\xC5\xEDD\xD3L\xBD\xF4B\xB6\xC4\xE3\xC6\xE9\xB9[\xAC        3$tE $\xA81Ę\xFA$\xC5l\ h{\x84\xB7Cܗ%\xDCH\x8Da\x94\x91ƒhh+rb\x8DP(\xAA@[Q\x80\xC1h:@\xA6\x91gɀX \xA2\xC0\x8A\x80\xD1V\xAC!XC E \xC1\x87$\xEA\xC6X\xB1E+B\x8DU\x9D\x82\x88Eg)؈\xAA\x80i) \xA0h\xC0&quot;\x88@\xD0!b\x8D&quot;\x8A\x8CBDa/\x80\x810\x8C`P\xC0\xC1\x96P\xE8\x9E(4\xD1\x9E \x8F\x8B&amp;F@X@ʝ\xB0\xCC&gt;:\xA6\xDA4k\xD5l\xD6a\xFA9\x87\x83\x80X\xDCŰO +[\x86\x8BUM;;\xD3P\x89\x8F\xCFb$\xD4ً\xAD\xA5\x95T,\xAD%h\xB6%\xAA\x96b-1\xED01uD\xC0\xC2B\xA5\xC4+\xB1\xB5\xD2j\x8D&quot;\xDBE         \x83\x96\xC0;        L\xCAS2\x90\xC0\xD8RY B\x93\x84\xC42\x82t\xD7j\xB5\xA8\xAFY\xC4 jY\xBA,\xB54\x97&quot;\xA3+\xF6(&lt;\x9Fd \xC5x'\xE9\xB8+\x800B\xB4Ɔh\x{134403}\xD0~\xBA\xEF\xB0\xC6\xE3\xC6\x8BF\xBDL\x9A؝\xB3\xC1\xB0
+TK\xC94bM:M\x84\x96\xAE\xB2\xA0\x9Dw-9N\xAA
+AB&quot;bC\xD4\xCCĭaw\xBA\xD9i\xBFͥ\xF1\xB2,\x93\xC5\xFEđ x\xAE6\xAD\xB0\x81H\xD5\xD1\xD2F\xAB
+\x88+iHQl\x8AeR\xD8\x800\x84\xC0%#.E\xDDD\xB7,\xE8]&quot;\xAA\xA0/@        &quot;@\x80@\xF4
+h\x85\xA3\xD3bĢS\xC5J\xC5`\xD0\x8A#\x8A
+ +F\x80Z\x82\xAA*$p @\xE2C\xA2\xAA\xAA::\xC0\xC1@\xC7\xBEt\xC9\x91\xC0a1h\x8A&quot;\xC0\xE1\xCE        `\xB5\x99\xD89\xD3\xFCh\xBDY\xE8\xAC\xDF\xED~2\x83\x80X\xDC\xD5\xD6T[\x89,jcb\xA6 + +\x86\x9D\xADZ\xB4\xD8ڋ\x8DU6\xB8\x8Dn\x8C`ULU\xC4&quot;t\xA0\x82&quot;\xE3\xB6\xF5\xF4\x91&gt;\x9B\x9CU\x8D \xB5@&quot;\xD1&gt;q\xDC\x80\x8AQ\xB1\x84\x8D \xDA\x981\xEE\xB5`a\xAA,8Ԓ\xE8*@\xC4&quot;\x91F\xDD ;B&quot;pM&lt;0\xD0\xED\xAEFjhw\x85\xA0 +\xB5\xA4\xEAa\xA4\x92HA\x9AP,\x8A\xE7\x905\x80\xE8r\xDCY\x9D        \x86qU\xD2!\xA4 )\x88!¸\xF2\xB14
++]HLk3{\xE1\xC6\xF6\x98Ʌ=\xC5 \xC8\x92a\xD5\xE7\xB2|\xA8N +!j@\xEDH\xCA(H\xEF\\xB5\xA6ݩ\x8F\xA7\xDB(\xBE\xF3&gt;T\xA0\xAA@\xB4U\x88
+\xD4Ba\x80d&quot;\xAA\x82%@\x80\x850\xE8+ (\xAA\xA3\xC1\xD4FTɊ&quot;X\xC2\xC3\xC4Z\xAC
+؄\x88*\xD6\xC81\xC8&amp;` + \P2Vi\xACh,t*(ZU@\xA3X\xC0\xA8\x80\xAC\\xD6KDr:
+p\xB0\xC0@&gt;\x9EHtɣx\xD2\xA4M\xF4(\x954\xB8\xB3\xC0&amp;\xA3\xBF\xD5\xFB\x86\x9Fj5\x8B\x98\xC3\xC9t\xB2\xF9TbL@@\xECT\xD7H\x8C\xB3Z0ԴE\xA1ފ\x9Dv3\xF6bk\x9BZ%9b\xD8`Pb1\x8CC\xD1k\xDC&quot;֊\xA2\xAE\xD1\x95\x8AJ\x8E\xCB8
+\xEC\xC56B(\x8C\x98X\x91X\x8C\xA1b\xAC@c\xA5B\xBB\xAD–nS\x88\x99YT$1bu@㜙B\xB6&quot;\xAC\xA1*\x80P\xB1\x95]\xA7\xA4] +Φʑ\x80\xBA\xF5\x96\xE9\xD1\xE2̥D        R\xAD\xC0X\xE5 ]\xBBЖ#{s^ooo\xA1        l#\xFB]83\xC2ت$\xA2\xC7 M\x8B\xB8=
+\x8D\xBA\xBC.h_v\xE0\x86\x92\xF1\xEFr!\xB6M2\x98\x84\xA0\xEB\xC6x\x86\x81\x89\xC1Ne[\x89\xCAjOggS@Slr2
+\x98\x86\xFF\x80\xFF\x88\xFF|\xFF\x95\xFF\x91\xFF\x85\xFFy\xFF~\xFF\x82\xFF\x81\xFF_\xF7B\xF6k\x98\x81\x95\xEE&amp;\xC1\xF5\xBE\xC6\xE4\x80\x81@tX\xF1\xA2\x80\xB4\x82@ \x80\x88\x808Bx\x8026:E\xB0\x88\xE8X!UU(t \x84&quot;dm%
+\xC30ET\xB1.\x80 :T\xC0T (k\xC0\xE84\x88 U\x85Pl\xFD&quot;\x80G4ш\x93Q\xA4\xE5\xE0'`\x80U'\xDE7\xC4&amp;\x91\x80\xBE!\xD6\x88\xA3wU\x86\x92\x91\xBB2\x99m\xD4s\x9A\x8D\x9A\xDA~w\xB4;/&amp;v\xAAUkĈ\xB1`\x8CZ\x91D\xECj\xB1D[\x87\xA5\xD2sl\x90\xA5X#KKQLF@\xAFUR5ZQU        \xD1x
+\xAD\x93\xE2F\xC8\xB6-&quot;\xD8\x92        H\xB4p\x85ea\xF8\xAA[\xCDp1\x80\xB1%\xE1d:\xF1B\xBB4QH\x8D\x93x\xA1\x89&quot; \xD8.\xA9\xD7\xC5|\x95\x92\x97)B\x80;a5\x80\xA5R҆,5 E a\xA5BL\xA3+\xA1\x89\xC2\xC0\x85\x8E\xD55E5\x9E\xAC\\x8D'\xF0\xCD\xCC\xCCY\xCAc\x8A\xED\x86R`\xC2\x87mT\x99,֠Q\xBB\xB3\xB4\xA8T\xADUt\xA3iwH\xE1J3\xD8ϥ\x90X]P\xCD\x8F\xE6ι\xFC䡌X\xDEJ&amp;bX\x8BX@Е\xA5\xC1\xE8\\x80+\x85(9\x81h\xB0\xC8\x8B@\x80#ɂP + h,F@lTEG;*\x82\x85\x82\xF0&amp;  \x82A\x8CXWE\xC1\xBA!\xA86\x88U\x85 GEfpUA \xA2꡻\xE0@r \xCBp2\x93(=\xE0\x947\xAC?\x80f +^8\x94\xC9#iI`T(\x94\xD1!iI`|g+\x81\x98m\xCC\xFA\xE1sk\xC3j\xDEu\x98s\xA6c;\x8B\xB6(\xAAX \xD3t\x9D\xF6f\x83\xA1\x94H\xEC\xC4\x89ѐճ\xADX\xB1&quot;n\x89U0WRk\xADC\xACxm,\xAC\xD1Pv\x95\xA5\xC3hA\xE1ҀTQPE\x91F@j,臱(\xCA BHC8m\x83\xA1\xDD)\D\xA1        W\xB0\xB2\xDDFdP\xA4\x9AN\xC1u\xA3\xA7&amp;(\xC8\xD4*\xC8lh(pNN\xAA̴\xE8A\xE8FcJ̔9\x816\xD4u4\x85B.\xA8\xAC\xBA\xB1[\\xB4b@\x95$\xBDʂL\x88\x81a\xC9+MG$\xF6T\xCD,\xC48\xB5X)(ǎ2!5\xC8I /0\xABU~\xF2.m\x9Aw\xB2\xAA\xA0&amp;\xA3L\x8D\xCEE        ^\xA2n\xDC%1t\xD7-E@\xAA\xDB!\xAD\xA1L\xB4\xACQZ$A3(\xB6\xC2x\xA0 dm+\xB1\xA4\x84p0\xC3/\xA1\xA2C\xB0\x88u(TuXЫv\xF1^X@\x8Ch +\xAAP\xEA0֩ \xD6hAt
+\xAD\xA0\x80\xAA\xD5lD\xB4`\x9D\xAA\xE1e\xA030[\xE0D&amp;L\x8Fe +\xA2f\xB0V+\xBE(\xF4\xDD\x9E\xC0b1\x9B&lt;\x80ŝ\x99K\xF4\xF7\xE1\xC7?k#Bu8q4\xFDt4\xC4,ީ\x86a\xB1VVC\xEAMM\xD44\x990l\xD3P1M\x9BaG\xE1X5\xD3|\xEC\x90=\xD63b&amp;\xD6e\x93\x80l+**\xAE\xB5\xB6:\xA8'%X)K6 X\xE3\R\xE8F`,\x98&quot;\xB4\x88-\xCC
+i@D\xB2;\xDC\xD0*\x80-\xB4\x904@M@C5\x96\x8BT'o\xA9\x81a\x8D#\x83q*$3\xA2[\x8F\x90Nk\x84\xC6\x87\x80\xAA6\x80\xA8n\xA2\x86\x8C\x812        \xA0\x8Af\xFF6\x87u\xB8j\xA9\x8A+QRΈ
+!\x9DĊ\xB5 \xE1\xE9\xA27[\x8024\xEAm\x85\xECn3M\xE1\xB0 H1\x895\xFC\xCE-\xDB&amp;Ȥ\xCEV\xE98\x8B\xE2\xF6c?7
+\xA7\x95Ǣ\x80h\xD3        \x81 b\xB2\xD1
+\x80l\xE4cT\x88Ah0\xB0@\xD1D'\x88\xD1
+\xA2\xAA\xAE-@\x8C%\x81 +TE0F\xA7FP\xC5e\xA9\x83\xAA^\x81\xD1\x80#\x8C(@#F\xD8(\x90\xB0A(\xD3@\x81@\x81\x80lb\xA0C^\x84\xC0d\xB0
+\xE72X~\xD8\xDA\xEAGĈ\xA8\xCDTs\xF7\xFBL%\xE6\x82\xC0\xC1\xA9W\\x90_\xB69
+\x81\x81\xBE&lt;C\x93f\xB0\x9E\xB5\xF6\xABΞ\xE89\xECVk\x86\xC4\xD2\xDE&gt;Y\xAFa\x97dP!]\x9B\xDAI\xB4Z\x91\xEB0D\x84bBdA\xE0\xB6\xDD\x80A-4! \x8BV\x84\xB0ф\xB2\xECeU/\xA0z\xB4\xD0\xE2
+@\xA8\xC4ؒ\x97\xA5g\xC0G\x93\x8A\x9A\xF4\xBB\xB9G
+\xB9-\xBE*9q \xB1\x80\xD0Z\xC4:\xD4\x84\x88hR\x850\x84\xCBDBu\x93YK-\xE4b\xEA&gt;3g\xD0̘&quot;\xC7fH8cun\xA4Q\x98.`\xA54H\x88\xC6\xF2:I\xD3ٓ\x9A\xA2`z)\xFE5&amp;\xEF\xE3R\xABj\x80ŞhtQ&amp;D\x85J\x94\x83\xE21\xD0`\xB2&quot;\xC7E
+c#-.XAI\x93\xA1\x83\xACS#2ƺI\xD1\xA5\x8CP\xC6@[ \xADHQ\x8C]\xB0\x86 \xAAV-SU3A1, \x80YQ\xA1PE4*\xE8-XC4\x81 \xD6@Q\xB5\xD1@TQ\xEB\xA8\xA2\xC5&quot;\x88\xA8 B\x81\xC1\xA0X\x87\x80*
+\xB4ƹg\x91\x838\xC0P\x8000:
+\x9Ch\x80\x80NU^Ht\xDAA\x8B\x8E\xD7Q\xE1\xD0x\xA8\x80ŝ\x9B0B?\x89m\xF8\xAC\xC3\xFB\xDA5\xCBg7\xBF\xCF\xCDe0\x8B\xBB`E,\x8A)h\x9Cɐ\x85\x84\x98U\x9B\xED\x86\x8Bi\x8D3RK1\xC5b\xF4K3\xAB\xBA\xEA&gt;\xB3\xD6\xC6+\xB5U-h0\x82K\xBA@\xA4pLZ&quot;\xA4\x84z\xC1\xB2\xBDB\xAD\xD3\xD4h\xA8\xC7\xDAi\xA8U\xF1\xDE3\xEC\xEDUf\x9D\xA2\x90ArР\xA0\xB1\xA8\x9C@Z\xCB2#\xC2\xC92\xC0x\xC3 ,c\x83\xA0(0,\xA1\xDB`Wу\x9BH\x89\xADt\xB8\xA9\xC3\xA9\x8E\xBA3Y&amp;M\x8EAPy\xE6\xC2\xC6\xDC\xF1\xA65k\x85\xA2)M2!\x8C\xBE;#\x85U\x87\x99S\x96\xCA=\x95 +\xD4:\x88\xADK\xDD]\xD9'\xC6ͅ\xA2:\x8E}2\xB3W\wE\xB2\xF1\xE4\xC0\xABNC\xCD\xC1\xFCrx\x88\xBA IQK'A\xA92ţ\x85q\xC0[\xDB        \x82\x8C\xB0 +z\x88-\xC0R \x83 V
+j\x80\x8A\x8Bщ\xC0@2\x88؀nۆ=b\xA6 +\x88        \x92Y
+\xA2b\x91\x98\xA0A\xB0\xA9\x88\xD6\xD6`c\xB0\xAE\xA0`b
+0\xA0a                k\xA3r\xCE\xD1@\xF9A@  \xA3^H1\x91 F\x85DP\xC9`tg`ð9q\x94\x8D\xF0\x89vTk&gt;e\xE6\xF46ŻL2\xB1S\xAD\xF6\xAC6\xAA\x88\xD54\x{D92E}\xCE*\xD3\xD1\xC1\xB6\xC1o+*\xD6\xC7\xDEҭ\x9BV4\x97 \xA2\xAB( \xAAV\xD6$^\x8CCA8\x81\xC3V\x81)\x8A\xC5s#\xC5\xAC,\xA8(\xA4\xAB\xC1bf\xA48l\xC15&quot;\x90+\xD2*tP\xCA4\x9Ajp\x8F\x81\xAFŒf\xFA\x8D1\x80\xA1#NujH\x98I\xCAЮ*P\x80t \xAE%\x9A\xB7\xE1^\x9C\x9B\xBAڅ\xDBU\xB4jF\x80\xC6\xA7iO#\xE7\x8DHk\xB2^R        \x99\x8C4*\xB4qӥ\xA4\x93&amp;2\xFDN\xA7H\xD5Mٻ\xB6\xE8\xD6\xC6r\xD3SI Q2
+\xBA\xC7\xD0\xE0$\xF7\xD3\xCD˷\x97\xCD8Jr\xA0\xC3NAP%\xAD\xC7cJMD@\xB8&quot;\xA0A\x8D\xE1hT\ h\xB0\xE8@t\xAA`\xCDR\xAB(촀p\xC8!jXU\xC4\xB5\x86((\x8B\xACCZ \xA0\x80U\xC1\x80ƀ\xB1N\x84\x9B@ƀc\x84!\xC0\xB6!\x92\xC7&amp;αT\x8A%\x80\xD0        &gt;(\xC6=\xC0xP\xC8\*@:z\xD5*\xCAD쾝6gu\x84\xAAU\x8A\x9F\xDBb &amp;v*\xAA֪ZQ\xF1Ƌ\x88\x966\xDBꆽa\xB3\xA5\x8DYmaC-մ\xB4\x9A\xA8cY\xA6\x85[bJ\x9EQ\xD4 +k\xAANR#\xD1\xD14\xB0\xC2i#\x84\xD6\xDA=\xA6        s\x91\x8D\xED\xC0A&amp;\x8E\xE9Y0\x95.laQM\xAD\xA4H0 +,I\xD5\xD5-iw\x8A\xC1\xAA\xADe\x8D'\x84\x9A\xC0\xB4I\xEA(.        j%CZRp{\xA4^ +QkUS\x99\xB1\x8B\x84D+4\x99\x8C;7V\xB2\x85 +\xCEL\xE1s4        R\xE8\xB2hBA\xAA#\xB0\xB1Gq\x82        :ʁ$Cb\x80\xBBv;\xC7\xE4.\xE1\xD5)\xB19]+\xB2Z\xA8c\xAD\xA5\xBFNo\x90\xF7p\xF3A\xBFB\xEC\xC6\xE0 \xA0\x81\xB1\xC0\x84a\x95\xA0\x96\x80\xC12b\xC5\xCE\xC8e\x8B\x9E\xBB\x87\xC0J\x80!\x92P\xB5\x82\xD1P\x83\xAB`A%`r|K\xA8U\xC8RQ\xD1h\xC1b\xEB# U\xD7\x82(\x80: +U#b +\x80 4,`\x91\xC0#p&quot;\xA3\x80\x802\xCA\x80\x80\xC3:0^(\xD4\xD1a5D,
+\x892z\xA0\xAC\xC0\xE8ng`\xB0\xC1\xC46\xDAQ_\xB5\xD1P\x9B\xAE\xA3\xE9h\x9FC\x8CA\xE0\xE0T\xB5\xB7\xB1\xB7U\xB5ت\xB7W\x8BM\xB6l\xBC\xD8ƻ[\xAA\xB4\xD4Pkٖ&amp;\xC9(\xAC,\xBAm\xB4&quot;Fq\xAA-4\x91e\xF1\xDB\x85\xE3@\x92\x96
+C۽HA`\x92\xB2\x84P&amp;Q\x8D\x91 b \xEA\xC2#0\x9A\x95q+\x82\x91`\xAC\xA1\x88\xE1y\xB4f4\xB4\x89vQ\x8B`:\xD3\xA9D7¤\xABP\x8AG4\xC0\xE4\x88\xBB\xC24\xB4B\xA3\x99\x90\xE7\xBC\xFA\xB0U4\xFD\xC7\xD4.O\xFFT\xAD\xCC\xE5\xA5\xC8Q\x9CF\xD5\xA6\xD6[
+\xC9\x82\xBDA$\xDD1\x80;KP\xF4:`\xA0#Q +\xB2H(\x8E\xA3)6\xF4\x80.v歜\xA7r,\x96\x824\xE0\xA0A\x93z\x88 c\xED\x81h\x80\xC5]\x98\xB2`\xC0\x89\xB7Dn\xB0RT1 h@\xC0kc\x8Bh\xB4Ƃ\xB2V5 \xAA,\x8F\xC0\xA0\xBA\xC4X\xB9\x88\xD6\x84,\x81,\xD4D\xBC\xC2V\xA0
+\xACY\x8C\x80x:Q\xC1֊\x84m-6\xD5dq&quot;#\xA3\x870\xE8\xFE\xC4\xC9#\x89\xA4\xB0 \xE2怖@\x96\xAFjj\x80\x8C\xCC\xDCG;\xEA}Eժ\xCET~\xD8\xE7c\x92\x89\x9D\xFAM\x96-b\xB4\x8BT3bX\xC9d=\xB2hd0L[zj\x99)\x939K\xE6\x97\xD1L\x89EF\xC3\xDEN-چQVP\x8DщQ#\xC4#\xB6        d\x85
+e@\xD6Bd\\xD8$\xA0\xA9P\x84SX±)\xA9\x8Cua\x80(        \x91a\xB0\xA6 )\x86p)\xA5P\x98PP0D\x930-%\xC6Rנ\xAA\x90\xD6\xEDF P^U+,n        '\xEB
+BLÀ\x96\x82\xA4$\xB7Gh\xB4\xC1}\xD0M\xC3Jfe\x90\xF6PF\xDAdC\xC2\xC5p\xE1\xF8\xF8t\x95\xF41\xABl\xBB\xA91\xB1 +Pe#\xA8P \xAAs \x9C\xEFron^\xDCzV\xE6\xF2n\x9A\x84֊\x90\xDA*\x90\xA8\x9AD+8\xB5`\xDC +`\x87&amp;\x8E`XĪ
+\x8C +T KPLKAw'F\xD0R6 \x98 \xD6\xB5f (jMT +\xA0\x80\x88 b4\xA5 +\x88F &quot;h \x80\x82 \xC2\xF6eFb&lt;\xA3@``С\xBET\xDD\xAC `\xF17\xE4\xE3\xAC\xC0\xFBx\xCEi$B6,{\xC7\xEA\xEB\xA76Sms\xD7aқO%&amp;b\xA7\x9E-`M3\xA2F\x8Ck\x8AQ\xD9\xD9Xl\xAB\x9AX u\xEDm,\xECF\xC9\xD8&lt;\xCC\xB5pC\xAD\x8DFá\x8C$\xC9!\x80C1\x92$@4ۢ\x88\x83:\x84\xC6TA\xF1\xD1D\x83(\x90@\xCD\xA1\xCBf\x81Ȭ$-\x861        P-\xEC\xA8j$))\x93\xE1*K C̤+\x88&quot;\x99 +3\xBA\xDC%3L\xAF,\xE4 \xA3u\xD4\xFA%\xE1\xE3\xE0w=I\xB9\x97\xACa\x9Ah\xB2Ԕ +=(\xC3![\xE5\xC4\xCE +\x8D\xEA\x91(\xCAj鈩\xC7XS\xEC5p\x96\xED&gt;wwanV˵\x9A\xCBy\x91[\xB6u
+\x8FL\xCFD\x8B\xA7GRS\xC0:X\xCBY +!\x89@\xB4        MkT@\x84\xD1J\xA0\xA4v&quot;\x9DJ\x80         (\xF4xKX\x82gx\xF9 \x82\x8C-^\xA3GTQ\xB0Z\xD5 {^`\x83&quot;\xB4\x86\xD8`a\x98\xA8\x82a +EE&quot;FU\x808\xC4B\x83\xADPT@\x805UD\xA6!\x9A\xC1\xE4#pb̀\xF8&quot;@V\xBA5\x9E(\xD45\x91\x8C\x87\xBAF\xA0\x92        \xC0\xE8\xCE6\x90l$\xDBȚ*\xE64\xABE\xD8tg.0 +f0;\xD5\xC18\xA7\xC5\xCE4RŰ        f\x82\xD5\xD1\xDE.5\xBC\xD5&amp;l\xB11\xED,L7\xACf[Zɜ\xC40K\\xE9\xD6\xD8P\xA9\xE0EDF\xA3j\xAC\x8D\x880\xB2\xDD#\xC0\xA1,(\xC5m\xA1*V \xA4f\x8A\xA1 ri\xA4 p̦jK\x84\xE3\xA6\xD3(C\xA4\x9AY# \x97\xF5y1n' \x84T-\x84\x99B\xC0(\xBAp\x99$\x806D*\xC1\xE4\x86r(̭\xE6-ժ1\xA0\xA1s\xB0\xD0&quot;[\xB8\x97\xE6\xA0\xA3*H\x9C9#E\x82r\xEC\x88N({J{jaR&amp;t8bzr\x89I(1\xCB\xC9\xDC\xBC\x90LA\xCC'\xF3S\xC8OggS@xlr\xF2\x88I%}\xFF\x86\xFF\x88\xFF\x88HKHHFHGVVZWWX[W]XU[VBLD\XS\xFFR\xFFX\x8Dc\xA0ȁ\x85\x94\xE9uH@\xC43:[\xB4+DG\x81Т\xB0 \xB0\x95\xCBzP@0h ݊\x80P\xA0E\xC1\x82\xC0\x88
+\x9A\x9C6\x82b\x83\xAB\xA0@\xAD\xD3,\x80F&quot;\xC6:@P\xB4\xC3 +B\xC0T\xC0\xA0\xA8b\x8D6\xAAV \xA0^\x81c&lt;\xCD\xF3\x9B\x87@N\xD1a \x81A@\xA3\xFE7\xA4\xC6#\x89d b\xCD\xE8oHMD\xE2\x99X\xBD\xEB\x8A)\x85H\x91\x99;;:T4\xA3#\xA26]\xF1S w4\x98        \x98v\xAA56\xA9\xE9QԢ\xAA\xA6!\xCEj_\xD9cV\xA3r\xC4\xEAԦR\xB7ƲV\xD5h\xD1.\xBDFU@\x8F\xADX\xD5!\xB5&quot;[
+BB\xB2\xE2\xD6b-l\x96 K\xB0U\x85qSeI\x9Ap\xCA#:\x8C\x89\xA9\x84b,)\xEA\xA4Ec\xDBjv\xB7\x8Ah\xDCn\x92rf\xBBw\xF7H\x99ԊU\xF7 \xA7a\x89
+8\x92\x8A` +\xEEB\xEBY\x8C@E\x95n1Ѐ\xDA)\xBB\xB5ocǝ\x95a\xA6\xD53\xAA\xB2Ld`\x8A\xC3\xE0\xBA Ww\x98 \xA1-\xA6\xA9\xB1\xA0.\xC8\xF1\xA2S\xB9pZ\x8DbV) +0e&lt;4\xDE/!v\x91X2\xE9J M\xD2\xC4\xEA +\x88.N+\x81\x80\xA0\xD3I\x87k +\x83, \x80!̰\x8A\xBB5Ă'\x8AbB        0h\x94\xA2D\xC4h +\xEE{0\x88ƈ\x8D\xAASl`\x8D\xC4`EA\xAC=\xA6C\x86\xA0\xAC\xB0\xAB\xA0\xD85\x80\xAA \xB0\x82\xC1Z\xA6\xB9N\xE4q\x8E\x9Ec
+ H0\xC2\xD0
+!Tt^8t^j@\xC40\x8Bá\x8Bp &quot;\x88\xC7w\xB6&amp;\xE45L\xDF6\xA3\xBEZ\x9BN펶|\x81\x83S\xB3\xA4&amp;B\xA2i1lR\xB5ڃ`J\x9Cio\xAD\xB0 +C\xEDm\x82io\xD5Xe\xB5\xB1U[,\\xD4\xCCuPc\x81\x88\xB2 \xD6&quot;\x8Ae\x91a +h5m\xB7 lHL\x8A&amp;\x94s\xDCa-)$h-%\x8D\x83,CN&quot;Q.S7xl\xA8D#f\x98\x89\xBA@,aIQ\xA5\x94\xB75\xEDgW+H X\x92&amp;4iY\xB3\xB4E\x90\xA5\x84T\xC7`\x98*\xE8t'\xD3\xD1&gt;$\xB2QFl\xE4U&amp;3b@&quot;\x8El*\x83[\x83Ń1T&quot;J\xA21\x90\x9AeL+v\x9F4E\xF7\xF4i#ʕ&amp;\xC5,(F:\xA0\xC5@\x8AЅ\xB1\xC1\x80\xA2\xE9K\xB1b\x8C\xAD +!@\xB2X\x81\x8CDh\x98\x82b@'FQ3+\xA86\xA5\xC8E,\xD4\xB4\xC6*j\xD50\xC0\xC9\xD2B\xC5\xD1j\xC1f\x85\x824\xB22\xCE*\xA0`\x8C# Y\xA2&amp;\x82\x8Ah\xAA\x8A\xCE{\xB4\x8C2\xA0ݡ\x8C`!\xC03\x80\xA2\xD3\xD6\xF6S\xA9A\xD02\xD6E\x9BP\xA1AdJ\xC4:\xFA\xE8\xB5ͮئ\xAF\xA8\xDE\xD7O\xB5\x9Aw&quot;~oS&lt;3Xܫ\x88&amp;\x902٧\xC3GG\x9B&gt;\xAB\xADڸ\xB6ژ֊r\xC4 \xA4\x81\xCB\xF5\x84\x8C\x90m^\xACY\xB3Hԭ\xA8M֬X\xB5\xB7K\xB1\x8CZՊk+k\xCB&quot;\xA2{,J\x93baP\x90\x95\xA86\x98\xD0J         &quot;`Pu\x81\x87\xA5&quot;!Ȁ\x90 \xB4pzM\x98&lt;)k\xE5|\xA2Æ@@\x80V\xDDv\x9B\xE1&quot;\xC9@\x81l\xD1\xC0\x9B1N\x9CX*\x80R8BPт
+A\xA3bd\xC1\xCC\x8708I|\x81\x93\x97\xE9H\xEA\x8D&amp;WC\xB50 \xCEq&lt;\x8CkE\x80\xCCEO\x87`\xC2t +뮘\xF2\xFEmM\x8A\xEC\x87LP\xC19_7\xA6\\x80\xEF\x86N\x98\x84\xF1\x81\x88\x98\x82L1\xE0 +\xBBY b@D\x80 \x85 aH1\xB6n        \xB7@\x80@\xD2Af\xC20@\xE3e\x98\x892)t\xB6hUc[\xD5)`\xAC\x84\x8D;\x98\xD8AրDĊ\x80&quot;Z\xC0\x88N\xC0\xA00\x88\x88\x881\x88\xA8\x9D\xCD\xFC\x8A݂$G\x80ETC@H6yP5\xAD!\xCC}dЀ\xED\xCE\xE8m\x95\xD11\x98\xC3\xFD\xA1\x85\x814\#\xC0g\xFE\xC1\x94\xCF
+ U\xC4\xF6X&amp;\x80+\xB1\xB2\x94V\xF4󢢛7\xBB+\xCD\xDDN\x9C\xDEu\xA4\xBDwmӡ Xk\xBC-,7\x83hI\xBBoJ\x91\x91 +\xCE\xB5B\x9C`]aI\x8AP        \x80\x9F\x90\xCB\xF7H\xD5&quot;QG\x87ji\xC9[q\xD2Ks\xF6^7͋\xB5Ѿ\xBB\xCD`\xAF\xDE\xDEV5'\x84\x88 \xC4%\xF5NC
+\x8A/\x89\xC4)=V\xA1p        \xFA\xC1\x97\x98\x94\x92\xE5p\xBC|&gt;\x8FBUҊԨJҒ\x9A\xA2\x9A\xB6հ\xD01T\xAA\x8As\xA2\x85\xA5b\x88땍\xB0\\xFC\xFCuQ\xEC\xE5&gt;?\xFF\xF5N-Ym\x9F\xEA\xCE\x9F\xC2\x90R3\x812\x97\x8E\xF2)q\xE02\xA1\xBB\x8Aqa\x98i\xC8\xEA52\xC6\xC4X\x9B10qr\xE3\xE9
+\xC7\xCFvl8\xFC)!v@\xE4\xEFH\x8E \xD8ۭ\xB7&amp;3%\x9BS2L\x8Aq\x9Ct\xB2\xA1@1Y\xF5ZF\x8E\xB0\xDC,
+[\xF1@&lt;\xD1Q\x8C\xAFnv\x85\x98ʌ(x|F:\x99s\x8D}\x9D\xC4%fd\xE0f\xCFc\xCBS&quot;\xCA\xC6g;&gt;\xAB(K\xEDd+,\x8C\x84\xF2wz\x929\xAA\x85Тu\x86@\xC7;\         \x94\x8B\xF0\xB4qۘ\xBD\xB8Yi\xA6 HK\x90\xF67\xB4\xB4\xBD H\xD9\xEF\xB7\xBDH\xC9 &lt;U\x9C\x88)%\x90\xAC\xCDri\xD5e\x96\x94XŅX\xB9\xD0g&gt;,-\x8B\x90\xB4ҥ1\xB0\xAC\xED\xF6\xB3\x92E4\xC6)I\xEA%\xCC-\xE9, +6\xD0\xD5-\xA9,\xB5H\xF2 /\xB4\x82\xB5~)\x9AK\x834\xAC\x88^\xAD
+\xAAb\xD6͹\xB2\xBBER#y~@\xD1\xDB~[oZG\xE6q\x9Bǔ\x96\x8CV0\xD1R\x88^_\x88 \xACT\x88C\xB0\xD63\xD56\xE45\x99a\x80\x95\x8D=\xF7\x9A\\x91\x906N\xC6\x90\xCE\xDAF\xCDNfB)V7H&lt;\xA3\xEAWO\xC0\x82\xD4\xD6Nš        :T\xADX\x95Cen)\xAC\x9C/EM\xCF5B&amp;V\xE0`\xBD\x86R,\xF4\xEB+\xE8U%\xE7O\xB6\xEE{\xBC\xB5,\x95\xCC\xEA&amp;#X;\xEA\xAB\xD2B\x8AnN\xE4bDa2 +\xF19\x8BQ\xA5\xAD\x95\xA5\xBCv!z\xD7\xCCY\xAE\xE5\xCF\xEA\xEBZ\xCASY\xAA\xA4\xCAH&lt;-\xB7&gt;-y\x97\xA5\xBB\xAC\x9B0 \xF7ZSD\x843\xAFZk\x8C!5\xA9\xC9dX\x86\xD4;\xE0$#\xA6\x8C\xFBۄ\x8D\x84j\x9Bo@E
+\x87a\x8AmH\xAD\x9B}\xD0al\x8D]\xA3\xEDR_,\xCEc\xFAc\xB1z\xFE\xF2WN\xA5H&quot;.L\xAA\xD5p        \x8A브\x8C\xD6\xC0Z\x8300\x96,\x9C\xF5\xC16+F@\x9A\xD1S\x8DCf\xEC\xF8ۜ \xD3p\x83\x80&gt;6'4\xCF\xC5֦\x8AF5+9\xB0\xD4
+\xA8\xF5#5H\x93\xBA\xA8_6\xA6r\xA3\xFBPi!\xB1\xB8b\x9A\xD8FҢ\xAFEA]\xF9\x9EK
+\xAFE\x93k\xC1\xDC!\xC9F\xA0aƜa \xB9Ɓ\xA1.\xD3HW\xC2A\xCAb\x98\xD0ɢ\x9B\x89X\xA3\xF4\xADhm\xE8\xA8vk,\xD69?\xD1'
+YT=!\xDFKk\xA1\xD6%\xD9AI\xFCD\xE3*\x8D\xB9\xCA΂\xAAQ@\xA1\x88)jg\xE4g\xA0k\x9AX\xE4\xB6!Yw&amp;2\xBF-\xAC\x99\x86\x80Hx\xC1`*H\x98\xC40\x92ZG\x861*R'_o{\xBD\x86\xB1\x9A\xE5ڧ\x90\xAC\xBC\xFC\xE7ċ\xC9Ev\xCDT'\xC5ʼn\xED\x8AxQ x,\x91+.\xD3Z\x8AQ\xB5\x8A\xBC1\x85d\x94\x91A\x93vv\xCE\xF8 ǤPM`\xB2&quot;J\xF8B\x8AT\x95R\xBD\xA8\xB6Qs\x89\x96\xCF\xD4\xED(^\xD4\xD5YZ\xBF\xF0Ji        \xCB&amp;HY\x8A\x85\x85\x94\x95TU\xB1\xAAQ\xC1\xA3\xA8\xD6j\xC1X\x82\x8Cu\xDCX\xA4\x9A\xE0-3\xEA\x8C +%H\xE0\xA89LN\xFA\xF2\xE4\xE9;U\xACQ\x81UE\x83[R+˥\xAF\xF9\xF9Ln\xBDfAR\xB9\x8F\xA3\x89.^\xA6P\xB4L\xAC\xB8\x94\xF1\xA1&quot;\xC9Ҧ\xEBӂ\xB3\xC0*\xD9U\xCBdZT +F\xB4!ig\xE0i~ +I;{c\xD0\xF6 \x91q+\xD3\xC8ȴ\xA1E\xECo\xD8&amp;\xB2e+\x9A-\xBCҸ:\xAB\x82\x95S\xAE\xB2|e&gt;\xEC.\x87\x84c\xAD֩壮&gt;R̬\xB8\xC0B: FTk\xA4D\xC4ZE\xD4\xC9\xE1\x83\xA0\xCC\xA9\x82e\x80\x80\xF9\xAE\x885        N\xE0\xE6ɪL\x96\xCBZL\x8A\xC9-\xCElZQѫ\xD5Z\xDD?A\xCFD茩v\x81\xC8J\xADA\x96s}6r=DQ\xAA7\xA9 \xB9\xC2n: -\x90ca\xD5h\xAD\x88\xFD\xDD\xDF6\x85cq\xF49q\x92 \xAD\xEC9qd\x84d\xE5\x90&gt;}\x80͉&amp;Q\x93\x84\xCB\xF8\xC2\x8C|Tր\xA6tEU E
+ +\xA9\xB8\xF4\x88TY\x948\xBC\xFA\xC2\xD5w+\xAC^:3n-1U\xC5F;P\xB1Ěi*\xAAh\xB4\xB2\x96pC\xF0\xADz\xD2(\x8Ft\x88t\xE8)P\xC3\xEClD-9\xD6P\xE0H'\x90o\xA9X4\x94\xA3\xD7 +\xAA\xBAW$|\x9C\xBD)\x97ֺV\xA3\xEA\xF2a\xA5\x8Bv\xDFAB\xADh\xF4\xDAJUcU\xC4\xD5\x{1BBBF24}\x95:\xAFq\xF42a\xF6\xB4\xF4 \x82\x90{6o:֭\x89\xCC D\xC5\xC90&amp;\xC5` +F\x83*0v\x90\x95\xD1j\xE0\xAB\x88\xB5\x89\xAC\x81\xD5+\xE4s\xB9m\x88h\xF0\x{DD19}\xD0\x94%\xFD\xCA@\xF0 \xE0\xAC\xE8\x95F\xDBm\xBAu*Y\x94:\x97\xE2
+k\xDF\xED-\ \xAB‚\xBDЎb&amp;\xD7V\x95\xF2=(%\xE9\x88*\x9A\xAC\xAAp҅\xF6\xF4\xD1@,\x98e${e\xB9HE\xC4%ib\xA0P\xE0qHZH`\xCFK\x99\xB0a\x92\x93\xD2P\xF3V@\x90r\x8EE\xA1pH\xC7-!w\x94\xB3,        (\xE8\xDBq\x86\xB1(\x85#5\xF0X\xC1\xEA\xFD&quot;ч\xFC%}3d&quot;\xDD3,\xEC\x84\x80\xB0[\xBF\xCEQH\xB9\xE5(\xAC\xE1\xFA\xD6 +b\xBDjE#(W\xEA\xA2.\xA0hD\xB1\xD3h+j\xB4\x88&lt;\x8E\xCEb\x95Rʢ@xu\xC7h\xAD\x8B\x80ŵ]]Ջ\xC6K\xA1.\x86uY\xBD(grt\xF4A\xAF\xBE+t\xC3|H\x99b\xE6=\xE85o
+\xDDp\x81ҦxN\x95\x85\x8A\xB0t\x9A +\xA1gDV\xC1F10M\xC5
+\xD6+V;\xB4d%\xB23\xF2ф\xD9\xB5.\xEA*B\xB6WFr,F\x8F@\xA6Ů
+\x8A\x82AЪ\xCE\xC0\xE4Ew\xBD+\xBB\xD8\xEC!\xBA\xEBY\xDB*9&lt;\xDCzk\xB3\x90l\xA1B\xAEH7 \xA8:4\xA0\xA8\xA1VIE\xD5RтX\x87U #Ίz\xE80Zb\x87XDՀFE\xAB\xC2\xFA\x9B\xBD7V\xEC\x80\xC0b!:iT\xE8\x9D +\x92R\x99/͓F\x95\x9E0\xC5E+\x8B:\xF1\xFC\xCE\xC8(Uꩧ\xA2̨T\xA2\xDFjm\xDAm:\xA27&amp;\xDEZ\xA5lHs䄘        \xECT\xB5ƠV\xAC\xAA7F\xD4jJ\xBC6\xB6\xE2\xB4D&quot;V;\xFB,\xCC\xCCR\xADff\xDAh\x99        KӪ\x82\xD1P@4\xA2`Q\xF4B\x82\x80шf\xAD\x88F\xA4hG\x82ATU\xD5)o\xD7@ڡ1MEQAK\xB1A' hK T\xB5H+q`\xD1`@l\xDB:,\x96b,9\xB1\xF6(\xCB\x92nl@\x842!\xF9.\x9C\x91\xA8\xA2\x8C M`j\xF0\xE8IAa\xA2q\xBA\x82\x91Z \x84&amp;$\xA0a2\x81\xA2Ylh\xC6ǒ\xF6\xD1\x8E\xC18\x9Eh/\xB5b X\xB8        A\xABQ \x8A5\xAA\x88\xAC\xC8`Er\x82P\xC0\x92\xB7\xB9\xA9Fm\xC8m\x9D(Z\xB1\x8B\x8A\x84\xB0 \xABeY\x97\xE4\x8C&amp;;ѝ04\xE4\xE7;\xCF:&gt;b\xCEh\x82\x9E \x80F,Vi \xD0NX̕\xC6]ᴑ\x850\xC0\xFC +\xBD]\xC49\x90p\xE4\xC8a\x8FZk&quot;\xF1n\xC5 \xA4rc&amp; `\xA7*\x84`5 \xD3b\xA06\xF6\x86a\x83բ6v\xA6\xC5\xD6\xC4\xCEj5!\x9E\x88\x940\xE5q$\x85\xA5Q\xAE$OlUѩ\x82(&quot;k\x8A0VŊhT\x8D(Rبn(\xB6\xA9؈h\x8C&quot;
+x=\x91\xA45֎0(\x8AU\xADU\xD0 &quot;\x8C\x81\xDE\xF6\xC6:\x83b\xC0F+\x8A\x82\xD4\x90C\x8Bn:\xC0\x82 [\xF6\x9B\xDE\x9E\xAE!0m2m(3\x99( c/ $$\x8B\x93n\xDC\x86\x8AŽO+\x8C\xBE\xB7\xC0ā+\xC0ơ\xA4X\xA6\xED\x87\xC8M D4        \x9Ev@\xD3\xCBQ\x89\x8A
+M\x8B\x9EFDF܏fi@\x92Ȁa\x85L-9\x881\x80\xC9(6\xA3\xE4\x81d\xB7\xB3@T\x8D\x88\x8BX\xC5\xC6֊\xB1BNã.\xE9k\x83\xD1R\xB1\x83\xA0\xFE\xAD        l \xC0E 00P\xD0\xA3EOggS@\x92lr(\x9B\x82^/HCUKVNOOQUPUOSUWVSXWUWFSLSSQPZUUXXR\WTVWY]ZW\xFF\x8A\xFF\x94.K^\x98\xD4Վa\xCA\\xCA,yaRW\xBB\xF2\xD0u+E\x81`\x99j2X\xB1֘\x9B\x9B\x9B3\xEAZ\xA8\x89} ؅\xE4e\xB8\xE3 \x95\x80Q+zO庈F\x87\xE0\xF3\x80\xB4: _\x91q\x8A\xB48\xB7: \x9FB~\x96\xCCt\xA3\x8Cja\xA5SI\xB9?[\xC1\x8AVUTE\x95\xD3
+\xAC\xAC9\x8B&amp;\x92m\xF7\xCA&quot;\xDB+A|\xA3\x8C\x96\xA2\x8C\x85|\xE0(\x94&quot;\xC5\xE8\x8C;\x97ʘJ\x91\xE2 +L\xA6;K\xD5O7j\xA3l\xF3\x90\x90\xD8lU\xADXt`\x8DQDU\xAB\xB1\x805Z\xEC\xD1(\xE9zI\xD1Fz\x8E\xAC\xD6\xC4*\x8BX\xAD\x92\x99\x8B ˬ\x84 (\xDAZPe\xAD`5,E!\xD4J=\x93\xC4\x92_\xAB\x95z&amp; +\x88%$\xBF\xD6;}\xE4\xE4        \x8CL\x95\x9A)\xA2b͚\xDA\xD2沢\xC1h4
+\xCD7\xFF\xA5\xFA\xF3\xE5\xE2\xFE\xA8\xFA\xC6aI\x84&gt;\xAA\xD3B5P-:Du\xBA\x99\xFA|\x81\x9CFK^eM\xC7\xCA\xDDF\xA7ђWY\xD31\xA3\xF3\xA3\xD4\xD7CpMxB\xA4\xD8\xD9ؐ\xA0VAѩ\xB1\xAA\xA8\xF2}\xB2R\x8Ch\xB1\xC5\xD1]s\x9C\xBDô3\xABRXVR\x85;4G\x96B\x97\x84Z4VV\x83\xF0\xBC.=O`\xA2Z~\xACez\x9E\xC0D\xB6\xC68w\xCBZeY\xA0        \x91\xA2\xC4&quot;:\x8D\xAAQ\xEB\xC0&quot;
+b\xB3\xA9\xEF@.\xFBl&lt; Ĭ\xF4 \xA9%\xCD&quot;\xD8(@PW\x88XkEX(n'|R\xCB7;\x8C\x88ɚOj\xF9n\x871Y-\xB9\xD9&quot;i&amp; ,a\x8E\x91\x9D\xAA؀\x98\x86\xDAX\xECmlTE\xAD\x9B\x86\xB1\xEB\xBB\xDE\xF9\xA7\xD0A\x86\x84
+\xE28Px\xBD\xF3WdK&amp;\xEF \xC3r \x86\xB0a&quot;\x84F\x8B\xDFm\xB8薍\xC5\xD0hɫFBro+ì \x86\xD5b/*&amp;\xA3\xB1.f\x8B*\xE8F\xAB\x92\xD4:@!a.AkU&lt;\xE8\xA5\jQ\xC3A\xA4`!\xB4\xCD)\xDA\xD8ڵ) M\xB0|&gt;\x8B\xDF=p}A\xF8\xF9,\xFE\xF0\xC0\xF5i\xB7\xB6\x8C\xB2@\xBA\x85@b\xD5`@\xADE\xD5
+b\x895Ӏ% 谬\xB87D\x9E8r\xAA\xA5&amp;볡&quot;\xA5G\xE5*\xC4A\xAC0\xA8\xD5U\xED\xEEZ\xE4 \\xC3\xC0(DN\xAF\xBC&amp;\x88\xC6\xFC\x92&quot;\xA7Wރ(\xCC\xCFZ\xE1@Fn#O \xD4$@\xAB\xB5\xB2\xA0\xCB\xC2dXQEѩU\xA3ϩ\x80\x88\xEE\x95R.\x91\xD6מ\x97EWsm\xED\xE8)M\xB5h\xB8q(1Ut&amp;\xB8\xA4F\x8B?\x80\x9A!\xB8a\x94-~-P\xDD%7Ln\x91Y' 0\x97!\xA3\xA8\x8A\x8Ahu\x88\xA0*W\xA9\xEFB\xB4F\xE8\xCBx\xBC\xBE\x90}\xEAC\xE6ˋ\x9F\xD2AX\xA3*\x88Q 2VP\xB5\xDD\xE2\xE6\xAAN\xD3 \xBC&gt; \xDFe\xBD\xD9ۘ\xA2\xF8\xFA,|\x8D\xAC\xF9\xB3F\xF9\xCC\xDAj\xAD\xEC\xB2&quot;1\xA2\x86a=ױLPK\x9B\xC1\xD0 \x95: \x95ɪ\x8Fh/\xCBa/\x93@
+\xC6Q        \x8D\xA8\x96VUu\xA5\xB5\x8D\xA2Q\xC0+\xA3\xDA\xB4V \x96\xC15\xADՂņ\xA5G\xB9Zrۃ\xF6j\xB9 F6\x86E쭢bk\xB15Ĵ1Kl\x9C
+ZĪF\xB4b\xAD\xA2Q\xB4h\xC6 \xA2^\xEClB)e D\xB1\xF1\x91\xE7 TNw}x\xB2\x99\xF9a%VNw\xBE{J\x99\xF9 k\x9CYSb+'B\x8CZ\xAC`f\xCE4L,T\xB4\xDAZԂ\x88j&lt;\xA3DT\xA3R\xA0 +\xC1\xF7*\xE2\xE9&quot;\x92\xE9\xC2a\xF8ڶ\xC1\x8B$ \xA2\xC1V\xDDܻ\xAD\xE7&lt;\xACF\xFD\xAFJ\xA8\xDC +\x97\xAA\xD9j\xB4\xF0U\xA5\x86:%\x90\xBBܬ7\xB5\xD4\xC2\xE9\x85\xDBZ\x91\xB5\xAA(bQ+* \xE3\xA5cAS\xAE;\xCD|\x91\xFB\xB1h\xCC\xD1è \xC2\xEAU\x81 R\xB8X\x96\x8302a\xB0J_G\xCEm\xD0LJ\xAF\xBE\xD8\xF1S\x9F6\xA2\x93ҫ/\xF6@\xBC\xC2\xC7E\xF0`\xBD\x85\xA8&amp;f5g!E\x83+\xF6\xB6\xF6b`\xB1S\xAC\xA9)\xA82DEA\xAF\x846\xD4kT\x8B\x962Z\xC7
+\xC1j\x90\xD6p\xB1\xAD\x8A\xB5\xB6U\xC5Z$        
+TRw\xBDٕ\xC5.8èTRw\xBDbWy8S,\xDD:Q\xA8\x8BUR !\xA3\xD6\xB1\x82\xAAâT\xADX\xD5\xBB\xB2\xE2\xD0j\x90b        B,ťb]\xD1&gt;\xB7e`e,\x83\xC5\xAD\xD0jl\xC5\xAA\xA2\xAC^ ?\x8D5\x84\x91\x9FUk\xE1k\x8C=7DN\xB5\xB2 \xAA\xB2\xB2ƪ\xB5\xAA\x98bj!\xEA\xA8:5\xAB\xA8[K(\x91\xC2\xD5\[U\U\x9D\xCA\xD8q3l\xB3\xAEʰ\x82\xC0\xAB\xED\xA0y\xA8ZDQ\x9C\x9CJK߁\xC0\x9D\xDCa\xA7\xD2\xD2\xD7pYwCk\xF7\xB6g\xD5\xC6 !{#\x8B\x8D\xA1X\xC3f\xCDR\xAC&quot;F\x87F\xA7\x96AA/\xA5\xAB\x91:pK\xAEF\xB9\xD3\xCE*^V\x88&lt;}\xFA\xE4\xEAΘ\x96\xC1Q,,J\xA9\xEA*A
+#\xEBs\x94J\x8B^\x98ҫq\x96\xC7(\x94N\x8B^\x98ҵ_/O\xF1\x94ܞ$\xA99\x89\xBD\xAD؊        b\xA6\x81h\xB4\x88u\xE8T&lt;8 \xD2V\xEB\xF3\x9E^\x95\x829t\xCEB\xCC\xC4dD\x98\xACYeSX֖\xA2\xB5\xF4\xFC\xDA4 -\x94:\x8B\xDF[\xC9\xD9ʚ\\xEA,~Wl\xC6\xD5\xCAZ \xDFJm)3\xA55\xCDR#\xA81bt\xE8\xB0\x8B\x89Z\xCD$\xD8\xC2AdF-\xEA\x8Av\x82\xE9\xA9 %\xAAnQ\xCB\x94֩E3\x95\x91\xAA\x88u,\xE4Ky\xECN\xF5o@\x90_\xF8\x94\xF2\xEET\xFF\xF9\x86O\xE1\xDE\xC9\xD1j\xB2do\xB1\xD8\xDAXU-\xB0ٺX\xB3&amp;&amp;\xA2Vmi\xA3
+ \xBA\xA7\x8D\xB3,\x848NK\x9D\xEA\xD2B\xD7JmZG\xADQC\x87)H\xDF\xEA\xA0X$#\xD6E\x87\xB5Z\x90\x9CBKv\xE26\xE6T\xE3N\xA1%;\xA0\xAF1\xA5\xB9ޞPʒ !\xD3j\xB17UDM\xEB\x86ba\x8AG\xEB\xC0\x9E\xB2X\xF9\xDD\xDC'\xB4\xA7A        K\x8C0\xD86\xB0Ù9 \xA4&gt; \x9E\x9B\xE9=\xB9A\x90\xFA,|c\xA8\xF4\xAAl\xF4\xF62$j1\x8C,f\xA9\x9B@41\xAD\x82U\xB5bD\xA3J\xBD\xA4y\xB1\xA2\xAB^\x8B\xA4R\xAB\xA3\xD2bEaB\xD6^\x8Dm\xA7X\xB4 \xA2\xAB\x95*&quot;\xB8_\xA4\xE9
+\xE4R\xF5@T\xE7\x99\\xAA~\x88\xEC|\xD3ێ%,L\xEEBȰ\xD8[\xEDm\xD40,,m\xB6n\xA3uSA\xC0\x84a\xD8\xEE}
+\x87\xAB        \x8A\xDD\xFBF\xFE&gt;\xD2\xEE\xAD@\x8D\xC3        ɪ-\xA1 \xADV\x8Cdbw\xDD\xEC\xA8v\xBFi8ebw\xDD\xED\xA8v\xBFj8&lt;XOUT!I\xDA)`ጐ\xA3bZD\xD4\xDE40\xB1ؙv\x92}ǥ\xBF\x85\x81\x85\xE90r\xCAK&lt;\xB2@V[\xE1\xB2OP\x94
+\x82\xA4\x92\xC9V\xC1\xC0dB˿Rf^\xC3C&amp;\xB4\xFC\x9B!e\xE6\xB6\\xAA\x81\xB3NF\x96\xC1V\x82\x85\x90֨\x82iKQK U'\xDAF\xA0*\xE3\xA8*\x83\xA2\xA6\xF4\xA2\xE8\xA7\xF5\xA1
+E!\xD1ǧS\xA3\xB5&quot;X\xAC\xC5\xE1\xD8hA tB\x8B\xA3\xB257/H\x9D\xD0\xE2\xA4l\x83\x8B \x94P\xB6a%jPAAA\xCA粪\x8D\xA2(\xA2A\xABŒ\xB0\xE30t!A\xA4\xC6\xC3\xD8FA:tX\x80$!E^\xF4 \xB1\xAC\xC4,\xEC\xB6\xE3 +\xA4V\x8B\xB3\x98uX%\xB5Z\x9C\x8D\xC0\xAC\xC3j딪\x86f        r\xB2\xC2H\xAD(F\xD4boo\xB15\xD5VLU[X\xB7Q\xF8\xEE*\xA2V\xB5\x8Aڻ\xBB\xABq{\x9B\xF7\xDDu\x91\xCB|\xD5\xD6@d\xC7z\xFE|olFw\xBC\xDB3\x95\xAF\xF3\xB4\xCD\xE8\x8E\xD7\xD83\xB5\xAFr)\xD2o        \xDB\xD2iI\xB1Xl\xED\xAD&quot;\x8ANU\xACѢ\xDAzkT\xB4PKdFǰ\xF5يl9\xCA(x\xCA\xEAS\x85f\x9BZc\x80\xCC.-\xF7(&lt;\xD6XV\xB0xa p\xD0\x9C2=\x89\xD0\xDEd\xCC\xF0)\xD3s\x97\xC8\xCA/\xF1s\xF9\xD6[\x84JҪ5\xD6Pt\xA2\xC3*El\xC0\x8A\x88V$@\xAB\x89\xCA\xD4Eg\xA8+\x90\xEB\x8A{\xA8\xB0\խ@\xB1mI&quot;^M\x96@V\x8D\xA0\xBA\xE7!\xDA \x84&gt;˽\xDB\xD2O\xF88)\xF4Y\xEE56\x84\xF2&gt;N\xBA5\xB2L\xACr$ȐXQ\xABU \x8DFQ\x8Dh4:\xF4\xB2BE\x83&quot;\xD6Jt\xEC%Pe]f9 +\xE6\xC9h!\xA51\x80b\xFD\x82uCa\xEB#g\xC5`*#\6w&gt;\xDBQ\xAB\xD9Zg\xE0\xB2Y\xFEٮx&amp;\x87\xCA\xC0\xAD\x89\xAC
+\xB6        '\x90\x905\xB2QYiA\x87\xAATtZ\xD1]\xBB\xDEۮzQ\x8BE\x93\xA6\x95B\xD7k\xBB\xA6\x93\xC0\xA3Qu\x90\x87\xC6\xC4MhD\xAC\xAA\xFA\xA6\x98nj\x89l|6 \x9E \x9B\x9FDu\xBE\\xFEl&lt; \xA3zge\xF8\xAC[DV\x82\xB6\xDAR +K \x93m\xC11 +\xD3X\xB5\xBE\xD4\xD4\x87Z.\xF5\x94R\xE7ȂҤC\xB2ѫ\x91 H\xA9Q\xB5V\xEBU1F՛0t6\x8Bv\x98\xCAL|ng\xB3\xE8a\x87\xA9\xAAb\xE2^\xB5\xB2\xC0j        aD\x8AAEԨX\xB4&quot;\xAB\xB6ZQ\xB0Ewʎ\xE4ASз\xD7Vd$\xFA\xAAXX\xBA؇\xD6\xE2E\xABڶI\xE7&quot;\x87\xE1:n?\x8F\xF7|2 \xC6\xE6\xC6\xCF˵GE\xDC'\xB3\xE0\xD9\xD8\xDC\xF8jU\xDB)\xAE\xB75\xA4\xE5(L\x8Aհ\xB3\xA6\xA8\xA8\xCD&amp;\xA6\x81)\xA6Uں\xAE6\xCA( kT\xAA\xE1\xC0\xE9\xB5\xC2$X\x82        \xE5 _=\x84\xB9\xC1bEKE\xB4h4\xD6,‹A\xB9 R\&quot;w&lt;\x83UC\x8B\x97TE/\x91;\x9E\xC1\xAA\xC1\xC9\xEB\xE4\xA8/\xC0f\xC3@*\x91`%        ! &quot;\x96\x86 +\x8A\xD6h4Pz\xA5\x9C\xEA\xC3bJ\xC1\x9AB/m-\xC1JE\x81
+\xC6^;\xB4\xC1\xB6m\xC7\xEF\xE5yS\xBCZ\xD5\x84. _4\xC2\xF6\x93\xE6\xE14tY\xF8\xA2\xB6?\x86\xE1ܭS*2I\xA4        \x8C\xABVT\xAB\xAA\xAA\xB1(RQQ\xEB1M\x85i}\xB0(k2\x96;\xABJ\xAB m\x98 X
+ \x80\xAAQu\xB4:t\xEA\xB2\xE4k\xFB^;t:w\xBEFz\xE1Z\xFEt\x96{\xADT$q\xAC\xBB\x93Ϭ)\x8B\xB6NԈ'\xA8\x8A\x8E\xB14LK\xEC
+\x8B\xA8:\xB5V        \xA5\x9A\xFAz\xAA#R@\xEB\xF2\xF4\xA6d\xA9&gt;\LWCc nNQ4\xB5R\xDF\xDCܤ\xBE\x94&amp; ށ\xB2_\xD1\xEC]W\x9A,\xF8*\xFD\x8Bfu\xF5\xAC\xCD(\xA4\xACU%H!\xC5`1\xC6\xC2\xD24Pú\xB1RjW\x8A\x85'\x88c*\xFD\xD0[Fk\xB5Xe=.*\x87\x86\xD8M\x9C\x96J +b\xF1\x82Ba\x8Cf\x9B|w\xA7j\x85\xE8\Kn
+\xB9\xD5B\x97i,\xBE)\xE4J\x86!\xFA\xD4*\xB0\x86\x98sxI\x96\x8AQ CT-mB\xEBX\xEB\xC0\xA3PG\xDDZK\xDC\xD6K͢\xD1iE\xB8R
+\x946\xA0 f\xA5\x96\xAD\xD7\x81im% \x8354\xCBv\xA5*}o\x98\xE6\x8Be7\xBBTٺ\xB3\xA0\xF7\xB4؆5T#J\xF9\xE2|J1L\xABX\xC7\xC4R-khT\xAA\xAA+ '(2\xF7]\xCB\xE1\x9AeY\xA7#s\x91*&quot;eZ,F\xAC1(\xA8\xBAT\x8Bh\xC5\xE6\xE4b\xD1&lt;6\xAF\xBC(\xA9\x93_\x98(yd^y\xAD\x922~\x82\xA1\xDE\xEC\x87\xB1kp\xDAZ\xD4ނbi]0-EU\x8C\xA2U\x94@\xF2\x9A\xC1\xA0\xD4\xFA \xDC\xEB\xF7\x83]h{\xE3\xB6 rt\xD5\xF6\xB5ЃM/\xD48\xD0#\xAD\xA1\xC3Ј\xE8\xA3\xA5        \xC4\xE8TKoQ7C
+O+\x89\xA5w\x80\xA8\xA3y\xC6\xDF:\xD5\xB44\xC2X\x835V2*\xA2X\xA31:\xC5P\x9B\xC3T\xCAt\x85m{2\x86ֺF\xD3Q)\x83&amp;3f|G\xA5\xAAZo\x8B\x97C`G\xD9w\xD2t\xABi\xB5:\x88܀|\x80\x96W֞\z\xCFʾB\xE4p\xF2BX^Y{s\xE9=+\xFB\xBERff\xCB92\x80w\xE40\xC3\xFB\xB0\xB6\xAA\xD3?\xE9)~03;5\x8D +\x89a\xB1\xDAe\x8B\x82=\xF6\xB5\x88\x9D\xBD\xBD\x81i'\xB6j\x82\x91\x93#rž$\x8D\xCF        \xB5'_B\x8AJXV5X4\xA8&quot;\xE0d4\xD2*(6* H\x9A+\x94V\xA3\xC3b\xC1\x88\xCE^#\x9C1\x99޶U\x9D\xB6\xA2UTĴXBұz\x848\x96\xEE\x8A\xC0U0\xA1\x9BA\xA24\x98f4 \xA0&quot;\xA4\xA5\xBD-Bb1\x84!\x8CK\xB7iZJxݷC\xA0tu\xA2\xB6g(^c\x96Jb:\xBBp\xBA\xACB%\x9C\xD5\xAB\xA9\xC9#\x89G0\x82\x99\x86\x83L*4\xDD\xCAT\x90H\xEC\xB9鶯F\xB5&amp;\xE4C\xEFi\xAE\x8C\xA5t\x88\xC0z̀\x8C
+\x99I\x90\x89\xA50\x80\x80\xC4@\xB3\x96\x90A\xC1`Dc\xB1c\xBC,\xA0\x8AX\x90\xF3\x82\x97PX(\x90\x8D\x88c\x83.,\x88\xAA \xA8Z1\x92 Lh̊Q\x8D\x80\x821\xAB        \xF3\xE3\x90@ω\x8C~\xAC\xCD#\x94\xDE
+:\x80d4~) \xCD\x8CH\xF4\xC5x\xD3\xF6X\xE1\/\x85\xA1\xBE#\xA5Z\xAD/ړ\xB6NJ[o\xFA\xA1`M\x9EwH\xE4\x8E\xA6\xF86bT\xD5f\xA6\xA3\xCDQ*7;w\xAB\x81\xE4jX\xB0uc        q\xAA\xCExԄ\x9AiIM\xA32T,6\xA2\xA6a\xB1XL AD\xD1*h\xAC( \xA2
+ :,\xAAj\x9B\xACZ
+\xD60r@Y\x9B O\xAD\xC06\x91/\xC2\xF09{\x8A\xC6\xC6ZTQIE\xA7\x94\x8A&amp;\xC4\x94٭\xC0*l\xDCH3\xA1ӃAC:&quot;GZ\xC0k        f4A\x8DdR8\x90\xA6*r@\x8AB*,bY\xB0\xB4\xA7i4\x90$\xC3\xC4\xCD\xC4\xDE\xCE'܍\x9AvM[\x8F%\xED\xA15K.;=\xAC\xA2⬊\x93P\xADtC\xB6\xA5\xE7\xAC\x82\xBDt\xB1\x8C\xEDOggS@\xC2lr\xC8Ii\xA7\x94\xFFx\xFFb\xFFf\xFFd\xFFm\xFF\x82\xFF~\xFF\\xFF|\xFF\x88\xFF\xA6\xB19\xF7\x868\x94+\xC5\xC30C\x98L#TDp\xB4\xB5
+Ac @TD\xC9U\xB1\xC9\xC81\xC0
+\x96%\x9E\x8C&amp;\xB8\xADD\xC0\xAA\xB4&quot;\xA0U0\xFC6\x82\x88#\xD86E$\xA3UEA
+-6\xE8\x83\x85G?O1hAt\x8A\xD4
+\x80т\xB8D\xC8\xC4d#2\xA8Ӊ`\xD0 \x80B\xB20\xA4U\x89t!\x90\x8D\xB8\x80a\xB0A\xD0\xAD
+&gt;)\xE4\xF1Œ\xC8\xC6\xE6O\xE57)\xE4\xF1Œ\xC8\xC6\xE4O\x82\xC8\x{13D4E8}\xD4&amp;Y\x87\x94\xC0\xB6ϭ\x81) \x96ʑ\xF3VS\xF9
+L\xE2\xE9 \xC6\xCC&lt;\xC5]P#\x83!\x8AU1ð\xB5\xD8Z,v\x86\xD8ۂ\xD5\xD6^l1\xC5b
+\x8AV\xAD\xA0j,X+*ZP\xAD*Q\xC5ė\xE3C\x8BVD5\xC2\xCA\xD2\xF4)\xF6\xBE\xEA\xAAF\xC1X\x83\x82ԣ\xB5V\x85'Z쯨Z\xAD0`\x80\xECD\xA3_Ju\xB8\x8E\xBF\xF6E\xB61\xC6P\x84N-c\xED\xB0\x85Ҫk\x8DX]\xE8\xEC)\xEAMw.\x87H$ H&lt;v\xB1\xE42\xA3\xC4        9\xE4*%Q\xB2-\xAF\xA81\x86\xC7M\x8CU`\xC8\xE4\x96[\xCC\xC5\xD0b2\xD0$0W\xE7\xEBHq\xC1P\x88 bU\xABb
+\x88eD]\x85&quot;FС\x80U{\x91\x84`B@\x83\x91)e
+\x80-\xB6\x88\x88 \xE8R@\x87\x88\x88\xA0*\xC0.C\xD1\xD6J\xD6b\xA3\xC5F\xD0P@,\x92\x90/\x92l\xA0$YV3        \\xC4:\xEESDx5I\x90\x83\x8Eph
+@# \x82M\xFE\xF9i\x84\xB0\x97\xF4\xC9H\xF4\xB5\xBD\xCF\x88#4{I\x9F\x8CD_{\x81ѻ\xD1?g{\xC0$2RRI?, U\x9B.\x8B9\xA4\xB03\xB3\x83\xB8[E\xEBm\xD2\xC30l \x8B\x8A6X\xC4P\xB5\xA90+L;;;[\x9Bx\xB1W{SAT\xEBEc\x83\x80\xE8cA1\x88V\xB1E\xA3\x8B\xE5'n \xEB\x8A(&quot;\x81=\x80A\xA0TKJXaQU[t &quot;\xC0\xBFM[\xA0&quot;l\xAC\xB5wu        Eb+TM\xF5\xB2\x80  6V4\x80 bU\xABSUmUK\xE8\xE8E\x9B\xC66k\x8B4`\xF0P\xE9sha4.\xED\xA1\xD0(6\x8B
+\x84.\xEC\x82Nx \xA1\x94\x8A \xEF|\xF5\xB9:
+AC.\x80$\x8D\x96\xB9R;\xA4YC:) \xA95\xBD\x88\xA2A\x84\xAA\xA6QUk\xB5V\xC5`\x81\xDB\x82H;7i\xFC\xBCC\x925ӹ\xD76O
+\x85\xDDE\xAD\x8A\xA86\x82\xBD\xD2\xDA\xC3\xD3n\xD8'/--Ky\xF9\r\xB0j\x87l\xFFMu\x87$\xD76\xA5\xA3\xF0\xCC \xDC\x93(Yh
+&gt;\xD9Sd\x84\xE2\x82&gt;k\xEBdO\x95        \x82 \xFAhT2:\xD6W\xA2\x8C\x90E-)\xCE\xD9 0\xC5\xD5\xE9\x97\xE2]\xBAj\x96O1\xE6!\xE6\xE0\xC0b\xCC\xC4\xE2\xAEjUTԊ1\x8Eؘ\xD6Yi0\xC1\x94:\xAB\xA8\x8A\xA5a\x8AX\xB1j\xC5\xB1\xD0!\x8ChDP-\x82)\xAAPUAd\xB5Xl@\x80$\x99z\xA7\xE4\xB6PQ@\xC0\xD2j\x83AFن\xC0Hc\xF0b\xB5t\x8A\x9D6\xC06HئH\xD1\xC9Jc#uQ\xB5ATC@Hє\xF2F\x85\xF8\xC7 \xA30Th        @\x81\x84`\xA4ٱ\x91\xB8\xDB[j\x8D$BƨC \xC3@$\xD7ؔ\xE3\xB5\xF9\xA02\xA7\x89\xA2T\xB5(\xAD\xC0\xA1@C&amp;`\xB0\xE3жq        \xB6\x8AU-\xA8\x82\x94 \xB7f\xDB\xD1\xEAT\xADAEյF[\xC56\xA43\xFA\x9Cȱ\x83\xF4kd۵i\xFBѻ&lt;P\xDB)@\xB0E@ؖ\x9A\xC9\xCE(\xFB\xA9\x83\xDD3\xC0Y!\xDAٿ\xA4\xCFv\xAAU\x91\xF4eS\x9E_[DhЃ75H\x90 `'\xA0\xD0:\xBE\xC8S\x84\xC154\xA7\xE3\xC1r\xBCE\x9E&quot;5\xAE\xD1\xA7\xE3\xC1z\xBCW\x89\xB2^\xA9Z\xA4/$\x8E\xA4&quot;\xCEh\x87: )\xC4ܜ0;qB\xCCL\xCC\xC4\xE2nT\x85%\x828\xD1ZcB\x96B\xB6Ū\x86a\xD3ز\x8E\xBD\xB9%\xFB\x87'k\xCA0A\x92\x84\xA5|А(\xC1AhB\xC6\xE0Ix1!\x86\x9A6\x92#\xCA\xC6\xF8\xB4\xAB\xD8\x8A\xC1@AQ\xC0\xFA\x97\xD5P\xB0\xAA\xAA5U\x84\x98K\xDA\xDD`Վ%\xAD\x8A\x8A\xA8\xBA\xB0\xF36\xA3H\x8D\xC52^@\xE0\xE0\xDA\xD71E%`@aP`\xCBi'\xA0PrDգBc\x9DULS\x91\xC1jPA͘p\xDC\xB3\x99\x90\xBFN\xB4(bAi\xB1\xAA\xAAhl$DU5
+\x86a\xC5&quot;\xB7\xE6\x86a\xCDB\x8B&quot;eT\xD0Pd\xB6t\xC0
+\x818\xBA9%\xD0.\xB2Xdȵ\x9C2\x8E\xC2L \xF7\xFC\xB9\xB6\xBAʑi\xBA\xE1\xF8\xF9hЯ&amp;\xAD&gt;\xDCe\xD8D$\xB7&gt;W\xD6\xA5\xE0o\xC0\x88\x80\xD0
+\xA0j3\xDE\xC8#\xA9\x83\xD2 +\x8A\xD4\xF1@\x89]\xAC\x8D=\x929(ݠH\x95J\xECb\xDFIn\x93\xD9;\xEF\x89\xA3pzgD[\xADm\xA9\x88S\xC4R\xB1\x981{q\xEC \xC5c#\x8E6V\xEC1\x89LDT\xBCkg\x8DsZ +;{;\xC3bU\xAB\xAD\x98^4b\xD5:RQT`KaX1 + 먀
+\x88`\x92_\xD0 AUa\x80\x94\x80t\x999\x91ܚ
+*\xC0\xA0\xA27*\x98        ,h\x85\xC0\xC8JnЀj\xC4`\xA3j\xADEK@\x98d&quot;K\xD6
+)\xACdr        \x90C\x95B@\xD96Y\x80%y\x89\xADІ0\x93\x86\xD0v\xB9T\x88\x91glK\x80h\xD9)\xEC\xC9MQ\xBEj@\x80
+ 
+ 2!\x88T-,#-2\xC1
+\xACZX5, +\xCB\xD1*\x86\x8A\xB8+\x8B\xACX\x93`\xB1\xB0@\xEDdL\xB6\x93\xC0`\xAD\xC0B\xED\xA2\x97&gt;\xF5\xA2\xC0\x88\xB08 \x8C\x8D\x93|\xC2        t\xFD\xFC-\xDBƺ2\x98+\xCE3DA@P\xAA\xF8\xC4 @\xC1h
+\x80\xD84(\xFE\xB8#\xA4\x81.\xAA)j\xC37\xEE\xE1aj\x86jt\xB4\xE1\xF0)\x91\xA1\xA8\x94@
+\xA9,j^QD\x90\x886\x87֪jS\xFA\xE9d\x9B\xA9؁\x80\xA7\xB8Ǩ\x92\xB6\xB58&gt;\x8AkQ\xA3\xD6z,6c\xA3\xB5\xE2$5\xAAZ&amp;فw\xE6\xB11D\xEC\xC5a`;\x92M*ni`\xA0\x92c\xF7\xC8j\xD1
+\x800hT\xF2\xD0\x8C@ &quot;\x8C\x96\xB4\xA8*RBP2V\x8CTibT \xA20\xA4d0\xA2]!=\xA2\xA8&quot;\xA3U,X˲X\xC45\xC2b\+\xB4\xDD\x94R&gt;ɽΤF2%&quot; 6`8\x89\x81\xEC\xA7b        p\x94\x80\xCB\x90Ȩ\x93\xB2\x86 \x95b)\xC4a`\xB1\xA6\x87\xE2\xBC8\xD3eK\xDF\xF0\xE2\x95x\x9A+\xE2\xE4&quot;,
+AIX)m\x91R\x87\xE0E\xF4\xB2`@A\xA5\x8E\xEC.+\x880\x80\xD0cPЅ)] z@\xAEE\xA3ǐ\x8A\xA2b@E\xAB\x82\xD8\xE8\xB4\xB0VP\xC0H)b\xD1*`P\xAD \x80V\xAAB\xDE5\x92\xFD\xE5\xE7 H@(\x9CA00l8-D\x8C@T\xADU[f5\xE9\xA3Ƀ\x909\x82\x82LO\xB0F\xEE`r\xA0&quot;G\xD2T\x99\xD2\xA0\xBF9\xF1\x9A\xD2\xE9Ï0\x95S\xB2=}*\xF1e\x81)\xEE\x887\ӰZ4\xD16f#j=5\xADgުM(\xB6\xB49ۚZ\x98\xB0\xC8B\xDBFn\x93X`yH!\x82\xA8Z\xD4R\xAC\xA0\xAE\xC6\xC6I!\xE89r\x95\xCA:\x840\xB4%֡`D1QnJ\xAD\xBA)Ő +\xDBRj,`\xF1\xFFm \x85RdI\xC40`\xA3`\xC9R\xACb0bѩ\xA0UdK\x81e\xE8E\xB6\x83#h\xAD
+&quot;\xB6q\x91 +2\x86\xAC\x95x\xD9M\xD8\xD2be\x91iHk +H\xA9\xC1\x82\x8Di\x89\xF6\x8CV\xB0FR\xC8X\xB6K\x8E褹\x9Dw\xE7 \x80td\x86\xFA\xC5&quot;d-R0\xAC +\xB5\x87\xB3[\x8A( aDE\xA3&quot;Z\xDB4
+\xB0Ҝ\xFCPX'\xF3\xE3\xC7\xBD,\xEEE\x8E!\xA1\xC6\xF6.X\x80\xC0Z\xB0\xB1\xAA
+6X'\x88-(&quot;\x8Ab@&quot;0 \x80\xC0
+\x80\xD1-@\xB7\x83^EP\xB52!\x9E\xEC\xD8 \xC0\x80@\xC1
+\x80\xA8*\x8C\xF3\x81\xC0\xCAH\xC0h + \xA2\x84\xB1\xB3\xAA&gt;\xD9&gt;\xE3`\x9D\xEC\x9F@\x8Ep\x80\xF5\xB2KrΜ/^$\xAF&gt;\xA2V\xEDp\x89=\x9D\xCAA\x8C\x89\x99\x89\xBB\xBD7\xB0XP1 1LU &amp; +6 +6v\x98\x8A\x98\x89u,l0\xAC\xAA5U\xAC\xD9Š\xA1\xA2h-\x8A\xD6V\xB0\xB40\x94\xA2\xE8\xD0&quot;`\xA4\x8B.I4D\xA8        bY\x88 +JB=%\xA0\xC1*0I\xA0\xA5mE#&quot;`DI\x8D\x90H\xC5!mͶ\x89\xA9Ȱ\x8F\xA5Dʁ NT@k\xB2,\xC0\xEB\xA1\xEA|/\xE9r\x86B\xD8\xF1\x82\xB9@MQ\x84\x809\xF2{l\xD3pS(\xB2\x970h+6\x80&lt;HmC|\xCA\xAD\x98Q\xADXR\x8E +,\xDBH\x81@*\xAAP\x81\xD2\xE0\xD0R\xAF\x84\xD6\x84\xB6\xB8x\xDB,*k\xF43\x82|X\x92-\x88\x80_B@$ \xACC@UQAN;\x8C\xACG\x98        E&lt;A&gt;7&gt;%\xD7_N\x96\xF9\xC0q\x86\xF6\xCAH\xF0\xB3L\xF5        \x80S\xA0\xC0#\xEB\xD6\xFE\xE8\xE3d\x83J\xA6\xEF\x80\xE3\xE9#u\x83H\xB6\xEF\x80\xE3\xF5N-`,ڻ?\xBC\x80x\x9F\xD5«y\xD7I*\x81]\xBC3q&quot;\xEEI5\xAD +j
+\xF666V\x8B\x88ث\xA9\xB666\xF6l +\xAD\xAFê K\xABd\x9B\xD60-FD\xD40e4\x83fn*8-C`\xA10\x88u\x8AVU\xC4v\xC4\xEAP\xC9 pucV\xC4
+UD'X\x80\xC1@X\xF6\x980\xCA\xAC\x8Aƣ`UT1@\xEA\x8F\xA3աSS (B
+\xD1=d\x8C\x87\x80\xB1,l\x8C2\xC5*@\x8CGo\xC5iE\xACYҀQt\x82)4Wb;L0*\x81M\xD82\x90\xA8\x84-c!i\xA83\x80 +B\xA0\xB5\x8C=J\x91\x9B \xB0P\x8C\xBD&quot;d\x8CŮ\x8A\xC4H\x83\xE5 +\xA2\xBA\xF8\xA6N\x90A \xE3`\xC5X\xB8\x90ˁd\x81\xA2\xD5Ŷ\xC8\x80\xACX\xC8 +\xCA-\xB6\xC0\xD13IF@+\x82 \xA21\xA6\x95\xBBuj\x8C Z\x8C\xAC)\x8A`i\x82\xA1\x825P\xB0*\x80\xA0\x80        C%\xF9\xB6r\xD4ԩYJ\xAD
+G)(V\xED\xEF
+\x83\xA0\xC24\xAC`\x80\x82 \x825A\xB1al\xAA\xBE\xE8c&amp;\x82\xC8r0њ\xB3.\xFA\x98\x89 \xB2IC\xE6c\xBERl\xF9\x9E_\xAD\xA9yW`:\x99\x8ER\x89\x95\x808\x95\xB8\x86X\xECml K6MSLl4l\xB4\x8E\x8D5v\x99\x89i\xCDf+6bMLԊ\xA5aia\xA3!\x96\xA6+\xA3\xE8\xADت \x82J\xA0X\xBC/ \xF2d\xEF~\xA5%UQ \xA4,
+\xA9Dr\x88\x91IPe
+Ԁ\xB8 \xDCB`\x8A\xC2Be \xB4\x8A\xA8\x8AA`\xFC\xBD\xCD\x84\xDB`^W\xC5\xA0Ya\xA0\xA1-D db0n\xA4 H\x8C\x90\xAB\xB4\x98\x80\xB00H
+
+(\xDB\xC5-\x80\x99C:\xC0t\xBB                %&amp;\xC0Q\x8FE#\xB9\x92\xB6(&amp;\xCC\xEE\xBEm6\xAB\x94\x86ޏ/C\xA8\xAEoo *;\xC748\xC2\xF7P\xA0 \xCEP\xB1ң
+\xA3\xA1\xC0LB\x86L@9\x99\x98\xC1\xA2\0hTcAt)5\x82\x8A&quot;\x85\x86Z`4V\xB1\xADV\xE3\xAA1(\x94\xE8        
+@ J\x8D\x88ƈ`tZ\xC0V51\xE9`\xBDA§%\xB0\xC08@ EAhh`\xD1U\xC0\x97ԪM\x88\xA0\xE9\x93̓\x98\x83H\x9F\xAE\xDC&amp;\x86\xE1\xA2gp\xCD\xF4@\xEE\xCD\xF5kU\x9C\x86\xBA6\xEB(\xD8\xF3}Lb\x8A\xBB=֪XM\xADl\xB4\xDEj\xD8T\xF6\xB6\xD6D\xAD;;S,ͬ\x91f\xD1j\xF6`\x9D,Z\xCD\xD2&quot;\x97\xB20Q\xC70l\xC5\xF4&amp;[Dl+\xB6\xAE̬\xA0\x92A0TB&amp;`\xB1\x962~\x8A'+F\x97\xC0R        *\xBD
+dDل\xF2&gt;\xF3!0\xC8`-\x88\xC2ZlEc|m\x9A&quot;e\x82 \xA0\x86Y&lt;R\x88\x83\xC4C(J\xB4m .\x86@aD\x8A\x97\x96+\xBC&gt;\x96\xAB\x88\xA983߈\x88\x84\x95 + $ +Az\xB00ewa2\xEA\xC1\xC3dh\xE7p\xDE        gPS6\xE5\x88&amp;\xAB\x80\xA2\xB9\xFD_\xDC\xFCnh\xAF\x85 \x80B\x8D\x81 [t b\xB1\x8E\x90\x99&amp;DB
+\x86\xD0)$\x872\x86U`D\xB78\x80\xA8\xB5R[\xAD\xC4\xE2\xAAElPD\xC1
+
+\xBE?4Djl+:\xC5&quot;\x8A-M\xC4P\xC6\xDE^Q\xD3\xDE&quot;\x9A\xEB\xD8        \xA2\x8A@\xD5TSH\xD4j\x93\xD6\xC4rPA Qd\xC0\xBA\x82\x80\xA9\xA2\x82\xB1 +HF\xC22\xB0@E\xC0`4 \x80\xE0$\x81 +\xD1 + +@  \xA2b@\x8CƂ\x88m[\xA2 OggS@\xEAlr\x86\x89R\xFF\x91\xFF\xA6\xFF\xA5\xFF\x9B\xFF\xB2\xFF\x8C\xFF\x97\xFF\x93\xFF\xAE\xFF\x97\x9E\xE8\x93΃0\xA2\x82$\xE6ĝ\xF4\xB0#(wN\x90\x90D8 \xF9\xCC:\xFD\xD0\xF0\xD1\xDAt;\x89\xF79\xC4\xCA\xF4w\x8Bi\xB1\xC74U\xAC1\xC4bb8\xC1Β`\xD8h\x82Ѵ        \xD68P\xB1\x8F+\xC1\xD1j\x8Bg\xB9\xA6\x91M\xD5 +\x85\xB2 \xD8\xE1\xC0:T\xB1n)Pb\x82\xA0\xAAXĠ\x8A\x{16522A}D\x8C +R@[#\x8C )\xF7 +ӊV        \x821&quot;2v`ƂĶ\xC0FD\x83YM\xA3j5T\x87$(e0\x8B\x80UEY
+`ŋ\x8FGy\x95)\xB9\x96E\x80޲\xDBERXUxhT4a'N        fv\x84\xC2Z\xD3(p\x8F\x85\xAA\x81\xE9        qp\xD1D8{\xE0u        .\xB4uh\xB7\x8B5q\xC6U!\x98\xC4R\xBD4\xA8\xC4\x8D\x91T\xFCG:\xC0\xB2\xC9ՠ\xF0\x8AF@]L\xA2H\xC0X\x8F\xED,6\x80d\xD0
+@#k1 \xA2\xC56\xAB`\xA8\xAA\xC0B\xF4mSw\x96\xA6\x81XD\xC0\xBA\x80\x80i) \xB0,\xB8Ѐ\xC1\xB5F\xACQ\x83\xC06H\x82\xB0\x90H$ ,\xC0h\xD1\xB0U\xC1\xD8ZP\xD4\xDE޷\xC2C\xC9\xDC\x83\xBD`J6\xC6.\xDF\xB4\xB7\xBC]\xA3\xB5\xFAP5\x9F\xCAў\xEF\xF96\x9D0\x8Bka`Q\x92\xB1\xB5\xB3$X\xA2\xCAVL\x8B\x9D\x83\x8A\x8Ad``\x86\xEAB\x97
+¤\x91\x84!#Ȗa\xA3\xAAi\xD5T\x84!\x83\xA5\xAC\xAD\xAD\xA3n\xA7\xD8\x8Aj1\xDAJQD`\xD0f0\xC1VM\xA4Q\xB0\xE0P^B\x8B0 \xE5ՙ\x91M\xDAt \x89\xF6\x82 +\x8E\xB0Q\xAC\xA3N#j\xA0\xE1\xA2\xE1Q&amp;
+ \xD3B\xABv_(\x94\xB9\x81\x94\x9E\x85\xC0\xB6F\x92\xBCxšF \xB4.\xE0`Ŧ\xA5\xB0H\xD482Ry\xBB\x811IT\xD4\xD0i`\xDCQ\xCAB(\xC6!6%3\xC8 \x9E\xA5jj`\x86ڋ\xA8\xA14-_D\xE2g\x9C\xB1}W:\xE0\xF2\xF89\\x9CG\xFAu+M\xFE\b\xDB\xF2\xB0C;Ԓm@\xE06zR\xAF$!q\x85!Q!\xC5p@͋\xE91A\x87\xCD        \xAA\x99@\xB1YH 0\xE8Hc\xBD\xA8)\x900\xFB\x8C        \x89\xAA\xAEWIT\xD6k\xAA&quot;\xD8e0\xD1t\xF4bA\x80\x8C\x88Bjo[Aa\xBD \x82\xC8Zlї`\x83^\xC0\x80\x84Up($\xC5 \x88&quot;\x83\xA0\x91\x90\xD1Q\xA0\x86&quot;\x80\x8C\xDE\xC83%\x82j
+@\xE3\xCFꀂ\xC1ʝ\x93 \xC56;\x9Cd\xF5mU\xAB&gt;\xD5\xDC\xFC\x9E\xCF\xE1\xC0\xB4\xA3\x85\x81\x81\x8Da\xD3P\xB1VbWLK2&amp;\xF65+6\xAA\x89X\x94\xB6\xCC(V\x8D\xD4&amp;\x8BD1P \xB5EQ,\x8AN\x9D\x8B\x9AX\xA1U\x8CEf\xAD2(\xB6\xA8Q\xC5X \x80\x81L*v!c$\xB9%m \xA0WB q״L&quot;ZRB D\x83{mgZ #`V\xA4\xCBݲ\xA4\xA2\x85[\xB5&amp;k\xAF
+ &quot;0M\xB0\x8C1N0\xA8\x88P\x8BTUmi\x80\xAAЉ2+)2\xA4\xC0ݢ\x87L\xC0V +\x8C\x86\x8AJ)[ rNF\xAC +KZ\xA8\x89\x83\xAE@\xF4\xD0 \xCC&lt;\xFF\xD4{\xC4op\x9EF\xA7\xCEsg/\xE7w7\x9F]\xFFX\xD3  \xF0&quot;r
+L\xB7j\x96Q\x82co\xE5b\xB49\xCDB+\\xDB +TU\x88\xA1!$Q+@\xD0\x89\x8A\xC0\xC3t\x94 -TA\xA0TE@\xC1D4s        \xA2\x80ZQ\xA4\x9DX\xC2`\x83ED\x8CTtcD\x8C\xF51\xC50U\xD7\xD7$\xC1N\xD72\x87\xE8\xB0@ň\x85` +\xA2\x9A\xB2^1&quot;(ض\x80.D\\xA0\xBBĀA\xF4 \xC0 \x80LD08(h\x80\xC5Ag\xADj\xFE\xB8+Mf0\x8F\xBB\xD4$ 0 wDnkk\xC0\xDEV|\xBDZayʜ~\xF3\x83Řx. , \xC3N\xAD\xA6\x98V\x8B\xBD\xA1BeU\xCD\xF6v\x89\xF6\x8A\xB5\xC1\xD66!\xF5\xF6\xA0\x98\xF6bX-\x80\x80\x8Az {\x9B,3\x97\x9A\xE1:R\x86UEM\xC5j\xAA\xA8b\x81ZW\xC3\xDARQ\xA5(0\xA3\x90\xD0)d&quot;X\xD5        k\xB6&quot;! !idd\xD1B\xCC&quot;\xC2B(\xB4B !'c\xAEԙ;3\xEC\xD2V\xE3f\xA5R4\xF4&quot;Z\xC2g\x87\xE0 \x85\xD0\xD8*\xD0Э\xC30\xB5 S'\xDF;e\xA9\xB0\xBF\xF5\xADs\xFB\xF1jj:\x93\x95(0\xD5\xC0\xB20\xA9\xCAn\x98pA\xD9\xA5 \xB0XQc\x99\x85Z\x83\xDD\xF4DcD.\x93\xFBgä&amp;„r/        \xE8̮:\xD2\xED+sC\xBA[P\xBDQ\xA5\x8E4`8qzL\x81\xE3e\xA1h\x88\x8FX\xD0NXj\xF8\x81\xC0\xA0Et\x80\xE8@DՂ\xC1:D-\x881 \xB60 \x83
+X
+X\xA8        &amp;X7Ath\xA3\xB5\x82\x81`\xA4\xC5\x88\xC1\xB0V5\xE8@-\xB6l-($\xBF|\xB7X\x99\xC6&amp;\x80\xB9\xEE\xC0$\x8A1̆8 ,U@\xD5k\x9E\xF8\xD3ހ:\x86@\xA2O{ +\xEA\x97K؆o\xE7Y\x87jmv\xEE\xE2\xBA% \xF9\x9E*υ\x81\x81\xBD\xA8\x8D\xAD$\xA8\xDAٛ\xA6\x9D\xD5ɨ\x9A\xA8\x9D\xBD\xA8\x86(\x88\x86\x8DV(\x80`D*VKK\xC3mi\xA1\xA9E\xAD\xA9\xA5\xA5Z\xB5ٰ̠\xD6l\xB6\xD0@UJ+J\xE9ZQѱ8E\x8A\xC6&quot;(Z\xA3 +\x83\x85:\xC1\x80\xABQU\x85D\xD0&amp;t\xE2\xD0,\x822\xDDnC&lt;\xC9bp8M1\xA3R\x80\x8Ch\xA0FhD\xA9\x8AY\x89L0\xD9hD] \x9D \x82F\x84M\xC3\xD2&gt;\xB6\x94X\xE0\x8B +\xD0I\xA0Y\xA6pgf\xA7\x96R5\xCED\xE3R\x84\xA9\x88\x95\xA6\xE3H\xE7\xA6\xEC\xA2&quot;\xA0FS\xFEFok\xB8\xCCi\xB2\xDC6DT\x8C\xD2m7M\xA9\x84\xEE\xC1 \x9E\x86\xEA\xE9`E6\x88|R\xBAYL\xD2h +&amp;\xB5B\xD62\x80b\xC0j\xC1\x80 \xB11`\x80\x88\xC1\xE0\xB56z\xD0(*\xA8bi]L\xB5\x86j&quot;\xD6L\xC1\xBA`\xB0\xFA\x80 X\x80\x85HY3\xD5\xD5j\x83hT(- +\xB0\xB0\x86\xA0\x88XG\xACZ\xC0$W5 SD\xB5\x8E@\x8FXE%\xF8W}40VpE\x87\xF1\x80D\xE9L\x80h\xB0*\x80D\xD1~\xC8\xD3\xC9b}:@s\x98ߥ\xA8VA\x89\xDB4Z4}ۈP\x9BNm\x8E6GSL\x8C\x89\xA7\xB8[\x8B\xB5\xA5\xA2j\x82\xA5[S\xED\xED\xA2z״\xB1h\xB0%eUt\x8C+V-i+U\xB4K\xA9&quot;\xB5\xAB\xA8\x88\x83j0\x86\x94\x8A1nĨRWi(\x94e-.\xF2&quot;\x80\xD5\xFB\xFE\xA6#@) +\x84\xE9;\xDC\xC7\xE8Re@R\x9C!        \xF6\xD0L\xAF豈h\xD5 \x82\x91\xA5f\x8C\xE5 \xD6&quot;\xAA\x8A\xA9\x9D\x90\x8CH\x85A4\x82`4c3dC\x8FИ$\x87\x8E\xA0\x89\x8A3Z,5T&lt;\xA4Q\xB2\xA8\xC1\x8Dk\xE1p\xF1L\xE6z\xE1^\xB12\x86Z\xC5 +n\x89\xD6\xCC\xF3\xEE\xAC\xC9n\xE6:\x90 +\xA0\xA6پ\x8D\xB9{c\xD5*H\xE49\x80\xE5\xCC\xDA3 \x99\x99\x92\xAAE1 (Z\xC0Ȣֶ +\xA8\x80\x81\x80LQ4\xD4 ^#X\xD8&quot;\x89\xAD#\xA8\x80^U-b\xD0id\xAF\xE1\xE0\xB6\xB8t\xD4\xDERP\xAB\xD6@\xEBЀ\x8A.\x83\xC0\xDDm\x99\x80 +\x82\xB0b\x8C\xB4`-`0\x80\xD58 ohx\xC8\xB4\x8A\x89cX8D`t\x80U[
+\x9E\xB8\xD3\xC5&gt;\x82\x84w\xA6:@7 a +J!&quot;\xA1m\xFA\xFB\xF4\xF5\xD6Z\xB41\xEBh\xBF\xCDT\xC4bĎ\xC4]\xA2!E\x8CX\xE9jlL\x8Di\x9Ci:;5\x83m\xBC\xB7\xC0\xDE\xD2\xC2\xDE\xD6LX\xA8\x91\xEE\xF6e\x99\xAA\xCA\xDE\xC2ҐrD\xB1
+@\xEA +H\xA1\xEC\xC6e1!0\xEA4\xD4&quot;\x88\x88\xA6Dg@\x9AI5Pv  \xD6&quot;jԚ\x82pO \xC4uA\xB5|X\xABĔ\xE0`i\xA9\xA9\xA0 +\x85\\x87U         \xC5RcPU@\xC6Q\xA6\xE2\xDC\xE4\xFD\xC7ֲZDdg\xBBg\xDC8\x81:\xD8󽣝`\x98r\xB8v\xB5\xAD\xD8W\xD18}\x9Dc2\xE7PR0Ig\xC6S]\x92x\xB2\x8E\xE2\xD1\xB7g \x9FS\x99\x84\x9C\x9D5\xDC\xF5(5\x82h\xC0\xE8\xF4\x85\x8AD u\xEA@ p\xCA(\x80\xC9%H \xAC`5cZ        \xCF֊\xE0\x8A\x80*VU@\xEB\xA06\xA2\xAC\x85\x9A9\xB0\x80\xE1E aZ1D,\xAD!\xA6\xB0X\xB4&quot;\xD8` +\x96\xD1=\xE25&quot;`\xAC\xC3&quot;@\xAD!\xD5\xDCEJ\xCEq0\x81\x80(\x90J00\xC0!=\xA0\x80\x82 X\xB3I^\xB8\xD3\xC5\xBA\xA0\xB0\xA7\xABt@:\xBD\xAA\x91!!d\xEC\xD3\xC7\xCCQmTk\xD3\xEDt\xB2\x8FT\xE2ibq\xB7\xB5
+^\x93\x90\xBD\xC1~(Cl\xB5\xB7\xB3*mۺ-m\xB0\x92V5\xE3H[7\xC6X\xF1\x95,SɼJcg\xD54-M-+f
+\xA2El1 \xFA&quot;E\xC5m\xE4\xD2ZB\x92\xD1.F\xD2
+\x84wi\xA1#\x8A!\x8Cu\x8B\xB4P\xD2 \x90N\xD6(\xB6\xC8\xF4\x80\xB6{\xC8l\xC8\xBC}\xAF\x81\xD0\x{DEBF}F\x88}㳮\xD8vf]M0\xA1\xADaZ\xEBj\xA04Ck\xA8\xDD\x99\xA0z\xEC\x9F\xC7\xBDNa\xB0\xE9bZ:\xCD \xB0Ģl᧫\xC3N&lt;\xA4\xDEv\xB0z\xFCE\xB5\xA0\x99{\x85\x9F\xEFӒc\xB0w\xAA0\x9E\xDAq3\xB5$\xC6 48\x8F6\x80\x90\x91XԂЉС\x80.@] \xA406&gt;\xFA[ \xB6\x82\xD5\xA0K \x82=k\xA9\xB0\x83\x80a,\xEE\x92 \xD6T\xD4\xD3\xA2\xA0\x99 E\xEB \x80h1&quot;\xC0 \x88\xA5\xC6ZQm\xB0r\x85\xF8&amp;V`\xE0`\x98# \xC0h&gt;\xE8-\x82\xC8
+Pl\xCC&lt;
+
+^\xF8\x8B\x9E\x81\x80\x88q(\xDCE/\xC00\x80Fޥ\xAC\xADD&quot; \x82\b\x9B\xED\xACțET\x9B\xA7\xE4\xBB谀&lt;O\xE5ى#q\xCFb\xB0
+\x8A#\xAAJ\xCDj\x80H\x82\xC5ΰ`\x89!\xDB
+R41Y\x81R\xC3\xD2е\x9D\xD1.\x83ۛ\x8A\x9BY\xA3#t.&quot;\xB2h\xD1Z5\xEAj\xAD\x8A:jf͠S\xB5\x9B)\xC40\xA4s\xB41
+-lK6\xA5 4\x82&quot;bDa\xBA\xC4A \xA1\x99\xC6H\xC5\x81 &quot;\x9DH
+\x98^CڲshQ\xE1\x81۶iF`-\xCF \x8C^ &amp;\xC6I\x96br\xD4\xC13H\xB00\xA7@f\x9D\x8Af\xE8\xBF\xB3\x98\x917\xE0\xE2\x92T\xE50\xAAdW\xF6^Q\xFD9\xD23\x89*\x9B\xBA \xB6q`\x9Dc\xCF\xD6j\xA0\x8B\x9A\xC4&amp;I,\xBC\x8F,&lt;\xA8\xDEƘ\xCB.\xA2\x8BL`\x85HU \xC42\xB2\xD8Юu\xCC\xC30\xC4AT\x82X \xA2&lt;\x86\xA2\xADE0EF\xAB\xA8\xC005\x971\xA8 \xBA~\xCBA2\xB5r  \x82\xA9\xC2Z\xD5d\xD5\xA1\xF5\xCE\xC0?\x8C\xD7@\xEF\xD5V`\xDFD@\xF7?\xE3\xEA
+ O\x9E\xC0\xFE\x80\w\xA4\x8AX`A\xC5;\xB0@\xB0\xD8P\x80\x86\xBE\xAC \x80Cp\x81\xB5`\xB05 \x806٪\x9E\xC8KEr\xB1w\xA90@  \xDC)H\xD3 \xFBt\xD2\xD9\xE6j\xA3\x9D\xAE\xC3\xE6h˝\xEED&lt;Oq7R[\xABŵ\xA8XQ\x8B\xC5V\xAD\xA25\xD8\xC47غ\xC5Ϋd#cKc\x94\xF5\xD1Fꖉ5\xED\xDCV\xB0\xA8쬣\xEC\x8DEOu\xE9\x965Ҫ׌\xF4`)\xC2,Y\x88\x8Am H٭b\xA9Р2A\xAB
+ (\xC0\x88\xC5X        \x84\xD6\x81\xD3 \xD3.\xC1X,\x90\xB4\x88'X\]\xC0@ Ԍ)hu*\x84QfR\x800k%)m\xF6\xA1\x9D㢃\xC6~f\x9Eq\xE9w\x8D \x9C\xC4\xCFB\x91O+vI\xB5tW9\xD5 \xAC\xC9F`\x92\xCC\xACm\x99\x8Aqe\x92Ca\xE3\xD0\xD0Shz\xD7j\xECb\x8C\xAD\x8CYD43\xC9
+\xE9\xB6\xC8\xDB]%\xC6\xD2H \xC4\x81\xA4d\xC0J+\x88\xB1F\xD1\x80 +$\xE4}\xC3b쉐h\x85
+YM\x85\xAC\x8AE\xA3b\x83\xAA
+\xC2)X \x94\xA0@TlDEl@\x94\x95ND\xD5!`@ ( ۣ\x86X\xB1\xA6(`\x9A\xD0\x81p \xB1\x81CƘE@#  @\xB1\xA8B10\x80\x80\x8B`c\xDD
+`\x92\x85\x99
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestestpdffromrev162335releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestestpdf"></a>
<div class="binary"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.pdf)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestestpdf"></a>
<div class="propset"><h4>Property changes: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.pdf</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtkresourcestesttxtfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtktestsresourcestesttxt"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.txt (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/resources/test.txt) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.txt        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+test
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktest_utilscfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2010 Arno Renevier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;test_utils.h&quot;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+
+int testutils_relative_chdir(const gchar *targetFilename, const gchar *executablePath)
+{
+    /* user can set location of the webkit repository directory if it differs from build directory */
+    const gchar *repoPath = g_getenv(&quot;WEBKITREPODIR&quot;);
+    if (repoPath) {
+        if (g_chdir(repoPath))
+            return -1;
+    } else if (g_chdir(g_path_get_dirname(executablePath)))
+            return -1;
+
+    while (!g_file_test(targetFilename, G_FILE_TEST_EXISTS)) {
+        gchar *pathName;
+        if (g_chdir(&quot;..&quot;))
+            return -1;
+        g_assert(!g_str_equal((pathName = g_get_current_dir()), &quot;/&quot;));
+        g_free(pathName);
+    }
+
+    gchar *dirName = g_path_get_dirname(targetFilename);
+    if (g_chdir(dirName)) {
+        g_free(dirName);
+        return -1;
+    }
+
+    g_free(dirName);
+    return 0;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktest_utilshfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststest_utilsh"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/test_utils.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/test_utils.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+#include &lt;glib.h&gt;
+
+int testutils_relative_chdir(const gchar *targetFilename, const gchar *executablePath);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestapplicationcachecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestapplicationcachec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testapplicationcache.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testapplicationcache.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2011 Lukasz Slachciak
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;glib/gprintf.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static void test_application_cache_maximum_size()
+{
+    unsigned long long maxSize = 8192;
+    webkit_application_cache_set_maximum_size(maxSize);
+
+    // Creating a WebView - make sure that it didn't change anything
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    g_object_unref(webView);
+
+    g_assert(maxSize == webkit_application_cache_get_maximum_size());
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/application_cache/maximum_size&quot;,
+                    test_application_cache_maximum_size);
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestatkcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatk.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatk.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,2210 @@
</span><ins>+/*
+ * Copyright (C) 2009 Igalia S.L.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;locale.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static const char* centeredContents = &quot;&lt;html&gt;&lt;body&gt;&lt;p style='text-align: center;'&gt;Short line&lt;/p&gt;&lt;p style='text-align: center;'&gt;Long-size line with some foo bar baz content&lt;/p&gt;&lt;p style='text-align: center;'&gt;Short line&lt;/p&gt;&lt;p style='text-align: center;'&gt;This is a multi-line paragraph&lt;br /&gt;where the first line&lt;br /&gt;is the biggest one&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contents = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test. This is the second sentence. And this the third.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithNewlines = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test. \n\nThis\n is the second sentence. And this the third.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithPreformattedText = &quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;\n\t\n\tfirst line\n\tsecond line\n\t\n&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithSpecialChars = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;&amp;laquo;&amp;nbsp;This is a paragraph with &amp;ldquo;special&amp;rdquo; characters inside.&amp;nbsp;&amp;raquo;&lt;/p&gt;&lt;ul&gt;&lt;li style='max-width:100px;'&gt;List item with some text that wraps across different lines.&lt;/li&gt;&lt;li style='max-width:100px;'&gt;&lt;p&gt;List item with some text that wraps across different lines.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInTextarea = &quot;&lt;html&gt;&lt;body&gt;&lt;textarea cols='80'&gt;This is a test. This is the second sentence. And this the third.&lt;/textarea&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInTextInput = &quot;&lt;html&gt;&lt;body&gt;&lt;input type='text' size='80' value='This is a test. This is the second sentence. And this the third.'/&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInParagraphAndBodySimple = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;Hello world.&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInParagraphAndBodyModerate = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;Hello world.&lt;br /&gt;&lt;font color='#00cc00'&gt;This sentence is green.&lt;/font&gt;&lt;br /&gt;This one is not.&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInTable = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;foo&lt;/td&gt;&lt;td&gt;bar&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsInTableWithHeaders = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;foo&lt;/th&gt;&lt;th&gt;bar&lt;/th&gt;&lt;th colspan='2'&gt;baz&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;qux&lt;/th&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th rowspan='2'&gt;quux&lt;/th&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;corge&lt;/th&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithExtraneousWhiteSpaces = &quot;&lt;html&gt;&lt;head&gt;&lt;body&gt;&lt;p&gt;This\n                          paragraph\n                                                      is\n                                                                                                                                                                                                                                                                                                                                                                            borked!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithWrappedLines = &quot;&lt;html&gt;&lt;body&gt;&lt;p style='max-width:150px;'&gt;This is one line wrapped because of the maximum width of its container.&lt;/p&gt;&lt;p&gt;This is another line wrapped&lt;br&gt;because of one forced&lt;br&gt;line break in the middle.&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* contentsWithEmbeddedObjects = &quot;&lt;html&gt;&lt;body&gt;This is one line containing two &lt;img&gt; embedded objects &lt;img&gt; in the middle.&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* comboBoxSelector = &quot;&lt;html&gt;&lt;body&gt;&lt;select&gt;&lt;option selected value='foo'&gt;foo&lt;/option&gt;&lt;option value='bar'&gt;bar&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* embeddedObjects = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;Choose: &lt;input value='foo' type='checkbox'/&gt;foo &lt;input value='bar' type='checkbox'/&gt;bar (pick one)&lt;/p&gt;&lt;p&gt;Choose: &lt;select name='foo'&gt;&lt;option&gt;bar&lt;/option&gt;&lt;option&gt;baz&lt;/option&gt;&lt;/select&gt; (pick one)&lt;/p&gt;&lt;p&gt;&lt;input name='foobarbutton' value='foobar' type='button'/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* formWithTextInputs = &quot;&lt;html&gt;&lt;body&gt;&lt;form&gt;&lt;input type='text' name='entry' /&gt;&lt;input type='password' name='passwordEntry' /&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* hypertextAndHyperlinks = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;A paragraph with no links at all&lt;/p&gt;&lt;p&gt;&lt;a href='http://foo.bar.baz/'&gt;A line&lt;/a&gt; with &lt;a href='http://bar.baz.foo/'&gt;a link in the middle&lt;/a&gt; as well as at the beginning and &lt;a href='http://baz.foo.bar/'&gt;at the end&lt;/a&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;List item with a &lt;span&gt;&lt;a href='http://foo.bar.baz/'&gt;link inside a span node&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* layoutAndDataTables = &quot;&lt;html&gt;&lt;body&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;Odd&lt;/th&gt;&lt;th&gt;Even&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;foo&lt;/td&gt;&lt;td&gt;bar&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* linksWithInlineImages = &quot;&lt;html&gt;&lt;head&gt;&lt;style&gt;a.http:before {content: url(no-image.png);}&lt;/style&gt;&lt;body&gt;&lt;p&gt;&lt;a class='http' href='foo'&gt;foo&lt;/a&gt; bar baz&lt;/p&gt;&lt;p&gt;foo &lt;a class='http' href='bar'&gt;bar&lt;/a&gt; baz&lt;/p&gt;&lt;p&gt;foo bar &lt;a class='http' href='baz'&gt;baz&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* listsOfItems = &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;text only&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;link only&lt;/a&gt;&lt;/li&gt;&lt;li&gt;text and a &lt;a href='bar'&gt;link&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;text only&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;link only&lt;/a&gt;&lt;/li&gt;&lt;li&gt;text and a &lt;a href='bar'&gt;link&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* textForCaretBrowsing = &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;A text header&lt;/h1&gt;&lt;p&gt;A paragraph &lt;a href='http://foo.bar.baz/'&gt;with a link&lt;/a&gt; in the middle&lt;/p&gt;&lt;ol&gt;&lt;li&gt;A list item&lt;/li&gt;&lt;li&gt;&lt;span style='display:block;'&gt;Block span in a list item&lt;/span&gt;&lt;span&gt;Inline span in a list item&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a list item&lt;/span&gt;&lt;span&gt;Inline span in a link in a list item&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;select&gt;&lt;option selected value='foo'&gt;An option in a combo box&lt;/option&gt;&lt;/select&gt;&lt;input type='text' name='foo' value='foo bar baz' /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;a table cell&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a table cell&lt;/span&gt;&lt;span&gt;Inline span in a link in a table cell&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;span style='display:block;'&gt;Block span in a table cell&lt;/span&gt;&lt;span&gt;Inline span in a table cell&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;h4&gt;&lt;a href='foo'&gt;&lt;span style='display:block;'&gt;Block span in a link in a heading&lt;/span&gt;&lt;span&gt;Inline span in a link in a heading&lt;/span&gt;&lt;/h4&gt;&lt;h4&gt;&lt;span style='display:block;'&gt;Block span in a heading&lt;/span&gt;&lt;span&gt;Inline span in a heading&lt;/span&gt;&lt;/h4&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* textForSelections = &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;A paragraph with plain text&lt;/p&gt;&lt;p&gt;A paragraph with &lt;a href='http://webkit.org'&gt;a link&lt;/a&gt; in the middle&lt;/p&gt;&lt;ol&gt;&lt;li&gt;A list item&lt;/li&gt;&lt;/ol&gt;&lt;select&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static const char* textWithAttributes = &quot;&lt;html&gt;&lt;head&gt;&lt;style&gt;.st1 {font-family: monospace; color:rgb(120,121,122);} .st2 {text-decoration:underline; background-color:rgb(80,81,82);}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;p style=\&quot;font-size:14; text-align:right;\&quot;&gt;This is the &lt;i&gt;first&lt;/i&gt;&lt;b&gt; sentence of this text.&lt;/b&gt;&lt;/p&gt;&lt;p class=\&quot;st1\&quot;&gt;This sentence should have an style applied &lt;span class=\&quot;st2\&quot;&gt;and this part should have another one&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;x&lt;sub&gt;1&lt;/sub&gt;&lt;sup&gt;2&lt;/sup&gt;=x&lt;sub&gt;2&lt;/sub&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/p&gt;&lt;p style=\&quot;text-align:center;\&quot;&gt;This sentence is the &lt;strike&gt;last&lt;/strike&gt; one.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+static AtkObject* getWebAreaObject(WebKitWebView* webView)
+{
+    /* Manually spin the main context to make sure the accessible
+       objects are properly created before continuing. */
+    while (g_main_context_pending(0))
+        g_main_context_iteration(0, TRUE);
+
+    AtkObject* rootObject = gtk_widget_get_accessible(GTK_WIDGET(webView));
+    if (!rootObject)
+        return NULL;
+
+    AtkObject* webAreaObject = atk_object_ref_accessible_child(rootObject, 0);
+    if (!webAreaObject)
+        return NULL;
+
+    /* We don't need the extra ref here. */
+    g_object_unref(webAreaObject);
+
+    return webAreaObject;
+}
+
+typedef gchar* (*AtkGetTextFunction) (AtkText*, gint, AtkTextBoundary, gint*, gint*);
+
+static void testGetTextFunction(AtkText* textObject, AtkGetTextFunction fn, AtkTextBoundary boundary, gint offset, const char* textResult, gint startOffsetResult, gint endOffsetResult)
+{
+    gint startOffset;
+    gint endOffset;
+    char* text = fn(textObject, offset, boundary, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpstr(text, ==, textResult);
+    g_assert_cmpint(startOffset, ==, startOffsetResult);
+    g_assert_cmpint(endOffset, ==, endOffsetResult);
+    g_free(text);
+}
+
+static void runGetTextTests(AtkText* textObject)
+{
+    char* text = atk_text_get_text(textObject, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is a test. This is the second sentence. And this the third.&quot;);
+    g_free(text);
+
+    /* ATK_TEXT_BOUNDARY_CHAR */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR,
+                        0, &quot;T&quot;, 0, 1);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR,
+                        0, &quot;h&quot;, 1, 2);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR,
+                        0, &quot;&quot;, 0, 0);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR,
+                        1, &quot;T&quot;, 0, 1);
+
+    /* ATK_TEXT_BOUNDARY_WORD_START */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        0, &quot;This &quot;, 0, 5);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        4, &quot;This &quot;, 0, 5);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        10, &quot;test. &quot;, 10, 16);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        58, &quot;third.&quot;, 58, 64);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        64, &quot;third.&quot;, 58, 64);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        0, &quot;&quot;, 0, 0);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        5, &quot;This &quot;, 0, 5);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        7, &quot;This &quot;, 0, 5);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        64, &quot;the &quot;, 54, 58);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        0, &quot;is &quot;, 5, 8);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        4, &quot;is &quot;, 5, 8);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        3, &quot;is &quot;, 5, 8);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START,
+                        64, &quot;&quot;, 64, 64);
+
+    /* ATK_TEXT_BOUNDARY_WORD_END */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        0, &quot;This&quot;, 0, 4);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        4, &quot; is&quot;, 4, 7);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        5, &quot; is&quot;, 4, 7);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        9, &quot; test&quot;, 9, 14);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        58, &quot; third&quot;, 57, 63);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        64, &quot;.&quot;, 63, 64);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        0, &quot;&quot;, 0, 0);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        5, &quot;This&quot;, 0, 4);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        4, &quot;This&quot;, 0, 4);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        7, &quot; is&quot;, 4, 7);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        64, &quot; third&quot;, 57, 63);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        0, &quot; is&quot;, 4, 7);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        5, &quot; a&quot;, 7, 9);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        4, &quot; a&quot;, 7, 9);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END,
+                        64, &quot;&quot;, 64, 64);
+
+    /* ATK_TEXT_BOUNDARY_SENTENCE_START */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        0, &quot;This is a test. &quot;, 0, 16);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        15, &quot;This is a test. &quot;, 0, 16);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        0, &quot;This is the second sentence. &quot;, 16, 45);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        15, &quot;This is the second sentence. &quot;, 16, 45);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        16, &quot;This is a test. &quot;, 0, 16);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        44, &quot;This is a test. &quot;, 0, 16);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_START,
+                        15, &quot;&quot;, 0, 0);
+
+    /* ATK_TEXT_BOUNDARY_SENTENCE_END */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        0, &quot;This is a test.&quot;, 0, 15);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        15, &quot; This is the second sentence.&quot;, 15, 44);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        16, &quot; This is the second sentence.&quot;, 15, 44);
+
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        17, &quot; This is the second sentence.&quot;, 15, 44);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        0, &quot; This is the second sentence.&quot;, 15, 44);
+
+    testGetTextFunction(textObject, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        15, &quot; And this the third.&quot;, 44, 64);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        16, &quot;This is a test.&quot;, 0, 15);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        15, &quot;This is a test.&quot;, 0, 15);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        14, &quot;&quot;, 0, 0);
+
+    testGetTextFunction(textObject, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_SENTENCE_END,
+                        44, &quot; This is the second sentence.&quot;, 15, 44);
+
+    /* It's tricky to test these properly right now, since our a11y
+       implementation splits different lines in different a11y items. */
+    /* ATK_TEXT_BOUNDARY_LINE_START */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START,
+                        0, &quot;This is a test. This is the second sentence. And this the third.&quot;, 0, 64);
+
+    /* ATK_TEXT_BOUNDARY_LINE_END */
+    testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END,
+                        0, &quot;This is a test. This is the second sentence. And this the third.&quot;, 0, 64);
+
+    /* For objects implementing AtkEditableText, try to change the
+       exposed text and retrieve it again as a full line.
+       (see https://bugs.webkit.org/show_bug.cgi?id=72830) */
+    if (ATK_IS_EDITABLE_TEXT(textObject)) {
+        atk_editable_text_set_text_contents(ATK_EDITABLE_TEXT(textObject), &quot;foo bar baz&quot;);
+        testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, &quot;foo bar baz&quot;, 0, 11);
+        testGetTextFunction(textObject, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;foo bar baz&quot;, 0, 11);
+    }
+}
+
+static gchar* textCaretMovedResult = 0;
+
+static void textCaretMovedCallback(AtkText* text, gint pos, gpointer data)
+{
+    g_assert(ATK_IS_TEXT(text));
+
+    g_free(textCaretMovedResult);
+    AtkRole role = atk_object_get_role(ATK_OBJECT(text));
+    textCaretMovedResult = g_strdup_printf(&quot;|%s|%d|&quot;, atk_role_get_name(role), pos);
+}
+
+static void testWebkitAtkCaretOffsets()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, textForCaretBrowsing, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* header = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_TEXT(header));
+    g_signal_connect(header, &quot;text-caret-moved&quot;, G_CALLBACK(textCaretMovedCallback), 0);
+
+    gchar* text = atk_text_get_text(ATK_TEXT(header), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;A text header&quot;);
+    g_free (text);
+
+    /* It should be possible to place the caret inside a header. */
+    gboolean result = atk_text_set_caret_offset(ATK_TEXT(header), 5);
+    g_assert_cmpint(result, ==, TRUE);
+    gint offset = atk_text_get_caret_offset(ATK_TEXT(header));
+    g_assert_cmpint(offset, ==, 5);
+    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|heading|5|&quot;);
+
+    AtkObject* paragraph = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_IS_TEXT(paragraph));
+    g_signal_connect(paragraph, &quot;text-caret-moved&quot;, G_CALLBACK(textCaretMovedCallback), 0);
+
+    text = atk_text_get_text(ATK_TEXT(paragraph), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;A paragraph with a link in the middle&quot;);
+    g_free (text);
+
+    /* It should be possible to place the caret inside a paragraph and a link. */
+    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 5);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
+    g_assert_cmpint(offset, ==, 5);
+    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|5|&quot;);
+
+    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 20);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
+    g_assert_cmpint(offset, ==, 20);
+    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|20|&quot;);
+
+    result = atk_text_set_caret_offset(ATK_TEXT(paragraph), 30);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(paragraph));
+    g_assert_cmpint(offset, ==, 30);
+    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|30|&quot;);
+
+    AtkObject* link = atk_object_ref_accessible_child(paragraph, 0);
+    g_assert(ATK_IS_TEXT(link));
+    text = atk_text_get_text(ATK_TEXT(link), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;with a link&quot;);
+    g_free (text);
+
+    result = atk_text_set_caret_offset(ATK_TEXT(link), 5);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(link));
+    g_assert_cmpint(offset, ==, 5);
+    /* Positions inside links are reported relative to the paragraph. */
+    g_assert_cmpstr(textCaretMovedResult, ==, &quot;|paragraph|17|&quot;);
+
+    AtkObject* list = atk_object_ref_accessible_child(object, 2);
+    g_assert(ATK_OBJECT(list));
+    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
+    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 3);
+
+    AtkObject* listItem = atk_object_ref_accessible_child(list, 0);
+    g_assert(ATK_IS_TEXT(listItem));
+    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;1. A list item&quot;);
+    g_free (text);
+
+    listItem = atk_object_ref_accessible_child(list, 1);
+    g_assert(ATK_IS_TEXT(listItem));
+    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;2. Block span in a list item\nInline span in a list item&quot;);
+    g_free (text);
+
+    listItem = atk_object_ref_accessible_child(list, 2);
+    g_assert(ATK_IS_TEXT(listItem));
+    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;3. Block span in a link in a list item\nInline span in a link in a list item&quot;);
+    g_free (text);
+
+    /* It's not possible to place the caret inside an item's marker. */
+    result = atk_text_set_caret_offset(ATK_TEXT(listItem), 1);
+    g_assert_cmpint(result, ==, FALSE);
+
+    /* It should be possible to place the caret inside an item's text. */
+    result = atk_text_set_caret_offset(ATK_TEXT(listItem), 5);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(listItem));
+    g_assert_cmpint(offset, ==, 5);
+
+    AtkObject* panel = atk_object_ref_accessible_child(object, 3);
+    g_assert(ATK_IS_OBJECT(panel));
+    g_assert(atk_object_get_role(panel) == ATK_ROLE_PANEL);
+
+    AtkObject* comboBox = atk_object_ref_accessible_child(panel, 0);
+    g_assert(ATK_IS_OBJECT(comboBox));
+    g_assert(!ATK_IS_TEXT(comboBox));
+    g_assert(atk_object_get_role(comboBox) == ATK_ROLE_COMBO_BOX);
+
+    AtkObject* menuPopup = atk_object_ref_accessible_child(comboBox, 0);
+    g_assert(ATK_IS_OBJECT(menuPopup));
+    g_assert(!ATK_IS_TEXT(menuPopup));
+    g_assert(atk_object_get_role(menuPopup) == ATK_ROLE_MENU);
+
+    AtkObject* comboBoxOption = atk_object_ref_accessible_child(menuPopup, 0);
+    g_assert(ATK_IS_OBJECT(comboBoxOption));
+    g_assert(atk_object_get_role(comboBoxOption) == ATK_ROLE_MENU_ITEM);
+    g_assert(ATK_IS_TEXT(comboBoxOption));
+    text = atk_text_get_text(ATK_TEXT(comboBoxOption), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;An option in a combo box&quot;);
+    g_free(text);
+
+    /* It's not possible to place the caret inside an option for a combobox. */
+    result = atk_text_set_caret_offset(ATK_TEXT(comboBoxOption), 1);
+    g_assert_cmpint(result, ==, FALSE);
+
+    AtkObject* textEntry = atk_object_ref_accessible_child(panel, 1);
+    g_assert(ATK_IS_OBJECT(textEntry));
+    g_assert(atk_object_get_role(textEntry) == ATK_ROLE_ENTRY);
+    g_assert(ATK_IS_TEXT(textEntry));
+    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
+    g_free(text);
+
+    result = atk_text_set_caret_offset(ATK_TEXT(textEntry), 5);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(textEntry));
+    g_assert_cmpint(offset, ==, 5);
+
+    AtkObject* table = atk_object_ref_accessible_child(object, 4);
+    g_assert(ATK_IS_OBJECT(table));
+    g_assert(!ATK_IS_TEXT(table));
+    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
+    g_assert_cmpint(atk_object_get_n_accessible_children(table), ==, 4);
+
+    AtkObject* tableCell = atk_object_ref_accessible_child(table, 0);
+    g_assert(ATK_IS_TEXT(tableCell));
+    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
+    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;a table cell&quot;);
+    g_free(text);
+
+    result = atk_text_set_caret_offset(ATK_TEXT(tableCell), 2);
+    g_assert_cmpint(result, ==, TRUE);
+    offset = atk_text_get_caret_offset(ATK_TEXT(tableCell));
+    g_assert_cmpint(offset, ==, 2);
+
+    /* Even empty table cells should implement AtkText, but report an empty string */
+    tableCell = atk_object_ref_accessible_child(table, 1);
+    g_assert(ATK_IS_TEXT(tableCell));
+    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
+    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;&quot;);
+    g_free(text);
+
+    tableCell = atk_object_ref_accessible_child(table, 2);
+    g_assert(ATK_IS_TEXT(tableCell));
+    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
+    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;Block span in a link in a table cell\nInline span in a link in a table cell&quot;);
+    g_free(text);
+
+    tableCell = atk_object_ref_accessible_child(table, 3);
+    g_assert(ATK_IS_TEXT(tableCell));
+    g_assert(atk_object_get_role(tableCell) == ATK_ROLE_TABLE_CELL);
+    text = atk_text_get_text(ATK_TEXT(tableCell), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;Block span in a table cell\nInline span in a table cell&quot;);
+    g_free(text);
+
+    header = atk_object_ref_accessible_child(object, 5);
+    g_assert(ATK_IS_TEXT(header));
+    g_assert(atk_object_get_role(header) == ATK_ROLE_HEADING);
+    text = atk_text_get_text(ATK_TEXT(header), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;Block span in a link in a heading\nInline span in a link in a heading&quot;);
+    g_free(text);
+
+    header = atk_object_ref_accessible_child(object, 6);
+    g_assert(ATK_IS_TEXT(header));
+    g_assert(atk_object_get_role(header) == ATK_ROLE_HEADING);
+    text = atk_text_get_text(ATK_TEXT(header), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;Block span in a heading\nInline span in a heading&quot;);
+    g_free(text);
+
+    g_free(textCaretMovedResult);
+
+    g_object_unref(header);
+    g_object_unref(paragraph);
+    g_object_unref(link);
+    g_object_unref(list);
+    g_object_unref(listItem);
+    g_object_unref(panel);
+    g_object_unref(comboBox);
+    g_object_unref(menuPopup);
+    g_object_unref(comboBoxOption);
+    g_object_unref(textEntry);
+    g_object_unref(table);
+    g_object_unref(tableCell);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithExtraneousWhiteSpaces, 0, 0, 0);
+
+    /* Enable caret browsing. */
+    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+    g_object_set(G_OBJECT(settings), &quot;enable-caret-browsing&quot;, TRUE, NULL);
+    webkit_web_view_set_settings(webView, settings);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    AtkText* textObject = ATK_TEXT(object);
+    g_assert(ATK_IS_TEXT(textObject));
+
+    gchar* text = atk_text_get_text(textObject, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This paragraph is borked!&quot;);
+    g_free(text);
+
+    gint characterCount = atk_text_get_character_count(textObject);
+    g_assert_cmpint(characterCount, ==, 25);
+
+    gboolean result = atk_text_set_caret_offset(textObject, characterCount - 1);
+    g_assert_cmpint(result, ==, TRUE);
+
+    gint caretOffset = atk_text_get_caret_offset(textObject);
+    g_assert_cmpint(caretOffset, ==, characterCount - 1);
+
+    result = atk_text_set_caret_offset(textObject, characterCount);
+    g_assert_cmpint(result, ==, TRUE);
+
+    caretOffset = atk_text_get_caret_offset(textObject);
+    g_assert_cmpint(caretOffset, ==, characterCount);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkComboBox()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, comboBoxSelector, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* formObject = atk_object_ref_accessible_child(object, 0);
+    g_assert(formObject);
+
+    AtkObject* comboBox = atk_object_ref_accessible_child(formObject, 0);
+    g_assert(ATK_IS_OBJECT(comboBox));
+
+    AtkObject* menuPopup = atk_object_ref_accessible_child(comboBox, 0);
+    g_assert(ATK_IS_OBJECT(menuPopup));
+
+    AtkObject* item1 = atk_object_ref_accessible_child(menuPopup, 0);
+    g_assert(ATK_IS_OBJECT(item1));
+
+    AtkObject* item2 = atk_object_ref_accessible_child(menuPopup, 1);
+    g_assert(ATK_IS_OBJECT(item2));
+
+    /* Check roles. */
+    g_assert(atk_object_get_role(comboBox) == ATK_ROLE_COMBO_BOX);
+    g_assert(atk_object_get_role(menuPopup) == ATK_ROLE_MENU);
+    g_assert(atk_object_get_role(item1) == ATK_ROLE_MENU_ITEM);
+    g_assert(atk_object_get_role(item2) == ATK_ROLE_MENU_ITEM);
+
+    /* Check the implementation of the AtkSelection interface. */
+    g_assert(ATK_IS_SELECTION(comboBox));
+    AtkSelection* atkSelection = ATK_SELECTION(comboBox);
+    g_assert_cmpint(atk_selection_get_selection_count(atkSelection), ==, 1);
+    g_assert(atk_selection_is_child_selected(atkSelection, 0));
+    g_assert(!atk_selection_is_child_selected(atkSelection, 1));
+    AtkObject* selectedItem = atk_selection_ref_selection(atkSelection, 0);
+    g_assert(selectedItem == item1);
+    g_object_unref(selectedItem);
+
+    /* Check that the menu popup has 0 links and doesn't crash from checking. */
+    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(menuPopup));
+    g_assert_cmpint(nLinks, ==, 0);
+
+    /* Check the implementations of the AtkAction interface. */
+    g_assert(ATK_IS_ACTION(comboBox));
+    AtkAction* atkAction = ATK_ACTION(comboBox);
+    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
+    g_assert(atk_action_do_action(atkAction, 0));
+
+    g_assert(ATK_IS_ACTION(menuPopup));
+    atkAction = ATK_ACTION(menuPopup);
+    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
+    g_assert(atk_action_do_action(atkAction, 0));
+
+    g_assert(ATK_IS_ACTION(item1));
+    atkAction = ATK_ACTION(item1);
+    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
+    g_assert(atk_action_do_action(atkAction, 0));
+
+    g_assert(ATK_IS_ACTION(item2));
+    atkAction = ATK_ACTION(item2);
+    g_assert_cmpint(atk_action_get_n_actions(atkAction), ==, 1);
+    g_assert(atk_action_do_action(atkAction, 0));
+
+    /* After selecting the second item, selection should have changed. */
+    g_assert_cmpint(atk_selection_get_selection_count(atkSelection), ==, 1);
+    g_assert(!atk_selection_is_child_selected(atkSelection, 0));
+    g_assert(atk_selection_is_child_selected(atkSelection, 1));
+    selectedItem = atk_selection_ref_selection(atkSelection, 0);
+    g_assert(selectedItem == item2);
+    g_object_unref(selectedItem);
+
+    /* Check the implementation of the AtkText interface. */
+    g_assert(ATK_IS_TEXT(item1));
+    AtkText* atkText = ATK_TEXT(item1);
+    char *text = atk_text_get_text(atkText, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;foo&quot;);
+    g_free(text);
+    text = atk_text_get_text(atkText, 0, 2);
+    g_assert_cmpstr(text, ==, &quot;fo&quot;);
+    g_free(text);
+
+    g_assert(ATK_IS_TEXT(item2));
+    atkText = ATK_TEXT(item2);
+    text = atk_text_get_text(atkText, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;bar&quot;);
+    g_free(text);
+    text = atk_text_get_text(atkText, 1, 3);
+    g_assert_cmpstr(text, ==, &quot;ar&quot;);
+    g_free(text);
+
+    g_object_unref(formObject);
+    g_object_unref(comboBox);
+    g_object_unref(menuPopup);
+    g_object_unref(item1);
+    g_object_unref(item2);
+    g_object_unref(webView);
+}
+
+static gchar* loadingEventsResult = 0;
+
+static void updateLoadingEventsResult(const gchar* signalName)
+{
+    g_assert(signalName);
+
+    gchar* previousResult = loadingEventsResult;
+    loadingEventsResult = g_strdup_printf(&quot;%s|%s&quot;, previousResult, signalName);
+    g_free(previousResult);
+}
+
+static gboolean documentLoadingEventCallback(GSignalInvocationHint *signalHint, guint numParamValues, const GValue *paramValues, gpointer data)
+{
+    // At least we should receive the instance emitting the signal.
+    if (numParamValues &lt; 1)
+        return TRUE;
+
+    GSignalQuery signal_query;
+    g_signal_query(signalHint-&gt;signal_id, &amp;signal_query);
+
+    updateLoadingEventsResult(signal_query.signal_name);
+    return TRUE;
+}
+
+static void testWebkitAtkDocumentLoadingEvents()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+
+    /* Connect globally to see those events during a future load. */
+    guint loadCompleteListenerId = atk_add_global_event_listener(documentLoadingEventCallback, &quot;ATK:AtkDocument:load-complete&quot;);
+
+    /* Do the load, so we can see those events happening. */
+    loadingEventsResult = g_strdup(&quot;&quot;);
+    webkit_web_view_load_string(webView, contents, 0, 0, 0);
+
+    /* Trigger the creation of the full accessibility hierarchy by
+       asking for the webArea object, so we can listen to events. */
+    getWebAreaObject(webView);
+
+    atk_remove_global_event_listener(loadCompleteListenerId);
+
+    g_assert_cmpstr(loadingEventsResult, ==, &quot;|load-complete&quot;);
+
+    g_free(loadingEventsResult);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkEmbeddedObjects()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, embeddedObjects, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
+    g_assert(ATK_IS_TEXT(paragraph1));
+    g_assert(ATK_IS_HYPERTEXT(paragraph1));
+
+    const gchar* expectedText = &quot;Choose: \357\277\274foo \357\277\274bar (pick one)&quot;;
+    char* text = atk_text_get_text(paragraph1, 0, -1);
+    g_assert_cmpstr(text, ==, expectedText);
+    g_free(text);
+
+    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph1));
+    g_assert_cmpint(nLinks, ==, 2);
+
+    AtkHyperlink* hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph1), 0);
+    g_assert(ATK_HYPERLINK(hLink));
+    AtkObject* hLinkObject = atk_hyperlink_get_object(hLink, 0);
+    g_assert(ATK_OBJECT(hLinkObject));
+    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_CHECK_BOX);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
+
+    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
+    g_assert(ATK_IS_TEXT(paragraph2));
+    g_assert(ATK_IS_HYPERTEXT(paragraph2));
+
+    expectedText = &quot;Choose: \357\277\274 (pick one)&quot;;
+    text = atk_text_get_text(paragraph2, 0, -1);
+    g_assert_cmpstr(text, ==, expectedText);
+    g_free(text);
+
+    nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph2));
+    g_assert_cmpint(nLinks, ==, 1);
+
+    hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 0);
+    g_assert(ATK_HYPERLINK(hLink));
+    hLinkObject = atk_hyperlink_get_object(hLink, 0);
+    g_assert(ATK_OBJECT(hLinkObject));
+    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_COMBO_BOX);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 8);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 9);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
+
+    AtkText* paragraph3 = ATK_TEXT(atk_object_ref_accessible_child(object, 2));
+    g_assert(ATK_IS_TEXT(paragraph3));
+    g_assert(ATK_IS_HYPERTEXT(paragraph3));
+
+    expectedText = &quot;\357\277\274&quot;;
+    text = atk_text_get_text(paragraph3, 0, -1);
+    g_assert_cmpstr(text, ==, expectedText);
+    g_free(text);
+
+    nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph3));
+    g_assert_cmpint(nLinks, ==, 1);
+
+    hLink = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph3), 0);
+    g_assert(ATK_HYPERLINK(hLink));
+    hLinkObject = atk_hyperlink_get_object(hLink, 0);
+    g_assert(ATK_OBJECT(hLinkObject));
+    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_PUSH_BUTTON);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink), ==, 0);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink), ==, 1);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink, 0), ==, 0);
+
+    g_object_unref(paragraph1);
+    g_object_unref(paragraph2);
+    g_object_unref(paragraph3);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffset()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contents, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    AtkText* textObject = ATK_TEXT(object);
+    g_assert(ATK_IS_TEXT(textObject));
+
+    runGetTextTests(textObject);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetNewlines()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithNewlines, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    AtkText* textObject = ATK_TEXT(object);
+    g_assert(ATK_IS_TEXT(textObject));
+
+    runGetTextTests(textObject);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetTextarea()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInTextarea, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    AtkText* textObject = ATK_TEXT(object);
+    g_assert(ATK_IS_TEXT(textObject));
+
+    runGetTextTests(textObject);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetTextInput()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInTextInput, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    AtkText* textObject = ATK_TEXT(object);
+    g_assert(ATK_IS_TEXT(textObject));
+
+    runGetTextTests(textObject);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetWithPreformattedText()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithPreformattedText, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* preformattedText = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_OBJECT(preformattedText));
+    g_assert(atk_object_get_role(preformattedText) == ATK_ROLE_PANEL);
+    g_assert(ATK_IS_TEXT(preformattedText));
+    char* text = atk_text_get_text(ATK_TEXT(preformattedText), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\t\n\tfirst line\n\tsecond line\n\t\n&quot;);
+    g_free(text);
+
+    /* Try retrieving all the lines indicating the position of the offsets at the beginning of each of them. */
+    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, &quot;\t\n&quot;, 0, 2);
+    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 2, &quot;\tfirst line\n&quot;, 2, 14);
+    testGetTextFunction(ATK_TEXT(preformattedText), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 14, &quot;\tsecond line\n&quot;, 14, 27);
+
+    g_object_unref(preformattedText);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetWithSpecialCharacters()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithSpecialChars, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* paragraph = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_TEXT(paragraph));
+
+    gchar* expectedText = g_strdup(&quot;\302\253\302\240This is a paragraph with \342\200\234special\342\200\235 characters inside.\302\240\302\273&quot;);
+    char* text = atk_text_get_text(ATK_TEXT(paragraph), 0, -1);
+    g_assert_cmpstr(text, ==, expectedText);
+    g_free(text);
+
+    /* Check that getting the text with ATK_TEXT_BOUNDARY_LINE_START
+       and ATK_TEXT_BOUNDARY_LINE_END does not crash because of not
+       properly handling characters inside the UTF-8 string. */
+    testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 0, expectedText, 0, 57);
+    testGetTextFunction(ATK_TEXT(paragraph), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, expectedText, 0, 57);
+    g_free(expectedText);
+
+    AtkObject* list = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_OBJECT(list));
+
+    AtkText* listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 0));
+    g_assert(ATK_IS_TEXT(listItem));
+
+    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\342\200\242 List item with some text that wraps across different lines.&quot;);
+    g_free(text);
+
+    /* Check that getting the text with ATK_TEXT_BOUNDARY_LINE_START
+       and ATK_TEXT_BOUNDARY_LINE_END for line items with bullets
+       (special character) and wrapped text always return the right
+       piece of text for each line. */
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, &quot;\342\200\242 List item &quot;, 0, 12);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, &quot;with some &quot;, 12, 22);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;\342\200\242 List item&quot;, 0, 11);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, &quot; with some&quot;, 11, 21);
+
+    g_object_unref(listItem);
+
+    listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 1));
+    g_assert(ATK_IS_TEXT(listItem));
+
+    /* Check that placing the same text in a paragraph doesn't break things. */
+    text = atk_text_get_text(ATK_TEXT(listItem), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\342\200\242 List item with some text that wraps across different lines.&quot;);
+    g_free(text);
+
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 3, &quot;\342\200\242 List item &quot;, 0, 12);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 13, &quot;with some &quot;, 12, 22);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 0, &quot;\342\200\242 List item&quot;, 0, 11);
+    testGetTextFunction(ATK_TEXT(listItem), atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 12, &quot; with some&quot;, 11, 21);
+
+    g_object_unref(list);
+    g_object_unref(listItem);
+    g_object_unref(paragraph);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetWithWrappedLines()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithWrappedLines, 0, 0, 0);
+
+    /* Enable caret browsing. */
+    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+    g_object_set(settings, &quot;enable-caret-browsing&quot;, TRUE, NULL);
+    webkit_web_view_set_settings(webView, settings);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    /* Check the paragraph with the text wrapped because of max-width. */
+    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
+    g_assert(ATK_IS_TEXT(paragraph1));
+
+    gchar* text = atk_text_get_text(paragraph1, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is one line wrapped because of the maximum width of its container.&quot;);
+    g_free(text);
+
+    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot;e&quot;, 15, 16);
+    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot; &quot;, 16, 17);
+    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR, 16, &quot;w&quot;, 17, 18);
+
+    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;one &quot;, 8, 12);
+    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;line &quot;, 12, 17);
+    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START, 16, &quot;wrapped &quot;, 17, 25);
+
+    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; line&quot;, 11, 16);
+    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; wrapped&quot;, 16, 24);
+    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END, 16, &quot; because&quot;, 24, 32);
+
+    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;This is one line &quot;, 0, 17);
+    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;wrapped because &quot;, 17, 33);
+    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_START, 17, &quot;of the maximum &quot;, 33, 48);
+
+    testGetTextFunction(paragraph1, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot;This is one line&quot;, 0, 16);
+    testGetTextFunction(paragraph1, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot; wrapped because&quot;, 16, 32);
+    testGetTextFunction(paragraph1, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_END, 17, &quot; of the maximum&quot;, 32, 47);
+
+    g_object_unref(paragraph1);
+
+    /* Check the paragraph with the text wrapped because of &lt;br&gt; elements. */
+    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
+    g_assert(ATK_IS_TEXT(paragraph2));
+
+    text = atk_text_get_text(paragraph2, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is another line wrapped\nbecause of one forced\nline break in the middle.&quot;);
+    g_free(text);
+
+    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;d&quot;, 27, 28);
+    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;\n&quot;, 28, 29);
+    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_CHAR, 28, &quot;b&quot;, 29, 30);
+
+    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;line &quot;, 16, 21);
+    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;wrapped\n&quot;, 21, 29);
+    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_START, 28, &quot;because &quot;, 29, 37);
+
+    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot; wrapped&quot;, 20, 28);
+    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot;\nbecause&quot;, 28, 36);
+    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_WORD_END, 28, &quot; of&quot;, 36, 39);
+
+    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;This is another line wrapped\n&quot;, 0, 29);
+    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;because of one forced\n&quot;, 29, 51);
+    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_START, 30, &quot;line break in the middle.&quot;, 51, 76);
+
+    testGetTextFunction(paragraph2, atk_text_get_text_before_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;This is another line wrapped&quot;, 0, 28);
+    testGetTextFunction(paragraph2, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;\nbecause of one forced&quot;, 28, 50);
+    testGetTextFunction(paragraph2, atk_text_get_text_after_offset, ATK_TEXT_BOUNDARY_LINE_END, 30, &quot;\nline break in the middle.&quot;, 50, 76);
+
+    g_object_unref(paragraph2);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextAtOffsetWithEmbeddedObjects()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsWithEmbeddedObjects, 0, 0, 0);
+
+    /* Enable caret browsing. */
+    WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+    g_object_set(settings, &quot;enable-caret-browsing&quot;, TRUE, NULL);
+    webkit_web_view_set_settings(webView, settings);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    /* Check the paragraph with the text wrapped because of max-width. */
+    AtkText* paragraph = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
+    g_assert(ATK_IS_TEXT(paragraph));
+
+    gchar* text = atk_text_get_text(paragraph, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is one line containing two \357\277\274 embedded objects \357\277\274 in the middle.&quot;);
+    g_free(text);
+
+    /* Check right before the first embedded object */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 32, &quot;\357\277\274&quot;, 32, 33);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 32, &quot;two \357\277\274 &quot;, 28, 34);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 32, &quot; \357\277\274 embedded&quot;, 31, 42);
+
+    /* Check right after the first embedded object (and before the first word after it) */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 33, &quot; &quot;, 33, 34);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 33, &quot;two \357\277\274 &quot;, 28, 34);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 33, &quot; \357\277\274 embedded&quot;, 31, 42);
+
+    /* Check at the beginning of the first word between the two embedded objects */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 34, &quot;e&quot;, 34, 35);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 34, &quot;embedded &quot;, 34, 43);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 34, &quot; \357\277\274 embedded&quot;, 31, 42);
+
+    /* Check at the end of the first word between the two embedded objects */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 42, &quot; &quot;, 42, 43);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 42, &quot;embedded &quot;, 34, 43);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 42, &quot; objects&quot;, 42, 50);
+
+    /* Check right before the second embedded object */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 51, &quot;\357\277\274&quot;, 51, 52);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 51, &quot;objects \357\277\274 &quot;, 43, 53);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 51, &quot; \357\277\274 in&quot;, 50, 55);
+
+    /* Check right after the second embedded object (and before the first word after it) */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 52, &quot; &quot;, 52, 53);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 52, &quot;objects \357\277\274 &quot;, 43, 53);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 52, &quot; \357\277\274 in&quot;, 50, 55);
+
+    /* Check at the beginning of the first word after the two embedded objects */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 53, &quot;i&quot;, 53, 54);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 53, &quot;in &quot;, 53, 56);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 53, &quot; \357\277\274 in&quot;, 50, 55);
+
+    /* Check at the end of the first word after the two embedded objects */
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_CHAR, 55, &quot; &quot;, 55, 56);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_START, 55, &quot;in &quot;, 53, 56);
+    testGetTextFunction(paragraph, atk_text_get_text_at_offset, ATK_TEXT_BOUNDARY_WORD_END, 55, &quot; the&quot;, 55, 59);
+
+    g_object_unref(paragraph);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextInParagraphAndBodySimple()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInParagraphAndBodySimple, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    AtkObject* object1 = atk_object_ref_accessible_child(object, 0);
+    g_assert(object1);
+    AtkObject* object2 = atk_object_ref_accessible_child(object, 1);
+    g_assert(object2);
+
+    AtkText* textObject1 = ATK_TEXT(object1);
+    g_assert(ATK_IS_TEXT(textObject1));
+    AtkText* textObject2 = ATK_TEXT(object2);
+    g_assert(ATK_IS_TEXT(textObject2));
+
+    char *text = atk_text_get_text(textObject1, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is a test.&quot;);
+
+    text = atk_text_get_text(textObject2, 0, 12);
+    g_assert_cmpstr(text, ==, &quot;Hello world.&quot;);
+
+    g_object_unref(object1);
+    g_object_unref(object2);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextInParagraphAndBodyModerate()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInParagraphAndBodyModerate, 0, 0, 0);
+
+    /* Get to the inner AtkText object. */
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    AtkObject* object1 = atk_object_ref_accessible_child(object, 0);
+    g_assert(object1);
+    AtkObject* object2 = atk_object_ref_accessible_child(object, 1);
+    g_assert(object2);
+
+    AtkText* textObject1 = ATK_TEXT(object1);
+    g_assert(ATK_IS_TEXT(textObject1));
+    AtkText* textObject2 = ATK_TEXT(object2);
+    g_assert(ATK_IS_TEXT(textObject2));
+
+    char *text = atk_text_get_text(textObject1, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;This is a test.&quot;);
+
+    text = atk_text_get_text(textObject2, 0, 53);
+    g_assert_cmpstr(text, ==, &quot;Hello world.\nThis sentence is green.\nThis one is not.&quot;);
+
+    g_object_unref(object1);
+    g_object_unref(object2);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetTextInTable()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInTable, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+    object = atk_object_ref_accessible_child(object, 0);
+    g_assert(object);
+
+    /* Tables should not implement AtkText. */
+    g_assert(!G_TYPE_INSTANCE_GET_INTERFACE(object, ATK_TYPE_TEXT, AtkTextIface));
+
+    g_object_unref(object);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetHeadersInTable()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contentsInTableWithHeaders, 0, 0, 0);
+
+    AtkObject* axWebView = getWebAreaObject(webView);
+    g_assert(axWebView);
+
+    /* Check table with both column and row headers. */
+    AtkObject* table = atk_object_ref_accessible_child(axWebView, 0);
+    g_assert(table);
+    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
+
+    AtkObject* colHeader = atk_table_get_column_header(ATK_TABLE(table), 0);
+    g_assert(colHeader);
+    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(colHeader) == 0);
+
+    colHeader = atk_table_get_column_header(ATK_TABLE(table), 1);
+    g_assert(colHeader);
+    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(colHeader) == 1);
+
+    colHeader = atk_table_get_column_header(ATK_TABLE(table), 2);
+    g_assert(colHeader);
+    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(colHeader) == 2);
+
+    colHeader = atk_table_get_column_header(ATK_TABLE(table), 3);
+    g_assert(colHeader);
+    g_assert(atk_object_get_role(colHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(colHeader) == 2);
+
+    AtkObject* rowHeader = atk_table_get_row_header(ATK_TABLE(table), 0);
+    g_assert(rowHeader);
+    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(rowHeader) == 0);
+
+    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 1);
+    g_assert(rowHeader);
+    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(rowHeader) == 3);
+
+    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 2);
+    g_assert(rowHeader);
+    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(rowHeader) == 7);
+
+    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 3);
+    g_assert(rowHeader);
+    g_assert(atk_object_get_role(rowHeader) == ATK_ROLE_TABLE_CELL);
+    g_assert(atk_object_get_index_in_parent(rowHeader) == 7);
+
+    g_object_unref(table);
+
+    /* Check table with no headers at all. */
+    table = atk_object_ref_accessible_child(axWebView, 1);
+    g_assert(table);
+    g_assert(atk_object_get_role(table) == ATK_ROLE_TABLE);
+
+    colHeader = atk_table_get_column_header(ATK_TABLE(table), 0);
+    g_assert(colHeader == 0);
+
+    colHeader = atk_table_get_column_header(ATK_TABLE(table), 1);
+    g_assert(colHeader == 0);
+
+    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 0);
+    g_assert(rowHeader == 0);
+
+    rowHeader = atk_table_get_row_header(ATK_TABLE(table), 1);
+    g_assert(rowHeader == 0);
+
+    g_object_unref(table);
+    g_object_unref(webView);
+}
+
+static gint compAtkAttribute(AtkAttribute* a1, AtkAttribute* a2)
+{
+    gint strcmpVal = g_strcmp0(a1-&gt;name, a2-&gt;name);
+    if (strcmpVal)
+        return strcmpVal;
+    return g_strcmp0(a1-&gt;value, a2-&gt;value);
+}
+
+static gint compAtkAttributeName(AtkAttribute* a1, AtkAttribute* a2)
+{
+    return g_strcmp0(a1-&gt;name, a2-&gt;name);
+}
+
+static gboolean atkAttributeSetAttributeNameHasValue(AtkAttributeSet* set, const gchar* attributeName, const gchar* value)
+{
+    AtkAttribute at;
+    at.name = (gchar*)attributeName;
+    GSList* element = g_slist_find_custom(set, &amp;at, (GCompareFunc)compAtkAttributeName);
+    return element &amp;&amp; !g_strcmp0(((AtkAttribute*)(element-&gt;data))-&gt;value, value);
+}
+
+static gboolean atkAttributeSetContainsAttributeName(AtkAttributeSet* set, const gchar* attributeName)
+{
+    AtkAttribute at;
+    at.name = (gchar*)attributeName;
+    return g_slist_find_custom(set, &amp;at, (GCompareFunc)compAtkAttributeName) ? true : false;
+}
+
+static gboolean atkAttributeSetAttributeHasValue(AtkAttributeSet* set, AtkTextAttribute attribute, const gchar* value)
+{
+    return atkAttributeSetAttributeNameHasValue(set, atk_text_attribute_get_name(attribute), value);
+}
+
+static gboolean atkAttributeSetAreEqual(AtkAttributeSet* set1, AtkAttributeSet* set2)
+{
+    if (!set1)
+        return !set2;
+
+    set1 = g_slist_sort(set1, (GCompareFunc)compAtkAttribute);
+    set2 = g_slist_sort(set2, (GCompareFunc)compAtkAttribute);
+
+    while (set1) {
+        if (!set2 || compAtkAttribute(set1-&gt;data, set2-&gt;data))
+            return FALSE;
+
+        set1 = set1-&gt;next;
+        set2 = set2-&gt;next;
+    }
+
+    return (!set2);
+}
+
+static void testWebkitAtkTextAttributes()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, textWithAttributes, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* child = atk_object_ref_accessible_child(object, 0);
+    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
+    AtkText* childText = ATK_TEXT(child);
+
+    gint startOffset;
+    gint endOffset;
+    AtkAttributeSet* set1 = atk_text_get_run_attributes(childText, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 12);
+    g_assert(atkAttributeSetAreEqual(set1, 0));
+
+    AtkAttributeSet* set2 = atk_text_get_run_attributes(childText, 15, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 12);
+    g_assert_cmpint(endOffset, ==, 17);
+    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_STYLE, &quot;italic&quot;));
+
+    AtkAttributeSet* set3 = atk_text_get_run_attributes(childText, 17, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 17);
+    g_assert_cmpint(endOffset, ==, 40);
+    g_assert(atkAttributeSetAttributeHasValue(set3, ATK_TEXT_ATTR_WEIGHT, &quot;700&quot;));
+
+    AtkAttributeSet* set4 = atk_text_get_default_attributes(childText);
+    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_STYLE, &quot;normal&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_JUSTIFICATION, &quot;right&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set4, ATK_TEXT_ATTR_SIZE, &quot;14&quot;));
+    atk_attribute_set_free(set1);
+    atk_attribute_set_free(set2);
+    atk_attribute_set_free(set3);
+    atk_attribute_set_free(set4);
+
+    child = atk_object_ref_accessible_child(object, 1);
+    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
+    childText = ATK_TEXT(child);
+
+    set1 = atk_text_get_default_attributes(childText);
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_FAMILY_NAME, &quot;monospace&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STYLE, &quot;normal&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STRIKETHROUGH, &quot;false&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_WEIGHT, &quot;400&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_FG_COLOR, &quot;120,121,122&quot;));
+
+    set2 = atk_text_get_run_attributes(childText, 43, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 43);
+    g_assert_cmpint(endOffset, ==, 80);
+    /* Checks that default attributes of text are not returned when called to atk_text_get_run_attributes. */
+    g_assert(!atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_FG_COLOR, &quot;120,121,122&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_UNDERLINE, &quot;single&quot;));
+    g_assert(atkAttributeSetAttributeHasValue(set2, ATK_TEXT_ATTR_BG_COLOR, &quot;80,81,82&quot;));
+    atk_attribute_set_free(set1);
+    atk_attribute_set_free(set2);
+
+    child = atk_object_ref_accessible_child(object, 2);
+    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
+    childText = ATK_TEXT(child);
+
+    set1 = atk_text_get_run_attributes(childText, 0, &amp;startOffset, &amp;endOffset);
+    set2 = atk_text_get_run_attributes(childText, 3, &amp;startOffset, &amp;endOffset);
+    g_assert(atkAttributeSetAreEqual(set1, set2));
+    atk_attribute_set_free(set2);
+
+    set2 = atk_text_get_run_attributes(childText, 1, &amp;startOffset, &amp;endOffset);
+    set3 = atk_text_get_run_attributes(childText, 5, &amp;startOffset, &amp;endOffset);
+    g_assert(atkAttributeSetAreEqual(set2, set3));
+    g_assert(!atkAttributeSetAreEqual(set1, set2));
+    atk_attribute_set_free(set3);
+
+    set3 = atk_text_get_run_attributes(childText, 2, &amp;startOffset, &amp;endOffset);
+    set4 = atk_text_get_run_attributes(childText, 6, &amp;startOffset, &amp;endOffset);
+    g_assert(atkAttributeSetAreEqual(set3, set4));
+    g_assert(!atkAttributeSetAreEqual(set1, set3));
+    g_assert(!atkAttributeSetAreEqual(set2, set3));
+    atk_attribute_set_free(set1);
+    atk_attribute_set_free(set2);
+    atk_attribute_set_free(set3);
+    atk_attribute_set_free(set4);
+
+    child = atk_object_ref_accessible_child(object, 3);
+    g_assert(child &amp;&amp; ATK_IS_TEXT(child));
+    childText = ATK_TEXT(child);
+    set1 = atk_text_get_run_attributes(childText, 24, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 21);
+    g_assert_cmpint(endOffset, ==, 25);
+    g_assert(atkAttributeSetAttributeHasValue(set1, ATK_TEXT_ATTR_STRIKETHROUGH, &quot;true&quot;));
+
+    set2 = atk_text_get_run_attributes(childText, 25, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 25);
+    g_assert_cmpint(endOffset, ==, 30);
+    g_assert(atkAttributeSetAreEqual(set2, 0));
+
+    set3 = atk_text_get_default_attributes(childText);
+    g_assert(atkAttributeSetAttributeHasValue(set3, ATK_TEXT_ATTR_JUSTIFICATION, &quot;center&quot;));
+    atk_attribute_set_free(set1);
+    atk_attribute_set_free(set2);
+    atk_attribute_set_free(set3);
+}
+
+static gchar* textSelectionChangedResult = 0;
+
+static void textSelectionChangedCallback(AtkText* text, gpointer data)
+{
+    g_assert(ATK_IS_TEXT(text));
+
+    g_free(textSelectionChangedResult);
+    AtkRole role = atk_object_get_role(ATK_OBJECT(text));
+    int startOffset = 0;
+    int endOffset = 0;
+    atk_text_get_selection(ATK_TEXT(text), 0, &amp;startOffset, &amp;endOffset);
+    textSelectionChangedResult = g_strdup_printf(&quot;|%s|%d|%d|&quot;, atk_role_get_name(role), startOffset, endOffset);
+}
+
+static void testWebkitAtkTextSelections()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, textForSelections, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkText* paragraph1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
+    g_assert(ATK_IS_TEXT(paragraph1));
+    g_signal_connect(paragraph1, &quot;text-selection-changed&quot;, G_CALLBACK(textSelectionChangedCallback), 0);
+
+    AtkText* paragraph2 = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
+    g_assert(ATK_IS_TEXT(paragraph2));
+    g_signal_connect(paragraph2, &quot;text-selection-changed&quot;, G_CALLBACK(textSelectionChangedCallback), 0);
+
+    AtkText* link = ATK_TEXT(atk_object_ref_accessible_child(ATK_OBJECT(paragraph2), 0));
+    g_assert(ATK_IS_TEXT(link));
+
+    AtkObject* list = atk_object_ref_accessible_child(object, 2);
+    g_assert(ATK_OBJECT(list));
+
+    AtkText* listItem = ATK_TEXT(atk_object_ref_accessible_child(list, 0));
+    g_assert(ATK_IS_TEXT(listItem));
+
+    /* First paragraph (simple text). */
+
+    /* Basic initial checks. */
+    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 0);
+
+    gint startOffset;
+    gint endOffset;
+    gchar* selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 0);
+    g_assert_cmpstr(selectedText, ==, 0);
+    g_free (selectedText);
+
+    /* Try removing a non existing (yet) selection. */
+    gboolean result = atk_text_remove_selection(paragraph1, 0);
+    g_assert(!result);
+
+    /* Try setting a 0-char selection. */
+    result = atk_text_set_selection(paragraph1, 0, 5, 5);
+    g_assert(result);
+
+    /* Make a selection and test it. */
+    result = atk_text_set_selection(paragraph1, 0, 5, 25);
+    g_assert(result);
+    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 1);
+    g_assert_cmpstr(textSelectionChangedResult, ==, &quot;|paragraph|5|25|&quot;);
+    selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 5);
+    g_assert_cmpint(endOffset, ==, 25);
+    g_assert_cmpstr(selectedText, ==, &quot;agraph with plain te&quot;);
+    g_free (selectedText);
+
+    /* Try removing the selection from other AtkText object (should fail). */
+    result = atk_text_remove_selection(paragraph2, 0);
+    g_assert(!result);
+
+    /* Remove the selection and test everything again. */
+    result = atk_text_remove_selection(paragraph1, 0);
+    g_assert(result);
+    g_assert_cmpint(atk_text_get_n_selections(paragraph1), ==, 0);
+    selectedText = atk_text_get_selection(paragraph1, 0, &amp;startOffset, &amp;endOffset);
+    /* Now offsets should be the same, set to the last position of the caret. */
+    g_assert_cmpint(startOffset, ==, endOffset);
+    g_assert_cmpint(startOffset, ==, 25);
+    g_assert_cmpint(endOffset, ==, 25);
+    g_assert_cmpstr(selectedText, ==, 0);
+    g_free (selectedText);
+
+    /* Second paragraph (text + link + text). */
+
+    /* Set a selection partially covering the link and test it. */
+    result = atk_text_set_selection(paragraph2, 0, 7, 21);
+    g_assert(result);
+
+    /* Test the paragraph first. */
+    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 1);
+    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 7);
+    g_assert_cmpint(endOffset, ==, 21);
+    g_assert_cmpstr(selectedText, ==, &quot;raph with a li&quot;);
+    g_free (selectedText);
+
+    /* Now test just the link. */
+    g_assert_cmpint(atk_text_get_n_selections(link), ==, 1);
+    selectedText = atk_text_get_selection(link, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 4);
+    g_assert_cmpstr(selectedText, ==, &quot;a li&quot;);
+    g_free (selectedText);
+
+    /* Make a selection after the link and check selection for the whole paragraph. */
+    result = atk_text_set_selection(paragraph2, 0, 27, 37);
+    g_assert(result);
+    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 1);
+    g_assert_cmpstr(textSelectionChangedResult, ==, &quot;|paragraph|27|37|&quot;);
+    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 27);
+    g_assert_cmpint(endOffset, ==, 37);
+    g_assert_cmpstr(selectedText, ==, &quot;the middle&quot;);
+    g_free (selectedText);
+
+    /* Remove selections and text everything again. */
+    result = atk_text_remove_selection(paragraph2, 0);
+    g_assert(result);
+    g_assert_cmpint(atk_text_get_n_selections(paragraph2), ==, 0);
+    selectedText = atk_text_get_selection(paragraph2, 0, &amp;startOffset, &amp;endOffset);
+    /* Now offsets should be the same (no selection). */
+    g_assert_cmpint(startOffset, ==, endOffset);
+    g_assert_cmpstr(selectedText, ==, 0);
+    g_free (selectedText);
+
+    g_assert_cmpint(atk_text_get_n_selections(link), ==, 0);
+    selectedText = atk_text_get_selection(link, 0, &amp;startOffset, &amp;endOffset);
+    /* Now offsets should be the same (no selection). */
+    g_assert_cmpint(startOffset, ==, endOffset);
+    g_assert_cmpstr(selectedText, ==, 0);
+    g_free (selectedText);
+
+    /* List item */
+
+    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
+    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 1);
+
+    gchar* text = atk_text_get_text(listItem, 0, -1);
+    g_assert_cmpstr(text, ==, &quot;1. A list item&quot;);
+    g_free (text);
+
+    /* It's not possible to select text inside an item's marker. */
+    result = atk_text_set_selection (listItem, 0, 0, 9);
+    g_assert(!result);
+    result = atk_text_set_selection (listItem, 0, 9, 1);
+    g_assert(!result);
+
+    /* It should be possible to select text inside an item's text. */
+    result = atk_text_set_selection (listItem, 0, 3, 9);
+    g_assert(result);
+
+    g_assert_cmpint(atk_text_get_n_selections(listItem), ==, 1);
+    selectedText = atk_text_get_selection(listItem, 0, &amp;startOffset, &amp;endOffset);
+    g_assert_cmpint(startOffset, ==, 3);
+    g_assert_cmpint(endOffset, ==, 9);
+    g_assert_cmpstr(selectedText, ==, &quot;A list&quot;);
+    g_free (selectedText);
+
+    g_free(textSelectionChangedResult);
+
+    g_object_unref(paragraph1);
+    g_object_unref(paragraph2);
+    g_object_unref(list);
+    g_object_unref(listItem);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkGetExtents()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, centeredContents, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkText* shortText1 = ATK_TEXT(atk_object_ref_accessible_child(object, 0));
+    g_assert(ATK_IS_TEXT(shortText1));
+    AtkText* longText = ATK_TEXT(atk_object_ref_accessible_child(object, 1));
+    g_assert(ATK_IS_TEXT(longText));
+    AtkText* shortText2 = ATK_TEXT(atk_object_ref_accessible_child(object, 2));
+    g_assert(ATK_IS_TEXT(shortText2));
+    AtkText* multilineText = ATK_TEXT(atk_object_ref_accessible_child(object, 3));
+    g_assert(ATK_IS_TEXT(multilineText));
+
+    /* Start with window extents. */
+    AtkTextRectangle sline_window1, sline_window2, lline_window, mline_window;
+    atk_text_get_range_extents(shortText1, 0, 10, ATK_XY_WINDOW, &amp;sline_window1);
+    atk_text_get_range_extents(longText, 0, 44, ATK_XY_WINDOW, &amp;lline_window);
+    atk_text_get_range_extents(shortText2, 0, 10, ATK_XY_WINDOW, &amp;sline_window2);
+    atk_text_get_range_extents(multilineText, 0, 60, ATK_XY_WINDOW, &amp;mline_window);
+
+    /* Check vertical line position. */
+    g_assert_cmpint(sline_window1.y + sline_window1.height, &lt;=, lline_window.y);
+    g_assert_cmpint(lline_window.y + lline_window.height + sline_window2.height, &lt;=, mline_window.y);
+
+    /* Paragraphs 1 and 3 have identical text and alignment. */
+    g_assert_cmpint(sline_window1.x, ==, sline_window2.x);
+    g_assert_cmpint(sline_window1.width, ==, sline_window2.width);
+    g_assert_cmpint(sline_window1.height, ==, sline_window2.height);
+
+    /* All lines should be the same height; line 2 is the widest line. */
+    g_assert_cmpint(sline_window1.height, ==, lline_window.height);
+    g_assert_cmpint(sline_window1.width, &lt;, lline_window.width);
+
+    /* Make sure the character extents jive with the range extents. */
+    gint x;
+    gint y;
+    gint width;
+    gint height;
+
+    /* First paragraph (short text). */
+    atk_text_get_character_extents(shortText1, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, sline_window1.x);
+    g_assert_cmpint(y, ==, sline_window1.y);
+    g_assert_cmpint(height, ==, sline_window1.height);
+
+    atk_text_get_character_extents(shortText1, 9, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, sline_window1.x + sline_window1.width - width);
+    g_assert_cmpint(y, ==, sline_window1.y);
+    g_assert_cmpint(height, ==, sline_window1.height);
+
+    /* Second paragraph (long text). */
+    atk_text_get_character_extents(longText, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, lline_window.x);
+    g_assert_cmpint(y, ==, lline_window.y);
+    g_assert_cmpint(height, ==, lline_window.height);
+
+    atk_text_get_character_extents(longText, 43, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, lline_window.x + lline_window.width - width);
+    g_assert_cmpint(y, ==, lline_window.y);
+    g_assert_cmpint(height, ==, lline_window.height);
+
+    /* Third paragraph (short text). */
+    atk_text_get_character_extents(shortText2, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, sline_window2.x);
+    g_assert_cmpint(y, ==, sline_window2.y);
+    g_assert_cmpint(height, ==, sline_window2.height);
+
+    atk_text_get_character_extents(shortText2, 9, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, sline_window2.x + sline_window2.width - width);
+    g_assert_cmpint(y, ==, sline_window2.y);
+    g_assert_cmpint(height, ==, sline_window2.height);
+
+    /* Four paragraph (3 lines multi-line text). */
+    atk_text_get_character_extents(multilineText, 0, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    g_assert_cmpint(x, ==, mline_window.x);
+    g_assert_cmpint(y, ==, mline_window.y);
+    g_assert_cmpint(3 * height, ==, mline_window.height);
+
+    atk_text_get_character_extents(multilineText, 59, &amp;x, &amp;y, &amp;width, &amp;height, ATK_XY_WINDOW);
+    /* Last line won't fill the whole width of the rectangle. */
+    g_assert_cmpint(x, &lt;=, mline_window.x + mline_window.width - width);
+    g_assert_cmpint(y, ==, mline_window.y + mline_window.height - height);
+    g_assert_cmpint(height, &lt;=, mline_window.height);
+
+    /* Check that extent for a full line are the same height than for
+       a partial section of the same line */
+    gint startOffset;
+    gint endOffset;
+    gchar* text = atk_text_get_text_at_offset(multilineText, 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
+    g_free(text);
+
+    AtkTextRectangle fline_window;
+    AtkTextRectangle afline_window;
+    atk_text_get_range_extents(multilineText, startOffset, endOffset, ATK_XY_WINDOW, &amp;fline_window);
+    atk_text_get_range_extents(multilineText, startOffset, endOffset - 1, ATK_XY_WINDOW, &amp;afline_window);
+    g_assert_cmpint(fline_window.x, ==, afline_window.x);
+    g_assert_cmpint(fline_window.y, ==, afline_window.y);
+    g_assert_cmpint(fline_window.height, ==, afline_window.height);
+
+    g_object_unref(shortText1);
+    g_object_unref(shortText2);
+    g_object_unref(longText);
+    g_object_unref(multilineText);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkLayoutAndDataTables()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, layoutAndDataTables, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    /* Check the non-layout table (data table). */
+
+    AtkObject* table1 = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_TABLE(table1));
+    AtkAttributeSet* set1 = atk_object_get_attributes(table1);
+    g_assert(set1);
+    g_assert(!atkAttributeSetContainsAttributeName(set1, &quot;layout-guess&quot;));
+    atk_attribute_set_free(set1);
+
+    /* Check the layout table. */
+
+    AtkObject* table2 = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_IS_TABLE(table2));
+    AtkAttributeSet* set2 = atk_object_get_attributes(table2);
+    g_assert(set2);
+    g_assert(atkAttributeSetContainsAttributeName(set2, &quot;layout-guess&quot;));
+    g_assert(atkAttributeSetAttributeNameHasValue(set2, &quot;layout-guess&quot;, &quot;true&quot;));
+    atk_attribute_set_free(set2);
+
+    g_object_unref(table1);
+    g_object_unref(table2);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkLinksWithInlineImages()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, linksWithInlineImages, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    /* First paragraph (link at the beginning). */
+    AtkObject* paragraph = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_TEXT(paragraph));
+    gint startOffset;
+    gint endOffset;
+    gchar* text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
+    g_assert(text);
+    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 11);
+    g_free(text);
+    g_object_unref(paragraph);
+
+    /* Second paragraph (link in the middle). */
+    paragraph = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_IS_TEXT(paragraph));
+    text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
+    g_assert(text);
+    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 11);
+    g_free(text);
+    g_object_unref(paragraph);
+
+    /* Third paragraph (link at the end). */
+    paragraph = atk_object_ref_accessible_child(object, 2);
+    g_assert(ATK_IS_TEXT(paragraph));
+    text = atk_text_get_text_at_offset(ATK_TEXT(paragraph), 0, ATK_TEXT_BOUNDARY_LINE_START, &amp;startOffset, &amp;endOffset);
+    g_assert(text);
+    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
+    g_assert_cmpint(startOffset, ==, 0);
+    g_assert_cmpint(endOffset, ==, 11);
+    g_free(text);
+    g_object_unref(paragraph);
+
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkHypertextAndHyperlinks()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, hypertextAndHyperlinks, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* paragraph1 = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_OBJECT(paragraph1));
+    g_assert(atk_object_get_role(paragraph1) == ATK_ROLE_PARAGRAPH);
+    g_assert(ATK_IS_HYPERTEXT(paragraph1));
+
+    /* No links in the first paragraph. */
+    gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph1));
+    g_assert_cmpint(nLinks, ==, 0);
+
+    AtkObject* paragraph2 = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_OBJECT(paragraph2));
+    g_assert(atk_object_get_role(paragraph2) == ATK_ROLE_PARAGRAPH);
+    g_assert(ATK_IS_HYPERTEXT(paragraph2));
+
+    /* Check links in the second paragraph.
+       nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(paragraph2));
+       g_assert_cmpint(nLinks, ==, 3); */
+
+    AtkHyperlink* hLink1 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 0);
+    g_assert(ATK_HYPERLINK(hLink1));
+    AtkObject* hLinkObject1 = atk_hyperlink_get_object(hLink1, 0);
+    g_assert(ATK_OBJECT(hLinkObject1));
+    g_assert(atk_object_get_role(hLinkObject1) == ATK_ROLE_LINK);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink1), ==, 0);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink1), ==, 6);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink1), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink1, 0), ==, &quot;http://foo.bar.baz/&quot;);
+
+    AtkHyperlink* hLink2 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 1);
+    g_assert(ATK_HYPERLINK(hLink2));
+    AtkObject* hLinkObject2 = atk_hyperlink_get_object(hLink2, 0);
+    g_assert(ATK_OBJECT(hLinkObject2));
+    g_assert(atk_object_get_role(hLinkObject2) == ATK_ROLE_LINK);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink2), ==, 12);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink2), ==, 32);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink2), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink2, 0), ==, &quot;http://bar.baz.foo/&quot;);
+
+    AtkHyperlink* hLink3 = atk_hypertext_get_link(ATK_HYPERTEXT(paragraph2), 2);
+    g_assert(ATK_HYPERLINK(hLink3));
+    AtkObject* hLinkObject3 = atk_hyperlink_get_object(hLink3, 0);
+    g_assert(ATK_OBJECT(hLinkObject3));
+    g_assert(atk_object_get_role(hLinkObject3) == ATK_ROLE_LINK);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLink3), ==, 65);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLink3), ==, 75);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLink3), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLink3, 0), ==, &quot;http://baz.foo.bar/&quot;);
+
+    AtkObject* list = atk_object_ref_accessible_child(object, 2);
+    g_assert(ATK_OBJECT(list));
+    g_assert(atk_object_get_role(list) == ATK_ROLE_LIST);
+    g_assert_cmpint(atk_object_get_n_accessible_children(list), ==, 1);
+
+    AtkObject* listItem = atk_object_ref_accessible_child(list, 0);
+    g_assert(ATK_IS_TEXT(listItem));
+    g_assert(ATK_IS_HYPERTEXT(listItem));
+
+    AtkHyperlink* hLinkInListItem = atk_hypertext_get_link(ATK_HYPERTEXT(listItem), 0);
+    g_assert(ATK_HYPERLINK(hLinkInListItem));
+    AtkObject* hLinkObject = atk_hyperlink_get_object(hLinkInListItem, 0);
+    g_assert(ATK_OBJECT(hLinkObject));
+    g_assert(atk_object_get_role(hLinkObject) == ATK_ROLE_LINK);
+    g_assert_cmpint(atk_hyperlink_get_start_index(hLinkInListItem), ==, 20);
+    g_assert_cmpint(atk_hyperlink_get_end_index(hLinkInListItem), ==, 43);
+    g_assert_cmpint(atk_hyperlink_get_n_anchors(hLinkInListItem), ==, 1);
+    g_assert_cmpstr(atk_hyperlink_get_uri(hLinkInListItem, 0), ==, &quot;http://foo.bar.baz/&quot;);
+
+    /* Finally check the AtkAction interface for a given AtkHyperlink. */
+    g_assert(ATK_IS_ACTION(hLink1));
+    g_assert_cmpint(atk_action_get_n_actions(ATK_ACTION(hLink1)), ==, 1);
+    g_assert_cmpstr(atk_action_get_keybinding(ATK_ACTION(hLink1), 0), ==, &quot;&quot;);
+    g_assert_cmpstr(atk_action_get_name(ATK_ACTION(hLink1), 0), ==, &quot;jump&quot;);
+    g_assert(atk_action_do_action(ATK_ACTION(hLink1), 0));
+
+    g_object_unref(paragraph1);
+    g_object_unref(paragraph2);
+    g_object_unref(list);
+    g_object_unref(listItem);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkListsOfItems()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, listsOfItems, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    /* Unordered list. */
+
+    AtkObject* uList = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_OBJECT(uList));
+    g_assert(atk_object_get_role(uList) == ATK_ROLE_LIST);
+    g_assert_cmpint(atk_object_get_n_accessible_children(uList), ==, 3);
+
+    AtkObject* item1 = atk_object_ref_accessible_child(uList, 0);
+    g_assert(ATK_IS_TEXT(item1));
+    AtkObject* item2 = atk_object_ref_accessible_child(uList, 1);
+    g_assert(ATK_IS_TEXT(item2));
+    AtkObject* item3 = atk_object_ref_accessible_child(uList, 2);
+    g_assert(ATK_IS_TEXT(item3));
+
+    g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0);
+    g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1);
+    g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1);
+
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, &quot;\342\200\242 text only&quot;);
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, &quot;\342\200\242 link only&quot;);
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, &quot;\342\200\242 text and a link&quot;);
+
+    g_object_unref(item1);
+    g_object_unref(item2);
+    g_object_unref(item3);
+
+    /* Ordered list. */
+
+    AtkObject* oList = atk_object_ref_accessible_child(object, 1);
+    g_assert(ATK_OBJECT(oList));
+    g_assert(atk_object_get_role(oList) == ATK_ROLE_LIST);
+    g_assert_cmpint(atk_object_get_n_accessible_children(oList), ==, 3);
+
+    item1 = atk_object_ref_accessible_child(oList, 0);
+    g_assert(ATK_IS_TEXT(item1));
+    item2 = atk_object_ref_accessible_child(oList, 1);
+    g_assert(ATK_IS_TEXT(item2));
+    item3 = atk_object_ref_accessible_child(oList, 2);
+    g_assert(ATK_IS_TEXT(item3));
+
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item1), 0, -1), ==, &quot;1. text only&quot;);
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item2), 0, -1), ==, &quot;2. link only&quot;);
+    g_assert_cmpstr(atk_text_get_text(ATK_TEXT(item3), 0, -1), ==, &quot;3. text and a link&quot;);
+
+    g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0);
+    g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1);
+    g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1);
+
+    g_object_unref(item1);
+    g_object_unref(item2);
+    g_object_unref(item3);
+
+    g_object_unref(uList);
+    g_object_unref(oList);
+    g_object_unref(webView);
+}
+
+typedef enum {
+  TEXT_CHANGE_INSERT = 1,
+  TEXT_CHANGE_REMOVE = 2
+} TextChangeType;
+
+static gchar* textChangedResult = 0;
+
+static void textChangedCb(AtkText* text, gint pos, gint len, gchar* modifiedText, gpointer data)
+{
+    g_assert(text &amp;&amp; ATK_IS_OBJECT(text));
+
+    TextChangeType type = GPOINTER_TO_INT(data);
+    g_free(textChangedResult);
+    textChangedResult = g_strdup_printf(&quot;|%d|%d|%d|'%s'|&quot;, type, pos, len, modifiedText);
+}
+
+static void testWebkitAtkTextChangedNotifications()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, formWithTextInputs, 0, 0, 0);
+
+    AtkObject* object = getWebAreaObject(webView);
+    g_assert(object);
+
+    AtkObject* form = atk_object_ref_accessible_child(object, 0);
+    g_assert(ATK_IS_OBJECT(form));
+
+    /* First check normal text entries. */
+    AtkObject* textEntry = atk_object_ref_accessible_child(form, 0);
+    g_assert(ATK_IS_EDITABLE_TEXT(textEntry));
+    g_assert(atk_object_get_role(ATK_OBJECT(textEntry)) == ATK_ROLE_ENTRY);
+
+    g_signal_connect(textEntry, &quot;text-insert&quot;,
+                     G_CALLBACK(textChangedCb),
+                     GINT_TO_POINTER(TEXT_CHANGE_INSERT));
+    g_signal_connect(textEntry, &quot;text-remove&quot;,
+                     G_CALLBACK(textChangedCb),
+                     GINT_TO_POINTER(TEXT_CHANGE_REMOVE));
+
+    gint pos = 0;
+    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(textEntry), &quot;foo bar baz&quot;, 11, &amp;pos);
+    char* text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;foo bar baz&quot;);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|1|0|11|'foo bar baz'|&quot;);
+    g_free(text);
+
+    atk_editable_text_delete_text(ATK_EDITABLE_TEXT(textEntry), 4, 7);
+    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;foo  baz&quot;);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|2|4|3|'bar'|&quot;);
+    g_free(text);
+
+    pos = 4;
+    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(textEntry), &quot;qux quux tobeignored&quot;, 8, &amp;pos);
+    text = atk_text_get_text(ATK_TEXT(textEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;foo qux quux baz&quot;);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|1|4|8|'qux quux'|&quot;);
+    g_free(text);
+
+    /* Now check for password entries. */
+    AtkObject* passwordEntry = atk_object_ref_accessible_child(form, 1);
+    g_assert(ATK_IS_EDITABLE_TEXT(passwordEntry));
+    g_assert(atk_object_get_role(ATK_OBJECT(passwordEntry)) == ATK_ROLE_PASSWORD_TEXT);
+
+    g_signal_connect(passwordEntry, &quot;text-insert&quot;,
+                     G_CALLBACK(textChangedCb),
+                     GINT_TO_POINTER(TEXT_CHANGE_INSERT));
+    g_signal_connect(passwordEntry, &quot;text-remove&quot;,
+                     G_CALLBACK(textChangedCb),
+                     GINT_TO_POINTER(TEXT_CHANGE_REMOVE));
+
+    pos = 0;
+    /* A single bullet character is '\342\200\242' */
+    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(passwordEntry), &quot;foobar&quot;, 6, &amp;pos);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|1|0|6|'\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242'|&quot;);
+    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
+    g_free(text);
+
+    atk_editable_text_delete_text(ATK_EDITABLE_TEXT(passwordEntry), 2, 4);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|2|2|2|'\342\200\242\342\200\242'|&quot;);
+
+    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
+    g_free(text);
+
+    pos = 3;
+    atk_editable_text_insert_text(ATK_EDITABLE_TEXT(passwordEntry), &quot;qux tobeignored&quot;, 3, &amp;pos);
+    g_assert_cmpstr(textChangedResult, ==, &quot;|1|3|3|'\342\200\242\342\200\242\342\200\242'|&quot;);
+
+    text = atk_text_get_text(ATK_TEXT(passwordEntry), 0, -1);
+    g_assert_cmpstr(text, ==, &quot;\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242\342\200\242&quot;);
+    g_free(text);
+
+    g_free(textChangedResult);
+
+    g_object_unref(form);
+    g_object_unref(textEntry);
+    g_object_unref(passwordEntry);
+    g_object_unref(webView);
+}
+
+static void testWebkitAtkParentForRootObject()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contents, 0, 0, 0);
+
+    /* We need a parent container widget for the webview. */
+    GtkWidget* parentContainer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    g_object_ref_sink(parentContainer);
+    gtk_container_add(GTK_CONTAINER(parentContainer), GTK_WIDGET(webView));
+
+    AtkObject* axParent = gtk_widget_get_accessible(parentContainer);
+    g_assert(ATK_IS_OBJECT(axParent));
+
+    AtkObject* axRoot = gtk_widget_get_accessible(GTK_WIDGET(webView));
+    g_assert(ATK_IS_OBJECT(axRoot));
+
+    /* The child for the parent container's accessibility object
+       should be the accessibility object for the WebView's root. */
+    AtkObject* axParentChild = atk_object_ref_accessible_child(axParent, 0);
+    g_assert(axParentChild == axRoot);
+
+    /* Bottom-up navigation should match top-down one. */
+    g_assert(atk_object_get_parent(axParentChild) == axParent);
+
+    g_object_unref(axParentChild);
+    g_object_unref(parentContainer);
+}
+
+static void testWebkitAtkSetParentForObject()
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GtkAllocation allocation = { 0, 0, 800, 600 };
+    gtk_widget_size_allocate(GTK_WIDGET(webView), &amp;allocation);
+    webkit_web_view_load_string(webView, contents, 0, 0, 0);
+
+    /* Put the webview in a parent container widget to check that the
+       normal behaviour keeps working as expected by default. */
+    GtkWidget* parentContainer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    g_object_ref_sink(parentContainer);
+    gtk_container_add(GTK_CONTAINER(parentContainer), GTK_WIDGET(webView));
+
+    AtkObject* axRoot = gtk_widget_get_accessible(GTK_WIDGET(webView));
+    g_assert(ATK_IS_OBJECT(axRoot));
+
+    AtkObject* axParent = gtk_widget_get_accessible(parentContainer);
+    g_assert(ATK_IS_OBJECT(axParent));
+
+    /* The parent of the root object is the parent container's a11y object. */
+    g_assert(atk_object_get_parent(axRoot) == axParent);
+
+    /* We now need to use something as a an alternative parent for
+       the a11y object associated with the root of the DOM tree. */
+    GtkWidget* alternativeParent = gtk_button_new();
+    g_object_ref_sink(alternativeParent);
+
+    AtkObject* axAlternativeParent = gtk_widget_get_accessible(alternativeParent);
+    g_assert(ATK_IS_OBJECT(axAlternativeParent));
+
+    /* Manually set the alternative parent's accessibility object as
+       the parent for the WebKit accessibility root object and check. */
+    atk_object_set_parent(axRoot, axAlternativeParent);
+    g_assert(atk_object_get_parent(axRoot) == axAlternativeParent);
+
+    g_object_unref(alternativeParent);
+    g_object_unref(parentContainer);
+}
+
+#ifdef GTK_API_VERSION_2
+static void initializeTestingFramework(int argc, char** argv)
+{
+    /* Ensure GAIL is the only module loaded. */
+    g_setenv(&quot;GTK_MODULES&quot;, &quot;gail&quot;, TRUE);
+
+    /* Following lines were taken from gtk_test_init(). */
+    g_test_init(&amp;argc, &amp;argv, 0);
+    gtk_disable_setlocale();
+    setlocale(LC_ALL, &quot;C&quot;);
+
+    gtk_init(&amp;argc, &amp;argv);
+}
+#endif
+
+int main(int argc, char** argv)
+{
+#ifdef GTK_API_VERSION_2
+    /* We can't just call to gtk_test_init() in this case because its
+       implementation makes sure that no GTK+ module will be loaded, and
+       we will need to load GAIL for tests that need to use AtkObjects
+       from non-WebKit GtkWidgets (e.g parentForRootObject).*/
+    initializeTestingFramework(argc, argv);
+#else
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+#endif
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/atk/caretOffsets&quot;, testWebkitAtkCaretOffsets);
+    g_test_add_func(&quot;/webkit/atk/caretOffsetsAndExtranousWhiteSpaces&quot;, testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces);
+    g_test_add_func(&quot;/webkit/atk/comboBox&quot;, testWebkitAtkComboBox);
+    g_test_add_func(&quot;/webkit/atk/documentLoadingEvents&quot;, testWebkitAtkDocumentLoadingEvents);
+    g_test_add_func(&quot;/webkit/atk/embeddedObjects&quot;, testWebkitAtkEmbeddedObjects);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffset&quot;, testWebkitAtkGetTextAtOffset);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetNewlines&quot;, testWebkitAtkGetTextAtOffsetNewlines);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetTextarea&quot;, testWebkitAtkGetTextAtOffsetTextarea);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetTextInput&quot;, testWebkitAtkGetTextAtOffsetTextInput);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithPreformattedText&quot;, testWebkitAtkGetTextAtOffsetWithPreformattedText);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithSpecialCharacters&quot;, testWebkitAtkGetTextAtOffsetWithSpecialCharacters);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithWrappedLines&quot;, testWebkitAtkGetTextAtOffsetWithWrappedLines);
+    g_test_add_func(&quot;/webkit/atk/getTextAtOffsetWithEmbeddedObjects&quot;, testWebkitAtkGetTextAtOffsetWithEmbeddedObjects);
+    g_test_add_func(&quot;/webkit/atk/getTextInParagraphAndBodySimple&quot;, testWebkitAtkGetTextInParagraphAndBodySimple);
+    g_test_add_func(&quot;/webkit/atk/getTextInParagraphAndBodyModerate&quot;, testWebkitAtkGetTextInParagraphAndBodyModerate);
+    g_test_add_func(&quot;/webkit/atk/getTextInTable&quot;, testWebkitAtkGetTextInTable);
+    g_test_add_func(&quot;/webkit/atk/getHeadersInTable&quot;, testWebkitAtkGetHeadersInTable);
+    g_test_add_func(&quot;/webkit/atk/textAttributes&quot;, testWebkitAtkTextAttributes);
+    g_test_add_func(&quot;/webkit/atk/textSelections&quot;, testWebkitAtkTextSelections);
+    g_test_add_func(&quot;/webkit/atk/getExtents&quot;, testWebkitAtkGetExtents);
+    g_test_add_func(&quot;/webkit/atk/hypertextAndHyperlinks&quot;, testWebkitAtkHypertextAndHyperlinks);
+    g_test_add_func(&quot;/webkit/atk/layoutAndDataTables&quot;, testWebkitAtkLayoutAndDataTables);
+    g_test_add_func(&quot;/webkit/atk/linksWithInlineImages&quot;, testWebkitAtkLinksWithInlineImages);
+    g_test_add_func(&quot;/webkit/atk/listsOfItems&quot;, testWebkitAtkListsOfItems);
+    g_test_add_func(&quot;/webkit/atk/textChangedNotifications&quot;, testWebkitAtkTextChangedNotifications);
+    g_test_add_func(&quot;/webkit/atk/parentForRootObject&quot;, testWebkitAtkParentForRootObject);
+    g_test_add_func(&quot;/webkit/atk/setParentForObject&quot;, testWebkitAtkSetParentForObject);
+    return g_test_run ();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestatkrolescfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestatkrolesc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatkroles.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testatkroles.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatkroles.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testatkroles.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,426 @@
</span><ins>+/*
+ * Copyright © 2010 Joanmarie Diggs
+ * Copyright © 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+/* Non form roles */
+#define HTML_DOCUMENT_FRAME &quot;&lt;html&gt;&lt;body&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_HEADING &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;1&lt;/h1&gt;&lt;h2&gt;2&lt;/h2&gt;&lt;h3&gt;3&lt;/h3&gt;&lt;h4&gt;4&lt;/h4&gt;&lt;h5&gt;5&lt;/h5&gt;&lt;h6&gt;6&lt;/h6&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_IMAGE &quot;&lt;html&gt;&lt;body&gt;&lt;img src='foobar.png' alt='This is a test.'/&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_LINK_TEXT &quot;&lt;html&gt;&lt;body&gt;&lt;a href='foobar.html'&gt;This is a test.&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_LIST &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_PARAGRAPH &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;This is a test.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_SECTION &quot;&lt;html&gt;&lt;body&gt;&lt;div&gt;This is a test.&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_TABLE &quot;&lt;html&gt;&lt;body&gt;&lt;table border='1'&gt;&lt;tr&gt;&lt;td&gt;This is&lt;/td&gt;&lt;td&gt;a test.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_SEPARATOR &quot;&lt;html&gt;&lt;body&gt;&lt;hr/&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_COMBOBOX &quot;&lt;html&gt;&lt;body&gt;&lt;select size='1'&gt;&lt;option&gt;one&lt;/option&gt;&lt;option&gt;two&lt;/option&gt;&lt;option&gt;three&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+/* Form roles */
+#define HTML_FORM &quot;&lt;html&gt;&lt;body&gt;&lt;form&gt;This is a test.&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_CHECK_BOX &quot;&lt;html&gt;&lt;body&gt;&lt;input type='checkbox' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_LABELED_ENTRY &quot;&lt;html&gt;&lt;body&gt;&lt;label for='foo'&gt;Name:&lt;/label&gt;&lt;input type='text' id='foo' /&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_LISTBOX &quot;&lt;html&gt;&lt;body&gt;&lt;select size='3'&gt;&lt;option&gt;one&lt;/option&gt;&lt;option&gt;two&lt;/option&gt;&lt;option&gt;three&lt;/option&gt;&lt;/select&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_PASSWORD_TEXT &quot;&lt;html&gt;&lt;body&gt;&lt;input type='password' /&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_PUSH_BUTTON &quot;&lt;html&gt;&lt;body&gt;&lt;input type='submit' value='ok' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_RADIO_BUTTON &quot;&lt;html&gt;&lt;body&gt;&lt;input type='radio' /&gt;This is a test.&lt;/body&gt;&lt;/html&gt;&quot;
+
+typedef struct {
+    AtkObject* document;
+    AtkObject* obj;
+    AtkRole role;
+    GtkWidget* webView;
+    GtkAllocation alloc;
+    GMainLoop* loop;
+} AtkRolesFixture;
+
+static gboolean finish_loading(AtkRolesFixture* fixture)
+{
+    if (g_main_loop_is_running(fixture-&gt;loop))
+        g_main_loop_quit(fixture-&gt;loop);
+
+    // With the change to support WK2 accessibility, the root object
+    // has changed and it's no longer the document frame, but a scroll
+    // pane containing the document frame as its only child. See the
+    // bug 72390 for more details on this change.
+    // https://bugs.webkit.org/show_bug.cgi?id=72390
+    AtkObject* rootObject = gtk_widget_get_accessible(fixture-&gt;webView);
+    fixture-&gt;document = atk_object_ref_accessible_child(rootObject, 0);
+    g_assert(fixture-&gt;document);
+
+    // Remove the reference added by ref_accessible_child() and
+    // return, since we don't need to keep that extra ref at all.
+    g_object_unref(fixture-&gt;document);
+    return FALSE;
+}
+
+static void atk_roles_fixture_setup(AtkRolesFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;alloc = (GtkAllocation) { 0, 0, 800, 600 };
+    fixture-&gt;webView = webkit_web_view_new();
+    g_object_ref_sink(fixture-&gt;webView);
+
+    gtk_widget_size_allocate(fixture-&gt;webView, &amp;fixture-&gt;alloc);
+
+    if (data != NULL)
+        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
+
+    g_idle_add((GSourceFunc) finish_loading, fixture);
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void atk_roles_fixture_teardown(AtkRolesFixture* fixture, gconstpointer data)
+{
+    g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static void get_child_and_test_role(AtkObject* obj, gint pos, AtkRole role)
+{
+    AtkObject* child;
+    AtkRole child_role;
+
+    child = atk_object_ref_accessible_child(obj, pos);
+    g_assert(child);
+    child_role = atk_object_get_role(child);
+    g_assert(child_role == role);
+
+    g_object_unref(child);
+}
+
+static void test_webkit_atk_get_role_document_frame(AtkRolesFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;role = atk_object_get_role(fixture-&gt;document);
+    g_assert(fixture-&gt;role == ATK_ROLE_DOCUMENT_WEB);
+}
+
+static void test_webkit_atk_get_role_heading(AtkRolesFixture* fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_HEADING);
+    get_child_and_test_role(fixture-&gt;document, 1, ATK_ROLE_HEADING);
+    get_child_and_test_role(fixture-&gt;document, 2, ATK_ROLE_HEADING);
+    get_child_and_test_role(fixture-&gt;document, 3, ATK_ROLE_HEADING);
+    get_child_and_test_role(fixture-&gt;document, 4, ATK_ROLE_HEADING);
+    get_child_and_test_role(fixture-&gt;document, 5, ATK_ROLE_HEADING);
+}
+
+static void test_webkit_atk_get_role_image(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_IMAGE);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_link(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_LINK);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_list_and_item(AtkRolesFixture* fixture, gconstpointer data)
+{
+    AtkObject* listObj;
+
+    listObj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(listObj);
+    fixture-&gt;role = atk_object_get_role(listObj);
+    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
+
+    get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM);
+    get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM);
+    g_object_unref(listObj);
+
+    listObj = atk_object_ref_accessible_child(fixture-&gt;document, 1);
+    g_assert(listObj);
+    fixture-&gt;role = atk_object_get_role(listObj);
+    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
+
+    get_child_and_test_role(listObj, 0, ATK_ROLE_LIST_ITEM);
+    get_child_and_test_role(listObj, 1, ATK_ROLE_LIST_ITEM);
+    g_object_unref(listObj);
+}
+
+static void test_webkit_atk_get_role_paragraph(AtkRolesFixture* fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_PARAGRAPH);
+}
+
+static void test_webkit_atk_get_role_section(AtkRolesFixture* fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_SECTION);
+}
+
+// Does not yet test table cells because of bug 30895.
+static void test_webkit_atk_get_role_table(AtkRolesFixture* fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_TABLE);
+}
+
+static void test_webkit_atk_get_role_separator(AtkRolesFixture *fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_SEPARATOR);
+}
+
+static void test_webkit_atk_get_role_combobox(AtkRolesFixture *fixture, gconstpointer data)
+{
+    AtkObject* comboboxMenu;
+
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
+    g_assert(fixture-&gt;obj);
+    fixture-&gt;role = atk_object_get_role(fixture-&gt;obj);
+    g_assert(fixture-&gt;role == ATK_ROLE_COMBO_BOX);
+
+    comboboxMenu = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
+    g_assert(comboboxMenu);
+    fixture-&gt;role = atk_object_get_role(comboboxMenu);
+    g_assert(fixture-&gt;role == ATK_ROLE_MENU);
+
+    get_child_and_test_role(comboboxMenu, 0, ATK_ROLE_MENU_ITEM);
+    get_child_and_test_role(comboboxMenu, 1, ATK_ROLE_MENU_ITEM);
+    get_child_and_test_role(comboboxMenu, 2, ATK_ROLE_MENU_ITEM);
+
+    g_object_unref(fixture-&gt;obj);
+    g_object_unref(comboboxMenu);
+}
+
+/* Form roles */
+static void test_webkit_atk_get_role_form(AtkRolesFixture *fixture, gconstpointer data)
+{
+    get_child_and_test_role(fixture-&gt;document, 0, ATK_ROLE_FORM);
+}
+
+static void test_webkit_atk_get_role_check_box(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_CHECK_BOX);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_entry(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 1, ATK_ROLE_ENTRY);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_label(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_LABEL);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_listbox(AtkRolesFixture* fixture, gconstpointer data)
+{
+    AtkObject* listboxObj;
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    listboxObj = atk_object_ref_accessible_child(fixture-&gt;obj, 0);
+    g_assert(listboxObj);
+    fixture-&gt;role = atk_object_get_role(listboxObj);
+    g_assert(fixture-&gt;role == ATK_ROLE_LIST);
+
+    get_child_and_test_role(listboxObj, 0, ATK_ROLE_LIST_ITEM);
+    get_child_and_test_role(listboxObj, 1, ATK_ROLE_LIST_ITEM);
+    get_child_and_test_role(listboxObj, 2, ATK_ROLE_LIST_ITEM);
+
+    g_object_unref(fixture-&gt;obj);
+    g_object_unref(listboxObj);
+}
+
+static void test_webkit_atk_get_role_password_text(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_PASSWORD_TEXT);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_push_button(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_PUSH_BUTTON);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+static void test_webkit_atk_get_role_radio_button(AtkRolesFixture* fixture, gconstpointer data)
+{
+    // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+    fixture-&gt;obj = atk_object_ref_accessible_child(fixture-&gt;document, 0);
+    g_assert(fixture-&gt;obj);
+
+    get_child_and_test_role(fixture-&gt;obj, 0, ATK_ROLE_RADIO_BUTTON);
+
+    g_object_unref(fixture-&gt;obj);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_document_frame&quot;,
+               AtkRolesFixture, HTML_DOCUMENT_FRAME,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_document_frame,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_heading&quot;,
+               AtkRolesFixture, HTML_HEADING,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_heading,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_image&quot;,
+               AtkRolesFixture, HTML_IMAGE,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_image,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_link&quot;,
+               AtkRolesFixture, HTML_LINK_TEXT,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_link,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_list_and_item&quot;,
+               AtkRolesFixture, HTML_LIST,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_list_and_item,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_paragraph&quot;,
+               AtkRolesFixture, HTML_PARAGRAPH,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_paragraph,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_section&quot;,
+               AtkRolesFixture, HTML_SECTION,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_section,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_table&quot;,
+               AtkRolesFixture, HTML_TABLE,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_table,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_separator&quot;,
+               AtkRolesFixture, HTML_SEPARATOR,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_separator,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_combobox&quot;,
+               AtkRolesFixture, HTML_COMBOBOX,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_combobox,
+               atk_roles_fixture_teardown);
+
+    /* Form roles */
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_form&quot;,
+               AtkRolesFixture, HTML_FORM,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_form,
+               atk_roles_fixture_teardown);
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_check_box&quot;,
+               AtkRolesFixture, HTML_CHECK_BOX,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_check_box,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_entry&quot;,
+               AtkRolesFixture, HTML_LABELED_ENTRY,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_entry,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_label&quot;,
+               AtkRolesFixture, HTML_LABELED_ENTRY,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_label,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_listbox&quot;,
+               AtkRolesFixture, HTML_LISTBOX,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_listbox,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_password_text&quot;,
+               AtkRolesFixture, HTML_PASSWORD_TEXT,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_password_text,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_push_button&quot;,
+               AtkRolesFixture, HTML_PUSH_BUTTON,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_push_button,
+               atk_roles_fixture_teardown);
+
+    g_test_add(&quot;/webkit/atk/test_webkit_atk_get_role_radio_button&quot;,
+               AtkRolesFixture, HTML_RADIO_BUTTON,
+               atk_roles_fixture_setup,
+               test_webkit_atk_get_role_radio_button,
+               atk_roles_fixture_teardown);
+
+    return g_test_run();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestcontextmenucfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestcontextmenuc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcontextmenu.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcontextmenu.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,314 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;webkit/webkit.h&gt;
+
+typedef struct {
+    char *data;
+    guint flag;
+} TestInfo;
+
+static GMainLoop *loop;
+
+typedef struct {
+    WebKitWebView *webView;
+    TestInfo *info;
+} ContextMenuFixture;
+
+static TestInfo *testInfoNew(const char *data, guint flag)
+{
+    TestInfo *info = g_slice_new(TestInfo);
+    info-&gt;data = g_strdup(data);
+    info-&gt;flag = flag;
+
+    return info;
+}
+
+static void testInfoDestroy(TestInfo *info)
+{
+    g_free(info-&gt;data);
+    g_slice_free(TestInfo, info);
+}
+
+static void contextMenuFixtureSetup(ContextMenuFixture *fixture, gconstpointer data)
+{
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;info = (TestInfo *)data;
+}
+
+static void contextMenuFixtureTeardown(ContextMenuFixture *fixture, gconstpointer data)
+{
+    g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(loop);
+    testInfoDestroy(fixture-&gt;info);
+}
+
+static GList *checkAction(GList *iter, WebKitContextMenuAction action)
+{
+    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
+
+    g_assert(GTK_IS_MENU_ITEM(item));
+    g_assert(webkit_context_menu_item_get_action(item) == action);
+
+    return iter-&gt;next;
+}
+
+static GList *checkActionWithSubmenu(GList *iter, WebKitContextMenuAction action)
+{
+    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
+
+    g_assert(GTK_IS_MENU_ITEM(item));
+    g_assert(webkit_context_menu_item_get_action(item) == action);
+    g_assert(GTK_IS_MENU(gtk_menu_item_get_submenu(item)));
+
+    return iter-&gt;next;
+}
+
+static GList *checkSeparator(GList *iter)
+{
+    GtkMenuItem *item = (GtkMenuItem *)iter-&gt;data;
+
+    g_assert(GTK_IS_SEPARATOR_MENU_ITEM(item));
+
+    return iter-&gt;next;
+}
+
+static gboolean contextMenuCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
+{
+    TestInfo *info = (TestInfo *)userData;
+    guint context;
+    GList *items;
+    GList *iter;
+
+    /* Check signal parameters */
+    g_assert(WEBKIT_IS_WEB_VIEW(webView));
+    g_assert(GTK_IS_MENU(defaultMenu));
+    g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+    g_assert(!keyboardMode);
+
+    g_object_get(hitTestResult, &quot;context&quot;, &amp;context, NULL);
+    g_assert(context &amp; info-&gt;flag);
+
+    items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
+    switch (info-&gt;flag) {
+    case WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT:
+        iter = items;
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
+        g_assert(!iter);
+
+        break;
+    case WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE:
+        iter = items;
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD);
+        g_assert(!iter);
+
+        break;
+    case WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE:
+        iter = items;
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_CUT);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_PASTE);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DELETE);
+        iter = checkSeparator(iter);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL);
+        iter = checkSeparator(iter);
+        iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS);
+        iter = checkActionWithSubmenu(iter, WEBKIT_CONTEXT_MENU_ACTION_UNICODE);
+        g_assert(!iter);
+
+        break;
+    case WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK:
+        iter = items;
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK);
+        iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD);
+        g_assert(!iter);
+
+        break;
+    default:
+        g_assert_not_reached();
+    }
+
+    g_list_free(items);
+    g_main_loop_quit(loop);
+
+    return TRUE;
+}
+
+static void pushEvent(WebKitWebView *webView)
+{
+    GdkEvent *event = gdk_event_new(GDK_BUTTON_PRESS);
+#if GTK_CHECK_VERSION(3, 0, 0)
+    GdkDeviceManager *deviceManager;
+#endif
+
+    event-&gt;any.window = g_object_ref(gtk_widget_get_window(GTK_WIDGET(webView)));
+    event-&gt;any.send_event = FALSE;
+    event-&gt;button.time = GDK_CURRENT_TIME;
+    event-&gt;button.button = 3;
+    event-&gt;button.x = event-&gt;button.y = 5;
+    event-&gt;button.x_root = event-&gt;button.x;
+    event-&gt;button.y_root = event-&gt;button.y;
+#if GTK_CHECK_VERSION(3, 0, 0)
+    deviceManager = gdk_display_get_device_manager(gdk_display_get_default());
+    event-&gt;button.device = gdk_device_manager_get_client_pointer(deviceManager);
+#endif
+
+    gdk_event_put(event);
+    gdk_event_free(event);
+}
+
+static void loadStatusCallback(WebKitWebView *webView, GParamSpec *spec, gpointer data)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    TestInfo *info = (TestInfo *)data;
+
+    g_assert(status != WEBKIT_LOAD_FAILED);
+
+    if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    g_signal_connect(webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCallback), info);
+    pushEvent(webView);
+}
+
+static gboolean mapEventCallback(GtkWidget *widget, GdkEvent *event, gpointer data)
+{
+    gtk_widget_grab_focus(widget);
+    ContextMenuFixture *fixture = (ContextMenuFixture *)data;
+    webkit_web_view_load_string(fixture-&gt;webView,
+                                fixture-&gt;info-&gt;data,
+                                &quot;text/html&quot;,
+                                &quot;utf-8&quot;,
+                                &quot;file://&quot;);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(loadStatusCallback), fixture-&gt;info);
+    return FALSE;
+}
+
+static void testContextMenu(ContextMenuFixture *fixture, gconstpointer data)
+{
+    GtkAllocation allocation = { 0, 0, 50, 50 };
+    GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
+
+    gtk_window_resize(GTK_WINDOW(window), 50, 50);
+    gtk_window_move(GTK_WINDOW(window), 0, 0);
+    gtk_widget_size_allocate(GTK_WIDGET(fixture-&gt;webView), &amp;allocation);
+    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture-&gt;webView));
+    g_signal_connect(window, &quot;map-event&quot;, G_CALLBACK(mapEventCallback), fixture);
+    gtk_widget_show_all(window);
+
+    g_main_loop_run(loop);
+}
+
+static gboolean contextMenuCustomItemCallback(WebKitWebView *webView, GtkWidget *defaultMenu, WebKitHitTestResult *hitTestResult, gboolean keyboardMode, gpointer userData)
+{
+    TestInfo *info = (TestInfo *)userData;
+    guint context;
+    GList *items;
+    GList *iter;
+    GtkWidget *menuItem;
+    GtkAction *action;
+
+    /* Check signal parameters */
+    g_assert(WEBKIT_IS_WEB_VIEW(webView));
+    g_assert(GTK_IS_MENU(defaultMenu));
+    g_assert(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult));
+    g_assert(!keyboardMode);
+
+    g_object_get(hitTestResult, &quot;context&quot;, &amp;context, NULL);
+    g_assert(context &amp; info-&gt;flag);
+
+    action = gtk_action_new(&quot;TestAction&quot;, &quot;Custom Action&quot;, &quot;Custom Action Tooltip&quot;, NULL);
+    menuItem = gtk_action_create_menu_item(action);
+    g_object_unref(action);
+
+    gtk_menu_shell_append(GTK_MENU_SHELL(defaultMenu), menuItem);
+    gtk_widget_show(menuItem);
+
+    items = gtk_container_get_children(GTK_CONTAINER(defaultMenu));
+    iter = items;
+    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_BACK);
+    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD);
+    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_STOP);
+    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_RELOAD);
+    iter = checkAction(iter, WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION);
+    g_assert(!iter);
+
+    g_list_free(items);
+    g_main_loop_quit(loop);
+
+    return TRUE;
+}
+
+static void testContextMenuCustomItem(ContextMenuFixture *fixture, gconstpointer data)
+{
+    GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
+    gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(fixture-&gt;webView));
+    gtk_widget_show_all(window);
+    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
+
+    webkit_web_view_load_string(fixture-&gt;webView,
+                                fixture-&gt;info-&gt;data,
+                                &quot;text/html&quot;,
+                                &quot;utf-8&quot;,
+                                &quot;file://&quot;);
+    g_signal_connect(fixture-&gt;webView, &quot;context-menu&quot;, G_CALLBACK(contextMenuCustomItemCallback), fixture-&gt;info);
+    pushEvent(fixture-&gt;webView);
+}
+
+int main(int argc, char **argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/testcontextmenu/document&quot;, ContextMenuFixture,
+               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                           WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
+               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+    /* We hardcode all elements to be at 0,0 so that we know where to generate the button events */
+    g_test_add(&quot;/webkit/testcontextmenu/image&quot;, ContextMenuFixture,
+               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;img style='position:absolute; left:0; top:0' src='0xdeadbeef' width=50 height=50&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                           WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
+               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+    g_test_add(&quot;/webkit/testcontextmenu/editable&quot;, ContextMenuFixture,
+               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute; left:0; top:0' size='35'&gt;&lt;/input&gt;&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                           WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
+               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+    g_test_add(&quot;/webkit/testcontextmenu/link&quot;, ContextMenuFixture,
+               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;a style='position:absolute; left:0; top:0' href='http://www.example.com'&gt;HELLO WORLD&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                           WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
+               contextMenuFixtureSetup, testContextMenu, contextMenuFixtureTeardown);
+    g_test_add(&quot;/webkit/testcontextmenu/customitem&quot;, ContextMenuFixture,
+               testInfoNew(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                           WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
+               contextMenuFixtureSetup, testContextMenuCustomItem, contextMenuFixtureTeardown);
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestcopyandpastecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestcopyandpastec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testcopyandpaste.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testcopyandpaste.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,266 @@
</span><ins>+/*
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;string.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;webkit/webkit.h&gt;
+#include &lt;JavaScriptCore/JSStringRef.h&gt;
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+
+typedef struct {
+    char* page;
+    char* expectedContent;
+} TestInfo;
+
+typedef struct {
+    GtkWidget* window;
+    WebKitWebView* webView;
+    GMainLoop* loop;
+    TestInfo* info;
+} CopyAndPasteFixture;
+
+TestInfo*
+test_info_new(const char* page, const char* expectedContent)
+{
+    TestInfo* info;
+    info = g_slice_new0(TestInfo);
+    info-&gt;page = g_strdup(page);
+    if (expectedContent)
+        info-&gt;expectedContent = g_strdup(expectedContent);
+    return info;
+}
+
+void
+test_info_destroy(TestInfo* info)
+{
+    g_free(info-&gt;page);
+    g_free(info-&gt;expectedContent);
+    g_slice_free(TestInfo, info);
+}
+
+static void copy_and_paste_fixture_setup(CopyAndPasteFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+
+    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+
+    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
+}
+
+static void copy_and_paste_fixture_teardown(CopyAndPasteFixture* fixture, gconstpointer data)
+{
+    gtk_widget_destroy(fixture-&gt;window);
+    g_main_loop_unref(fixture-&gt;loop);
+    test_info_destroy(fixture-&gt;info);
+}
+
+static void load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
+{
+    CopyAndPasteFixture* fixture = (CopyAndPasteFixture*)data;
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+    gtk_clipboard_clear(clipboard);
+
+    webkit_web_view_copy_clipboard(webView);
+
+    gchar* text = gtk_clipboard_wait_for_text(clipboard);
+    g_assert(text || !fixture-&gt;info-&gt;expectedContent);
+    g_assert(!text || !strcmp(text, fixture-&gt;info-&gt;expectedContent));
+    g_free(text);
+
+    // Verify that the markup starts with the proper content-type meta tag prefix.
+    GtkSelectionData* selectionData = gtk_clipboard_wait_for_contents(clipboard, gdk_atom_intern(&quot;text/html&quot;, FALSE));
+    if (selectionData) {
+        static const char* markupPrefix = &quot;&lt;meta http-equiv=\&quot;content-type\&quot; content=\&quot;text/html; charset=utf-8\&quot;&gt;&quot;;
+        char* markup = g_strndup((const char*) gtk_selection_data_get_data(selectionData),
+            gtk_selection_data_get_length(selectionData));
+        g_assert(strlen(markupPrefix) &lt;= strlen(markup));
+        g_assert(!strncmp(markupPrefix, markup, strlen(markupPrefix)));
+        g_free(markup);
+    }
+
+    g_assert(!gtk_clipboard_wait_is_uris_available(clipboard));
+    g_assert(!gtk_clipboard_wait_is_image_available(clipboard));
+
+    g_main_loop_quit(fixture-&gt;loop);
+}
+
+gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
+{
+    CopyAndPasteFixture* fixture = (CopyAndPasteFixture*)data;
+    webkit_web_view_load_string(fixture-&gt;webView, fixture-&gt;info-&gt;page,
+                                &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
+    return FALSE;
+}
+
+static void test_copy_and_paste(CopyAndPasteFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;info = (TestInfo*)data;
+    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), fixture);
+
+    gtk_widget_show(fixture-&gt;window);
+    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
+    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
+    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
+
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;,
+                     G_CALLBACK(load_status_cb), fixture);
+
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static CopyAndPasteFixture* currentFixture;
+static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    gtk_widget_grab_focus(GTK_WIDGET(currentFixture-&gt;webView));
+
+    // Simulate a paste keyboard sequence.
+    GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
+    event-&gt;key.keyval = gdk_unicode_to_keyval('v');
+    event-&gt;key.state = GDK_CONTROL_MASK;
+    event-&gt;key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture-&gt;webView));
+    g_object_ref(event-&gt;key.window);
+#ifndef GTK_API_VERSION_2
+    GdkDeviceManager* manager =  gdk_display_get_device_manager(gdk_window_get_display(event-&gt;key.window));
+    gdk_event_set_device(event, gdk_device_manager_get_client_pointer(manager));
+#endif
+
+    GdkKeymapKey* keys;
+    gint n_keys;
+    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event-&gt;key.keyval, &amp;keys, &amp;n_keys)) {
+        event-&gt;key.hardware_keycode = keys[0].keycode;
+        g_free(keys);
+    }
+
+    gtk_main_do_event(event);
+    event-&gt;key.type = GDK_KEY_RELEASE;
+    gtk_main_do_event(event);
+    gdk_event_free(event);
+
+    JSStringRef scriptString = JSStringCreateWithUTF8CString(&quot;document.body.innerHTML;&quot;);
+    JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
+    JSStringRelease(scriptString);
+
+    g_assert(JSValueIsString(context, value));
+    JSStringRef actual = JSValueToStringCopy(context, value, exception);
+    g_assert(!exception || !*exception);
+    g_assert(currentFixture-&gt;info-&gt;expectedContent);
+    JSStringRef expected = JSStringCreateWithUTF8CString(currentFixture-&gt;info-&gt;expectedContent);
+    g_assert(JSStringIsEqual(expected, actual));
+
+    JSStringRelease(expected);
+    JSStringRelease(actual);
+    g_main_loop_quit(currentFixture-&gt;loop);
+    return JSValueMakeUndefined(context);
+}
+
+static void window_object_cleared_callback(WebKitWebView* web_view, WebKitWebFrame* web_frame, JSGlobalContextRef context, JSObjectRef window_object, gpointer data)
+{
+    JSStringRef name = JSStringCreateWithUTF8CString(&quot;runTest&quot;);
+    JSObjectRef testComplete = JSObjectMakeFunctionWithCallback(context, name, runPasteTestCallback);
+    JSObjectSetProperty(context, window_object, name, testComplete, kJSPropertyAttributeNone, 0);
+    JSStringRelease(name);
+}
+
+static void pasting_test_get_data_callback(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data)
+{
+    gtk_selection_data_set(selection_data, gdk_atom_intern(&quot;text/html&quot;, FALSE), 8, (const guchar*) data, strlen((char*)data) + 1);
+}
+
+static void pasting_test_clear_data_callback(GtkClipboard* clipboard, gpointer data)
+{
+    g_free(data);
+}
+
+static void test_pasting_markup(CopyAndPasteFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;info = (TestInfo*)data;
+    currentFixture = fixture;
+
+    GtkTargetList* targetList = gtk_target_list_new(0, 0);
+    gtk_target_list_add(targetList, gdk_atom_intern(&quot;text/html&quot;, FALSE), 0, 0);
+
+    int numberOfTargets = 1;
+    GtkTargetEntry* targetTable = gtk_target_table_new_from_list(targetList, &amp;numberOfTargets);
+    gtk_clipboard_set_with_data(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD),
+                                targetTable, numberOfTargets,
+                                pasting_test_get_data_callback,
+                                pasting_test_clear_data_callback,
+                                g_strdup(fixture-&gt;info-&gt;expectedContent));
+    gtk_target_list_unref(targetList);
+    gtk_target_table_free(targetTable, numberOfTargets);
+
+    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), fixture);
+    g_signal_connect(fixture-&gt;webView, &quot;window-object-cleared&quot;,
+                     G_CALLBACK(window_object_cleared_callback), fixture);
+
+    gtk_widget_show(fixture-&gt;window);
+    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
+    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
+
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    const char* selected_span_html = &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy.&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;document.getSelection().selectAllChildren(document.getElementById('mainspan'));\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    const char* no_selection_html = &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;&lt;span id=\&quot;mainspan\&quot;&gt;All work and no play &lt;span&gt;make Jack a dull&lt;/span&gt; boy&lt;/span&gt;&quot;
+        &quot;&lt;script&gt;document.getSelection().collapse();\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    g_test_add(&quot;/webkit/copyandpaste/selection&quot;, CopyAndPasteFixture,
+               test_info_new(selected_span_html, &quot;All work and no play make Jack a dull boy.&quot;),
+               copy_and_paste_fixture_setup,
+               test_copy_and_paste,
+               copy_and_paste_fixture_teardown);
+    g_test_add(&quot;/webkit/copyandpaste/no-selection&quot;, CopyAndPasteFixture,
+               test_info_new(no_selection_html, 0),
+               copy_and_paste_fixture_setup,
+               test_copy_and_paste,
+               copy_and_paste_fixture_teardown);
+
+    const char* paste_test_html = &quot;&lt;html&gt;&quot;
+        &quot;&lt;body onLoad=\&quot;document.body.focus(); runTest();\&quot; contentEditable=\&quot;true\&quot;&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+    g_test_add(&quot;/webkit/copyandpaste/paste-markup&quot;, CopyAndPasteFixture,
+               test_info_new(paste_test_html, &quot;bobby&quot;),
+               copy_and_paste_fixture_setup,
+               test_pasting_markup,
+               copy_and_paste_fixture_teardown);
+
+    return g_test_run();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomdocumentcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdocumentc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdocument.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdocument.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,428 @@
</span><ins>+/*
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+#define HTML_DOCUMENT_TITLE &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_ELEMENTS &quot;&lt;html&gt;&lt;body&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;li&gt;3&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_ELEMENTS_CLASS &quot;&lt;html&gt;&lt;body&gt;&lt;div class=\&quot;test\&quot;&gt;&lt;/div&gt;&lt;div class=\&quot;strange\&quot;&gt;&lt;/div&gt;&lt;div class=\&quot;test\&quot;&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_ELEMENTS_ID &quot;&lt;html&gt;&lt;body&gt;&lt;div id=\&quot;testok\&quot;&gt;&lt;/div&gt;&lt;div id=\&quot;testbad\&quot;&gt;first&lt;/div&gt;&lt;div id=\&quot;testbad\&quot;&gt;second&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_LINKS &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;a href=\&quot;about:blank\&quot;&gt;blank&lt;/a&gt;&lt;a href=\&quot;http://www.google.com\&quot;&gt;google&lt;/a&gt;&lt;a href=\&quot;http://www.webkit.org\&quot;&gt;webkit&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_IFRAME &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;IFrame&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;iframe id='iframe'&gt;&lt;/iframe&gt;&lt;div id='test'&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_TABLE &quot;&lt;html&gt;&lt;body&gt;&lt;table id=\&quot;table\&quot;&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_EVALUATE &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;div&gt;First div&lt;/div&gt;&lt;div&gt;Second div&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+
+typedef struct {
+    GtkWidget* webView;
+    GMainLoop* loop;
+} DomDocumentFixture;
+
+static gboolean finish_loading(DomDocumentFixture* fixture)
+{
+    if (g_main_loop_is_running(fixture-&gt;loop))
+        g_main_loop_quit(fixture-&gt;loop);
+
+    return FALSE;
+}
+
+static void dom_document_fixture_setup(DomDocumentFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;webView = webkit_web_view_new();
+    g_object_ref_sink(fixture-&gt;webView);
+
+    if (data != NULL)
+        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
+
+    g_idle_add((GSourceFunc)finish_loading, fixture);
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void dom_document_fixture_teardown(DomDocumentFixture* fixture, gconstpointer data)
+{
+    if (fixture-&gt;webView)
+        g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static void test_dom_document_title(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    gchar* title = webkit_dom_document_get_title(document);
+    g_assert(title);
+    g_assert_cmpstr(title, ==, &quot;This is the title&quot;);
+    g_free(title);
+    webkit_dom_document_set_title(document, &quot;This is the second title&quot;);
+    title = webkit_dom_document_get_title(document);
+    g_assert(title);
+    g_assert_cmpstr(title, ==, &quot;This is the second title&quot;);
+    g_free(title);
+}
+
+static void test_dom_document_get_elements_by_tag_name(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;li&quot;);
+    g_assert(list);
+    gulong length = webkit_dom_node_list_get_length(list);
+    g_assert_cmpint(length, ==, 3);
+
+    guint i;
+
+    for (i = 0; i &lt; length; i++) {
+        WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
+        g_assert(item);
+        WebKitDOMElement* element = (WebKitDOMElement*)item;
+        g_assert(element);
+        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;LI&quot;);
+        WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
+        char* n = g_strdup_printf(&quot;%d&quot;, i+1);
+        g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, n);
+        g_free(n);
+    }
+
+    g_object_unref(list);
+}
+
+static void test_dom_document_get_elements_by_class_name(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_class_name(document, &quot;test&quot;);
+    g_assert(list);
+    gulong length = webkit_dom_node_list_get_length(list);
+    g_assert_cmpint(length, ==, 2);
+
+    guint i;
+
+    for (i = 0; i &lt; length; i++) {
+        WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
+        g_assert(item);
+        WebKitDOMElement* element = (WebKitDOMElement*)item;
+        g_assert(element);
+        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;DIV&quot;);
+    }
+
+    g_object_unref(list);
+}
+
+static void test_dom_document_get_element_by_id(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, &quot;testok&quot;);
+    g_assert(element);
+    element = webkit_dom_document_get_element_by_id(document, &quot;this-id-does-not-exist&quot;);
+    g_assert(element == 0);
+    /* The DOM spec says the return value is undefined when there's
+     * more than one element with the same id; in our case the first
+     * one will be returned */
+    element = webkit_dom_document_get_element_by_id(document, &quot;testbad&quot;);
+    g_assert(element);
+    WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
+    g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, &quot;first&quot;);
+}
+
+static void test_dom_document_get_links(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    WebKitDOMHTMLCollection *collection = webkit_dom_document_get_links(document);
+    g_assert(collection);
+    gulong length = webkit_dom_html_collection_get_length(collection);
+    g_assert_cmpint(length, ==, 3);
+
+    guint i;
+
+    for (i = 0; i &lt; length; i++) {
+        static const char* names[] = { &quot;blank&quot;, &quot;google&quot;, &quot;webkit&quot; };
+        static const char* uris[] = { &quot;about:blank&quot;, &quot;http://www.google.com/&quot;, &quot;http://www.webkit.org/&quot; };
+        WebKitDOMNode *node = webkit_dom_html_collection_item(collection, i);
+        g_assert(node);
+        WebKitDOMElement* element = (WebKitDOMElement*)node;
+        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;A&quot;);
+        WebKitDOMHTMLElement *htmlElement = (WebKitDOMHTMLElement*)element;
+        g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, names[i]);
+        WebKitDOMHTMLAnchorElement *anchor = (WebKitDOMHTMLAnchorElement*)element;
+        g_assert_cmpstr(webkit_dom_html_anchor_element_get_href(anchor), ==, uris[i]);
+    }
+    g_object_unref(collection);
+}
+
+static void test_dom_document_insert_row(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+    WebKitDOMElement* table = webkit_dom_document_get_element_by_id(document, &quot;table&quot;);
+    g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(table));
+    WebKitDOMHTMLCollection* rows = webkit_dom_html_table_element_get_rows(WEBKIT_DOM_HTML_TABLE_ELEMENT(table));
+    g_assert(WEBKIT_DOM_IS_HTML_COLLECTION(rows));
+
+    // Table is initially empty.
+    g_assert_cmpint(webkit_dom_html_collection_get_length(rows), ==, 0);
+    WebKitDOMHTMLElement* row = webkit_dom_html_table_element_insert_row(WEBKIT_DOM_HTML_TABLE_ELEMENT(table), -1, NULL);
+    g_assert(WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT(row));
+    rows = webkit_dom_html_table_element_get_rows(WEBKIT_DOM_HTML_TABLE_ELEMENT(table));
+    g_assert(WEBKIT_DOM_IS_HTML_COLLECTION(rows));
+    g_assert_cmpint(webkit_dom_html_collection_get_length(rows), ==, 1);
+}
+
+static void test_dom_document_evaluate(DomDocumentFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+    WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, &quot;html&quot;);
+    g_assert(list);
+    gulong length = webkit_dom_node_list_get_length(list);
+    g_assert_cmpint(length, ==, 1);
+    WebKitDOMNode* html = webkit_dom_node_list_item(list, 0);
+    g_assert(WEBKIT_DOM_IS_NODE(html));
+
+    WebKitDOMXPathResult* result = webkit_dom_document_evaluate(document, &quot;//div&quot;, html, NULL, 0, NULL, NULL);
+    g_assert(WEBKIT_DOM_IS_XPATH_RESULT(result));
+
+    int i = 0;
+    WebKitDOMNode* node;
+    while ( (node = webkit_dom_xpath_result_iterate_next(result, NULL)) != NULL) {
+        g_assert(node);
+        WebKitDOMElement* element = (WebKitDOMElement*)node;
+        g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, &quot;DIV&quot;);
+        i++;
+    }
+    g_assert_cmpint(i, ==, 2);
+
+    g_object_unref(list);
+}
+
+static void weak_notify(gpointer data, GObject* zombie)
+{
+    guint* count = (guint*)data;
+    (*count)++;
+}
+
+static void test_dom_document_garbage_collection(DomDocumentFixture* fixture, gconstpointer data)
+{
+    guint count = 0;
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
+    WebKitDOMHTMLHeadElement* head = webkit_dom_document_get_head(document);
+    g_assert(head);
+    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
+    WebKitDOMHTMLElement* body = webkit_dom_document_get_body(document);
+    g_assert(body);
+    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
+    WebKitDOMHTMLCollection *collection = webkit_dom_document_get_links(document);
+    g_assert(collection);
+    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_LINKS, NULL, NULL, NULL);
+
+    while (g_main_context_pending(NULL))
+        g_main_context_iteration(NULL, FALSE);
+
+    g_assert_cmpuint(count, ==, 3);
+
+    g_object_unref(collection);
+    g_assert_cmpuint(count, ==, 4);
+
+    count = 0;
+
+    document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
+    head = webkit_dom_document_get_head(document);
+    g_assert(head);
+    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
+    body = webkit_dom_document_get_body(document);
+    g_assert(body);
+    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
+    collection = webkit_dom_document_get_links(document);
+    g_assert(collection);
+    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
+    /* Ask twice for the same object */
+    WebKitDOMHTMLCollection* collection2 = webkit_dom_document_get_links(document);
+    g_assert(collection2);
+    g_object_weak_ref(G_OBJECT(collection2), (GWeakNotify)weak_notify, &amp;count);
+
+    g_object_unref(document);
+    g_object_unref(head);
+    g_object_unref(body);
+    g_object_unref(collection);
+    g_object_unref(collection2);
+
+    g_assert_cmpuint(count, ==, 5);
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_IFRAME, NULL, NULL, NULL);
+
+    while (g_main_context_pending(NULL))
+        g_main_context_iteration(NULL, FALSE);
+
+    count = 0;
+
+    document = webkit_web_view_get_dom_document(view);
+    WebKitDOMElement* div = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+    g_assert(div);
+    g_object_weak_ref(G_OBJECT(div), (GWeakNotify)weak_notify, &amp;count);
+    WebKitDOMElement* iframe = webkit_dom_document_get_element_by_id(document, &quot;iframe&quot;);
+    g_assert(iframe);
+
+    webkit_dom_element_set_attribute(iframe, &quot;src&quot;, &quot;data:&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;/html&gt;&quot;, NULL);
+
+    while (g_main_context_pending(NULL))
+        g_main_context_iteration(NULL, FALSE);
+
+    WebKitDOMDocument* iframeDocument = webkit_dom_html_iframe_element_get_content_document(WEBKIT_DOM_HTML_IFRAME_ELEMENT(iframe));
+    g_assert(iframeDocument);
+    head = webkit_dom_document_get_head(iframeDocument);
+    g_assert(head);
+    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
+
+    webkit_dom_element_set_attribute(iframe, &quot;src&quot;, &quot;about:blank&quot;, NULL);
+
+    while (g_main_context_pending(NULL))
+        g_main_context_iteration(NULL, FALSE);
+
+    g_assert_cmpuint(count, ==, 1);
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(view), HTML_DOCUMENT_LINKS, NULL, NULL, NULL);
+
+    while (g_main_context_pending(NULL))
+        g_main_context_iteration(NULL, FALSE);
+
+    g_assert_cmpuint(count, ==, 2);
+
+    count = 0;
+
+    document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    g_object_weak_ref(G_OBJECT(document), (GWeakNotify)weak_notify, &amp;count);
+    /* Ask twice for the Document */
+    WebKitDOMDocument* document2 = webkit_web_view_get_dom_document(view);
+    g_assert(document2);
+    g_object_weak_ref(G_OBJECT(document2), (GWeakNotify)weak_notify, &amp;count);
+    head = webkit_dom_document_get_head(document);
+    g_assert(head);
+    g_object_weak_ref(G_OBJECT(head), (GWeakNotify)weak_notify, &amp;count);
+    body = webkit_dom_document_get_body(document);
+    g_assert(body);
+    g_object_weak_ref(G_OBJECT(body), (GWeakNotify)weak_notify, &amp;count);
+    collection = webkit_dom_document_get_links(document);
+    g_assert(collection);
+    g_object_weak_ref(G_OBJECT(collection), (GWeakNotify)weak_notify, &amp;count);
+
+    gtk_widget_destroy(fixture-&gt;webView);
+    fixture-&gt;webView = NULL;
+
+    g_assert_cmpuint(count, ==, 4);
+
+    g_object_unref(collection);
+
+    g_assert_cmpuint(count, ==, 5);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/domdocument/test_title&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_TITLE,
+               dom_document_fixture_setup,
+               test_dom_document_title,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_get_elements_by_tag_name&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS,
+               dom_document_fixture_setup,
+               test_dom_document_get_elements_by_tag_name,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_get_elements_by_class_name&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_CLASS,
+               dom_document_fixture_setup,
+               test_dom_document_get_elements_by_class_name,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_get_element_by_id&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_ID,
+               dom_document_fixture_setup,
+               test_dom_document_get_element_by_id,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_get_links&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_LINKS,
+               dom_document_fixture_setup,
+               test_dom_document_get_links,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_table_insert_row&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_TABLE,
+               dom_document_fixture_setup,
+               test_dom_document_insert_row,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_document_evaluate&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_EVALUATE,
+               dom_document_fixture_setup,
+               test_dom_document_evaluate,
+               dom_document_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdocument/test_garbage_collection&quot;,
+               DomDocumentFixture, HTML_DOCUMENT_LINKS,
+               dom_document_fixture_setup,
+               test_dom_document_garbage_collection,
+               dom_document_fixture_teardown);
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomdomwindowcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomdomwindowc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomdomwindow.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomdomwindow.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,258 @@
</span><ins>+/*
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+#define HTML_DOCUMENT &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;style type='text/css'&gt;#test { font-size: 16px; }&lt;/style&gt;&lt;body&gt;&lt;p id='test'&gt;test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+
+typedef struct {
+    GtkWidget* webView;
+    GtkWidget* window;
+    WebKitDOMDOMWindow* domWindow;
+    GMainLoop* loop;
+
+    gboolean loaded;
+    gboolean clicked;
+    gconstpointer data;
+} DomDomviewFixture;
+
+static gboolean finish_loading(DomDomviewFixture* fixture)
+{
+    if (g_main_loop_is_running(fixture-&gt;loop))
+        g_main_loop_quit(fixture-&gt;loop);
+
+    return FALSE;
+}
+
+static void dom_domview_fixture_setup(DomDomviewFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    fixture-&gt;webView = webkit_web_view_new();
+    fixture-&gt;data = data;
+
+    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
+}
+
+static void dom_domview_fixture_teardown(DomDomviewFixture* fixture, gconstpointer data)
+{
+    gtk_widget_destroy(fixture-&gt;window);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static void dom_dom_window_fixture_setup(DomDomviewFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;webView = webkit_web_view_new();
+    g_object_ref_sink(fixture-&gt;webView);
+
+    if (data != NULL)
+        webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*) data, NULL, NULL, NULL);
+
+    g_idle_add((GSourceFunc)finish_loading, fixture);
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void dom_dom_window_fixture_teardown(DomDomviewFixture* fixture, gconstpointer data)
+{
+    if (fixture-&gt;webView)
+        g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static gboolean loadedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, DomDomviewFixture* fixture)
+{
+    g_assert(fixture-&gt;loaded == FALSE);
+    fixture-&gt;loaded = TRUE;
+
+    return FALSE;
+}
+
+static gboolean clickedCallback(WebKitDOMDOMWindow* view, WebKitDOMEvent* event, DomDomviewFixture* fixture)
+{
+    WebKitDOMEventTarget* target;
+    gushort phase;
+
+    g_assert(event);
+    g_assert(WEBKIT_DOM_IS_EVENT(event));
+
+    // We should catch this in the bubbling up phase, since we are connecting to the toplevel object
+    phase = webkit_dom_event_get_event_phase(event);
+    g_assert_cmpint(phase, ==, 3);
+
+    target = webkit_dom_event_get_current_target(event);
+    g_assert(target == WEBKIT_DOM_EVENT_TARGET(view));
+
+    g_assert(fixture-&gt;clicked == FALSE);
+    fixture-&gt;clicked = TRUE;
+
+    finish_loading(fixture);
+
+    return FALSE;
+}
+
+gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, DomDomviewFixture* fixture)
+{
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW (fixture-&gt;webView), (const char*)fixture-&gt;data, NULL, NULL, NULL);
+
+    return FALSE;
+}
+
+static void load_event_callback(WebKitWebView* webView, GParamSpec* spec, DomDomviewFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status == WEBKIT_LOAD_FINISHED) {
+        webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(fixture-&gt;domWindow), &quot;click&quot;, G_CALLBACK(clickedCallback), false, fixture);
+
+        g_assert(fixture-&gt;clicked == FALSE);
+        gtk_test_widget_click(GTK_WIDGET(fixture-&gt;webView), 1, 0);
+    }
+
+}
+
+static void test_dom_domview_signals(DomDomviewFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture);
+    WebKitWebView* view = (WebKitWebView*)fixture-&gt;webView;
+    g_assert(view);
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+    g_assert(document);
+    WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
+    g_assert(domWindow);
+
+    fixture-&gt;domWindow = domWindow;
+
+    webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(fixture-&gt;domWindow), &quot;load&quot;, G_CALLBACK(loadedCallback), false, fixture);
+    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;, G_CALLBACK(map_event_cb), fixture);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_event_callback), fixture);
+
+    gtk_widget_show_all(fixture-&gt;window);
+    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
+
+    g_main_loop_run(fixture-&gt;loop);
+
+    g_assert(fixture-&gt;loaded);
+    g_assert(fixture-&gt;clicked);
+}
+
+static gboolean
+clicked_cb(WebKitDOMEventTarget* target, WebKitDOMEvent* event, DomDomviewFixture* fixture)
+{
+    g_assert(fixture-&gt;clicked == FALSE);
+    fixture-&gt;clicked = TRUE;
+    finish_loading(fixture);
+    return FALSE;
+}
+
+static void load_status_callback(WebKitWebView* webView, GParamSpec* spec, DomDomviewFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status == WEBKIT_LOAD_FINISHED) {
+        WebKitDOMDocument* document;
+        WebKitDOMDOMWindow* domWindow;
+        WebKitDOMElement* element;
+        WebKitDOMEvent* event;
+        glong clientX, clientY;
+
+        document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
+        g_assert(document);
+        domWindow = webkit_dom_document_get_default_view(document);
+        g_assert(domWindow);
+        fixture-&gt;domWindow = domWindow;
+
+        element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+        g_assert(element);
+        event = webkit_dom_document_create_event(document, &quot;MouseEvent&quot;, NULL);
+        g_assert(event);
+        g_assert(WEBKIT_DOM_IS_EVENT(event));
+        g_assert(WEBKIT_DOM_IS_MOUSE_EVENT(event));
+        clientX = webkit_dom_element_get_client_left(element);
+        clientY = webkit_dom_element_get_client_top(element);
+        webkit_dom_mouse_event_init_mouse_event(WEBKIT_DOM_MOUSE_EVENT(event),
+                                                &quot;click&quot;, TRUE, TRUE,
+                                                fixture-&gt;domWindow, 0, 0, 0, clientX, clientY,
+                                                FALSE, FALSE, FALSE, FALSE,
+                                                1, WEBKIT_DOM_EVENT_TARGET(element));
+        webkit_dom_event_target_add_event_listener(WEBKIT_DOM_EVENT_TARGET(element), &quot;click&quot;, G_CALLBACK(clicked_cb), false, fixture);
+        g_assert(fixture-&gt;clicked == FALSE);
+        webkit_dom_event_target_dispatch_event(WEBKIT_DOM_EVENT_TARGET(element), event, NULL);
+    }
+
+}
+
+static void test_dom_domview_dispatch_event(DomDomviewFixture* fixture, gconstpointer data)
+{
+    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;, G_CALLBACK(map_event_cb), fixture);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_status_callback), fixture);
+
+    gtk_widget_show_all(fixture-&gt;window);
+    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
+
+    g_main_loop_run (fixture-&gt;loop);
+    g_assert(fixture-&gt;clicked);
+}
+
+static void test_dom_dom_window_get_computed_style(DomDomviewFixture* fixture, gconstpointer data)
+{
+    WebKitDOMDocument* document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
+    g_assert(document);
+    WebKitDOMDOMWindow* domWindow = webkit_dom_document_get_default_view(document);
+    g_assert(domWindow);
+
+    WebKitDOMElement*  element = webkit_dom_document_get_element_by_id(document, &quot;test&quot;);
+    g_assert(element);
+    g_assert(WEBKIT_DOM_IS_ELEMENT(element));
+    WebKitDOMCSSStyleDeclaration* cssStyle = webkit_dom_dom_window_get_computed_style(domWindow, element, NULL);
+    gchar* fontSize = webkit_dom_css_style_declaration_get_property_value(cssStyle, &quot;font-size&quot;);
+    g_assert_cmpstr(fontSize, ==, &quot;16px&quot;);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/domdomview/signals&quot;,
+               DomDomviewFixture, HTML_DOCUMENT,
+               dom_domview_fixture_setup,
+               test_dom_domview_signals,
+               dom_domview_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdomview/dispatch_event&quot;,
+               DomDomviewFixture, HTML_DOCUMENT,
+               dom_domview_fixture_setup,
+               test_dom_domview_dispatch_event,
+               dom_domview_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domdomwindow/get_computed_style&quot;,
+               DomDomviewFixture, HTML_DOCUMENT,
+               dom_dom_window_fixture_setup,
+               test_dom_dom_window_get_computed_style,
+               dom_dom_window_fixture_teardown);
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdomnodecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestdomnodec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomnode.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdomnode.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomnode.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdomnode.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,219 @@
</span><ins>+/*
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+#define HTML_DOCUMENT_HIERARCHY_NAVIGATION &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;This is the title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;1&lt;/p&gt;&lt;p&gt;2&lt;/p&gt;&lt;p&gt;3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+#define HTML_DOCUMENT_NODE_INSERTION &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;
+
+typedef struct {
+    GtkWidget* webView;
+    GMainLoop* loop;
+} DomNodeFixture;
+
+static gboolean finish_loading(DomNodeFixture* fixture)
+{
+    if (g_main_loop_is_running(fixture-&gt;loop))
+        g_main_loop_quit(fixture-&gt;loop);
+
+    return FALSE;
+}
+
+static void dom_node_fixture_setup(DomNodeFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;webView = webkit_web_view_new();
+    g_object_ref_sink(fixture-&gt;webView);
+
+    if (data != NULL)
+        webkit_web_view_load_string(WEBKIT_WEB_VIEW(fixture-&gt;webView), (const char*)data, NULL, NULL, NULL);
+
+    g_idle_add((GSourceFunc)finish_loading, fixture);
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void dom_node_fixture_teardown(DomNodeFixture* fixture, gconstpointer data)
+{
+    g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static void test_dom_node_hierarchy_navigation(DomNodeFixture* fixture, gconstpointer data)
+{
+    WebKitDOMDocument* document;
+    WebKitDOMHTMLHeadElement* head;
+    WebKitDOMHTMLBodyElement* body;
+    WebKitDOMNodeList* list;
+    WebKitDOMNode* ptr;
+    gulong i, length;
+
+    document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
+    g_assert(document);
+    g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+    head = webkit_dom_document_get_head(document);
+    g_assert(head);
+    g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head));
+
+    /* Title, head's child */
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(head));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
+    ptr = webkit_dom_node_list_item(list, 0);
+    g_assert(ptr);
+    g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(ptr));
+    g_object_unref(list);
+
+    /* Body, Head sibling */
+    ptr = webkit_dom_node_get_next_sibling(WEBKIT_DOM_NODE(head));
+    g_assert(ptr);
+    body = WEBKIT_DOM_HTML_BODY_ELEMENT(ptr);
+    g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(body));
+
+    /* There is no third sibling */
+    ptr = webkit_dom_node_get_next_sibling(ptr);
+    g_assert(ptr == NULL);
+
+    /* Body's previous sibling is Head */
+    ptr = webkit_dom_node_get_previous_sibling(WEBKIT_DOM_NODE(body));
+    g_assert(ptr);
+    g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(ptr));
+
+    /* Body has 3 children */
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    length = webkit_dom_node_list_get_length(list);
+    g_assert_cmpint(length, ==, 3);
+
+    /* The three of them are P tags */
+    for (i = 0; i &lt; length; i++) {
+        ptr = webkit_dom_node_list_item(list, i);
+        g_assert(ptr);
+        g_assert(WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT(ptr));
+    }
+
+    /* Go backwards */
+    for (i = 0; ptr; ptr = webkit_dom_node_get_previous_sibling(ptr), i++)
+        /* Nothing */;
+
+    g_assert_cmpint(i, ==, 3);
+    g_object_unref(list);
+}
+
+static void test_dom_node_insertion(DomNodeFixture* fixture, gconstpointer data)
+{
+    WebKitDOMDocument* document;
+    WebKitDOMHTMLElement* body;
+    WebKitDOMElement* p, *div;
+    WebKitDOMNodeList* list;
+    WebKitDOMNode* node;
+
+    document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture-&gt;webView));
+    g_assert(document);
+    body = webkit_dom_document_get_body(document);
+    g_assert(body);
+    g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(body));
+
+    /* Body shouldn't have any children at this point */
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)) == FALSE);
+
+    /* Insert one P element */
+    p = webkit_dom_document_create_element(document, &quot;P&quot;, NULL);
+    webkit_dom_node_append_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), NULL);
+
+    /* Now it should have one, the same that we inserted */
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
+    node = webkit_dom_node_list_item(list, 0);
+    g_assert(node);
+    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
+    g_object_unref(list);
+
+    /* Replace the P tag with a DIV tag */
+    div = webkit_dom_document_create_element(document, &quot;DIV&quot;, NULL);
+    webkit_dom_node_replace_child(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), WEBKIT_DOM_NODE(p), NULL);
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
+    node = webkit_dom_node_list_item(list, 0);
+    g_assert(node);
+    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+    g_object_unref(list);
+
+    /* Now remove the tag */
+    webkit_dom_node_remove_child(WEBKIT_DOM_NODE(body), node, NULL);
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 0);
+    g_object_unref(list);
+
+    /* Test insert_before */
+
+    /* If refChild is null, insert newChild as last element of parent */
+    div = webkit_dom_document_create_element(document, &quot;DIV&quot;, NULL);
+    webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(div), NULL, NULL);
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
+    node = webkit_dom_node_list_item(list, 0);
+    g_assert(node);
+    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+    g_object_unref(list);
+
+    /* Now insert a 'p' before 'div' */
+    p = webkit_dom_document_create_element(document, &quot;P&quot;, NULL);
+    webkit_dom_node_insert_before(WEBKIT_DOM_NODE(body), WEBKIT_DOM_NODE(p), WEBKIT_DOM_NODE(div), NULL);
+    g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+    list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+    g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 2);
+    node = webkit_dom_node_list_item(list, 0);
+    g_assert(node);
+    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(p), node));
+    node = webkit_dom_node_list_item(list, 1);
+    g_assert(node);
+    g_assert(webkit_dom_node_is_same_node(WEBKIT_DOM_NODE(div), node));
+    g_object_unref(list);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/domnode/test_hierarchy_navigation&quot;,
+               DomNodeFixture, HTML_DOCUMENT_HIERARCHY_NAVIGATION,
+               dom_node_fixture_setup,
+               test_dom_node_hierarchy_navigation,
+               dom_node_fixture_teardown);
+
+    g_test_add(&quot;/webkit/domnode/test_insertion&quot;,
+               DomNodeFixture, HTML_DOCUMENT_NODE_INSERTION,
+               dom_node_fixture_setup,
+               test_dom_node_insertion,
+               dom_node_fixture_teardown);
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestdownloadcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestdownloadc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdownload.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testdownload.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdownload.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testdownload.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,322 @@
</span><ins>+/*
+ * Copyright (C) 2009 Christian Dywan &lt;christian@twotoasts.de&gt;
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+GMainLoop* loop;
+char* temporaryFilename = NULL;
+WebKitDownload* theDownload = NULL;
+
+static void
+test_webkit_download_create(void)
+{
+    WebKitNetworkRequest* request;
+    WebKitDownload* download;
+    const gchar* uri = &quot;http://example.com&quot;;
+    gchar* tmpDir;
+
+    request = webkit_network_request_new(uri);
+    download = webkit_download_new(request);
+    g_object_unref(request);
+    g_assert_cmpstr(webkit_download_get_uri(download), ==, uri);
+    g_assert(webkit_download_get_network_request(download) == request);
+    g_assert(g_strrstr(uri, webkit_download_get_suggested_filename(download)));
+    g_assert(webkit_download_get_status(download) == WEBKIT_DOWNLOAD_STATUS_CREATED);
+    g_assert(!webkit_download_get_total_size(download));
+    g_assert(!webkit_download_get_current_size(download));
+    g_assert(!webkit_download_get_progress(download));
+    g_assert(!webkit_download_get_elapsed_time(download));
+    tmpDir = g_filename_to_uri(g_get_tmp_dir(), NULL, NULL);
+    webkit_download_set_destination_uri(download, tmpDir);
+    g_assert_cmpstr(tmpDir, ==, webkit_download_get_destination_uri(download));;
+    g_free(tmpDir);
+    g_object_unref(download);
+}
+
+static gboolean
+navigation_policy_decision_requested_cb(WebKitWebView* web_view,
+                                        WebKitWebFrame* web_frame,
+                                        WebKitNetworkRequest* request,
+                                        WebKitWebNavigationAction* action,
+                                        WebKitWebPolicyDecision* decision,
+                                        gpointer data)
+{
+    webkit_web_policy_decision_download(decision);
+    return TRUE;
+}
+
+static void
+notify_status_cb(GObject* object, GParamSpec* pspec, gpointer data)
+{
+    WebKitDownload* download = WEBKIT_DOWNLOAD(object);
+    switch (webkit_download_get_status(download)) {
+    case WEBKIT_DOWNLOAD_STATUS_FINISHED:
+    case WEBKIT_DOWNLOAD_STATUS_ERROR:
+        g_main_loop_quit(loop);
+        break;
+    case WEBKIT_DOWNLOAD_STATUS_CANCELLED:
+        g_assert_not_reached();
+        break;
+    default:
+        break;
+    }
+}
+
+static gboolean
+set_filename(gchar* filename)
+{
+    gchar *uri = g_filename_to_uri(filename, NULL, NULL);
+
+    webkit_download_set_destination_uri(theDownload, uri);
+    g_free(uri);
+
+    webkit_download_start(theDownload);
+    return FALSE;
+}
+
+static void
+handle_download_requested_cb(WebKitDownload* download,
+                             gboolean* beenThere,
+                             gboolean asynch)
+{
+    theDownload = download;
+    *beenThere = TRUE;
+
+    if (temporaryFilename) {
+        if (asynch) {
+            g_idle_add((GSourceFunc)set_filename, temporaryFilename);
+        } else {
+            gchar *uri = g_filename_to_uri(temporaryFilename, NULL, NULL);
+            if (uri)
+                webkit_download_set_destination_uri(download, uri);
+            g_free(uri);
+        }
+    }
+
+    g_signal_connect(download, &quot;notify::status&quot;,
+                     G_CALLBACK(notify_status_cb), NULL);
+}
+
+static gboolean
+download_requested_cb(WebKitWebView* web_view,
+                      WebKitDownload* download,
+                      gboolean* beenThere)
+{
+    handle_download_requested_cb(download, beenThere, FALSE);
+    return TRUE;
+}
+
+static gboolean
+download_requested_asynch_cb(WebKitWebView* web_view,
+                             WebKitDownload* download,
+                             gboolean* beenThere)
+{
+    handle_download_requested_cb(download, beenThere, TRUE);
+    return TRUE;
+}
+
+static void
+test_webkit_download_perform(gboolean asynch)
+{
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GCallback downloadRequestCallback = NULL;
+
+    g_object_ref_sink(G_OBJECT(webView));
+
+    g_signal_connect(webView, &quot;navigation-policy-decision-requested&quot;,
+                     G_CALLBACK(navigation_policy_decision_requested_cb),
+                     NULL);
+
+    if (asynch)
+        downloadRequestCallback = G_CALLBACK(download_requested_asynch_cb);
+    else
+        downloadRequestCallback = G_CALLBACK(download_requested_cb);
+
+    gboolean beenThere = FALSE;
+    g_signal_connect(webView, &quot;download-requested&quot;,
+                     downloadRequestCallback, &amp;beenThere);
+
+    /* Preparation; FIXME: we should move this code to a test
+     * utilities file, because we have a very similar one in
+     * testwebframe.c */
+    GError *error = NULL;
+    gchar* filename;
+    int fd = g_file_open_tmp(&quot;webkit-testwebdownload-XXXXXX&quot;, &amp;filename, &amp;error);
+    close(fd);
+
+    if (error)
+        g_critical(&quot;Failed to open a temporary file for writing: %s.&quot;, error-&gt;message);
+
+    if (g_unlink(filename) == -1)
+        g_critical(&quot;Failed to delete the temporary file: %s.&quot;, g_strerror(errno));
+
+    theDownload = NULL;
+    temporaryFilename = filename;
+
+    loop = g_main_loop_new(NULL, TRUE);
+    webkit_web_view_load_uri(webView, &quot;http://gnome.org/&quot;);
+    g_main_loop_run(loop);
+
+    g_assert_cmpint(beenThere, ==, TRUE);
+
+    g_assert_cmpint(g_file_test(temporaryFilename, G_FILE_TEST_IS_REGULAR), ==, TRUE);
+
+    g_unlink(temporaryFilename);
+    g_free(temporaryFilename);
+    temporaryFilename = NULL;
+
+    g_main_loop_unref(loop);
+    g_object_unref(webView);
+}
+
+static void
+test_webkit_download_synch(void)
+{
+    test_webkit_download_perform(FALSE);
+}
+
+static void
+test_webkit_download_asynch(void)
+{
+    test_webkit_download_perform(TRUE);
+}
+
+static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame,
+                                                       WebKitNetworkRequest* request, const char* mime_type,
+                                                       WebKitWebPolicyDecision* decision, gpointer data)
+{
+    webkit_web_policy_decision_download(decision);
+    return TRUE;
+}
+
+static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
+        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
+        g_main_loop_quit(loop);
+}
+
+static void
+test_webkit_download_data(void)
+{
+    gboolean beenThere = FALSE;
+    WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+
+    g_signal_connect(webView, &quot;download-requested&quot;,
+                     G_CALLBACK(download_requested_cb),
+                     &amp;beenThere);
+
+    g_signal_connect(webView, &quot;notify::load-status&quot;,
+                     G_CALLBACK(idle_quit_loop_cb),
+                     NULL);
+
+    g_signal_connect(webView, &quot;mime-type-policy-decision-requested&quot;,
+                     G_CALLBACK(mime_type_policy_decision_requested_cb),
+                     NULL);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    /* We're testing for a crash, so just not crashing is a pass */
+    webkit_web_view_load_uri(webView, &quot;data:application/octect-stream,&quot;);
+    g_main_loop_run(loop);
+
+    g_assert_cmpint(beenThere, ==, TRUE);
+
+    g_main_loop_unref(loop);
+    g_object_unref(webView);
+}
+
+static void notifyDownloadStatusCallback(GObject *object, GParamSpec *pspec, gpointer data)
+{
+    WebKitDownload *download = WEBKIT_DOWNLOAD(object);
+    WebKitNetworkResponse *response = webkit_download_get_network_response(download);
+    SoupMessage *message = webkit_network_response_get_message(response);
+
+    switch (webkit_download_get_status(download)) {
+    case WEBKIT_DOWNLOAD_STATUS_ERROR:
+        g_assert_cmpint(message-&gt;status_code, ==, 404);
+        g_main_loop_quit(loop);
+        break;
+    case WEBKIT_DOWNLOAD_STATUS_FINISHED:
+    case WEBKIT_DOWNLOAD_STATUS_CANCELLED:
+        g_assert_not_reached();
+        break;
+    default:
+        break;
+    }
+}
+
+static void serverCallback(SoupServer *server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *context, gpointer userData)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+static void test_webkit_download_not_found(void)
+{
+    SoupServer *server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+    soup_server_add_handler(server, NULL, serverCallback, NULL, NULL);
+    SoupURI *baseURI = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(baseURI, soup_server_get_port(server));
+
+    SoupURI *uri = soup_uri_new_with_base(baseURI, &quot;/foo&quot;);
+    char *uriString = soup_uri_to_string(uri, FALSE);
+    soup_uri_free(uri);
+
+    loop = g_main_loop_new(NULL, TRUE);
+    WebKitNetworkRequest *request = webkit_network_request_new(uriString);
+    g_free (uriString);
+    WebKitDownload *download = webkit_download_new(request);
+    g_object_unref(request);
+
+    webkit_download_set_destination_uri(download, &quot;file:///tmp/foo&quot;);
+    g_signal_connect(download, &quot;notify::status&quot;, G_CALLBACK(notifyDownloadStatusCallback), NULL);
+
+    webkit_download_start(download);
+    g_main_loop_run(loop);
+
+    g_object_unref(download);
+    g_main_loop_unref(loop);
+    soup_uri_free(baseURI);
+    g_object_unref(server);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/download/create&quot;, test_webkit_download_create);
+    g_test_add_func(&quot;/webkit/download/synch&quot;, test_webkit_download_synch);
+    g_test_add_func(&quot;/webkit/download/asynch&quot;, test_webkit_download_asynch);
+    g_test_add_func(&quot;/webkit/download/data&quot;, test_webkit_download_data);
+    g_test_add_func(&quot;/webkit/download/not-found&quot;, test_webkit_download_not_found);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestfavicondatabasecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestfavicondatabasec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testfavicondatabase.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testfavicondatabase.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,276 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+const int gIconSize = 16;
+
+GMainLoop *loop;
+char *baseURI;
+
+static void
+serverCallback(SoupServer *server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *context, void *data)
+{
+    if (message-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(message, SOUP_STATUS_OK);
+
+    char *contents;
+    gsize length;
+    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
+        GError *error = NULL;
+
+        g_file_get_contents(&quot;blank.ico&quot;, &amp;contents, &amp;length, &amp;error);
+        g_assert(!error);
+    } else {
+        contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;);
+        length = strlen(contents);
+    }
+
+    soup_message_body_append(message-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    soup_message_body_complete(message-&gt;response_body);
+}
+
+static void deleteDatabaseFileIfExists(const char *databasePath)
+{
+    if (!g_file_test(databasePath, G_FILE_TEST_IS_DIR))
+        return;
+
+    char *databaseFilename = g_build_filename(databasePath, &quot;WebpageIcons.db&quot;, NULL);
+    if (g_unlink(databaseFilename) == -1) {
+        g_free(databaseFilename);
+        return;
+    }
+
+    g_free(databaseFilename);
+    g_rmdir(databasePath);
+}
+
+static void testWebKitFaviconDatabaseSetPath()
+{
+    char *databasePath = g_build_filename(g_get_tmp_dir(), &quot;webkit-testfavicondatabase&quot;, NULL);
+    deleteDatabaseFileIfExists(databasePath);
+
+    WebKitFaviconDatabase *database = webkit_get_favicon_database();
+    webkit_favicon_database_set_path(database, databasePath);
+
+    g_assert_cmpstr(databasePath, ==, webkit_favicon_database_get_path(database));
+
+    g_free(databasePath);
+}
+
+// See the comment in main() function that goes with this same guard.
+#ifdef NDEBUG
+
+static void faviconDatabaseGetValidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+    gboolean *beenHere = (gboolean*)userData;
+    GError *error = NULL;
+    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
+    g_assert(icon);
+    g_object_unref(icon);
+
+    *beenHere = TRUE;
+
+    g_main_loop_quit(loop);
+}
+
+static void faviconDatabaseGetInvalidFaviconCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+    gboolean *beenHere = (gboolean*)userData;
+    GError *error = NULL;
+    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
+    g_assert(!icon);
+
+    *beenHere = TRUE;
+
+    g_main_loop_quit(loop);
+}
+
+static void faviconDatabaseGetFaviconCancelledCallback(GObject *sourceObject, GAsyncResult *result, void *userData)
+{
+    gboolean *beenHere = (gboolean*)userData;
+    GError *error = NULL;
+    GdkPixbuf *icon = webkit_favicon_database_get_favicon_pixbuf_finish(WEBKIT_FAVICON_DATABASE(sourceObject), result, &amp;error);
+    g_assert(!icon);
+    g_assert(error &amp;&amp; g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED));
+
+    *beenHere = TRUE;
+
+    g_main_loop_quit(loop);
+}
+
+static inline void quitMainLoopIfLoadCompleted(gboolean *iconOrPageLoaded)
+{
+    if (*iconOrPageLoaded)
+        g_main_loop_quit(loop);
+    else
+        *iconOrPageLoaded = TRUE;
+}
+
+static void idleQuitLoopCallback(WebKitWebView *webView, GParamSpec *paramSpec, gboolean *iconOrPageLoaded)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+
+    if (status == WEBKIT_LOAD_FINISHED || status == WEBKIT_LOAD_FAILED)
+        quitMainLoopIfLoadCompleted(iconOrPageLoaded);
+}
+
+static void webkitWebViewIconLoaded(WebKitFaviconDatabase *database, const char *frameURI, gboolean *iconOrPageLoaded)
+{
+    quitMainLoopIfLoadCompleted(iconOrPageLoaded);
+}
+
+static void loadURI(const char *uri)
+{
+    WebKitWebView *view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    gboolean iconOrPageLoaded = FALSE;
+
+    webkit_web_view_load_uri(view, uri);
+
+    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(idleQuitLoopCallback), &amp;iconOrPageLoaded);
+    g_signal_connect(view, &quot;icon-loaded&quot;, G_CALLBACK(webkitWebViewIconLoaded), &amp;iconOrPageLoaded);
+
+    g_main_loop_run(loop);
+
+    g_signal_handlers_disconnect_matched(view, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, &amp;iconOrPageLoaded);
+}
+
+static gboolean faviconDatabaseGetValidFaviconIdle(void *userData)
+{
+    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
+                                               gIconSize, gIconSize, NULL,
+                                               faviconDatabaseGetValidFaviconCallback, userData);
+    return FALSE;
+}
+
+static gboolean faviconDatabaseGetInvalidFaviconIdle(void *userData)
+{
+    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), &quot;http://www.webkitgtk.org/&quot;,
+                                               gIconSize, gIconSize, NULL,
+                                               faviconDatabaseGetInvalidFaviconCallback, userData);
+    return FALSE;
+}
+
+static gboolean faviconDatabaseGetFaviconCancelledIdle(void *userData)
+{
+    GCancellable *cancellable = g_cancellable_new();
+    webkit_favicon_database_get_favicon_pixbuf(webkit_get_favicon_database(), baseURI,
+                                               gIconSize, gIconSize, cancellable,
+                                               faviconDatabaseGetFaviconCancelledCallback, userData);
+    g_cancellable_cancel(cancellable);
+    g_object_unref(cancellable);
+    return FALSE;
+}
+
+static void testWebKitFaviconDatabaseGetFavicon()
+{
+    gboolean beenToIconCallback;
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    /* Load uri to make sure favicon is added to database. */
+    loadURI(baseURI);
+
+    beenToIconCallback = FALSE;
+    g_idle_add((GSourceFunc)faviconDatabaseGetValidFaviconIdle, &amp;beenToIconCallback);
+    g_main_loop_run(loop);
+    g_assert(beenToIconCallback);
+
+    beenToIconCallback = FALSE;
+    g_idle_add((GSourceFunc)faviconDatabaseGetInvalidFaviconIdle, &amp;beenToIconCallback);
+    g_main_loop_run(loop);
+    g_assert(beenToIconCallback);
+
+    beenToIconCallback = FALSE;
+    g_idle_add((GSourceFunc)faviconDatabaseGetFaviconCancelledIdle, &amp;beenToIconCallback);
+    g_main_loop_run(loop);
+    g_assert(beenToIconCallback);
+}
+
+static void testWebKitFaviconDatabaseGetFaviconURI()
+{
+    char *iconURI = webkit_favicon_database_get_favicon_uri(webkit_get_favicon_database(), baseURI);
+    char *expectedURI = g_strdup_printf(&quot;%sfavicon.ico&quot;, baseURI);
+    g_assert_cmpstr(iconURI, ==, expectedURI);
+    g_free(expectedURI);
+    g_free(iconURI);
+}
+
+#endif
+
+static void testWebKitFaviconDatabaseRemoveAll(void)
+{
+    WebKitFaviconDatabase *database = webkit_get_favicon_database();
+    webkit_favicon_database_clear(database);
+    char *iconURI = webkit_favicon_database_get_favicon_uri(database, baseURI);
+    g_assert(!iconURI);
+    g_free(iconURI);
+}
+
+static void testWebKitFaviconDatabaseCloseDatabase(void)
+{
+    WebKitFaviconDatabase *database = webkit_get_favicon_database();
+    char *databasePath = g_strdup(webkit_favicon_database_get_path(database));
+    webkit_favicon_database_set_path(database, 0);
+    deleteDatabaseFileIfExists(databasePath);
+    g_free(databasePath);
+}
+
+int main(int argc, char **argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    /* This hopefully makes the test independent of the path it's called from. */
+    testutils_relative_chdir(&quot;Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html&quot;, argv[0]);
+
+    SoupServer *server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+
+    soup_server_add_handler(server, NULL, serverCallback, NULL, NULL);
+
+    SoupURI *soupURI = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(soupURI, soup_server_get_port(server));
+
+    baseURI = soup_uri_to_string(soupURI, FALSE);
+    soup_uri_free(soupURI);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/favicondatabase/set-path&quot;, testWebKitFaviconDatabaseSetPath);
+
+    // These two tests will trigger an ASSERTION on debug builds due
+    // to http://webkit.org/b/67582. Remove the guards once the bug is fixed.
+#ifdef NDEBUG
+    g_test_add_func(&quot;/webkit/favicondatabase/get-favicon&quot;, testWebKitFaviconDatabaseGetFavicon);
+    g_test_add_func(&quot;/webkit/favicondatabase/get-favicon-uri&quot;, testWebKitFaviconDatabaseGetFaviconURI);
+#endif
+
+    g_test_add_func(&quot;/webkit/favicondatabase/remove-all&quot;, testWebKitFaviconDatabaseRemoveAll);
+    g_test_add_func(&quot;/webkit/favicondatabase/close-db&quot;, testWebKitFaviconDatabaseCloseDatabase);
+
+    return g_test_run();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestglobalscfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestglobalsc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testglobals.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testglobals.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testglobals.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testglobals.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+/*
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+// Make sure the session is initialized properly when webkit_get_default_session() is called.
+static void test_globals_default_session()
+{
+    g_test_bug(&quot;36754&quot;);
+
+    SoupSession* session = webkit_get_default_session();
+    soup_session_remove_feature_by_type(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG);
+
+    // This makes sure our initialization ran.
+    g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL);
+
+    // Creating a WebView should make sure the session is
+    // initialized, and not mess with our changes.
+    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(web_view);
+    g_object_unref(web_view);
+
+    // These makes sure our modification was kept.
+    g_assert(soup_session_get_feature(session, SOUP_TYPE_CONTENT_DECODER) != NULL);
+    g_assert(soup_session_get_feature(session, WEBKIT_TYPE_SOUP_AUTH_DIALOG) == NULL);
+}
+
+static void test_globals_security_policy()
+{
+    // Check default policy for well known schemes.
+    WebKitSecurityPolicy policy = webkit_get_security_policy_for_uri_scheme(&quot;http&quot;);
+    guint mask = WEBKIT_SECURITY_POLICY_CORS_ENABLED;
+    g_assert_cmpuint(policy &amp; mask, ==, mask);
+
+    policy = webkit_get_security_policy_for_uri_scheme(&quot;https&quot;);
+    mask = WEBKIT_SECURITY_POLICY_SECURE | WEBKIT_SECURITY_POLICY_CORS_ENABLED;
+    g_assert_cmpuint(policy &amp; mask, ==, mask);
+
+    policy = webkit_get_security_policy_for_uri_scheme(&quot;file&quot;);
+    mask = WEBKIT_SECURITY_POLICY_LOCAL;
+    g_assert_cmpuint(policy &amp; mask, ==, mask);
+
+    policy = webkit_get_security_policy_for_uri_scheme(&quot;data&quot;);
+    mask = WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME | WEBKIT_SECURITY_POLICY_SECURE;
+    g_assert_cmpuint(policy &amp; mask, ==, mask);
+
+    policy = webkit_get_security_policy_for_uri_scheme(&quot;about&quot;);
+    mask = WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME | WEBKIT_SECURITY_POLICY_SECURE | WEBKIT_SECURITY_POLICY_EMPTY_DOCUMENT;
+    g_assert_cmpuint(policy &amp; mask, ==, mask);
+
+    // Custom scheme.
+    policy = webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;);
+    g_assert(!policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_LOCAL;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_NO_ACCESS_TO_OTHER_SCHEME;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_DISPLAY_ISOLATED;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_SECURE;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_CORS_ENABLED;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+
+    policy |= WEBKIT_SECURITY_POLICY_EMPTY_DOCUMENT;
+    webkit_set_security_policy_for_uri_scheme(&quot;foo&quot;, policy);
+    g_assert_cmpuint(webkit_get_security_policy_for_uri_scheme(&quot;foo&quot;), ==, policy);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/globals/default_session&quot;,
+                    test_globals_default_session);
+    g_test_add_func(&quot;/webkit/globals/security-policy&quot;,
+                    test_globals_security_policy);
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktesthittestresultcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststesthittestresultc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhittestresult.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhittestresult.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,169 @@
</span><ins>+/*
+ * Copyright (C) 2009 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+typedef struct {
+  char* data;
+  guint flag;
+} TestInfo;
+
+static GMainLoop* loop;
+
+typedef struct {
+    WebKitWebView* webView;
+    TestInfo* info;
+} HitTestResultFixture;
+
+TestInfo*
+test_info_new(const char* data, guint flag)
+{
+    TestInfo* info;
+
+    info = g_slice_new(TestInfo);
+    info-&gt;data = g_strdup(data);
+    info-&gt;flag = flag;
+
+    return info;
+}
+
+void
+test_info_destroy(TestInfo* info)
+{
+    g_free(info-&gt;data);
+    g_slice_free(TestInfo, info);
+}
+
+static void hit_test_result_fixture_setup(HitTestResultFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(fixture-&gt;webView);
+    loop = g_main_loop_new(NULL, TRUE);
+    fixture-&gt;info = (TestInfo*)data;
+}
+
+static void hit_test_result_fixture_teardown(HitTestResultFixture* fixture, gconstpointer data)
+{
+    g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(loop);
+    test_info_destroy(fixture-&gt;info);
+}
+
+static void
+load_status_cb(WebKitWebView* webView,
+               GParamSpec* spec,
+               gpointer data)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    TestInfo* info = (TestInfo*)data;
+
+    if (status == WEBKIT_LOAD_FINISHED) {
+        WebKitHitTestResult* result;
+        guint context;
+        GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
+        WebKitDOMNode* node;
+        gint x, y;
+
+        /* Close enough to 0,0 */
+        event-&gt;button.x = 5;
+        event-&gt;button.y = 5;
+
+        result = webkit_web_view_get_hit_test_result(webView, (GdkEventButton*) event);
+        gdk_event_free(event);
+        g_assert(result);
+
+        g_object_get(result, &quot;context&quot;, &amp;context, NULL);
+        g_assert(context &amp; info-&gt;flag);
+
+        g_object_get(result, &quot;inner-node&quot;, &amp;node, NULL);
+        g_assert(node);
+        g_assert(WEBKIT_DOM_IS_NODE(node));
+
+        g_object_get(result, &quot;x&quot;, &amp;x, &quot;y&quot;, &amp;y, NULL);
+        g_assert_cmpint(x, ==, 5);
+        g_assert_cmpint(y, ==, 5);
+
+        /* We can only test these node types at the moment. In the
+         * input case there seems to be an extra layer with a DIV on
+         * top of the input, which gets assigned to the inner-node.
+         * tag */
+        if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT)
+            g_assert(WEBKIT_DOM_IS_HTML_HTML_ELEMENT(node));
+        else if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)
+            g_assert(WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT(node));
+        else if (info-&gt;flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
+            /* The hit test will give us the inner text node, we want
+             * the A tag */
+            WebKitDOMNode* parent = webkit_dom_node_get_parent_node(node);
+            g_assert(WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT(parent));
+        }
+
+        g_object_unref(result);
+        g_main_loop_quit(loop);
+    }
+}
+
+static void
+test_webkit_hit_test_result(HitTestResultFixture* fixture, gconstpointer data)
+{
+    TestInfo* info = (TestInfo*)data;
+    GtkAllocation allocation = { 0, 0, 50, 50 };
+
+    webkit_web_view_load_string(fixture-&gt;webView,
+                                info-&gt;data,
+                                &quot;text/html&quot;,
+                                &quot;utf-8&quot;,
+                                &quot;file://&quot;);
+    gtk_widget_size_allocate(GTK_WIDGET(fixture-&gt;webView), &amp;allocation);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_status_cb), info);
+    g_main_loop_run(loop);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    g_test_add(&quot;/webkit/hittestresult/document&quot;, HitTestResultFixture, 
+               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                             WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT),
+               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
+    /* We hardcode all elements to be at 0,0 so that we know where to
+     * generate the button events */
+    g_test_add(&quot;/webkit/hittestresult/image&quot;, HitTestResultFixture,
+               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;img style='position:absolute; left:0; top:0'src='0xdeadbeef' width=50 height=50&gt;&lt;/img&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                             WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE),
+               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
+    g_test_add(&quot;/webkit/hittestresult/editable&quot;, HitTestResultFixture,
+               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;input style='position:absolute; left:0; top:0' size='35'&gt;&lt;/input&gt;&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                             WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE),
+               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
+    g_test_add(&quot;/webkit/hittestresult/link&quot;, HitTestResultFixture,
+               test_info_new(&quot;&lt;html&gt;&lt;body&gt;&lt;a style='position:absolute; left:0; top:0' href='http://www.example.com'&gt;HELLO WORLD&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                             WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK),
+               hit_test_result_fixture_setup, test_webkit_hit_test_result, hit_test_result_fixture_teardown);
+               
+    return g_test_run ();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktesthttpbackendcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststesthttpbackendc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testhttpbackend.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testhttpbackend.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2009 Gustavo Noronha Silva
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+// Not yet public API
+SoupMessage* webkit_network_request_get_message(WebKitNetworkRequest* request);
+
+static gboolean navigation_policy_decision_requested_cb(WebKitWebView* web_view,
+                                                        WebKitWebFrame* web_frame,
+                                                        WebKitNetworkRequest* request,
+                                                        WebKitWebNavigationAction* action,
+                                                        WebKitWebPolicyDecision* decision,
+                                                        gpointer data)
+{
+    SoupMessage* message = webkit_network_request_get_message(request);
+
+    /* 1 -&gt; webkit_network_request_with_core_request
+     *
+     * The SoupMessage is created exclusively for the emission of this
+     * signal.
+     */
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
+
+    return FALSE;
+}
+
+static void test_soup_message_lifetime()
+{
+    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+
+    g_object_ref_sink(web_view);
+
+    g_signal_connect(web_view, &quot;navigation-policy-decision-requested&quot;,
+                     G_CALLBACK(navigation_policy_decision_requested_cb),
+                     NULL);
+
+    /* load_uri will trigger the navigation-policy-decision-requested
+     * signal emission;
+     */
+    webkit_web_view_load_uri(web_view, &quot;http://127.0.0.1/&quot;);
+
+    g_object_unref(web_view);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/soupmessage/lifetime&quot;, test_soup_message_lifetime);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestkeyeventscfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestkeyeventsc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testkeyevents.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testkeyevents.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,390 @@
</span><ins>+/*
+ * Copyright (C) 2009, 2010 Martin Robinson &lt;mrobinson@webkit.org&gt;
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;string.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;webkit/webkit.h&gt;
+#include &lt;JavaScriptCore/JSStringRef.h&gt;
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+
+typedef struct {
+    char* page;
+    char* text;
+    gboolean shouldBeHandled;
+} TestInfo;
+
+typedef struct {
+    GtkWidget* window;
+    WebKitWebView* webView;
+    GMainLoop* loop;
+    TestInfo* info;
+} KeyEventFixture;
+
+TestInfo*
+test_info_new(const char* page, gboolean shouldBeHandled)
+{
+    TestInfo* info;
+
+    info = g_slice_new(TestInfo);
+    info-&gt;page = g_strdup(page);
+    info-&gt;shouldBeHandled = shouldBeHandled;
+    info-&gt;text = 0;
+
+    return info;
+}
+
+void
+test_info_destroy(TestInfo* info)
+{
+    g_free(info-&gt;page);
+    g_free(info-&gt;text);
+    g_slice_free(TestInfo, info);
+}
+
+static void key_event_fixture_setup(KeyEventFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+
+    fixture-&gt;window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+
+    gtk_container_add(GTK_CONTAINER(fixture-&gt;window), GTK_WIDGET(fixture-&gt;webView));
+}
+
+static void key_event_fixture_teardown(KeyEventFixture* fixture, gconstpointer data)
+{
+    gtk_widget_destroy(fixture-&gt;window);
+    g_main_loop_unref(fixture-&gt;loop);
+    test_info_destroy(fixture-&gt;info);
+}
+
+static gboolean key_press_event_cb(WebKitWebView* webView, GdkEvent* event, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    gboolean handled = GTK_WIDGET_GET_CLASS(fixture-&gt;webView)-&gt;key_press_event(GTK_WIDGET(fixture-&gt;webView), &amp;event-&gt;key);
+    g_assert_cmpint(handled, ==, fixture-&gt;info-&gt;shouldBeHandled);
+
+    return FALSE;
+}
+
+static gboolean key_release_event_cb(WebKitWebView* webView, GdkEvent* event, gpointer data)
+{
+    // WebCore never seems to mark keyup events as handled.
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    gboolean handled = GTK_WIDGET_GET_CLASS(fixture-&gt;webView)-&gt;key_press_event(GTK_WIDGET(fixture-&gt;webView), &amp;event-&gt;key);
+    g_assert(!handled);
+
+    g_main_loop_quit(fixture-&gt;loop);
+
+    return FALSE;
+}
+
+static void test_keypress_events_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status == WEBKIT_LOAD_FINISHED) {
+        g_signal_connect(fixture-&gt;webView, &quot;key-press-event&quot;,
+                         G_CALLBACK(key_press_event_cb), fixture);
+        g_signal_connect(fixture-&gt;webView, &quot;key-release-event&quot;,
+                         G_CALLBACK(key_release_event_cb), fixture);
+        if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                                      gdk_unicode_to_keyval('a'), 0))
+            g_assert_not_reached();
+    }
+
+}
+
+gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    webkit_web_view_load_string(fixture-&gt;webView, fixture-&gt;info-&gt;page,
+                                &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
+    return FALSE;
+}
+
+static void setup_keyevent_test(KeyEventFixture* fixture, gconstpointer data, GCallback load_event_callback)
+{
+    fixture-&gt;info = (TestInfo*)data;
+    g_signal_connect(fixture-&gt;window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), fixture);
+
+    gtk_widget_grab_focus(GTK_WIDGET(fixture-&gt;webView));
+    gtk_widget_show(fixture-&gt;window);
+    gtk_widget_show(GTK_WIDGET(fixture-&gt;webView));
+    gtk_window_present(GTK_WINDOW(fixture-&gt;window));
+
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;,
+                     load_event_callback, fixture);
+
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void test_keypress_events(KeyEventFixture* fixture, gconstpointer data)
+{
+    setup_keyevent_test(fixture, data, G_CALLBACK(test_keypress_events_load_status_cb));
+}
+
+static gboolean element_text_equal_to(JSContextRef context, const gchar* text)
+{
+    JSStringRef scriptString = JSStringCreateWithUTF8CString(
+      &quot;window.document.getElementById(\&quot;in\&quot;).value;&quot;);
+    JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
+    JSStringRelease(scriptString);
+
+    // If the value isn't a string, the element is probably a div
+    // so grab the innerText instead.
+    if (!JSValueIsString(context, value)) {
+        JSStringRef scriptString = JSStringCreateWithUTF8CString(
+          &quot;window.document.getElementById(\&quot;in\&quot;).innerText;&quot;);
+        value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
+        JSStringRelease(scriptString);
+    }
+
+    g_assert(JSValueIsString(context, value));
+    JSStringRef inputString = JSValueToStringCopy(context, value, 0);
+    g_assert(inputString);
+
+    gint size = JSStringGetMaximumUTF8CStringSize(inputString);
+    gchar* cString = g_malloc(size);
+    JSStringGetUTF8CString(inputString, cString, size);
+    JSStringRelease(inputString);
+
+    gboolean result = g_utf8_collate(cString, text) == 0;
+    g_free(cString);
+    return result;
+}
+
+static void test_ime_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    JSGlobalContextRef context = webkit_web_frame_get_global_context(
+        webkit_web_view_get_main_frame(webView));
+    g_assert(context);
+
+    GtkIMContext* imContext = 0;
+    g_object_get(webView, &quot;im-context&quot;, &amp;imContext, NULL);
+    g_assert(imContext);
+
+    // Test that commits that happen outside of key events
+    // change the text field immediately. This closely replicates
+    // the behavior of SCIM.
+    g_assert(element_text_equal_to(context, &quot;&quot;));
+    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;a&quot;);
+    g_assert(element_text_equal_to(context, &quot;a&quot;));
+    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;b&quot;);
+    g_assert(element_text_equal_to(context, &quot;ab&quot;));
+    g_signal_emit_by_name(imContext, &quot;commit&quot;, &quot;c&quot;);
+    g_assert(element_text_equal_to(context, &quot;abc&quot;));
+
+    g_object_unref(imContext);
+    g_main_loop_quit(fixture-&gt;loop);
+}
+
+static void test_ime(KeyEventFixture* fixture, gconstpointer data)
+{
+    setup_keyevent_test(fixture, data, G_CALLBACK(test_ime_load_status_cb));
+}
+
+static gboolean verify_contents(gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    JSGlobalContextRef context = webkit_web_frame_get_global_context(
+        webkit_web_view_get_main_frame(fixture-&gt;webView));
+    g_assert(context);
+
+    g_assert(element_text_equal_to(context, fixture-&gt;info-&gt;text));
+    g_main_loop_quit(fixture-&gt;loop);
+    return FALSE;
+}
+
+static void test_blocking_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    // The first keypress event should not modify the field.
+    fixture-&gt;info-&gt;text = g_strdup(&quot;bc&quot;);
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                                 gdk_unicode_to_keyval('a'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                                  gdk_unicode_to_keyval('b'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                                  gdk_unicode_to_keyval('c'), 0))
+        g_assert_not_reached();
+
+    g_idle_add(verify_contents, fixture);
+}
+
+static void test_blocking(KeyEventFixture* fixture, gconstpointer data)
+{
+    setup_keyevent_test(fixture, data, G_CALLBACK(test_blocking_load_status_cb));
+}
+
+#if defined(GDK_WINDOWING_X11)
+static void test_xim_load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer data)
+{
+    KeyEventFixture* fixture = (KeyEventFixture*)data;
+    WebKitLoadStatus status = webkit_web_view_get_load_status(webView);
+    if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    GtkIMContext* imContext = 0;
+    g_object_get(webView, &quot;im-context&quot;, &amp;imContext, NULL);
+    g_assert(imContext);
+
+    gchar* originalId = g_strdup(gtk_im_multicontext_get_context_id(GTK_IM_MULTICONTEXT(imContext)));
+    gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), &quot;xim&quot;);
+
+    // Test that commits that happen outside of key events
+    // change the text field immediately. This closely replicates
+    // the behavior of SCIM.
+    fixture-&gt;info-&gt;text = g_strdup(&quot;debian&quot;);
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                                 gdk_unicode_to_keyval('d'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                             gdk_unicode_to_keyval('e'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                             gdk_unicode_to_keyval('b'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                             gdk_unicode_to_keyval('i'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                             gdk_unicode_to_keyval('a'), 0))
+        g_assert_not_reached();
+    if (!gtk_test_widget_send_key(GTK_WIDGET(fixture-&gt;webView),
+                             gdk_unicode_to_keyval('n'), 0))
+        g_assert_not_reached();
+
+    gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(imContext), originalId);
+    g_free(originalId);
+    g_object_unref(imContext);
+
+    g_idle_add(verify_contents, fixture);
+}
+
+static void test_xim(KeyEventFixture* fixture, gconstpointer data)
+{
+    setup_keyevent_test(fixture, data, G_CALLBACK(test_xim_load_status_cb));
+}
+#endif
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+
+    // We'll test input on a slew of different node types. Key events to
+    // text inputs and editable divs should be marked as handled. Key events
+    // to buttons and links should not.
+    const char* textinput_html = &quot;&lt;html&gt;&lt;body&gt;&lt;input id=\&quot;in\&quot; type=\&quot;text\&quot;&gt;&quot;
+        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    const char* button_html = &quot;&lt;html&gt;&lt;body&gt;&lt;input id=\&quot;in\&quot; type=\&quot;button\&quot;&gt;&quot;
+        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    const char* link_html = &quot;&lt;html&gt;&lt;body&gt;&lt;a href=\&quot;http://www.gnome.org\&quot; id=\&quot;in\&quot;&gt;&quot;
+        &quot;LINKY MCLINKERSON&lt;/a&gt;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+    const char* div_html = &quot;&lt;html&gt;&lt;body&gt;&lt;div id=\&quot;in\&quot; contenteditable=\&quot;true\&quot;&gt;&quot;
+        &quot;&lt;script&gt;document.getElementById('in').focus();&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    // These are similar to the blocks above, but they should block the first
+    // keypress modifying the editable node.
+    const char* textinput_html_blocking = &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;&lt;input id=\&quot;in\&quot; type=\&quot;text\&quot; &quot;
+        &quot;onkeypress=\&quot;if (first) {event.preventDefault();first=false;}\&quot;&gt;&quot;
+        &quot;&lt;script&gt;first = true;\ndocument.getElementById('in').focus();&lt;/script&gt;\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    const char* div_html_blocking = &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;&lt;div id=\&quot;in\&quot; contenteditable=\&quot;true\&quot; &quot;
+        &quot;onkeypress=\&quot;if (first) {event.preventDefault();first=false;}\&quot;&gt;&quot;
+        &quot;&lt;script&gt;first = true; document.getElementById('in').focus();&lt;/script&gt;\n&quot;
+        &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    g_test_add(&quot;/webkit/keyevents/event-textinput&quot;, KeyEventFixture,
+               test_info_new(textinput_html, TRUE),
+               key_event_fixture_setup,
+               test_keypress_events,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevents/event-buttons&quot;, KeyEventFixture,
+               test_info_new(button_html, FALSE),
+               key_event_fixture_setup,
+               test_keypress_events,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevents/event-link&quot;, KeyEventFixture,
+               test_info_new(link_html, FALSE),
+               key_event_fixture_setup,
+               test_keypress_events,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/event-div&quot;, KeyEventFixture,
+               test_info_new(div_html, TRUE),
+               key_event_fixture_setup,
+               test_keypress_events,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/ime-textinput&quot;, KeyEventFixture,
+               test_info_new(textinput_html, TRUE),
+               key_event_fixture_setup,
+               test_ime,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/ime-div&quot;, KeyEventFixture,
+               test_info_new(div_html, TRUE),
+               key_event_fixture_setup,
+               test_ime,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/block-textinput&quot;, KeyEventFixture,
+               test_info_new(textinput_html_blocking, TRUE),
+               key_event_fixture_setup,
+               test_blocking,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/block-div&quot;, KeyEventFixture,
+               test_info_new(div_html_blocking, TRUE),
+               key_event_fixture_setup,
+               test_blocking,
+               key_event_fixture_teardown);
+#if defined(GDK_WINDOWING_X11)
+    g_test_add(&quot;/webkit/keyevent/xim-textinput&quot;, KeyEventFixture,
+               test_info_new(textinput_html, TRUE),
+               key_event_fixture_setup,
+               test_xim,
+               key_event_fixture_teardown);
+    g_test_add(&quot;/webkit/keyevent/xim-div&quot;, KeyEventFixture,
+               test_info_new(div_html, TRUE),
+               key_event_fixture_setup,
+               test_xim,
+               key_event_fixture_teardown);
+#endif
+
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestloadingcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestloadingc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testloading.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testloading.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testloading.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testloading.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,435 @@
</span><ins>+/*
+ * Copyright (C) 2009, 2010 Gustavo Noronha Silva
+ * Copyright (C) 2009 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+/* This string has to be rather big because of the cancelled test - it
+ * looks like soup refuses to send or receive a too small chunk */
+#define HTML_STRING &quot;&lt;html&gt;&lt;body&gt;Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!&lt;/body&gt;&lt;/html&gt;&quot;
+
+SoupURI* base_uri;
+
+/* For real request testing */
+static void
+server_callback(SoupServer* server, SoupMessage* msg,
+                const char* path, GHashTable* query,
+                SoupClientContext* context, gpointer data)
+{
+    if (msg-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(msg, SOUP_STATUS_OK);
+
+    if (g_str_equal(path, &quot;/test_loading_status&quot;) || g_str_equal(path, &quot;/test_loading_status2&quot;))
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
+    else if (g_str_equal(path, &quot;/test_load_error&quot;)) {
+        soup_message_set_status(msg, SOUP_STATUS_CANT_CONNECT);
+    } else if (g_str_equal(path, &quot;/test_loading_cancelled&quot;)) {
+        soup_message_headers_set_encoding(msg-&gt;response_headers, SOUP_ENCODING_CHUNKED);
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING));
+        soup_server_unpause_message(server, msg);
+        return;
+    }
+
+    soup_message_body_complete(msg-&gt;response_body);
+}
+
+typedef struct {
+    WebKitWebView* webView;
+    GMainLoop *loop;
+    gboolean has_been_provisional;
+    gboolean has_been_committed;
+    gboolean has_been_first_visually_non_empty_layout;
+    gboolean has_been_finished;
+    gboolean has_been_failed;
+    gboolean has_been_load_error;
+} WebLoadingFixture;
+
+static void web_loading_fixture_setup(WebLoadingFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    fixture-&gt;loop = g_main_loop_new(NULL, TRUE);
+    g_object_ref_sink(fixture-&gt;webView);
+    fixture-&gt;has_been_provisional = FALSE;
+    fixture-&gt;has_been_committed = FALSE;
+    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
+    fixture-&gt;has_been_finished = FALSE;
+    fixture-&gt;has_been_failed = FALSE;
+    fixture-&gt;has_been_load_error = FALSE;
+}
+
+static void web_loading_fixture_teardown(WebLoadingFixture* fixture, gconstpointer data)
+{
+    g_object_unref(fixture-&gt;webView);
+    g_main_loop_unref(fixture-&gt;loop);
+}
+
+static char* get_uri_for_path(const char* path)
+{
+    SoupURI* uri;
+    char* uri_string;
+
+    uri = soup_uri_new_with_base(base_uri, path);
+    uri_string = soup_uri_to_string(uri, FALSE);
+    soup_uri_free (uri);
+
+    return uri_string;
+}
+
+static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebLoadingFixture* fixture)
+{
+    g_assert(fixture-&gt;has_been_provisional);
+    g_assert(fixture-&gt;has_been_committed);
+    g_assert(fixture-&gt;has_been_first_visually_non_empty_layout);
+
+    g_main_loop_quit(fixture-&gt;loop);
+}
+
+
+static void status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+    switch (status) {
+    case WEBKIT_LOAD_PROVISIONAL:
+        g_assert(!fixture-&gt;has_been_provisional);
+        g_assert(!fixture-&gt;has_been_committed);
+        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
+        fixture-&gt;has_been_provisional = TRUE;
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(!fixture-&gt;has_been_committed);
+        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
+        fixture-&gt;has_been_committed = TRUE;
+        break;
+    case WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(fixture-&gt;has_been_committed);
+        g_assert(!fixture-&gt;has_been_first_visually_non_empty_layout);
+        fixture-&gt;has_been_first_visually_non_empty_layout = TRUE;
+        break;
+    case WEBKIT_LOAD_FINISHED:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(fixture-&gt;has_been_committed);
+        g_assert(fixture-&gt;has_been_first_visually_non_empty_layout);
+        break;
+    default:
+        g_assert_not_reached();
+    }
+}
+
+static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data)
+{
+    char* uri_string;
+
+    g_assert_cmpint(webkit_web_view_get_load_status(fixture-&gt;webView), ==, WEBKIT_LOAD_PROVISIONAL);
+
+    g_object_connect(G_OBJECT(fixture-&gt;webView),
+                     &quot;signal::notify::load-status&quot;, G_CALLBACK(status_changed_cb), fixture,
+                     &quot;signal::load-finished&quot;, G_CALLBACK(load_finished_cb), fixture,
+                     NULL);
+
+    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
+
+    /* load_uri will trigger the navigation-policy-decision-requested
+     * signal emission;
+     */
+    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
+    g_free(uri_string);
+
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+    switch(status) {
+    case WEBKIT_LOAD_PROVISIONAL:
+        g_assert(!fixture-&gt;has_been_provisional);
+        fixture-&gt;has_been_provisional = TRUE;
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_assert(!fixture-&gt;has_been_committed);
+        fixture-&gt;has_been_committed = TRUE;
+        break;
+    case WEBKIT_LOAD_FINISHED:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(fixture-&gt;has_been_load_error);
+        g_assert(fixture-&gt;has_been_failed);
+        g_assert(!fixture-&gt;has_been_finished);
+        fixture-&gt;has_been_finished = TRUE;
+        break;
+    case WEBKIT_LOAD_FAILED:
+        g_assert(!fixture-&gt;has_been_failed);
+        fixture-&gt;has_been_failed = TRUE;
+        g_main_loop_quit(fixture-&gt;loop);
+        break;
+    default:
+        break;
+    }
+}
+
+static gboolean load_error_cb(WebKitWebView* webView, WebKitWebFrame* frame, const char* uri, GError *error, WebLoadingFixture* fixture)
+{
+    g_assert(fixture-&gt;has_been_provisional);
+    g_assert(!fixture-&gt;has_been_load_error);
+    fixture-&gt;has_been_load_error = TRUE;
+
+    return FALSE;
+}
+
+static void test_loading_error(WebLoadingFixture* fixture, gconstpointer data)
+{
+    char* uri_string;
+
+    g_test_bug(&quot;28842&quot;);
+
+    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_error_cb), fixture);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_error_status_changed_cb), fixture);
+
+    uri_string = get_uri_for_path(&quot;/test_load_error&quot;);
+    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
+    g_free(uri_string);
+
+    g_main_loop_run(fixture-&gt;loop);
+
+    g_assert(fixture-&gt;has_been_provisional);
+    g_assert(!fixture-&gt;has_been_committed);
+    g_assert(fixture-&gt;has_been_load_error);
+    g_assert(fixture-&gt;has_been_failed);
+    g_assert(!fixture-&gt;has_been_finished);
+}
+
+/* Cancelled load */
+
+static gboolean load_cancelled_cb(WebKitWebView* webView, WebKitWebFrame* frame, const char* uri, GError *error, WebLoadingFixture* fixture)
+{
+    g_assert(fixture-&gt;has_been_provisional);
+    g_assert(fixture-&gt;has_been_failed);
+    g_assert(!fixture-&gt;has_been_load_error);
+    g_assert(error-&gt;code == WEBKIT_NETWORK_ERROR_CANCELLED);
+    fixture-&gt;has_been_load_error = TRUE;
+
+    return TRUE;
+}
+
+static gboolean stop_load (gpointer data)
+{
+    webkit_web_view_stop_loading(WEBKIT_WEB_VIEW(data));
+    return FALSE;
+}
+
+static void load_cancelled_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+    switch(status) {
+    case WEBKIT_LOAD_PROVISIONAL:
+        g_assert(!fixture-&gt;has_been_provisional);
+        g_assert(!fixture-&gt;has_been_failed);
+        fixture-&gt;has_been_provisional = TRUE;
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_idle_add (stop_load, object);
+        break;
+    case WEBKIT_LOAD_FAILED:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(!fixture-&gt;has_been_failed);
+        g_assert(!fixture-&gt;has_been_load_error);
+        fixture-&gt;has_been_failed = TRUE;
+        g_main_loop_quit(fixture-&gt;loop);
+        break;
+    case WEBKIT_LOAD_FINISHED:
+        g_assert_not_reached();
+        break;
+    default:
+        break;
+    }
+}
+
+static void test_loading_cancelled(WebLoadingFixture* fixture, gconstpointer data)
+{
+    char* uri_string;
+
+    g_test_bug(&quot;29644&quot;);
+
+    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_cancelled_cb), fixture);
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_cancelled_status_changed_cb), fixture);
+
+    uri_string = get_uri_for_path(&quot;/test_loading_cancelled&quot;);
+    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
+    g_free(uri_string);
+
+    g_main_loop_run(fixture-&gt;loop);
+}
+
+static void load_goback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+    switch(status) {
+    case WEBKIT_LOAD_PROVISIONAL:
+        g_assert(!fixture-&gt;has_been_provisional);
+        fixture-&gt;has_been_provisional = TRUE;
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_assert(fixture-&gt;has_been_provisional);
+        fixture-&gt;has_been_committed = TRUE;
+        break;
+    case WEBKIT_LOAD_FAILED:
+        g_assert_not_reached();
+        break;
+    case WEBKIT_LOAD_FINISHED:
+        g_assert(fixture-&gt;has_been_provisional);
+        g_assert(fixture-&gt;has_been_committed);
+        fixture-&gt;has_been_finished = TRUE;
+        g_main_loop_quit(fixture-&gt;loop);
+        break;
+    default:
+        break;
+    }
+}
+
+static void load_wentback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+    char* uri_string;
+    char* uri_string2;
+
+    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
+    uri_string2 = get_uri_for_path(&quot;/test_loading_status2&quot;);
+
+    switch(status) {
+    case WEBKIT_LOAD_PROVISIONAL:
+        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string2);
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string);
+        break;
+    case WEBKIT_LOAD_FAILED:
+        g_assert_not_reached();
+        break;
+    case WEBKIT_LOAD_FINISHED:
+        g_assert_cmpstr(webkit_web_view_get_uri(fixture-&gt;webView), ==, uri_string);
+        g_main_loop_quit(fixture-&gt;loop);
+        break;
+    default:
+        break;
+    }
+
+    g_free(uri_string);
+    g_free(uri_string2);
+}
+
+static void load_error_test(WebKitWebView* webview, WebKitWebFrame* frame, const char* uri, GError* error)
+{
+    g_debug(&quot;Error: %s&quot;, error-&gt;message);
+}
+
+static void test_loading_goback(WebLoadingFixture* fixture, gconstpointer data)
+{
+    char* uri_string;
+
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_goback_status_changed_cb), fixture);
+
+    g_signal_connect(fixture-&gt;webView, &quot;load-error&quot;, G_CALLBACK(load_error_test), fixture);
+
+    uri_string = get_uri_for_path(&quot;/test_loading_status&quot;);
+    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
+    g_free(uri_string);
+
+    g_main_loop_run(fixture-&gt;loop);
+
+    fixture-&gt;has_been_provisional = FALSE;
+    fixture-&gt;has_been_committed = FALSE;
+    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
+    fixture-&gt;has_been_finished = FALSE;
+    fixture-&gt;has_been_failed = FALSE;
+    fixture-&gt;has_been_load_error = FALSE;
+
+    uri_string = get_uri_for_path(&quot;/test_loading_status2&quot;);
+    webkit_web_view_load_uri(fixture-&gt;webView, uri_string);
+    g_free(uri_string);
+
+    g_main_loop_run(fixture-&gt;loop);
+
+    g_signal_handlers_disconnect_by_func(fixture-&gt;webView, load_goback_status_changed_cb, fixture);
+
+    fixture-&gt;has_been_provisional = FALSE;
+    fixture-&gt;has_been_committed = FALSE;
+    fixture-&gt;has_been_first_visually_non_empty_layout = FALSE;
+    fixture-&gt;has_been_finished = FALSE;
+    fixture-&gt;has_been_failed = FALSE;
+    fixture-&gt;has_been_load_error = FALSE;
+
+    g_signal_connect(fixture-&gt;webView, &quot;notify::load-status&quot;, G_CALLBACK(load_wentback_status_changed_cb), fixture);
+    webkit_web_view_go_back(fixture-&gt;webView);
+
+    g_main_loop_run(fixture-&gt;loop);
+
+    g_signal_handlers_disconnect_by_func(fixture-&gt;webView, load_wentback_status_changed_cb, fixture);
+}
+
+int main(int argc, char** argv)
+{
+    SoupServer* server;
+
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+
+    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
+
+    base_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(base_uri, soup_server_get_port(server));
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add(&quot;/webkit/loading/status&quot;,
+               WebLoadingFixture, NULL,
+               web_loading_fixture_setup,
+               test_loading_status,
+               web_loading_fixture_teardown);
+    g_test_add(&quot;/webkit/loading/error&quot;,
+               WebLoadingFixture, NULL,
+               web_loading_fixture_setup,
+               test_loading_error,
+               web_loading_fixture_teardown);
+    g_test_add(&quot;/webkit/loading/cancelled&quot;,
+               WebLoadingFixture, NULL,
+               web_loading_fixture_setup,
+               test_loading_cancelled,
+               web_loading_fixture_teardown);
+    g_test_add(&quot;/webkit/loading/goback&quot;,
+               WebLoadingFixture, NULL,
+               web_loading_fixture_setup,
+               test_loading_goback,
+               web_loading_fixture_teardown);
+    return g_test_run();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestmimehandlingcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestmimehandlingc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testmimehandling.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testmimehandling.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,203 @@
</span><ins>+/*
+ * Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2009 Gustavo Noronha Silva
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit/webkit.h&gt;
+#include &lt;unistd.h&gt;
+
+GMainLoop* loop;
+SoupSession *session;
+char* base_uri;
+
+/* For real request testing */
+static void
+server_callback(SoupServer *server, SoupMessage *msg,
+                 const char *path, GHashTable *query,
+                 SoupClientContext *context, gpointer data)
+{
+    if (msg-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(msg, SOUP_STATUS_OK);
+
+    /* PDF */
+    if (g_str_equal(path, &quot;/pdf&quot;)) {
+        char* contents;
+        gsize length;
+        GError* error = NULL;
+
+        g_file_get_contents(&quot;test.pdf&quot;, &amp;contents, &amp;length, &amp;error);
+        g_assert(!error);
+
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    } else if (g_str_equal(path, &quot;/html&quot;)) {
+        char* contents;
+        gsize length;
+        GError* error = NULL;
+
+        g_file_get_contents(&quot;test.html&quot;, &amp;contents, &amp;length, &amp;error);
+        g_assert(!error);
+
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    } else if (g_str_equal(path, &quot;/text&quot;)) {
+        char* contents;
+        gsize length;
+        GError* error = NULL;
+
+        soup_message_headers_append(msg-&gt;response_headers, &quot;Content-Disposition&quot;, &quot;attachment; filename=test.txt&quot;);
+
+        g_file_get_contents(&quot;test.txt&quot;, &amp;contents, &amp;length, &amp;error);
+        g_assert(!error);
+
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    }
+
+    soup_message_body_complete(msg-&gt;response_body);
+}
+
+static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
+        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
+        g_main_loop_quit(loop);
+}
+
+static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame,
+                                                       WebKitNetworkRequest* request, const char* mime_type,
+                                                       WebKitWebPolicyDecision* decision, gpointer data)
+{
+    char* type = (char*)data;
+
+    if (g_str_equal(type, &quot;pdf&quot;)) {
+        g_assert_cmpstr(mime_type, ==, &quot;application/pdf&quot;);
+        g_assert(!webkit_web_view_can_show_mime_type(view, mime_type));
+    } else if (g_str_equal(type, &quot;html&quot;)) {
+        g_assert_cmpstr(mime_type, ==, &quot;text/html&quot;);
+        g_assert(webkit_web_view_can_show_mime_type(view, mime_type));
+    } else if (g_str_equal(type, &quot;text&quot;)) {
+        WebKitNetworkResponse* response = webkit_web_frame_get_network_response(frame);
+        SoupMessage* message = webkit_network_response_get_message(response);
+        char* disposition;
+
+        g_assert(message);
+        soup_message_headers_get_content_disposition(message-&gt;response_headers,
+                                                     &amp;disposition, NULL);
+        g_object_unref(response);
+
+        g_assert_cmpstr(disposition, ==, &quot;attachment&quot;);
+        g_free(disposition);
+
+        g_assert_cmpstr(mime_type, ==, &quot;text/plain&quot;);
+        g_assert(webkit_web_view_can_show_mime_type(view, mime_type));
+    }
+
+    g_free(type);
+
+    return FALSE;
+}
+
+static void testRemoteMimeType(const void* data)
+{
+    const char* name = (const char*) data;
+    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(G_OBJECT(view));
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_object_connect(G_OBJECT(view),
+                     &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
+                     &quot;signal::mime-type-policy-decision-requested&quot;, mime_type_policy_decision_requested_cb, g_strdup(name),
+                     NULL);
+
+    char* effective_uri = g_strdup_printf(&quot;%s%s&quot;, base_uri, name);
+    webkit_web_view_load_uri(view, effective_uri);
+    g_free(effective_uri);
+
+    g_main_loop_run(loop);
+
+    g_object_unref(view);
+}
+
+static void testLocalMimeType(const void* data)
+{
+     const char* typeName = (const char*) data;
+     WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+     g_object_ref_sink(G_OBJECT(view));
+
+     loop = g_main_loop_new(NULL, TRUE);
+
+     g_object_connect(G_OBJECT(view),
+                      &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
+                      &quot;signal::mime-type-policy-decision-requested&quot;, mime_type_policy_decision_requested_cb, g_strdup(typeName),
+                      NULL);
+
+     gchar* filename = g_strdup_printf(&quot;test.%s&quot;, typeName);
+     GFile* file = g_file_new_for_path(filename);
+     g_free(filename);
+
+     gchar* fileURI = g_file_get_uri(file);
+     g_object_unref(file);
+
+     webkit_web_view_load_uri(view, fileURI);
+     g_free(fileURI);

+     g_main_loop_run(loop);
+     g_object_unref(view);
+}
+
+int main(int argc, char** argv)
+{
+    SoupServer* server;
+    SoupURI* soup_uri;
+
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    /* Hopefully make test independent of the path it's called from. */
+    testutils_relative_chdir(&quot;Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html&quot;, argv[0]);
+
+    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+
+    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
+
+    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(soup_uri, soup_server_get_port(server));
+
+    base_uri = soup_uri_to_string(soup_uri, FALSE);
+    soup_uri_free(soup_uri);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_data_func(&quot;/webkit/mime/remote-PDF&quot;, &quot;pdf&quot;, testRemoteMimeType);
+    g_test_add_data_func(&quot;/webkit/mime/remote-HTML&quot;, &quot;html&quot;, testRemoteMimeType);
+    g_test_add_data_func(&quot;/webkit/mime/remote-TEXT&quot;, &quot;text&quot;, testRemoteMimeType);
+    g_test_add_data_func(&quot;/webkit/mime/local-PDF&quot;, &quot;pdf&quot;, testLocalMimeType);
+    g_test_add_data_func(&quot;/webkit/mime/local-HTML&quot;, &quot;html&quot;, testLocalMimeType);
+    g_test_add_data_func(&quot;/webkit/mime/local-TEXT&quot;, &quot;text&quot;, testLocalMimeType);
+
+    return g_test_run();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestnetworkrequestcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkrequestc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkrequest.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkrequest.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+/*
+ * Copyright (C) 2009 Gustavo Noronha Silva
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static void test_network_request_create_destroy()
+{
+    WebKitNetworkRequest* request;
+    SoupMessage* message;
+
+    /* Test creation with URI */
+    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;uri&quot;, &quot;http://debian.org/&quot;, NULL));
+    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
+    message = webkit_network_request_get_message(request);
+    g_assert(!message);
+    g_object_unref(request);
+
+    /* Test creation with SoupMessage */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, NULL));
+    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
+    g_object_unref(request);
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
+    g_object_unref(message);
+
+    /* Test creation with both SoupMessage and URI */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, &quot;uri&quot;, &quot;http://gnome.org/&quot;, NULL));
+    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
+    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://gnome.org/&quot;);
+    g_object_unref(request);
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
+    g_object_unref(message);
+}
+
+static void test_network_request_properties()
+{
+    WebKitNetworkRequest* request;
+    SoupMessage* message;
+    gchar* soupURI;
+
+    /* Test URI is set correctly when creating with URI */
+    request = webkit_network_request_new(&quot;http://debian.org/&quot;);
+    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
+    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://debian.org/&quot;);
+    g_object_unref(request);
+
+    /* Test URI is set correctly when creating with Message */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    request = WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, &quot;message&quot;, message, NULL));
+    g_assert(WEBKIT_IS_NETWORK_REQUEST(request));
+    g_object_unref(message);
+
+    message = webkit_network_request_get_message(request);
+    soupURI = soup_uri_to_string(soup_message_get_uri(message), FALSE);
+    g_assert_cmpstr(soupURI, ==, &quot;http://debian.org/&quot;);
+    g_free(soupURI);
+
+    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://debian.org/&quot;);
+    g_object_unref(request);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/networkrequest/createdestroy&quot;, test_network_request_create_destroy);
+    g_test_add_func(&quot;/webkit/networkrequest/properties&quot;, test_network_request_properties);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestnetworkresponsecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestnetworkresponsec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testnetworkresponse.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testnetworkresponse.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,97 @@
</span><ins>+/*
+ * Copyright (C) 2009 Gustavo Noronha Silva
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static void test_network_response_create_destroy()
+{
+    WebKitNetworkResponse* response;
+    SoupMessage* message;
+
+    /* Test creation with URI */
+    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;uri&quot;, &quot;http://debian.org/&quot;, NULL));
+    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
+    message = webkit_network_response_get_message(response);
+    g_assert(!message);
+    g_object_unref(response);
+
+    /* Test creation with SoupMessage */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, NULL));
+    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
+    g_object_unref(response);
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
+    g_object_unref(message);
+
+    /* Test creation with both SoupMessage and URI */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, &quot;uri&quot;, &quot;http://gnome.org/&quot;, NULL));
+    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 2);
+    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://gnome.org/&quot;);
+    g_object_unref(response);
+    g_assert_cmpint(G_OBJECT(message)-&gt;ref_count, ==, 1);
+    g_object_unref(message);
+}
+
+static void test_network_response_properties()
+{
+    WebKitNetworkResponse* response;
+    SoupMessage* message;
+    gchar* soupURI;
+
+    /* Test URI is set correctly when creating with URI */
+    response = webkit_network_response_new(&quot;http://debian.org/&quot;);
+    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
+    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://debian.org/&quot;);
+    g_object_unref(response);
+
+    /* Test URI is set correctly when creating with Message */
+    message = soup_message_new(&quot;GET&quot;, &quot;http://debian.org/&quot;);
+    response = WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, &quot;message&quot;, message, NULL));
+    g_assert(WEBKIT_IS_NETWORK_RESPONSE(response));
+    g_object_unref(message);
+
+    message = webkit_network_response_get_message(response);
+    soupURI = soup_uri_to_string(soup_message_get_uri(message), FALSE);
+    g_assert_cmpstr(soupURI, ==, &quot;http://debian.org/&quot;);
+    g_free(soupURI);
+
+    g_assert_cmpstr(webkit_network_response_get_uri(response), ==, &quot;http://debian.org/&quot;);
+    g_object_unref(response);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/networkresponse/createdestroy&quot;, test_network_response_create_destroy);
+    g_test_add_func(&quot;/webkit/networkresponse/properties&quot;, test_network_response_properties);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebbackforwardlistcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebbackforwardlistc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebbackforwardlist.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebbackforwardlist.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,326 @@
</span><ins>+/*
+ * Copyright (C) 2008 Holger Hans Peter Freyther
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static void test_webkit_web_history_item_lifetime(void)
+{
+    WebKitWebView* webView;
+    WebKitWebBackForwardList* backForwardList;
+    WebKitWebHistoryItem* currentItem;
+    WebKitWebHistoryItem* forwardItem;
+    WebKitWebHistoryItem* backItem;
+    WebKitWebHistoryItem* nthItem;
+    WebKitWebHistoryItem* item1;
+    WebKitWebHistoryItem* item2;
+    WebKitWebHistoryItem* item3;
+    WebKitWebHistoryItem* item4;
+    GList* backList = NULL;
+    GList* forwardList = NULL;
+    g_test_bug(&quot;19898&quot;);
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    backForwardList = webkit_web_view_get_back_forward_list(webView);
+    g_assert_cmpint(G_OBJECT(backForwardList)-&gt;ref_count, ==, 1);
+
+    /* add test items */
+    item1 = webkit_web_history_item_new_with_data(&quot;http://example.com/1/&quot;, &quot;Site 1&quot;);
+    webkit_web_back_forward_list_add_item(backForwardList, item1);
+    g_object_unref(item1);
+
+    item2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Site 2&quot;);
+    webkit_web_back_forward_list_add_item(backForwardList, item2);
+    g_object_unref(item2);
+
+    item3 = webkit_web_history_item_new_with_data(&quot;http://example.com/3/&quot;, &quot;Site 3&quot;);
+    webkit_web_back_forward_list_add_item(backForwardList, item3);
+    g_object_unref(item3);
+
+    item4 = webkit_web_history_item_new_with_data(&quot;http://example.com/4/&quot;, &quot;Site 4&quot;);
+    webkit_web_back_forward_list_add_item(backForwardList, item4);
+    g_object_unref(item4);
+
+    /* make sure these functions don't add unnecessary ref to the history item */
+    backItem = webkit_web_back_forward_list_get_back_item(backForwardList);
+    g_object_ref(backItem);
+    g_assert_cmpint(G_OBJECT(backItem)-&gt;ref_count, ==, 2);
+    g_object_unref(backItem);
+    g_assert_cmpint(G_OBJECT(backItem)-&gt;ref_count, ==, 1);
+
+    currentItem = webkit_web_back_forward_list_get_current_item(backForwardList);
+    g_object_ref(currentItem);
+    g_assert_cmpint(G_OBJECT(currentItem)-&gt;ref_count, ==, 2);
+    g_object_unref(currentItem);
+    g_assert_cmpint(G_OBJECT(currentItem)-&gt;ref_count, ==, 1);
+
+    webkit_web_back_forward_list_go_to_item(backForwardList, item2);
+    forwardItem = webkit_web_back_forward_list_get_forward_item(backForwardList);
+    g_object_ref(forwardItem);
+    g_assert_cmpint(G_OBJECT(forwardItem)-&gt;ref_count, ==, 2);
+    g_object_unref(forwardItem);
+    g_assert_cmpint(G_OBJECT(forwardItem)-&gt;ref_count, ==, 1);
+
+    nthItem = webkit_web_back_forward_list_get_nth_item(backForwardList, 1);
+    g_object_ref(nthItem);
+    g_assert_cmpint(G_OBJECT(nthItem)-&gt;ref_count, ==, 2);
+    g_object_unref(nthItem);
+    g_assert_cmpint(G_OBJECT(nthItem)-&gt;ref_count, ==, 1);
+
+    backList = webkit_web_back_forward_list_get_back_list_with_limit(backForwardList, 5);
+    for (; backList; backList = backList-&gt;next)
+        g_assert_cmpint(G_OBJECT(backList-&gt;data)-&gt;ref_count, ==, 1);
+
+    forwardList = webkit_web_back_forward_list_get_forward_list_with_limit(backForwardList, 5);
+    for (; forwardList; forwardList = forwardList-&gt;next)
+        g_assert_cmpint(G_OBJECT(forwardList-&gt;data)-&gt;ref_count, ==, 1);
+
+    g_list_free(forwardList);
+    g_list_free(backList);
+    g_assert_cmpint(G_OBJECT(item1)-&gt;ref_count, ==, 1);
+    g_assert_cmpint(G_OBJECT(item2)-&gt;ref_count, ==, 1);
+    g_assert_cmpint(G_OBJECT(item3)-&gt;ref_count, ==, 1);
+    g_assert_cmpint(G_OBJECT(item4)-&gt;ref_count, ==, 1);
+    g_assert_cmpint(G_OBJECT(backForwardList)-&gt;ref_count, ==, 1);
+    g_object_unref(webView);
+}
+
+static void test_webkit_web_back_forward_list_order(void)
+{
+    WebKitWebView* webView;
+    WebKitWebBackForwardList* webBackForwardList;
+    WebKitWebHistoryItem* item1;
+    WebKitWebHistoryItem* item2;
+    WebKitWebHistoryItem* item3;
+    WebKitWebHistoryItem* item4;
+    WebKitWebHistoryItem* currentItem;
+    GList* backList = NULL;
+    GList* forwardList = NULL;
+    g_test_bug(&quot;22694&quot;);
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+
+    webkit_web_view_set_maintains_back_forward_list(webView, TRUE);
+    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
+    g_assert(webBackForwardList);
+
+    // Check that there is no item.
+    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    // Add a new items
+    item1 = webkit_web_history_item_new_with_data(&quot;http://example.com/1/&quot;, &quot;Site 1&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, item1);
+    g_object_unref(item1);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item1));
+
+    item2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Site 2&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, item2);
+    g_object_unref(item2);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item2));
+
+    item3 = webkit_web_history_item_new_with_data(&quot;http://example.com/3/&quot;, &quot;Site 3&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, item3);
+    g_object_unref(item3);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item3));
+
+    item4 = webkit_web_history_item_new_with_data(&quot;http://example.com/4/&quot;, &quot;Site 4&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, item4);
+    g_object_unref(item4);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item4));
+
+    // check the back list order
+    backList = webkit_web_back_forward_list_get_back_list_with_limit(webBackForwardList, 5);
+    g_assert(backList);
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/3/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 3&quot;);
+    backList = backList-&gt;next;
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 2&quot;);
+    backList = backList-&gt;next;
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(backList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/1/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 1&quot;);
+    g_list_free(backList);
+
+    // check the forward list order
+    g_assert(webkit_web_view_go_to_back_forward_item(webView, item1));
+    forwardList = webkit_web_back_forward_list_get_forward_list_with_limit(webBackForwardList,5);
+    g_assert(forwardList);
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/4/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 4&quot;);
+    forwardList = forwardList-&gt;next;
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/3/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 3&quot;);
+    forwardList = forwardList-&gt;next;
+
+    currentItem = WEBKIT_WEB_HISTORY_ITEM(forwardList-&gt;data);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Site 2&quot;);
+
+    g_list_free(forwardList);
+    g_object_unref(webView);
+}
+
+static void test_webkit_web_back_forward_list_add_item(void)
+{
+    WebKitWebView* webView;
+    WebKitWebBackForwardList* webBackForwardList;
+    WebKitWebHistoryItem* addItem1;
+    WebKitWebHistoryItem* addItem2;
+    WebKitWebHistoryItem* backItem;
+    WebKitWebHistoryItem* currentItem;
+    g_test_bug(&quot;22988&quot;);
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+
+    webkit_web_view_set_maintains_back_forward_list(webView, TRUE);
+    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
+    g_assert(webBackForwardList);
+
+    // Check that there is no item.
+    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    // Add a new item
+    addItem1 = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Added site&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, addItem1);
+    g_object_unref(addItem1);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem1));
+
+    // Check that the added item is the current item.
+    currentItem = webkit_web_back_forward_list_get_current_item(webBackForwardList);
+    g_assert(currentItem);
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Added site&quot;);
+
+    // Add another item.
+    addItem2 = webkit_web_history_item_new_with_data(&quot;http://example.com/2/&quot;, &quot;Added site 2&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, addItem2);
+    g_object_unref(addItem2);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem2));
+
+    // Check that the added item is new current item.
+    currentItem = webkit_web_back_forward_list_get_current_item(webBackForwardList);
+    g_assert(currentItem);
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 1);
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(webkit_web_view_can_go_back(webView));
+    g_assert_cmpstr(webkit_web_history_item_get_uri(currentItem), ==, &quot;http://example.com/2/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(currentItem), ==, &quot;Added site 2&quot;);
+
+    backItem = webkit_web_back_forward_list_get_back_item(webBackForwardList);
+    g_assert(backItem);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(backItem), ==, &quot;http://example.com/&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_title(backItem), ==, &quot;Added site&quot;);
+
+    // Go to the first added item.
+    g_assert(webkit_web_view_go_to_back_forward_item(webView, addItem1));
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 1);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    g_object_unref(webView);
+}
+
+static void test_webkit_web_back_forward_list_clear(void)
+{
+    WebKitWebView* webView;
+    WebKitWebBackForwardList* webBackForwardList;
+    WebKitWebHistoryItem* addItem;
+    g_test_bug(&quot;36173&quot;);
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+
+    webBackForwardList = webkit_web_view_get_back_forward_list(webView);
+    g_assert(webBackForwardList);
+
+    // Check that there is no item.
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    // Check that clearing the empty list does not modify counters
+    webkit_web_back_forward_list_clear(webBackForwardList);
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    // Add a new item
+    addItem = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Added site&quot;);
+    webkit_web_back_forward_list_add_item(webBackForwardList, addItem);
+    g_object_unref(addItem);
+    g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, addItem));
+
+    // Check that after clearing the list the added item is no longer in the list
+    webkit_web_back_forward_list_clear(webBackForwardList);
+    g_assert(!webkit_web_back_forward_list_contains_item(webBackForwardList, addItem));
+
+    // Check that after clearing it, the list is empty
+    g_assert_cmpint(webkit_web_back_forward_list_get_forward_length(webBackForwardList), ==, 0);
+    g_assert_cmpint(webkit_web_back_forward_list_get_back_length(webBackForwardList), ==, 0);
+    g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList));
+    g_assert(!webkit_web_view_can_go_forward(webView));
+    g_assert(!webkit_web_view_can_go_back(webView));
+
+    g_object_unref(webView);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/webbackforwardlist/add_item&quot;, test_webkit_web_back_forward_list_add_item);
+    g_test_add_func(&quot;/webkit/webbackforwardlist/list_order&quot;, test_webkit_web_back_forward_list_order);
+    g_test_add_func(&quot;/webkit/webhistoryitem/lifetime&quot;, test_webkit_web_history_item_lifetime);
+    g_test_add_func(&quot;/webkit/webbackforwardlist/clear&quot;, test_webkit_web_back_forward_list_clear);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebdatasourcecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebdatasourcec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebdatasource.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebdatasource.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,242 @@
</span><ins>+/*
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static const gshort defaultTimeout = 10;
+guint waitTimer;
+gboolean shouldWait;
+
+typedef struct {
+    WebKitWebView* webView;
+    WebKitWebFrame* mainFrame;
+} WebDataSourceFixture;
+
+static void test_webkit_web_data_source_get_initial_request()
+{
+    WebKitWebView* view;
+    WebKitWebFrame* frame;
+    WebKitWebDataSource* dataSource;
+    WebKitNetworkRequest* initialRequest;
+
+    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(view);
+    frame = webkit_web_view_get_main_frame(view);
+
+    WebKitNetworkRequest* request = webkit_network_request_new(&quot;http://www.google.com&quot;);
+    webkit_web_frame_load_request(frame, request);
+    g_object_unref(request);
+
+    dataSource = webkit_web_frame_get_provisional_data_source(frame);
+    g_assert(dataSource);
+    initialRequest = webkit_web_data_source_get_initial_request(dataSource);
+    g_assert_cmpstr(webkit_network_request_get_uri(initialRequest), ==, &quot;http://www.google.com/&quot;);
+
+    g_object_unref(view);
+}
+
+static void notify_load_status_unreachable_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
+    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
+
+    g_assert(status != WEBKIT_LOAD_FINISHED);
+
+    if (status != WEBKIT_LOAD_FAILED)
+        return;
+
+    WebKitWebDataSource* datasource = webkit_web_frame_get_data_source(frame);
+
+    g_assert_cmpstr(&quot;http://this.host.does.not.exist/doireallyexist.html&quot;, ==,
+                    webkit_web_data_source_get_unreachable_uri(datasource));
+
+    g_main_loop_quit(loop);
+}
+
+static void notify_load_status_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
+    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
+    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
+
+    if (status == WEBKIT_LOAD_COMMITTED) {
+        g_assert(webkit_web_data_source_is_loading(dataSource));
+        return;
+    }
+    else if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    /* Test get_request */
+    g_test_message(&quot;Testing webkit_web_data_source_get_request&quot;);
+    WebKitNetworkRequest* request = webkit_web_data_source_get_request(dataSource);
+    g_assert_cmpstr(webkit_network_request_get_uri(request), ==, &quot;http://www.webkit.org/&quot;);
+
+    /* Test get_main_resource */
+    g_test_message(&quot;Testing webkit_web_data_source_get_main_resource&quot;);
+    WebKitWebResource* resource = webkit_web_data_source_get_main_resource(dataSource);
+    g_assert_cmpstr(&quot;text/html&quot;, ==, webkit_web_resource_get_mime_type(resource));
+    g_assert_cmpstr(&quot;http://www.webkit.org/&quot;, ==, webkit_web_resource_get_uri(resource));
+
+    /* Test get_data. We just test if data has certain size for the mean time */
+    g_test_message(&quot;Testing webkit_web_data_source_get_data has certain size&quot;);
+    GString* data = webkit_web_data_source_get_data(dataSource);
+    g_assert(data-&gt;len &gt; 100);
+
+    /* FIXME: Add test for get_encoding */
+
+    g_main_loop_quit(loop);
+}
+
+static gboolean wait_timer_fired(GMainLoop* loop)
+{
+    waitTimer = 0;
+    g_main_loop_quit(loop);
+
+    return FALSE;
+}
+
+static void test_webkit_web_data_source()
+{
+    WebKitWebView* view;
+    GMainLoop* loop;
+
+    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(view);
+    loop = g_main_loop_new(NULL, TRUE);
+    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_cb), loop);
+    webkit_web_view_load_uri(view, &quot;http://www.webkit.org&quot;);
+
+    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
+
+    g_main_loop_run(loop);
+
+    if (waitTimer)
+        g_source_remove(waitTimer);
+
+    waitTimer = 0;
+
+    g_main_loop_unref(loop);
+    g_object_unref(view);
+}
+
+static void notify_load_status_lifetime_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop)
+{
+    WebKitLoadStatus status = webkit_web_view_get_load_status (view);
+    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
+    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame);
+
+    if (status == WEBKIT_LOAD_COMMITTED) {
+        g_assert(webkit_web_data_source_is_loading(dataSource));
+        return;
+    } else if (status != WEBKIT_LOAD_FINISHED)
+        return;
+
+    g_main_loop_quit(loop);
+}
+
+static void test_webkit_web_data_source_lifetime()
+{
+    WebKitWebView* view;
+    GMainLoop* loop;
+
+    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(view);
+    loop = g_main_loop_new(NULL, TRUE);
+    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_lifetime_cb), loop);
+    webkit_web_view_load_uri(view, &quot;http://www.webkit.org&quot;);
+
+    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
+
+    g_main_loop_run(loop);
+
+    WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(webkit_web_view_get_main_frame(view));
+    GList* subResources = webkit_web_data_source_get_subresources(dataSource);
+    gint numberOfResources = g_list_length(subResources);
+    g_list_free(subResources);
+
+    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_FINISHED);
+
+    webkit_web_view_load_uri(view, &quot;http://gnome.org&quot;);
+
+    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_PROVISIONAL);
+
+    webkit_web_view_stop_loading(view);
+
+    g_assert_cmpint(webkit_web_view_get_load_status(view), ==, WEBKIT_LOAD_FAILED);
+
+    subResources = webkit_web_data_source_get_subresources(dataSource);
+    g_assert_cmpint(numberOfResources, ==, g_list_length(subResources));
+    g_list_free(subResources);
+
+    if (waitTimer)
+        g_source_remove(waitTimer);
+
+    waitTimer = 0;
+
+    g_main_loop_unref(loop);
+    g_object_unref(view);
+}
+
+static void test_webkit_web_data_source_unreachable_uri()
+{
+    /* FIXME: this test fails currently. */
+    return;
+
+    WebKitWebView* view;
+    GMainLoop* loop;
+
+    view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(view);
+    loop = g_main_loop_new(NULL, TRUE);
+    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(notify_load_status_unreachable_cb), loop);
+    webkit_web_view_load_uri(view, &quot;http://this.host.does.not.exist/doireallyexist.html&quot;);
+
+    waitTimer = g_timeout_add_seconds(defaultTimeout, (GSourceFunc)wait_timer_fired, loop);
+
+    g_main_loop_run(loop);
+
+    if (waitTimer)
+        g_source_remove(waitTimer);
+
+    waitTimer = 0;
+
+    g_main_loop_unref(loop);
+    g_object_unref(view);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_bug(&quot;24758&quot;);
+    g_test_add_func(&quot;/webkit/webdatasource/get_initial_request&quot;,
+                    test_webkit_web_data_source_get_initial_request);
+    g_test_add_func(&quot;/webkit/webdatasource/api&quot;,
+                    test_webkit_web_data_source);
+    g_test_add_func(&quot;/webkit/webdatasource/unreachable_uri&quot;,
+                    test_webkit_web_data_source_unreachable_uri);
+    g_test_add_func(&quot;/webkit/webdatasource/lifetime&quot;,
+                    test_webkit_web_data_source_lifetime);
+
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebframecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebframec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebframe.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebframe.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebframe.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebframe.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,220 @@
</span><ins>+/*
+ * Copyright (C) 2008 Holger Hans Peter Freyther
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static int numberOfFramesCreated = 0;
+
+static void createFrameSignalTestFrameCreatedCallback(WebKitWebView* webView, WebKitWebFrame* frame, gpointer data)
+{
+    numberOfFramesCreated++;
+}
+
+static gboolean createFrameSignalTestTimeout(gpointer data)
+{
+    g_assert_cmpint(numberOfFramesCreated, ==, 2);
+    g_main_loop_quit((GMainLoop*) data);
+    return FALSE;
+}
+
+static void test_webkit_web_frame_created_signal(void)
+{
+    GtkWidget* webView;
+    GtkWidget* window;
+    GMainLoop* loop = g_main_loop_new(NULL, TRUE);
+
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+    webView = webkit_web_view_new();
+    g_signal_connect(webView, &quot;frame-created&quot;, G_CALLBACK(createFrameSignalTestFrameCreatedCallback), loop);
+
+    // We want to ensure that exactly two create-frame signals are
+    // fired and no more, so we set a timeout here. There does not appear
+    // to be a simple way via the API to figure out when all frames have
+    // loaded.
+    g_timeout_add(500, createFrameSignalTestTimeout, loop);
+
+    gtk_container_add(GTK_CONTAINER(window), webView);
+    gtk_widget_show(window);
+    gtk_widget_show(webView);
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView),
+        &quot;&lt;html&gt;&lt;body&gt;Frames!&quot;
+        &quot;&lt;iframe&gt;&lt;/iframe&gt;&quot;
+        &quot;&lt;iframe&gt;&lt;/iframe&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;,
+        &quot;text/html&quot;, &quot;utf-8&quot;, &quot;file://&quot;);
+    g_main_loop_run(loop);
+}
+
+static void test_webkit_web_frame_create_destroy(void)
+{
+    GtkWidget *webView;
+    GtkWidget *window;
+
+    g_test_bug(&quot;21837&quot;);
+    webView = webkit_web_view_new();
+    g_object_ref_sink(webView);
+    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
+    // This crashed with the original version
+    g_object_unref(webView);
+
+    g_test_bug(&quot;25042&quot;);
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    webView = webkit_web_view_new();
+    gtk_container_add(GTK_CONTAINER(window), webView);
+    gtk_widget_show(window);
+    gtk_widget_show(webView);
+    gtk_widget_destroy(webView);
+}
+
+static void test_webkit_web_frame_lifetime(void)
+{
+    WebKitWebView* webView;
+    WebKitWebFrame* webFrame;
+    g_test_bug(&quot;21837&quot;);
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
+    webFrame = webkit_web_view_get_main_frame(webView);
+    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 1);
+
+    // Add dummy reference on the WebKitWebFrame to keep it alive
+    g_object_ref(webFrame);
+    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 2);
+
+    // This crashed with the original version
+    g_object_unref(webView);
+
+    // Make sure that the frame got deleted as well. We did this
+    // by adding an extra ref on the WebKitWebFrame and we should
+    // be the one holding the last reference.
+    g_assert_cmpint(G_OBJECT(webFrame)-&gt;ref_count, ==, 1);
+    g_object_unref(webFrame);
+}
+
+static gboolean print_requested_cb(WebKitWebView* webView, WebKitWebFrame* webFrame, GMainLoop* loop)
+{
+    g_object_set_data(G_OBJECT(webView), &quot;signal-handled&quot;, GINT_TO_POINTER(TRUE));
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+static void print_timeout(GMainLoop* loop)
+{
+    if (g_main_loop_is_running(loop))
+        g_main_loop_quit(loop);
+}
+
+static void test_webkit_web_frame_printing(void)
+{
+    WebKitWebView* webView;
+
+    webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(webView);
+    g_assert_cmpint(G_OBJECT(webView)-&gt;ref_count, ==, 1);
+
+    webkit_web_view_load_string(webView,
+                                &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;WebKitGTK+!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                                &quot;text/html&quot;,
+                                &quot;utf-8&quot;,
+                                &quot;file://&quot;);
+
+    GMainLoop* loop = g_main_loop_new(NULL, TRUE);
+
+    // Does javascript print() work correctly?
+    g_signal_connect(webView, &quot;print-requested&quot;,
+                     G_CALLBACK(print_requested_cb),
+                     loop);
+
+    g_object_set_data(G_OBJECT(webView), &quot;signal-handled&quot;, GINT_TO_POINTER(FALSE));
+    webkit_web_view_execute_script (webView, &quot;print();&quot;);
+
+    // Give javascriptcore some time to process the print request, but
+    // prepare a timeout to avoid it running forever in case the signal is
+    // never emitted.
+    g_timeout_add(1000, (GSourceFunc)print_timeout, loop);
+    g_main_loop_run(loop);
+
+    g_assert_cmpint(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(webView), &quot;signal-handled&quot;)), ==, TRUE);
+
+    // Does printing directly to a file?
+    GError *error = NULL;
+    gchar* temporaryFilename = NULL;
+    gint fd = g_file_open_tmp (&quot;webkit-testwebframe-XXXXXX&quot;, &amp;temporaryFilename, &amp;error);
+    close(fd);
+
+    if (error) {
+        g_critical(&quot;Failed to open a temporary file for writing: %s.&quot;, error-&gt;message);
+        g_error_free(error);
+        goto cleanup;
+    }
+
+    // We delete the file, so that we can easily figure out that the
+    // file got printed;
+    if (g_unlink(temporaryFilename) == -1) {
+        g_warning(&quot;Failed to delete the temporary file: %s.\nThis may cause the test to be bogus.&quot;, g_strerror(errno));
+    }
+
+    WebKitWebFrame* webFrame = webkit_web_view_get_main_frame(webView);
+    GtkPrintOperation* operation = gtk_print_operation_new();
+    GtkPrintOperationAction action = GTK_PRINT_OPERATION_ACTION_EXPORT;
+    GtkPrintOperationResult result;
+
+    gtk_print_operation_set_export_filename(operation, temporaryFilename);
+    result = webkit_web_frame_print_full (webFrame, operation, action, NULL);
+
+    g_assert_cmpint(result, ==, GTK_PRINT_OPERATION_RESULT_APPLY);
+    g_assert_cmpint(g_file_test(temporaryFilename, G_FILE_TEST_IS_REGULAR), ==, TRUE);
+
+    g_unlink(temporaryFilename);
+    g_object_unref(operation);
+cleanup:
+    g_object_unref(webView);
+    g_free(temporaryFilename);
+}
+
+static void test_webkit_web_frame_response()
+{
+    WebKitWebFrame* frame = g_object_new(WEBKIT_TYPE_WEB_FRAME, NULL);
+    WebKitNetworkResponse* response = webkit_web_frame_get_network_response(frame);
+    g_assert(!response);
+    g_object_unref(frame);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/webview/create_destroy&quot;, test_webkit_web_frame_create_destroy);
+    g_test_add_func(&quot;/webkit/webview/frame-created_signal&quot;, test_webkit_web_frame_created_signal);
+    g_test_add_func(&quot;/webkit/webframe/lifetime&quot;, test_webkit_web_frame_lifetime);
+    g_test_add_func(&quot;/webkit/webview/printing&quot;, test_webkit_web_frame_printing);
+    g_test_add_func(&quot;/webkit/webview/response&quot;, test_webkit_web_frame_response);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebhistoryitemcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebhistoryitemc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebhistoryitem.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebhistoryitem.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+typedef struct {
+    WebKitWebHistoryItem* item;
+} WebHistoryItemFixture;
+
+static void web_history_item_fixture_setup(WebHistoryItemFixture* fixture,
+                                           gconstpointer data)
+{
+    fixture-&gt;item = webkit_web_history_item_new_with_data(&quot;http://example.com/&quot;, &quot;Example1&quot;);
+    g_assert_cmpint(G_OBJECT(fixture-&gt;item)-&gt;ref_count, == , 1);
+    g_assert(fixture-&gt;item != NULL);
+}
+
+static void web_history_item_fixture_teardown(WebHistoryItemFixture* fixture,
+                                              gconstpointer data)
+{
+    g_assert(fixture-&gt;item != NULL);
+    g_assert_cmpint(G_OBJECT(fixture-&gt;item)-&gt;ref_count, ==, 1);
+}
+
+static void test_webkit_web_history_item_get_data(WebHistoryItemFixture* fixture,
+                                                  gconstpointer data)
+{
+    g_assert_cmpstr(webkit_web_history_item_get_title(fixture-&gt;item), ==, &quot;Example1&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_uri(fixture-&gt;item), ==, &quot;http://example.com/&quot;);
+}
+
+static void test_webkit_web_history_item_alternate_title(WebHistoryItemFixture* fixture,
+                                                         gconstpointer data)
+{
+    webkit_web_history_item_set_alternate_title(fixture-&gt;item, &quot;Alternate title&quot;);
+    g_assert_cmpstr(webkit_web_history_item_get_alternate_title(fixture-&gt;item), ==, &quot;Alternate title&quot;);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add(&quot;/webkit/webhistoryitem/get_data&quot;,
+               WebHistoryItemFixture, 0, web_history_item_fixture_setup,
+               test_webkit_web_history_item_get_data, web_history_item_fixture_teardown);
+    g_test_add(&quot;/webkit/webhistoryitem/alternate_title&quot;,
+               WebHistoryItemFixture, 0, web_history_item_fixture_setup,
+               test_webkit_web_history_item_alternate_title, web_history_item_fixture_teardown);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebinspectorcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebinspectorc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebinspector.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebinspector.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,173 @@
</span><ins>+/*
+ * Copyright (C) 2012 Gustavo Noronha Silva &lt;gns@gnome.org&gt;
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;string.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+GMainLoop *loop;
+GtkWidget *window;
+
+static gboolean quitLoop(gpointer data)
+{
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+/* Ignore simple translation-related messages and upgrade other
+ * messages to warnings.
+ */
+static gboolean consoleMessageCallback(WebKitWebView* webView, const char* message, unsigned int line, const char* sourceId)
+{
+    if (strstr(message, &quot;Localized string&quot;) || strstr(message, &quot;Protocol Error: the message is for non-existing domain 'Profiler'&quot;) ||
+        strstr(message, &quot;Didn't find a TreeElement for a representedObject&quot;))
+        return TRUE;
+
+    g_warning(&quot;Console: %s @%d: %s\n&quot;, sourceId, line, message);
+    return TRUE;
+}
+
+static WebKitWebView* inspectElementCallback(WebKitWebInspector *inspector, WebKitWebView *inspectedWebView, int *timesElementInspected)
+{
+    *timesElementInspected = *timesElementInspected + 1;
+
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+    GtkWidget *newWebView = webkit_web_view_new();
+    gtk_container_add(GTK_CONTAINER(window), newWebView);
+
+    g_signal_connect(newWebView, &quot;console-message&quot;,
+                     G_CALLBACK(consoleMessageCallback), NULL);
+
+    return WEBKIT_WEB_VIEW(newWebView);
+}
+
+static gboolean closeInspector(WebKitWebInspector *inspector, int *timesClosed)
+{
+    *timesClosed = *timesClosed + 1;
+
+    gtk_widget_destroy(window);
+    return TRUE;
+}
+
+static gboolean showInspector(WebKitWebInspector *inspector, gpointer data)
+{
+    g_idle_add(quitLoop, NULL);
+    return TRUE;
+}
+
+static void loadFinished(WebKitWebView *webView, WebKitWebFrame *frame, gboolean *isLoadFinished)
+{
+    *isLoadFinished = TRUE;
+    if (g_main_loop_is_running(loop))
+        g_main_loop_quit(loop);
+}
+
+static void test_webkit_web_inspector_close_and_inspect()
+{
+    WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    loop = g_main_loop_new(NULL, TRUE);
+
+    gboolean isLoadFinished = FALSE;
+    g_signal_connect(webView, &quot;load-finished&quot;, G_CALLBACK(loadFinished), &amp;isLoadFinished);
+    webkit_web_view_load_string(webView,
+                                &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;woohoo&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                                &quot;text/html&quot;, &quot;UTF-8&quot;, &quot;file://&quot;);
+    if (!isLoadFinished)
+        g_main_loop_run(loop);
+
+    g_object_set(webkit_web_view_get_settings(webView), &quot;enable-developer-extras&quot;, TRUE, NULL);
+    WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
+
+    int timesElementInspected = 0;
+    int timesClosed = 0;
+    g_object_connect(inspector,
+                     &quot;signal::inspect-web-view&quot;, G_CALLBACK(inspectElementCallback), &amp;timesElementInspected,
+                     &quot;signal::show-window&quot;, G_CALLBACK(showInspector), NULL,
+                     &quot;signal::close-window&quot;, G_CALLBACK(closeInspector), &amp;timesClosed,
+                     NULL);
+
+    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
+    g_assert_cmpint(timesElementInspected, ==, 1);
+
+    g_main_loop_run(loop);
+
+    webkit_web_inspector_close(inspector);
+    g_assert_cmpint(timesClosed, ==, 1);
+
+    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
+    g_assert_cmpint(timesElementInspected, ==, 2);
+
+    g_main_loop_run(loop);
+
+    gtk_widget_destroy(GTK_WIDGET(webView));
+    g_assert_cmpint(timesClosed, ==, 2);
+
+    g_main_loop_unref(loop);
+}
+
+static void test_webkit_web_inspector_destroy_inspected_web_view()
+{
+    WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    loop = g_main_loop_new(NULL, TRUE);
+
+    gboolean isLoadFinished = FALSE;
+    g_signal_connect(webView, &quot;load-finished&quot;, G_CALLBACK(loadFinished), &amp;isLoadFinished);
+    webkit_web_view_load_string(webView,
+                                &quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;woohoo&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;,
+                                &quot;text/html&quot;, &quot;UTF-8&quot;, &quot;file://&quot;);
+    if (!isLoadFinished)
+        g_main_loop_run(loop);
+
+    g_object_set(webkit_web_view_get_settings(webView), &quot;enable-developer-extras&quot;, TRUE, NULL);
+    WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
+
+    int timesElementInspected = 0;
+    int timesClosed = 0;
+    g_object_connect(inspector,
+                     &quot;signal::inspect-web-view&quot;, G_CALLBACK(inspectElementCallback), &amp;timesElementInspected,
+                     &quot;signal::show-window&quot;, G_CALLBACK(showInspector), NULL,
+                     &quot;signal::close-window&quot;, G_CALLBACK(closeInspector), &amp;timesClosed,
+                     NULL);
+
+    webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
+    g_assert_cmpint(timesElementInspected, ==, 1);
+
+    g_main_loop_run(loop);
+
+    gtk_widget_destroy(GTK_WIDGET(webView));
+    g_assert_cmpint(timesClosed, ==, 1);
+
+    g_main_loop_unref(loop);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/webinspector/destroy-inspected-web-view&quot;, test_webkit_web_inspector_destroy_inspected_web_view);
+    g_test_add_func(&quot;/webkit/webinspector/close-and-inspect&quot;, test_webkit_web_inspector_close_and_inspect);
+
+    return g_test_run();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebplugindatabasecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebplugindatabasec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebplugindatabase.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebplugindatabase.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2010 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;errno.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+/* This function is not public, so we need an extern declaration */
+extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
+
+static void test_webkit_web_plugin_database_get_plugins()
+{
+    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    WebKitWebPluginDatabase* database;
+    GSList* pluginList, *p;
+    gboolean found = FALSE;
+    gboolean enabled = FALSE;
+
+    webkit_web_settings_add_extra_plugin_directory(view, TEST_PLUGIN_DIR);
+    g_object_ref_sink(G_OBJECT(view));
+
+    database = webkit_get_web_plugin_database();
+    pluginList = webkit_web_plugin_database_get_plugins(database);
+    for (p = pluginList; p; p = p-&gt;next) {
+        WebKitWebPlugin* plugin = (WebKitWebPlugin*)p-&gt;data;
+        if (!g_strcmp0(webkit_web_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;) &amp;&amp;
+            !g_strcmp0(webkit_web_plugin_get_description(plugin), &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;)) {
+            found = TRUE;
+            enabled = webkit_web_plugin_get_enabled(plugin);
+            webkit_web_plugin_set_enabled(plugin, FALSE);
+        }
+    }
+    webkit_web_plugin_database_plugins_list_free(pluginList);
+    g_assert(found);
+    g_assert(enabled);
+
+    webkit_web_plugin_database_refresh(database);
+    pluginList = webkit_web_plugin_database_get_plugins(database);
+
+    for (p = pluginList; p; p = p-&gt;next) {
+        WebKitWebPlugin* plugin = (WebKitWebPlugin*)p-&gt;data;
+        if (!g_strcmp0(webkit_web_plugin_get_name(plugin), &quot;WebKit Test PlugIn&quot;) &amp;&amp;
+            !g_strcmp0(webkit_web_plugin_get_description(plugin), &quot;Simple Netscape® plug-in that handles test content for WebKit&quot;))
+            enabled = webkit_web_plugin_get_enabled(plugin);
+    }
+    webkit_web_plugin_database_plugins_list_free(pluginList);
+    g_assert(!enabled);
+
+    g_object_unref(view);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/webplugindatabase/getplugins&quot;, test_webkit_web_plugin_database_get_plugins);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebresourcecfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebresourcec"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebresource.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebresource.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebresource.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebresource.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,331 @@
</span><ins>+/*
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;libsoup/soup.h&gt;
+#include &lt;string.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+#define INDEX_HTML &quot;&lt;html&gt;&lt;/html&gt;&quot;
+#define MAIN_HTML &quot;&lt;html&gt;&lt;head&gt;&lt;script language=\&quot;javascript\&quot; src=\&quot;/javascript.js\&quot;&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;hah&lt;/h1&gt;&lt;/html&gt;&quot;
+#define JAVASCRIPT &quot;function blah () { var a = 1; }&quot;
+
+GMainLoop* loop;
+SoupSession *session;
+char *base_uri;
+WebKitWebResource* main_resource;
+WebKitWebResource* sub_resource;
+
+typedef struct {
+    WebKitWebResource* webResource;
+    WebKitWebView* webView;
+} WebResourceFixture;
+
+/* For real request testing */
+static void
+server_callback (SoupServer *server, SoupMessage *msg,
+                 const char *path, GHashTable *query,
+                 SoupClientContext *context, gpointer data)
+{
+    if (msg-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status (msg, SOUP_STATUS_OK);
+
+    /* Redirect */
+    if (g_str_equal (path, &quot;/&quot;)) {
+        soup_message_set_status (msg, SOUP_STATUS_MOVED_PERMANENTLY);
+
+        soup_message_headers_append (msg-&gt;response_headers,
+                                     &quot;Location&quot;, &quot;/index.html&quot;);
+    } else if (g_str_equal (path, &quot;/index.html&quot;)) {
+        soup_message_body_append (msg-&gt;response_body,
+                                  SOUP_MEMORY_COPY,
+                                  INDEX_HTML,
+                                  strlen (INDEX_HTML));
+    } else if (g_str_equal (path, &quot;/main.html&quot;)) {
+        soup_message_body_append (msg-&gt;response_body,
+                                  SOUP_MEMORY_COPY,
+                                  MAIN_HTML,
+                                  strlen (MAIN_HTML));
+    } else if (g_str_equal (path, &quot;/javascript.js&quot;)) {
+        soup_message_body_append (msg-&gt;response_body,
+                                  SOUP_MEMORY_COPY,
+                                  JAVASCRIPT,
+                                  strlen (JAVASCRIPT));
+    }
+
+
+    soup_message_body_complete (msg-&gt;response_body);
+}
+
+static void web_resource_fixture_setup(WebResourceFixture* fixture, gconstpointer data)
+{
+    fixture-&gt;webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(fixture-&gt;webView);
+    const gchar* webData = &quot;&lt;html&gt;&lt;/html&gt;&quot;;
+    fixture-&gt;webResource = webkit_web_resource_new(webData, strlen(webData), &quot;http://example.com/&quot;, &quot;text/html&quot;, &quot;utf8&quot;, &quot;Example.com&quot;);
+    g_assert(fixture-&gt;webResource);
+}
+
+static void web_resource_fixture_teardown(WebResourceFixture* fixture, gconstpointer data)
+{
+    g_assert(fixture-&gt;webResource);
+    g_object_unref(fixture-&gt;webResource);
+    g_object_unref(fixture-&gt;webView);
+}
+
+static void test_webkit_web_resource_get_url(WebResourceFixture* fixture, gconstpointer data)
+{
+    gchar* url;
+    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;uri&quot;, &amp;url, NULL);
+    g_assert_cmpstr(url, ==, &quot;http://example.com/&quot;);
+    g_assert_cmpstr(webkit_web_resource_get_uri(fixture-&gt;webResource) ,==,&quot;http://example.com/&quot;);
+    g_free(url);
+}
+
+static void test_webkit_web_resource_get_data(WebResourceFixture* fixture, gconstpointer data)
+{
+    GString* charData = webkit_web_resource_get_data(fixture-&gt;webResource);
+    g_assert_cmpstr(charData-&gt;str, ==, &quot;&lt;html&gt;&lt;/html&gt;&quot;);
+}
+
+static void test_webkit_web_resource_get_mime_type(WebResourceFixture* fixture, gconstpointer data)
+{
+    gchar* mime_type;
+    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;mime-type&quot;, &amp;mime_type, NULL);
+    g_assert_cmpstr(mime_type, ==, &quot;text/html&quot;);
+    g_assert_cmpstr(webkit_web_resource_get_mime_type(fixture-&gt;webResource),==,&quot;text/html&quot;);
+    g_free(mime_type);
+}
+
+static void test_webkit_web_resource_get_encoding(WebResourceFixture* fixture, gconstpointer data)
+{
+    gchar* text_encoding;
+    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;encoding&quot;, &amp;text_encoding, NULL);
+    g_assert_cmpstr(text_encoding, ==, &quot;utf8&quot;);
+    g_assert_cmpstr(webkit_web_resource_get_encoding(fixture-&gt;webResource),==,&quot;utf8&quot;);
+    g_free(text_encoding);
+}
+
+static void test_webkit_web_resource_get_frame_name(WebResourceFixture* fixture, gconstpointer data)
+{
+    gchar* frame_name;
+    g_object_get(G_OBJECT(fixture-&gt;webResource), &quot;frame-name&quot;, &amp;frame_name, NULL);
+    g_assert_cmpstr(frame_name, ==, &quot;Example.com&quot;);
+    g_assert_cmpstr(webkit_web_resource_get_frame_name(fixture-&gt;webResource),==,&quot;Example.com&quot;);
+    g_free(frame_name);
+}
+
+static void resource_request_starting_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebKitWebResource* web_resource, WebKitNetworkRequest* request, WebKitNetworkResponse* response, gpointer data)
+{
+    gint* been_there = data;
+    *been_there = *been_there + 1;
+
+    if (*been_there == 1) {
+        g_assert(!main_resource);
+        main_resource = g_object_ref(web_resource);
+
+        g_assert_cmpstr(webkit_web_resource_get_uri(web_resource), ==, base_uri);
+
+        /* This should be a redirect, so the response must be NULL */
+        g_assert(!response);
+    } else if (*been_there == 2) {
+        char* uri = g_strdup_printf(&quot;%sindex.html&quot;, base_uri);
+
+        g_assert_cmpstr(webkit_web_resource_get_uri(web_resource), ==, uri);
+
+        /* Cancel the request. */
+        webkit_network_request_set_uri(request, &quot;about:blank&quot;);
+
+        g_free(uri);
+    }
+}
+
+static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
+        gboolean* been_there = data;
+        *been_there = TRUE;
+
+        g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, &quot;about:blank&quot;);
+
+        g_main_loop_quit(loop);
+    }
+}
+
+static void test_web_resource_loading()
+{
+    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    gint been_to_resource_request_starting = 0;
+    gboolean been_to_load_finished = FALSE;
+    WebKitWebFrame* web_frame;
+    WebKitWebDataSource* data_source;
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_object_ref_sink(web_view);
+
+    g_signal_connect(web_view, &quot;resource-request-starting&quot;,
+                     G_CALLBACK(resource_request_starting_cb),
+                     &amp;been_to_resource_request_starting);
+
+    g_signal_connect(web_view, &quot;notify::load-status&quot;,
+                     G_CALLBACK(notify_load_status_cb),
+                     &amp;been_to_load_finished);
+
+    webkit_web_view_load_uri(web_view, base_uri);
+
+    /* We won't get finished immediately, because of the redirect */
+    g_main_loop_run(loop);
+    
+    web_frame = webkit_web_view_get_main_frame(web_view);
+    data_source = webkit_web_frame_get_data_source(web_frame);
+
+    g_assert(main_resource);
+    g_assert(webkit_web_data_source_get_main_resource(data_source) == main_resource);
+    g_object_unref(main_resource);
+    
+    g_assert_cmpint(been_to_resource_request_starting, ==, 2);
+    g_assert_cmpint(been_to_load_finished, ==, TRUE);
+
+    g_object_unref(web_view);
+    g_main_loop_unref(loop);
+}
+
+static void resource_request_starting_sub_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebKitWebResource* web_resource, WebKitNetworkRequest* request, WebKitNetworkResponse* response, gpointer data)
+{
+    if (!main_resource)
+        main_resource = g_object_ref(web_resource);
+    else if (!sub_resource)
+      sub_resource = g_object_ref(web_resource);
+}
+
+static void notify_load_status_sub_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED)
+        g_main_loop_quit(loop);
+}
+
+static gboolean idle_quit_loop_cb(gpointer data)
+{
+    g_main_loop_quit(loop);
+    return FALSE;
+}
+
+static void test_web_resource_sub_resource_loading()
+{
+    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    WebKitWebFrame* web_frame;
+    WebKitWebDataSource* data_source;
+    GList* sub_resources;
+    char* uri = g_strdup_printf(&quot;%smain.html&quot;, base_uri);
+
+    main_resource = NULL;
+    
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_object_ref_sink(web_view);
+
+    g_signal_connect(web_view, &quot;resource-request-starting&quot;,
+                     G_CALLBACK(resource_request_starting_sub_cb),
+                     NULL);
+
+    g_signal_connect(web_view, &quot;notify::load-status&quot;,
+                     G_CALLBACK(notify_load_status_sub_cb),
+                     NULL);
+
+    webkit_web_view_load_uri(web_view, uri);
+
+    g_main_loop_run(loop);
+
+    /* The main resource should be loaded; now let's wait for the sub-resource to load */
+    g_idle_add(idle_quit_loop_cb, NULL);
+    g_main_loop_run(loop);
+    
+    g_assert(main_resource &amp;&amp; sub_resource);
+    g_assert(main_resource != sub_resource);
+
+    web_frame = webkit_web_view_get_main_frame(web_view);
+    data_source = webkit_web_frame_get_data_source(web_frame);
+
+    g_assert(webkit_web_data_source_get_main_resource(data_source) == main_resource);
+    g_object_unref(main_resource);
+
+    sub_resources = webkit_web_data_source_get_subresources(data_source);
+    // Expected resources: javascripts.js, favicon.ico
+    g_assert(sub_resources);
+    g_assert(sub_resources-&gt;next);
+    g_assert(!sub_resources-&gt;next-&gt;next);
+
+    // Test that the object we got from the data source is the same
+    // that went through resource-request-starting. Note that the order is
+    // not important (and not guaranteed since the resources are stored in a
+    // hashtable).
+    g_assert(WEBKIT_WEB_RESOURCE(sub_resources-&gt;data) == sub_resource
+             || WEBKIT_WEB_RESOURCE(sub_resources-&gt;next-&gt;data) == sub_resource);
+
+    g_object_unref(web_view);
+    g_main_loop_unref(loop);
+}
+
+int main(int argc, char** argv)
+{
+    SoupServer* server;
+    SoupURI* soup_uri;
+
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+
+    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
+
+    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(soup_uri, soup_server_get_port(server));
+
+    base_uri = soup_uri_to_string(soup_uri, FALSE);
+    soup_uri_free(soup_uri);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add(&quot;/webkit/webresource/get_url&quot;,
+               WebResourceFixture, 0, web_resource_fixture_setup,
+               test_webkit_web_resource_get_url, web_resource_fixture_teardown);
+    g_test_add(&quot;/webkit/webresource/get_mime_type&quot;,
+               WebResourceFixture, 0, web_resource_fixture_setup,
+               test_webkit_web_resource_get_mime_type, web_resource_fixture_teardown);
+    g_test_add(&quot;/webkit/webresource/get_text_encoding_name&quot;,
+               WebResourceFixture, 0, web_resource_fixture_setup,
+               test_webkit_web_resource_get_encoding, web_resource_fixture_teardown);
+    g_test_add(&quot;/webkit/webresource/get_frame_name&quot;,
+               WebResourceFixture, 0, web_resource_fixture_setup,
+               test_webkit_web_resource_get_frame_name, web_resource_fixture_teardown);
+    g_test_add(&quot;/webkit/webresource/get_data&quot;,
+               WebResourceFixture, 0, web_resource_fixture_setup,
+               test_webkit_web_resource_get_data, web_resource_fixture_teardown);
+
+    g_test_add_func(&quot;/webkit/webresource/loading&quot;, test_web_resource_loading);
+    g_test_add_func(&quot;/webkit/webresource/sub_resource_loading&quot;, test_web_resource_sub_resource_loading);
+
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebsettingscfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebsettingsc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebsettings.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,153 @@
</span><ins>+/*
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;glib.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+/* Private API */
+char* webkitWebSettingsUserAgentForURI(WebKitWebSettings *settings, const char *uri);
+
+static void test_webkit_web_settings_copy(void)
+{
+    WebKitWebSettings *settings = webkit_web_settings_new();
+
+    // Set some non-default settings to verify that settings are properly copied.
+    g_object_set(settings,
+                 &quot;enable-webgl&quot;, TRUE,
+                 &quot;enable-fullscreen&quot;, TRUE,
+                 &quot;auto-load-images&quot;, FALSE,
+                 &quot;default-encoding&quot;, &quot;utf-8&quot;, NULL);
+
+    WebKitWebSettings *copy = webkit_web_settings_copy(settings);
+
+    gboolean enableWebGL = FALSE;
+    gboolean enableFullscreen = FALSE;
+    gboolean autoLoadImages = FALSE;
+    char *defaultEncoding = 0;
+    g_object_get(copy,
+                 &quot;enable-fullscreen&quot;, &amp;enableFullscreen,
+                 &quot;enable-webgl&quot;, &amp;enableWebGL,
+                 &quot;auto-load-images&quot;, &amp;autoLoadImages,
+                 &quot;default-encoding&quot;, &amp;defaultEncoding, NULL);
+
+    g_assert(enableWebGL);
+    g_assert(enableFullscreen);
+    g_assert(!autoLoadImages);
+    g_assert_cmpstr(defaultEncoding, ==, &quot;utf-8&quot;);
+    g_free(defaultEncoding);
+}
+
+static void test_non_quirky_user_agents(WebKitWebSettings *settings, const char *defaultUserAgent)
+{
+    char *userAgent = 0;
+
+    // test a custom UA string
+    userAgent = 0;
+    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
+    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    // setting it to NULL or an empty value should give us the default UA string
+    userAgent = 0;
+    g_object_set(settings, &quot;user-agent&quot;, 0, NULL);
+    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
+    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
+    g_free(userAgent);
+
+    userAgent = 0;
+    g_object_set(settings, &quot;user-agent&quot;, &quot;&quot;, NULL);
+    g_object_get(settings,&quot;user-agent&quot;, &amp;userAgent, NULL);
+    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
+    g_free(userAgent);
+}
+
+static void test_webkit_web_settings_user_agent(void)
+{
+    WebKitWebSettings *settings;
+    GtkWidget *webView;
+    char *defaultUserAgent;
+    char *userAgent = 0;
+    g_test_bug(&quot;17375&quot;);
+
+    webView = webkit_web_view_new();
+    g_object_ref_sink(webView);
+
+    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView));
+    defaultUserAgent = g_strdup(webkit_web_settings_get_user_agent(settings));
+
+    test_non_quirky_user_agents(settings, defaultUserAgent);
+
+    /* Test quirky google domains */
+    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com/&quot;);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://gmail.com/&quot;);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com.br/&quot;);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://calendar.google.com/&quot;);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    /* Now enable quirks handling */
+    g_object_set(settings, &quot;enable-site-specific-quirks&quot;, TRUE, NULL);
+
+    test_non_quirky_user_agents(settings, defaultUserAgent);
+
+    g_object_set(settings, &quot;user-agent&quot;, &quot;testwebsettings/0.1&quot;, NULL);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com/&quot;);
+    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://gmail.com/&quot;);
+    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.com.br/&quot;);
+    g_assert_cmpstr(userAgent, ==, defaultUserAgent);
+    g_free(userAgent);
+
+    userAgent = webkitWebSettingsUserAgentForURI(settings, &quot;http://www.google.uk.not.com.br/&quot;);
+    g_assert_cmpstr(userAgent, ==, &quot;testwebsettings/0.1&quot;);
+    g_free(userAgent);
+
+    g_free(defaultUserAgent);
+    g_object_unref(webView);
+}
+
+int main(int argc, char **argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/websettings/user_agent&quot;, test_webkit_web_settings_user_agent);
+    g_test_add_func(&quot;/webkit/websettings/copy&quot;, test_webkit_web_settings_copy);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwebviewcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwebviewc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebview.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwebview.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebview.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwebview.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,746 @@
</span><ins>+/*
+ * Copyright (C) 2008 Holger Hans Peter Freyther
+ * Copyright (C) 2009, 2010 Collabora Ltd.
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &quot;test_utils.h&quot;
+
+#include &lt;errno.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;string.h&gt;
+
+#include &lt;glib.h&gt;
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gdk/gdk.h&gt;
+#include &lt;gdk/gdkkeysyms.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+GMainLoop* loop;
+SoupSession *session;
+char* base_uri;
+
+/* For real request testing */
+static void
+server_callback(SoupServer* server, SoupMessage* msg,
+                 const char* path, GHashTable* query,
+                 SoupClientContext* context, gpointer data)
+{
+    if (msg-&gt;method != SOUP_METHOD_GET) {
+        soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED);
+        return;
+    }
+
+    soup_message_set_status(msg, SOUP_STATUS_OK);
+
+    if (g_str_equal(path, &quot;/favicon.ico&quot;)) {
+        char* contents;
+        gsize length;
+        GError* error = NULL;
+
+        g_file_get_contents(&quot;blank.ico&quot;, &amp;contents, &amp;length, &amp;error);
+        g_assert(!error);
+
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, length);
+    } else if (g_str_equal(path, &quot;/bigdiv.html&quot;)) {
+        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;&lt;a id=\&quot;link\&quot; href=\&quot;http://abc.def\&quot;&gt;test&lt;/a&gt;&lt;div style=\&quot;background-color: green; height: 1200px;\&quot;&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
+    } else if (g_str_equal(path, &quot;/iframe.html&quot;)) {
+        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body id=\&quot;some-content\&quot;&gt;&lt;div style=\&quot;background-color: green; height: 50px;\&quot;&gt;&lt;/div&gt;&lt;iframe src=\&quot;bigdiv.html\&quot;&gt;&lt;/iframe&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
+    } else {
+        char* contents = g_strdup(&quot;&lt;html&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;&quot;);
+        soup_message_body_append(msg-&gt;response_body, SOUP_MEMORY_TAKE, contents, strlen(contents));
+    }
+
+    soup_message_body_complete(msg-&gt;response_body);
+}
+
+static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED ||
+        webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED)
+        g_main_loop_quit(loop);
+}
+
+static gboolean timeout_cb(gpointer data)
+{
+    g_error(&quot;Didn't get icon-uri before timing out.&quot;);
+    return FALSE;
+}
+
+static void icon_uri_changed_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    char* expected_uri;
+
+    g_assert_cmpstr(g_param_spec_get_name(pspec), ==, &quot;icon-uri&quot;);
+
+    expected_uri = g_strdup_printf(&quot;%sfavicon.ico&quot;, base_uri);
+    g_assert_cmpstr(webkit_web_view_get_icon_uri(web_view), ==, expected_uri);
+    g_free(expected_uri);
+
+    g_main_loop_quit(loop);
+}
+
+static void icon_loaded_cb(WebKitWebView* web_view, char* icon_uri, gpointer data)
+{
+    gboolean* been_here = (gboolean*)data;
+    char* expected_uri = g_strdup_printf(&quot;%sfavicon.ico&quot;, base_uri);
+    g_assert_cmpstr(icon_uri, ==, expected_uri);
+    g_free(expected_uri);
+
+    g_assert_cmpstr(icon_uri, ==, webkit_web_view_get_icon_uri(web_view));
+
+    *been_here = TRUE;
+}
+
+static void test_webkit_web_view_icon_uri()
+{
+    gboolean been_to_icon_loaded = FALSE;
+    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    g_object_ref_sink(G_OBJECT(view));
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_object_connect(G_OBJECT(view),
+                     &quot;signal::notify::icon-uri&quot;, icon_uri_changed_cb, NULL,
+                     &quot;signal::icon-loaded&quot;, icon_loaded_cb, &amp;been_to_icon_loaded,
+                     NULL);
+
+    webkit_web_view_load_uri(view, base_uri);
+
+    guint timeout_id = g_timeout_add(500, timeout_cb, 0);
+
+    g_main_loop_run(loop);
+
+    g_source_remove(timeout_id);
+
+    g_assert(been_to_icon_loaded);
+
+    g_object_unref(view);
+}
+
+static gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
+{
+    GMainLoop* loop = (GMainLoop*)data;
+    g_main_loop_quit(loop);
+
+    return FALSE;
+}
+
+static gboolean quit_after_short_delay_cb(gpointer data)
+{
+    g_main_loop_quit((GMainLoop*)data);
+    return FALSE;
+}
+
+static void test_webkit_web_view_grab_focus()
+{
+    char* uri = g_strconcat(base_uri, &quot;iframe.html&quot;, NULL);
+    GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
+    GtkWidget* scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GtkAdjustment* adjustment;
+
+    gtk_window_set_default_size(GTK_WINDOW(window), 400, 200);
+
+    gtk_container_add(GTK_CONTAINER(window), scrolled_window);
+    gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(view));
+
+    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_signal_connect(view, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
+
+    /* Wait for window to show up */
+    gtk_widget_show_all(window);
+    g_signal_connect(window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), loop);
+    g_main_loop_run(loop);
+
+    /* Load a page with a big div that will cause scrollbars to appear */
+    webkit_web_view_load_uri(view, uri);
+    g_main_loop_run(loop);
+
+    adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
+
+    /* Since webkit_web_view_execute_script does not return a value,
+       it is impossible to know if an inner document has focus after
+       a node of it was focused via .focus() method.
+       The code below is an workaround: if the node has focus, a scroll
+       action is performed and afterward it is checked if the adjustment
+       has to be different from 0.
+    */
+    char script[] = &quot;var innerDoc = document.defaultView.frames[0].document; \
+                     innerDoc.getElementById(\&quot;link\&quot;).focus();              \
+                     if (innerDoc.hasFocus())                                \
+                        window.scrollBy(0, 100);&quot;;
+
+    /* Focus an element using JavaScript */
+    webkit_web_view_execute_script(view, script);
+
+    /* Adjustments update asynchronously, so we must wait a bit. */
+    g_timeout_add(100, quit_after_short_delay_cb, loop);
+    g_main_loop_run(loop);
+
+    /* Make sure the ScrolledWindow noticed the scroll */
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), !=, 0.0);
+
+    g_free(uri);
+    gtk_widget_destroy(window);
+}
+
+static void do_test_webkit_web_view_adjustments(gboolean with_page_cache)
+{
+    char* effective_uri = g_strconcat(base_uri, &quot;bigdiv.html&quot;, NULL);
+    char* second_uri = g_strconcat(base_uri, &quot;iframe.html&quot;, NULL);
+    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    GtkWidget* scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+    WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+    GtkAdjustment* adjustment;
+    double lower;
+    double upper;
+
+    if (with_page_cache) {
+        WebKitWebSettings* settings = webkit_web_view_get_settings(view);
+        g_object_set(settings, &quot;enable-page-cache&quot;, TRUE, NULL);
+    }
+
+    gtk_window_set_default_size(GTK_WINDOW(window), 400, 200);
+
+    gtk_container_add(GTK_CONTAINER(window), scrolled_window);
+    gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(view));
+
+    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_object_connect(G_OBJECT(view),
+                     &quot;signal::notify::load-status&quot;, idle_quit_loop_cb, NULL,
+                     NULL);
+
+    /* Wait for window to show up */
+    gtk_widget_show_all(window);
+    g_signal_connect(window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), loop);
+    g_main_loop_run(loop);
+
+    /* Load a page with a big div that will cause scrollbars to appear */
+    webkit_web_view_load_uri(view, effective_uri);
+    g_main_loop_run(loop);
+
+    /* Adjustments update asynchronously, so we must wait a bit. */
+    g_timeout_add(100, quit_after_short_delay_cb, loop);
+    g_main_loop_run(loop);
+
+    adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
+
+    lower = gtk_adjustment_get_lower(adjustment);
+    upper = gtk_adjustment_get_upper(adjustment);
+
+    /* Scroll the view using JavaScript */
+    webkit_web_view_execute_script(view, &quot;window.scrollBy(0, 100)&quot;);
+
+    /* Adjustments update asynchronously, so we must wait a bit. */
+    g_timeout_add(100, quit_after_short_delay_cb, loop);
+    g_main_loop_run(loop);
+
+    /* Make sure the ScrolledWindow noticed the scroll */
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
+
+    /* Load a second URI */
+    webkit_web_view_load_uri(view, second_uri);
+    g_main_loop_run(loop);
+
+    /* The page loaded but the adjustments may not be updated yet. Wait a bit. */
+    g_timeout_add(100, quit_after_short_delay_cb, loop);
+    g_main_loop_run(loop);
+
+    /* Make sure the scrollbar has been reset */
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 0.0);
+
+    /* Go back */
+    webkit_web_view_go_back(view);
+
+    /* When using page cache, go_back will return syncronously */
+    if (!with_page_cache)
+        g_main_loop_run(loop);
+
+    /* Make sure GTK+ has time to process the changes in size, for the adjusments */
+    while (gtk_events_pending())
+        gtk_main_iteration();
+
+    /* Make sure upper and lower bounds have been restored correctly */
+    g_assert_cmpfloat(lower, ==, gtk_adjustment_get_lower(adjustment));
+    g_assert_cmpfloat(upper, ==, gtk_adjustment_get_upper(adjustment));
+    g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
+
+    g_free(effective_uri);
+    g_free(second_uri);
+
+    gtk_widget_destroy(window);
+}
+
+static void test_webkit_web_view_adjustments()
+{
+    /* Test this with page cache disabled, and enabled. */
+    do_test_webkit_web_view_adjustments(FALSE);
+    do_test_webkit_web_view_adjustments(TRUE);
+}
+
+gboolean delayed_destroy(gpointer data)
+{
+    gtk_widget_destroy(GTK_WIDGET(data));
+    g_main_loop_quit(loop);
+    return FALSE;
+}
+
+static void test_webkit_web_view_destroy()
+{
+    GtkWidget* window;
+    GtkWidget* web_view;
+
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    web_view = webkit_web_view_new();
+
+    gtk_container_add(GTK_CONTAINER(window), web_view);
+
+    gtk_widget_show_all(window);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_signal_connect(window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), loop);
+    g_main_loop_run(loop);
+
+    g_idle_add(delayed_destroy, web_view);
+    g_main_loop_run(loop);
+
+    gtk_widget_destroy(window);
+}
+
+static void test_webkit_web_view_window_features()
+{
+    GtkWidget* window;
+    GtkWidget* web_view;
+    
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    web_view = webkit_web_view_new();
+    
+    gtk_container_add(GTK_CONTAINER(window), web_view);
+    
+    gtk_widget_show_all(window);
+    
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_signal_connect(window, &quot;map-event&quot;,
+                     G_CALLBACK(map_event_cb), loop);
+    g_main_loop_run(loop);
+    
+    /* Bug #36144 */
+    g_object_set(G_OBJECT(web_view), &quot;window-features&quot;, NULL, NULL);
+    
+    gtk_widget_destroy(window);
+}    
+
+static void test_webkit_web_view_in_offscreen_window_does_not_crash()
+{
+    loop = g_main_loop_new(NULL, TRUE);
+
+    GtkWidget *window = gtk_offscreen_window_new();
+    GtkWidget *web_view = webkit_web_view_new();
+
+    gtk_container_add(GTK_CONTAINER(window), web_view);
+    gtk_widget_show_all(window);
+    g_signal_connect(web_view, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
+    webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), base_uri);
+
+    g_main_loop_run(loop);
+
+    gtk_widget_destroy(window);
+    g_main_loop_unref(loop);
+}
+
+static void test_webkit_web_view_does_not_steal_focus()
+{
+    loop = g_main_loop_new(NULL, TRUE);
+
+    GtkWidget *window = gtk_offscreen_window_new();
+    GtkWidget *webView = webkit_web_view_new();
+    GtkWidget *entry = gtk_entry_new();
+
+#ifdef GTK_API_VERSION_2
+    GtkWidget *box = gtk_hbox_new(FALSE, 0);
+#else
+    GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+#endif
+
+    gtk_container_add(GTK_CONTAINER(box), webView);
+    gtk_container_add(GTK_CONTAINER(box), entry);
+    gtk_container_add(GTK_CONTAINER(window), box);
+    gtk_widget_show_all(window);
+
+    gtk_widget_grab_focus(entry);
+    g_assert(gtk_widget_is_focus(entry));
+
+    g_signal_connect(webView, &quot;notify::load-status&quot;, G_CALLBACK(idle_quit_loop_cb), NULL);
+    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
+        &quot;&lt;html&gt;&lt;body&gt;&quot;
+        &quot;    &lt;input id=\&quot;entry\&quot; type=\&quot;text\&quot;/&gt;&quot;
+        &quot;    &lt;script&gt;&quot;
+        &quot;        document.getElementById(\&quot;entry\&quot;).focus();&quot;
+        &quot;    &lt;/script&gt;&quot;
+        &quot;&lt;/body&gt;&lt;/html&gt;&quot;, &quot;file://&quot;);
+
+    g_main_loop_run(loop);
+
+    g_assert(gtk_widget_is_focus(entry));
+
+    gtk_widget_destroy(window);
+    g_main_loop_unref(loop);
+}
+
+static gboolean emitKeyStroke(WebKitWebView* webView)
+{
+    GdkEvent* pressEvent = gdk_event_new(GDK_KEY_PRESS);
+    pressEvent-&gt;key.keyval = GDK_KEY_f;
+    GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(webView));
+    pressEvent-&gt;key.window = window;
+    g_object_ref(pressEvent-&gt;key.window);
+
+#ifndef GTK_API_VERSION_2
+    GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(window));
+    gdk_event_set_device(pressEvent, gdk_device_manager_get_client_pointer(manager));
+#endif
+
+    // When synthesizing an event, an invalid hardware_keycode value
+    // can cause it to be badly processed by Gtk+.
+    GdkKeymapKey* keys;
+    gint n_keys;
+    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), GDK_KEY_f, &amp;keys, &amp;n_keys)) {
+        pressEvent-&gt;key.hardware_keycode = keys[0].keycode;
+        g_free(keys);
+    }
+
+    GdkEvent* releaseEvent = gdk_event_copy(pressEvent);
+    gtk_main_do_event(pressEvent);
+    gdk_event_free(pressEvent);
+    releaseEvent-&gt;key.type = GDK_KEY_RELEASE;
+    gtk_main_do_event(releaseEvent);
+    gdk_event_free(releaseEvent);
+
+    return FALSE;
+}
+
+static gboolean entering_fullscreen_cb(WebKitWebView* webView, GObject* element, gboolean blocked)
+{
+    if (blocked)
+        g_main_loop_quit(loop);
+    else
+        g_timeout_add(200, (GSourceFunc) emitKeyStroke, webView);
+    return blocked;
+}
+
+static gboolean leaving_fullscreen_cb(WebKitWebView* webView, GObject* element, gpointer data)
+{
+    g_main_loop_quit(loop);
+    return FALSE;
+}
+
+static void test_webkit_web_view_fullscreen(gconstpointer blocked)
+{
+    GtkWidget* window;
+    GtkWidget* web_view;
+    WebKitWebSettings *settings;
+
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    web_view = webkit_web_view_new();
+
+    settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(web_view));
+    g_object_set(settings, &quot;enable-fullscreen&quot;, TRUE, NULL);
+    webkit_web_view_set_settings(WEBKIT_WEB_VIEW(web_view), settings);
+
+    gtk_container_add(GTK_CONTAINER(window), web_view);
+
+    gtk_widget_show_all(window);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    g_signal_connect(web_view, &quot;entering-fullscreen&quot;, G_CALLBACK(entering_fullscreen_cb), (gpointer) blocked);
+    g_signal_connect(web_view, &quot;leaving-fullscreen&quot;, G_CALLBACK(leaving_fullscreen_cb), NULL);
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(web_view), &quot;&lt;html&gt;&lt;body&gt;&quot;
+                   &quot;&lt;script&gt;&quot;
+                   &quot;var eventName = 'keypress';&quot;
+                   &quot;document.addEventListener(eventName, function () {&quot;
+                   &quot;    document.documentElement.webkitRequestFullScreen();&quot;
+                   &quot;}, false);&quot;
+                   &quot;&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;&quot;, NULL, NULL, NULL);
+
+    g_timeout_add(100, (GSourceFunc) emitKeyStroke, WEBKIT_WEB_VIEW(web_view));
+    g_main_loop_run(loop);
+
+    gtk_widget_destroy(window);
+}
+
+static gboolean checkMimeTypeForFilter(GtkFileFilter* filter, const gchar* mimeType)
+{
+    GtkFileFilterInfo filter_info;
+    filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
+    filter_info.mime_type = mimeType;
+    return gtk_file_filter_filter(filter, &amp;filter_info);
+}
+
+static gboolean runFileChooserCbNoMultiselNoMime(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
+{
+    g_assert(!webkit_file_chooser_request_get_select_multiple(request));
+
+    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
+    g_assert(!mimeTypes);
+    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
+    g_assert(!filter);
+
+    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
+    g_assert(!selectedFiles);
+
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+static gboolean runFileChooserCbMultiselNoMime(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
+{
+    g_assert(webkit_file_chooser_request_get_select_multiple(request));
+
+    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
+    g_assert(!mimeTypes);
+    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
+    g_assert(!filter);
+    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
+    g_assert(!selectedFiles);
+
+    // Select some files.
+    const gchar* filesToSelect[4] = { &quot;/foo&quot;, &quot;/foo/bar&quot;, &quot;/foo/bar/baz&quot;, 0 };
+    webkit_file_chooser_request_select_files(request, filesToSelect);
+
+    // Check the files that have been just selected.
+    selectedFiles = webkit_file_chooser_request_get_selected_files(request);
+    g_assert(selectedFiles);
+    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
+    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
+    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
+    g_assert(!selectedFiles[3]);
+
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+static gboolean runFileChooserCbSelectionRetained(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
+{
+    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
+    g_assert(selectedFiles);
+    g_assert_cmpstr(selectedFiles[0], ==, &quot;/foo&quot;);
+    g_assert_cmpstr(selectedFiles[1], ==, &quot;/foo/bar&quot;);
+    g_assert_cmpstr(selectedFiles[2], ==, &quot;/foo/bar/baz&quot;);
+    g_assert(!selectedFiles[3]);
+
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+static gboolean runFileChooserCbNoMultiselAcceptTypes(WebKitWebView* webview, WebKitFileChooserRequest* request, gpointer data)
+{
+    g_assert(!webkit_file_chooser_request_get_select_multiple(request));
+
+    const gchar* const* mimeTypes = webkit_file_chooser_request_get_mime_types(request);
+    g_assert(mimeTypes);
+    g_assert_cmpstr(mimeTypes[0], ==, &quot;audio/*&quot;);
+    g_assert_cmpstr(mimeTypes[1], ==, &quot;video/*&quot;);
+    g_assert_cmpstr(mimeTypes[2], ==, &quot;image/*&quot;);
+    g_assert(!mimeTypes[3]);
+
+    GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request);
+    g_assert(GTK_IS_FILE_FILTER(filter));
+    g_assert(checkMimeTypeForFilter(filter, &quot;audio/*&quot;));
+    g_assert(checkMimeTypeForFilter(filter, &quot;video/*&quot;));
+    g_assert(checkMimeTypeForFilter(filter, &quot;image/*&quot;));
+
+    const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request);
+    g_assert(!selectedFiles);
+
+    g_main_loop_quit(loop);
+    return TRUE;
+}
+
+void doMouseButtonEvent(GtkWidget* widget, GdkEventType eventType, int x, int y, unsigned int button, unsigned int modifiers)
+{
+    g_assert(gtk_widget_get_realized(widget));
+
+    GdkEvent* event = gdk_event_new(eventType);
+    event-&gt;button.window = gtk_widget_get_window(widget);
+    g_object_ref(event-&gt;button.window);
+
+    event-&gt;button.time = GDK_CURRENT_TIME;
+    event-&gt;button.x = x;
+    event-&gt;button.y = y;
+    event-&gt;button.axes = 0;
+    event-&gt;button.state = modifiers;
+    event-&gt;button.button = button;
+
+#ifndef GTK_API_VERSION_2
+    event-&gt;button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(widget)));
+#endif
+
+    int xRoot, yRoot;
+    gdk_window_get_root_coords(gtk_widget_get_window(widget), x, y, &amp;xRoot, &amp;yRoot);
+    event-&gt;button.x_root = xRoot;
+    event-&gt;button.y_root = yRoot;
+    gtk_main_do_event(event);
+}
+
+static void clickMouseButton(GtkWidget* widget, int x, int y, unsigned int button, unsigned int modifiers)
+{
+    doMouseButtonEvent(widget, GDK_BUTTON_PRESS, x, y, button, modifiers);
+    doMouseButtonEvent(widget, GDK_BUTTON_RELEASE, x, y, button, modifiers);
+}
+
+static gboolean clickMouseButtonAndWaitForFileChooserRequest(WebKitWebView* webView)
+{
+    clickMouseButton(GTK_WIDGET(webView), 5, 5, 1, 0);
+    return TRUE;
+}
+
+static void test_webkit_web_view_file_chooser()
+{
+    const gchar* htmlFormatBase = &quot;&lt;html&gt;&lt;body&gt;&quot;
+            &quot;&lt;input style='position:absolute;left:0;top:0;margin:0;padding:0' type='file' %s/&gt;&quot;
+            &quot;&lt;/body&gt;&lt;/html&gt;&quot;;
+
+    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    GtkWidget* webView = webkit_web_view_new();
+    gtk_container_add(GTK_CONTAINER(window), webView);
+    gtk_widget_show_all(window);
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    // Multiple selections not allowed, no MIME filtering.
+    gulong handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbNoMultiselNoMime), NULL);
+    gchar* htmlFormat = g_strdup_printf(htmlFormatBase, &quot;&quot;);
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
+    g_free(htmlFormat);
+
+    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
+    g_main_loop_run(loop);
+
+    g_signal_handler_disconnect(webView, handler);
+
+    // Multiple selections allowed, no MIME filtering, some pre-selected files.
+    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbMultiselNoMime), NULL);
+    htmlFormat = g_strdup_printf(htmlFormatBase, &quot;multiple&quot;);
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
+    g_free(htmlFormat);
+
+    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
+    g_main_loop_run(loop);
+
+    g_signal_handler_disconnect(webView, handler);
+
+    // Perform another request to check if the list of files selected
+    // in the previous step appears now as part of the new request.
+    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbSelectionRetained), NULL);
+    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
+    g_main_loop_run(loop);
+
+    g_signal_handler_disconnect(webView, handler);
+
+    // Multiple selections not allowed, only accept images, audio and video files.
+    handler = g_signal_connect(webView, &quot;run-file-chooser&quot;, G_CALLBACK(runFileChooserCbNoMultiselAcceptTypes), NULL);
+    htmlFormat = g_strdup_printf(htmlFormatBase, &quot;accept='audio/*,video/*,image/*'&quot;);
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), htmlFormat, NULL, NULL, NULL);
+    g_free(htmlFormat);
+
+    g_timeout_add(100, (GSourceFunc) clickMouseButtonAndWaitForFileChooserRequest, WEBKIT_WEB_VIEW(webView));
+    g_main_loop_run(loop);
+
+    g_signal_handler_disconnect(webView, handler);
+    gtk_widget_destroy(window);
+}
+
+static void test_webkit_web_view_source_mode()
+{
+    GtkWidget* web_view;
+
+    web_view = webkit_web_view_new();
+
+    webkit_web_view_load_string(WEBKIT_WEB_VIEW(web_view), &quot;&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;&quot;, NULL, NULL, NULL);
+
+    g_assert(!webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
+
+    webkit_web_view_set_view_source_mode(WEBKIT_WEB_VIEW(web_view), TRUE);
+
+    g_assert(webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
+
+    webkit_web_view_set_view_source_mode(WEBKIT_WEB_VIEW(web_view), FALSE);
+
+    g_assert(!webkit_web_view_get_view_source_mode(WEBKIT_WEB_VIEW(web_view)));
+
+    gtk_widget_destroy(web_view);
+}
+
+int main(int argc, char** argv)
+{
+    SoupServer* server;
+    SoupURI* soup_uri;
+
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    /* Hopefully make test independent of the path it's called from. */
+    testutils_relative_chdir(&quot;Tools/TestWebKitAPI/Tests/WebKitGtk/resources/test.html&quot;, argv[0]);
+
+    server = soup_server_new(SOUP_SERVER_PORT, 0, NULL);
+    soup_server_run_async(server);
+
+    soup_server_add_handler(server, NULL, server_callback, NULL, NULL);
+
+    soup_uri = soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(soup_uri, soup_server_get_port(server));
+
+    base_uri = soup_uri_to_string(soup_uri, FALSE);
+    soup_uri_free(soup_uri);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/webview/icon-uri&quot;, test_webkit_web_view_icon_uri);
+    g_test_add_func(&quot;/webkit/webview/adjustments&quot;, test_webkit_web_view_adjustments);
+    g_test_add_func(&quot;/webkit/webview/destroy&quot;, test_webkit_web_view_destroy);
+    g_test_add_func(&quot;/webkit/webview/grab_focus&quot;, test_webkit_web_view_grab_focus);
+    g_test_add_func(&quot;/webkit/webview/window-features&quot;, test_webkit_web_view_window_features);
+    g_test_add_func(&quot;/webkit/webview/webview-in-offscreen-window-does-not-crash&quot;, test_webkit_web_view_in_offscreen_window_does_not_crash);
+    g_test_add_func(&quot;/webkit/webview/webview-does-not-steal-focus&quot;, test_webkit_web_view_does_not_steal_focus);
+    g_test_add_data_func(&quot;/webkit/webview/fullscreen&quot;, GINT_TO_POINTER(FALSE), test_webkit_web_view_fullscreen);
+    g_test_add_data_func(&quot;/webkit/webview/fullscreen-blocked&quot;, GINT_TO_POINTER(TRUE), test_webkit_web_view_fullscreen);
+    g_test_add_func(&quot;/webkit/webview/file-chooser&quot;, test_webkit_web_view_file_chooser);
+    g_test_add_func(&quot;/webkit/webview/source-mode&quot;, test_webkit_web_view_source_mode);
+
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPITestsWebKitGtktestwindowcfromrev162335releasesWebKitGTKwebkit22SourceWebKitgtkteststestwindowc"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwindow.c (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit/gtk/tests/testwindow.c) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwindow.c                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/Tests/WebKitGtk/testwindow.c        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,119 @@
</span><ins>+/*
+ * Copyright (C) 2009 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;autotoolsconfig.h&quot;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit/webkit.h&gt;
+
+static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data)
+{
+    if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) {
+        GMainLoop* loop = (GMainLoop*)data;
+
+        g_main_loop_quit(loop);
+    }
+}
+
+static void test_webkit_window_scrollbar_policy(void)
+{
+    GMainLoop* loop;
+    GtkWidget* scrolledWindow;
+    GtkWidget* webView;
+    WebKitWebFrame* mainFrame;
+    GtkPolicyType horizontalPolicy;
+    GtkPolicyType verticalPolicy;
+
+    loop = g_main_loop_new(NULL, TRUE);
+
+    scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
+    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
+                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+    webView = webkit_web_view_new();
+    g_object_ref_sink(webView);
+
+    g_signal_connect(webView, &quot;notify::load-status&quot;,
+                     G_CALLBACK(notify_load_status_cb), loop);
+
+    gtk_container_add(GTK_CONTAINER(scrolledWindow), webView);
+
+    mainFrame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(webView));
+
+    /* Test we correctly apply policy for not having scrollbars; This
+     * case is special, because we turn the policy from NEVER to
+     * AUTOMATIC, since we cannot easily represent the same thing
+     * using GtkScrolledWindow */
+    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
+                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'hidden';&lt;/script&gt;&lt;/html&gt;&quot;,
+                                     &quot;file://&quot;);
+
+    g_main_loop_run(loop);
+
+    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
+                                   &amp;horizontalPolicy, &amp;verticalPolicy);
+
+    g_assert(horizontalPolicy == GTK_POLICY_AUTOMATIC);
+    g_assert(verticalPolicy == GTK_POLICY_AUTOMATIC);
+
+    g_assert(GTK_POLICY_NEVER == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
+    g_assert(GTK_POLICY_NEVER == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
+
+    /* Test we correctly apply policy for always having scrollbars */
+    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
+                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'scroll';&lt;/script&gt;&lt;/html&gt;&quot;,
+                                     &quot;file://&quot;);
+
+    g_main_loop_run(loop);
+
+    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
+                                   &amp;horizontalPolicy, &amp;verticalPolicy);
+
+    g_assert(horizontalPolicy == GTK_POLICY_ALWAYS);
+    g_assert(verticalPolicy == GTK_POLICY_ALWAYS);
+
+    g_assert(horizontalPolicy == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
+    g_assert(verticalPolicy == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
+
+    /* Test we correctly apply policy for having scrollbars when needed */
+    webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
+                                     &quot;&lt;html&gt;&lt;body&gt;WebKit!&lt;/body&gt;&lt;script&gt;document.getElementsByTagName('body')[0].style.overflow = 'auto';&lt;/script&gt;&lt;/html&gt;&quot;,
+                                     &quot;file://&quot;);
+
+    g_main_loop_run(loop);
+
+    gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(scrolledWindow),
+                                   &amp;horizontalPolicy, &amp;verticalPolicy);
+
+    g_assert(horizontalPolicy == GTK_POLICY_AUTOMATIC);
+    g_assert(verticalPolicy == GTK_POLICY_AUTOMATIC);
+
+    g_assert(horizontalPolicy == webkit_web_frame_get_horizontal_scrollbar_policy(mainFrame));
+    g_assert(verticalPolicy == webkit_web_frame_get_vertical_scrollbar_policy(mainFrame));
+
+    g_object_unref(webView);
+}
+
+int main(int argc, char** argv)
+{
+    gtk_test_init(&amp;argc, &amp;argv, NULL);
+
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+    g_test_add_func(&quot;/webkit/window/scrollbar_policy&quot;, test_webkit_window_scrollbar_policy);
+    return g_test_run ();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,207 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;LoadTrackingTest.h&quot;
+
+#include &lt;webkit2/webkit2.h&gt;
+
+static void loadChangedCallback(WebKitWebView* webView, WebKitLoadEvent loadEvent, LoadTrackingTest* test)
+{
+    switch (loadEvent) {
+    case WEBKIT_LOAD_STARTED:
+        g_assert(webkit_web_view_is_loading(webView));
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
+        test-&gt;provisionalLoadStarted();
+        break;
+    case WEBKIT_LOAD_REDIRECTED:
+        g_assert(webkit_web_view_is_loading(webView));
+        test-&gt;m_activeURI = webkit_web_view_get_uri(webView);
+        if (!test-&gt;m_redirectURI.isNull())
+            g_assert_cmpstr(test-&gt;m_redirectURI.data(), ==, test-&gt;m_activeURI.data());
+        test-&gt;provisionalLoadReceivedServerRedirect();
+        break;
+    case WEBKIT_LOAD_COMMITTED: {
+        g_assert(webkit_web_view_is_loading(webView));
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
+
+        // Check that on committed we always have a main resource with a response.
+        WebKitWebResource* resource = webkit_web_view_get_main_resource(webView);
+        g_assert(resource);
+        g_assert(webkit_web_resource_get_response(resource));
+
+        test-&gt;loadCommitted();
+        break;
+    }
+    case WEBKIT_LOAD_FINISHED:
+        g_assert(!webkit_web_view_is_loading(webView));
+        if (!test-&gt;m_loadFailed)
+            g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
+        test-&gt;loadFinished();
+        break;
+    default:
+        g_assert_not_reached();
+    }
+}
+
+static void loadFailedCallback(WebKitWebView* webView, WebKitLoadEvent loadEvent, const char* failingURI, GError* error, LoadTrackingTest* test)
+{
+    test-&gt;m_loadFailed = true;
+    test-&gt;m_error.set(g_error_copy(error));
+
+    switch (loadEvent) {
+    case WEBKIT_LOAD_STARTED:
+        g_assert(!webkit_web_view_is_loading(webView));
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
+        g_assert(error);
+        test-&gt;provisionalLoadFailed(failingURI, error);
+        break;
+    case WEBKIT_LOAD_COMMITTED:
+        g_assert(!webkit_web_view_is_loading(webView));
+        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
+        g_assert(error);
+        test-&gt;loadFailed(failingURI, error);
+        break;
+    default:
+        g_assert_not_reached();
+    }
+}
+
+static void estimatedProgressChangedCallback(GObject*, GParamSpec*, LoadTrackingTest* test)
+{
+    test-&gt;estimatedProgressChanged();
+}
+
+LoadTrackingTest::LoadTrackingTest()
+    : m_runLoadUntilCompletion(false)
+    , m_loadFailed(false)
+{
+    g_signal_connect(m_webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), this);
+    g_signal_connect(m_webView, &quot;load-failed&quot;, G_CALLBACK(loadFailedCallback), this);
+    g_signal_connect(m_webView, &quot;notify::estimated-load-progress&quot;, G_CALLBACK(estimatedProgressChangedCallback), this);
+
+    g_assert(!webkit_web_view_get_uri(m_webView));
+}
+
+LoadTrackingTest::~LoadTrackingTest()
+{
+    g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
+}
+
+void LoadTrackingTest::waitUntilLoadFinished()
+{
+    m_estimatedProgress = 0;
+    m_runLoadUntilCompletion = true;
+    g_main_loop_run(m_mainLoop);
+}
+
+void LoadTrackingTest::provisionalLoadStarted()
+{
+    m_loadEvents.append(ProvisionalLoadStarted);
+}
+
+void LoadTrackingTest::provisionalLoadReceivedServerRedirect()
+{
+    m_loadEvents.append(ProvisionalLoadReceivedServerRedirect);
+}
+
+void LoadTrackingTest::provisionalLoadFailed(const gchar* failingURI, GError* error)
+{
+    m_loadEvents.append(ProvisionalLoadFailed);
+}
+
+void LoadTrackingTest::loadCommitted()
+{
+    m_loadEvents.append(LoadCommitted);
+}
+
+void LoadTrackingTest::loadFinished()
+{
+    m_loadEvents.append(LoadFinished);
+    if (m_runLoadUntilCompletion)
+        g_main_loop_quit(m_mainLoop);
+}
+
+void LoadTrackingTest::loadFailed(const gchar* failingURI, GError* error)
+{
+    m_loadEvents.append(LoadFailed);
+}
+
+void LoadTrackingTest::estimatedProgressChanged()
+{
+    double progress = webkit_web_view_get_estimated_load_progress(m_webView);
+    g_assert_cmpfloat(m_estimatedProgress, &lt;, progress);
+    m_estimatedProgress = progress;
+}
+
+void LoadTrackingTest::loadURI(const char* uri)
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::loadURI(uri);
+}
+
+void LoadTrackingTest::loadHtml(const char* html, const char* baseURI)
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::loadHtml(html, baseURI);
+}
+
+void LoadTrackingTest::loadPlainText(const char* plainText)
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::loadPlainText(plainText);
+}
+
+void LoadTrackingTest::loadRequest(WebKitURIRequest* request)
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::loadRequest(request);
+}
+
+void LoadTrackingTest::reload()
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    webkit_web_view_reload(m_webView);
+}
+
+void LoadTrackingTest::goBack()
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::goBack();
+}
+
+void LoadTrackingTest::goForward()
+{
+    m_loadEvents.clear();
+    m_estimatedProgress = 0;
+    m_error.clear();
+    WebViewTest::goForward();
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTesthfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsLoadTrackingTesth"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef LoadTrackingTest_h
+#define LoadTrackingTest_h
+
+#include &quot;TestMain.h&quot;
+#include &quot;WebViewTest.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+class LoadTrackingTest : public WebViewTest {
+public:
+    MAKE_GLIB_TEST_FIXTURE(LoadTrackingTest);
+    LoadTrackingTest();
+    virtual ~LoadTrackingTest();
+    void waitUntilLoadFinished();
+
+    virtual void provisionalLoadStarted();
+    virtual void provisionalLoadReceivedServerRedirect();
+    virtual void provisionalLoadFailed(const gchar* failingURI, GError*);
+    virtual void loadCommitted();
+    virtual void loadFinished();
+    virtual void loadFailed(const char* failingURI, GError*);
+    virtual void estimatedProgressChanged();
+
+    void loadURI(const char* uri);
+    void loadHtml(const char* html, const char* baseURI);
+    void loadPlainText(const char* plainText);
+    void loadRequest(WebKitURIRequest*);
+    void reload();
+    void goBack();
+    void goForward();
+
+    void setRedirectURI(const char* uri) { m_redirectURI = uri; }
+
+    enum LoadEvents {
+        ProvisionalLoadStarted,
+        ProvisionalLoadReceivedServerRedirect,
+        ProvisionalLoadFailed,
+        LoadCommitted,
+        LoadFinished,
+        LoadFailed
+    };
+    bool m_runLoadUntilCompletion;
+    bool m_loadFailed;
+    GOwnPtr&lt;GError&gt; m_error;
+    Vector&lt;LoadEvents&gt; m_loadEvents;
+    float m_estimatedProgress;
+    CString m_redirectURI;
+};
+
+#endif // LoadTrackingTest_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkTestMaincppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMaincpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;TestMain.h&quot;
+
+#include &lt;glib/gstdio.h&gt;
+#include &lt;gtk/gtk.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+void beforeAll();
+void afterAll();
+
+static void registerGResource(void)
+{
+    GOwnPtr&lt;char&gt; resourcesPath(g_build_filename(WEBKIT_EXEC_PATH, &quot;TestWebKitAPI&quot;, &quot;WebKit2Gtk&quot;, &quot;resources&quot;, &quot;webkit2gtk-tests-resources.gresource&quot;, NULL));
+    GResource* resource = g_resource_load(resourcesPath.get(), 0);
+    g_assert(resource);
+
+    g_resources_register(resource);
+    g_resource_unref(resource);
+}
+
+static void removeNonEmptyDirectory(const char* directoryPath)
+{
+    GDir* directory = g_dir_open(directoryPath, 0, 0);
+    g_assert(directory);
+    const char* fileName;
+    while ((fileName = g_dir_read_name(directory))) {
+        GOwnPtr&lt;char&gt; filePath(g_build_filename(directoryPath, fileName, NULL));
+        g_unlink(filePath.get());
+    }
+    g_dir_close(directory);
+    g_rmdir(directoryPath);
+}
+
+int main(int argc, char** argv)
+{
+    g_unsetenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;);
+    gtk_test_init(&amp;argc, &amp;argv, 0);
+    g_setenv(&quot;WEBKIT_EXEC_PATH&quot;, WEBKIT_EXEC_PATH, FALSE);
+    g_setenv(&quot;WEBKIT_INJECTED_BUNDLE_PATH&quot;, WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
+    g_setenv(&quot;LC_ALL&quot;, &quot;C&quot;, TRUE);
+    g_setenv(&quot;GIO_USE_VFS&quot;, &quot;local&quot;, TRUE);
+    g_setenv(&quot;GSETTINGS_BACKEND&quot;, &quot;memory&quot;, TRUE);
+    g_test_bug_base(&quot;https://bugs.webkit.org/&quot;);
+
+    registerGResource();
+
+    GOwnPtr&lt;char&gt; diskCacheTempDirectory(g_dir_make_tmp(&quot;WebKit2TestsDiskCache-XXXXXX&quot;, 0));
+    g_assert(diskCacheTempDirectory.get());
+    webkit_web_context_set_disk_cache_directory(webkit_web_context_get_default(), diskCacheTempDirectory.get());
+
+    beforeAll();
+    int returnValue = g_test_run();
+    afterAll();
+
+    removeNonEmptyDirectory(diskCacheTempDirectory.get());
+
+    return returnValue;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkTestMainhfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsTestMainh"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef TestMain_h
+#define TestMain_h
+
+#include &lt;cairo.h&gt;
+#include &lt;glib-object.h&gt;
+#include &lt;wtf/HashSet.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+#define MAKE_GLIB_TEST_FIXTURE(ClassName) \
+    static void setUp(ClassName* fixture, gconstpointer data) \
+    { \
+        new (fixture) ClassName; \
+    } \
+    static void tearDown(ClassName* fixture, gconstpointer data) \
+    { \
+        fixture-&gt;~ClassName(); \
+    } \
+    static void add(const char* suiteName, const char* testName, void (*testFunc)(ClassName*, const void*)) \
+    { \
+        GOwnPtr&lt;gchar&gt; testPath(g_strdup_printf(&quot;/webkit2/%s/%s&quot;, suiteName, testName)); \
+        g_test_add(testPath.get(), ClassName, 0, ClassName::setUp, testFunc, ClassName::tearDown); \
+    }
+
+#define ASSERT_CMP_CSTRING(s1, cmp, s2) \
+    do {                                                                 \
+        CString __s1 = (s1);                                             \
+        CString __s2 = (s2);                                             \
+        if (g_strcmp0(__s1.data(), __s2.data()) cmp 0) ;                 \
+        else                                                             \
+            g_assertion_message_cmpstr(G_LOG_DOMAIN, __FILE__, __LINE__, \
+                G_STRFUNC, #s1 &quot; &quot; #cmp &quot; &quot; #s2, __s1.data(), #cmp, __s2.data()); \
+    } while (0)
+
+
+class Test {
+public:
+    MAKE_GLIB_TEST_FIXTURE(Test);
+
+    ~Test()
+    {
+        if (m_watchedObjects.isEmpty())
+            return;
+
+        g_print(&quot;Leaked objects:&quot;);
+        HashSet&lt;GObject*&gt;::const_iterator end = m_watchedObjects.end();
+        for (HashSet&lt;GObject*&gt;::const_iterator it = m_watchedObjects.begin(); it != end; ++it)
+            g_print(&quot; %s(%p)&quot;, g_type_name_from_instance(reinterpret_cast&lt;GTypeInstance*&gt;(*it)), *it);
+        g_print(&quot;\n&quot;);
+
+        g_assert(m_watchedObjects.isEmpty());
+    }
+
+    static void objectFinalized(Test* test, GObject* finalizedObject)
+    {
+        test-&gt;m_watchedObjects.remove(finalizedObject);
+    }
+
+    void assertObjectIsDeletedWhenTestFinishes(GObject* object)
+    {
+        m_watchedObjects.add(object);
+        g_object_weak_ref(object, reinterpret_cast&lt;GWeakNotify&gt;(objectFinalized), this);
+    }
+
+    static CString getWebKit1TestResoucesDir()
+    {
+        GOwnPtr&lt;char&gt; resourcesDir(g_build_filename(WEBKIT_SRC_DIR, &quot;Tools&quot;, &quot;TestWebKitAPI&quot;, &quot;Tests&quot;, &quot;WebKitGtk&quot;, &quot;resources&quot;, NULL));
+        return resourcesDir.get();
+    }
+
+    static CString getResourcesDir()
+    {
+        GOwnPtr&lt;char&gt; resourcesDir(g_build_filename(WEBKIT_SRC_DIR, &quot;Tools&quot;, &quot;TestWebKitAPI&quot;, &quot;Tests&quot;, &quot;WebKit2Gtk&quot;, &quot;resources&quot;, NULL));
+        return resourcesDir.get();
+    }
+
+    void addLogFatalFlag(unsigned flag)
+    {
+        unsigned fatalMask = g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(G_LOG_FATAL_MASK));
+        fatalMask |= flag;
+        g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(fatalMask));
+    }
+
+    void removeLogFatalFlag(unsigned flag)
+    {
+        unsigned fatalMask = g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(G_LOG_FATAL_MASK));
+        fatalMask &amp;= ~flag;
+        g_log_set_always_fatal(static_cast&lt;GLogLevelFlags&gt;(fatalMask));
+    }
+
+    static bool cairoSurfacesEqual(cairo_surface_t* s1, cairo_surface_t* s2)
+    {
+        return (cairo_image_surface_get_format(s1) == cairo_image_surface_get_format(s2)
+            &amp;&amp; cairo_image_surface_get_width(s1) == cairo_image_surface_get_width(s2)
+            &amp;&amp; cairo_image_surface_get_height(s1) == cairo_image_surface_get_height(s2)
+            &amp;&amp; cairo_image_surface_get_stride(s1) == cairo_image_surface_get_stride(s2)
+            &amp;&amp; !memcmp(const_cast&lt;const void*&gt;(reinterpret_cast&lt;void*&gt;(cairo_image_surface_get_data(s1))),
+                const_cast&lt;const void*&gt;(reinterpret_cast&lt;void*&gt;(cairo_image_surface_get_data(s2))),
+                cairo_image_surface_get_height(s1)*cairo_image_surface_get_stride(s1)));
+    }
+
+    HashSet&lt;GObject*&gt; m_watchedObjects;
+};
+
+#endif // TestMain_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestBuscppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBuscpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitTestBus.h&quot;
+
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+WebKitTestBus::WebKitTestBus()
+    : m_pid(-1)
+{
+}
+
+bool WebKitTestBus::run()
+{
+    // FIXME: Use GTestDBus when we bump glib to 2.34.
+    GOwnPtr&lt;char&gt; dbusLaunch(g_find_program_in_path(&quot;dbus-launch&quot;));
+    if (!dbusLaunch) {
+        g_warning(&quot;Error starting DBUS daemon: dbus-launch not found in path&quot;);
+        return false;
+    }
+
+    GOwnPtr&lt;char&gt; output;
+    GOwnPtr&lt;GError&gt; error;
+    if (!g_spawn_command_line_sync(dbusLaunch.get(), &amp;output.outPtr(), 0, 0, &amp;error.outPtr())) {
+        g_warning(&quot;Error starting DBUS daemon: %s&quot;, error-&gt;message);
+        return false;
+    }
+
+    String outputString = String::fromUTF8(output.get());
+    Vector&lt;String&gt; lines;
+    outputString.split(UChar('\n'), /* allowEmptyEntries */ false, lines);
+    for (size_t i = 0; i &lt; lines.size(); ++i) {
+        char** keyValue = g_strsplit(lines[i].utf8().data(), &quot;=&quot;, 2);
+        g_assert_cmpuint(g_strv_length(keyValue), ==, 2);
+        if (!g_strcmp0(keyValue[0], &quot;DBUS_SESSION_BUS_ADDRESS&quot;)) {
+            m_address = keyValue[1];
+            g_setenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;, keyValue[1], TRUE);
+        } else if (!g_strcmp0(keyValue[0], &quot;DBUS_SESSION_BUS_PID&quot;))
+            m_pid = g_ascii_strtoll(keyValue[1], 0, 10);
+        g_strfreev(keyValue);
+    }
+
+    return m_pid &gt; 0;
+}
+
+WebKitTestBus::~WebKitTestBus()
+{
+    g_unsetenv(&quot;DBUS_SESSION_BUS_ADDRESS&quot;);
+
+    if (m_pid != -1)
+        kill(m_pid, SIGTERM);
+}
+
+GDBusConnection* WebKitTestBus::getOrCreateConnection()
+{
+    if (m_connection)
+        return m_connection.get();
+
+    g_assert(!m_address.isNull());
+    m_connection = adoptGRef(g_dbus_connection_new_for_address_sync(m_address.data(),
+        static_cast&lt;GDBusConnectionFlags&gt;(G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION),
+        0, 0, 0));
+    return m_connection.get();
+}
+
+static void onNameAppeared(GDBusConnection*, const char*, const char*, gpointer userData)
+{
+    g_main_loop_quit(static_cast&lt;GMainLoop*&gt;(userData));
+}
+
+GDBusProxy* WebKitTestBus::createProxy(const char* serviceName, const char* objectPath, const char* interfaceName, GMainLoop* mainLoop)
+{
+    unsigned watcherID = g_bus_watch_name_on_connection(getOrCreateConnection(), serviceName, G_BUS_NAME_WATCHER_FLAGS_NONE, onNameAppeared, 0, mainLoop, 0);
+    g_main_loop_run(mainLoop);
+    g_bus_unwatch_name(watcherID);
+
+    GDBusProxy* proxy = g_dbus_proxy_new_sync(
+        connection(),
+        G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
+        0, // GDBusInterfaceInfo
+        serviceName,
+        objectPath,
+        interfaceName,
+        0, // GCancellable
+        0);
+    g_assert(proxy);
+    return proxy;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestBushfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestBush"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebKitTestBus_h
+#define WebKitTestBus_h
+
+#include &lt;gio/gio.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+class WebKitTestBus {
+public:
+    WebKitTestBus();
+    virtual ~WebKitTestBus();
+
+    bool run();
+    GDBusProxy* createProxy(const char* serviceName, const char* objectPath, const char* interfaceName, GMainLoop*);
+    GDBusConnection* connection() const { return m_connection.get(); }
+
+private:
+    GDBusConnection* getOrCreateConnection();
+
+    pid_t m_pid;
+    CString m_address;
+    GRefPtr&lt;GDBusConnection&gt; m_connection;
+};
+
+#endif // WebKitTestBus_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestServercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitTestServer.h&quot;
+
+#include &quot;TestMain.h&quot;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+WebKitTestServer::WebKitTestServer(ServerType type)
+{
+    GOwnPtr&lt;char&gt; sslCertificateFile;
+    GOwnPtr&lt;char&gt; sslKeyFile;
+    if (type == ServerHTTPS) {
+        CString resourcesDir = Test::getResourcesDir();
+        sslCertificateFile.set(g_build_filename(resourcesDir.data(), &quot;test-cert.pem&quot;, NULL));
+        sslKeyFile.set(g_build_filename(resourcesDir.data(), &quot;test-key.pem&quot;, NULL));
+    }
+
+    GRefPtr&lt;SoupAddress&gt; address = adoptGRef(soup_address_new(&quot;127.0.0.1&quot;, SOUP_ADDRESS_ANY_PORT));
+    soup_address_resolve_sync(address.get(), 0);
+
+    m_soupServer = adoptGRef(soup_server_new(SOUP_SERVER_INTERFACE, address.get(),
+        SOUP_SERVER_SSL_CERT_FILE, sslCertificateFile.get(),
+        SOUP_SERVER_SSL_KEY_FILE, sslKeyFile.get(), nullptr));
+    m_baseURI = type == ServerHTTPS ? soup_uri_new(&quot;https://127.0.0.1/&quot;) : soup_uri_new(&quot;http://127.0.0.1/&quot;);
+    soup_uri_set_port(m_baseURI, soup_server_get_port(m_soupServer.get()));
+}
+
+WebKitTestServer::~WebKitTestServer()
+{
+    soup_uri_free(m_baseURI);
+}
+
+void WebKitTestServer::run(SoupServerCallback serverCallback)
+{
+    soup_server_run_async(m_soupServer.get());
+    soup_server_add_handler(m_soupServer.get(), 0, serverCallback, 0, 0);
+}
+
+CString WebKitTestServer::getURIForPath(const char* path)
+{
+    SoupURI* uri = soup_uri_new_with_base(m_baseURI, path);
+    GOwnPtr&lt;gchar&gt; uriString(soup_uri_to_string(uri, FALSE));
+    soup_uri_free(uri);
+    return uriString.get();
+}
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebKitTestServerhfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebKitTestServerh"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestServer.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebKitTestServer_h
+#define WebKitTestServer_h
+
+#include &lt;libsoup/soup.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+class WebKitTestServer {
+public:
+
+    enum ServerType {
+        ServerHTTP,
+        ServerHTTPS
+    };
+
+    WebKitTestServer(ServerType = ServerHTTP);
+    virtual ~WebKitTestServer();
+
+    SoupURI* baseURI() { return m_baseURI; }
+
+    CString getURIForPath(const char* path);
+    void run(SoupServerCallback);
+
+private:
+    GRefPtr&lt;SoupServer&gt; m_soupServer;
+    SoupURI* m_baseURI;
+};
+
+#endif // WebKitTestServer_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebProcessTestRunnercppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnercpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebProcessTestRunner.h&quot;
+
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+
+WebProcessTestRunner::WebProcessTestRunner()
+    : m_mainLoop(g_main_loop_new(0, TRUE))
+    , m_bus(adoptGRef(g_test_dbus_new(G_TEST_DBUS_NONE)))
+{
+    // Save the DISPLAY env var to restore it after calling g_test_dbus_up() that unsets it.
+    // See https://bugs.webkit.org/show_bug.cgi?id=125621.
+    const char* display = g_getenv(&quot;DISPLAY&quot;);
+    g_test_dbus_up(m_bus.get());
+    g_setenv(&quot;DISPLAY&quot;, display, FALSE);
+    m_connection = adoptGRef(g_bus_get_sync(G_BUS_TYPE_SESSION, 0, 0));
+}
+
+WebProcessTestRunner::~WebProcessTestRunner()
+{
+    g_main_loop_unref(m_mainLoop);
+
+    // g_test_dbus_down waits until the connection is freed, so release our refs explicitly before calling it.
+    m_connection = 0;
+    m_proxy = 0;
+    g_test_dbus_down(m_bus.get());
+}
+
+void WebProcessTestRunner::proxyCreatedCallback(GObject*, GAsyncResult* result, WebProcessTestRunner* testRunner)
+{
+    testRunner-&gt;m_proxy = adoptGRef(g_dbus_proxy_new_finish(result, 0));
+    g_main_loop_quit(testRunner-&gt;m_mainLoop);
+}
+
+GDBusProxy* WebProcessTestRunner::proxy()
+{
+    if (m_proxy)
+        return m_proxy.get();
+
+    g_dbus_proxy_new(m_connection.get(), G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, 0,
+        &quot;org.webkit.gtk.WebProcessTest&quot;, &quot;/org/webkit/gtk/WebProcessTest&quot;, &quot;org.webkit.gtk.WebProcessTest&quot;,
+        0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(WebProcessTestRunner::proxyCreatedCallback), this);
+    g_main_loop_run(m_mainLoop);
+    g_assert(m_proxy.get());
+
+    return m_proxy.get();
+}
+
+void WebProcessTestRunner::onNameAppeared(GDBusConnection*, const char*, const char*, gpointer userData)
+{
+    WebProcessTestRunner* testRunner = static_cast&lt;WebProcessTestRunner*&gt;(userData);
+    g_main_loop_quit(testRunner-&gt;m_mainLoop);
+}
+
+void WebProcessTestRunner::onNameVanished(GDBusConnection*, const char* name, gpointer userData)
+{
+    _exit(1);
+}
+
+void WebProcessTestRunner::testFinishedCallback(GDBusProxy* proxy, GAsyncResult* result, WebProcessTestRunner* testRunner)
+{
+    GRefPtr&lt;GVariant&gt; returnValue = adoptGRef(g_dbus_proxy_call_finish(proxy, result, 0));
+    g_assert(returnValue.get());
+    gboolean testResult;
+    g_variant_get(returnValue.get(), &quot;(b)&quot;, &amp;testResult);
+    testRunner-&gt;finishTest(testResult);
+}
+
+bool WebProcessTestRunner::runTest(const char* suiteName, const char* testName, GVariant* args)
+{
+    g_assert(g_variant_is_of_type(args, G_VARIANT_TYPE_VARDICT));
+
+    unsigned watcherID = g_bus_watch_name_on_connection(m_connection.get(), &quot;org.webkit.gtk.WebProcessTest&quot;, G_BUS_NAME_WATCHER_FLAGS_NONE,
+        WebProcessTestRunner::onNameAppeared, WebProcessTestRunner::onNameVanished, this, 0);
+    g_main_loop_run(m_mainLoop);
+
+    m_testResult = false;
+    GOwnPtr&lt;char&gt; testPath(g_strdup_printf(&quot;%s/%s&quot;, suiteName, testName));
+    g_dbus_proxy_call(
+        proxy(),
+        &quot;RunTest&quot;,
+        g_variant_new(&quot;(s@a{sv})&quot;, testPath.get(), args),
+        G_DBUS_CALL_FLAGS_NONE,
+        -1, 0,
+        reinterpret_cast&lt;GAsyncReadyCallback&gt;(WebProcessTestRunner::testFinishedCallback),
+        this);
+    g_main_loop_run(m_mainLoop);
+    g_bus_unwatch_name(watcherID);
+
+    return m_testResult;
+}
+
+void WebProcessTestRunner::finishTest(bool result)
+{
+    m_testResult = result;
+    g_main_loop_quit(m_mainLoop);
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebProcessTestRunnerhfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebProcessTestRunnerh"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTestRunner.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebProcessTestRunner_h
+#define WebProcessTestRunner_h
+
+#include &lt;gio/gio.h&gt;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+class WebProcessTestRunner {
+public:
+    WebProcessTestRunner();
+    ~WebProcessTestRunner();
+
+    bool runTest(const char* suiteName, const char* testName, GVariant* args);
+
+private:
+    static void proxyCreatedCallback(GObject*, GAsyncResult*, WebProcessTestRunner*);
+    static void onNameAppeared(GDBusConnection*, const char*, const char*, gpointer);
+    static void onNameVanished(GDBusConnection*, const char*, gpointer);
+    static void testFinishedCallback(GDBusProxy*, GAsyncResult*, WebProcessTestRunner*);
+
+    GDBusProxy* proxy();
+    void finishTest(bool result);
+
+    GMainLoop* m_mainLoop;
+    GRefPtr&lt;GTestDBus&gt; m_bus;
+    GRefPtr&lt;GDBusConnection&gt; m_connection;
+    GRefPtr&lt;GDBusProxy&gt; m_proxy;
+    bool m_testResult;
+};
+
+#endif // WebProcessTestRunner_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebViewTestcppfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTestcpp"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,444 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebViewTest.h&quot;
+
+#include &lt;JavaScriptCore/JSRetainPtr.h&gt;
+#include &lt;WebCore/GOwnPtrGtk.h&gt;
+
+WebViewTest::WebViewTest()
+    : m_webView(WEBKIT_WEB_VIEW(g_object_ref_sink(webkit_web_view_new())))
+    , m_mainLoop(g_main_loop_new(0, TRUE))
+    , m_parentWindow(0)
+    , m_javascriptResult(0)
+    , m_resourceDataSize(0)
+    , m_surface(0)
+{
+    assertObjectIsDeletedWhenTestFinishes(G_OBJECT(m_webView));
+}
+
+WebViewTest::~WebViewTest()
+{
+    if (m_parentWindow)
+        gtk_widget_destroy(m_parentWindow);
+    if (m_javascriptResult)
+        webkit_javascript_result_unref(m_javascriptResult);
+    if (m_surface)
+        cairo_surface_destroy(m_surface);
+    g_object_unref(m_webView);
+    g_main_loop_unref(m_mainLoop);
+}
+
+void WebViewTest::loadURI(const char* uri)
+{
+    m_activeURI = uri;
+    webkit_web_view_load_uri(m_webView, uri);
+}
+
+void WebViewTest::loadHtml(const char* html, const char* baseURI)
+{
+    if (!baseURI)
+        m_activeURI = &quot;about:blank&quot;;
+    else
+        m_activeURI = baseURI;
+    webkit_web_view_load_html(m_webView, html, baseURI);
+}
+
+void WebViewTest::loadPlainText(const char* plainText)
+{
+    m_activeURI = &quot;about:blank&quot;;
+    webkit_web_view_load_plain_text(m_webView, plainText);
+}
+
+void WebViewTest::loadRequest(WebKitURIRequest* request)
+{
+    m_activeURI = webkit_uri_request_get_uri(request);
+    webkit_web_view_load_request(m_webView, request);
+}
+
+void WebViewTest::loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI)
+{
+    m_activeURI = contentURI;
+    webkit_web_view_load_alternate_html(m_webView, html, contentURI, baseURI);
+}
+
+void WebViewTest::goBack()
+{
+    if (webkit_web_view_can_go_back(m_webView)) {
+        WebKitBackForwardList* list = webkit_web_view_get_back_forward_list(m_webView);
+        WebKitBackForwardListItem* item = webkit_back_forward_list_get_nth_item(list, -1);
+        m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
+    }
+
+    // Call go_back even when can_go_back returns FALSE to check nothing happens.
+    webkit_web_view_go_back(m_webView);
+}
+
+void WebViewTest::goForward()
+{
+    if (webkit_web_view_can_go_forward(m_webView)) {
+        WebKitBackForwardList* list = webkit_web_view_get_back_forward_list(m_webView);
+        WebKitBackForwardListItem* item = webkit_back_forward_list_get_nth_item(list, 1);
+        m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
+    }
+
+    // Call go_forward even when can_go_forward returns FALSE to check nothing happens.
+    webkit_web_view_go_forward(m_webView);
+}
+
+void WebViewTest::goToBackForwardListItem(WebKitBackForwardListItem* item)
+{
+    m_activeURI = webkit_back_forward_list_item_get_original_uri(item);
+    webkit_web_view_go_to_back_forward_list_item(m_webView, item);
+}
+
+void WebViewTest::quitMainLoop()
+{
+    g_main_loop_quit(m_mainLoop);
+}
+
+void WebViewTest::quitMainLoopAfterProcessingPendingEvents()
+{
+    while (gtk_events_pending())
+        gtk_main_iteration();
+    quitMainLoop();
+}
+
+static gboolean quitMainLoopIdleCallback(WebViewTest* test)
+{
+    test-&gt;quitMainLoop();
+    return FALSE;
+}
+
+void WebViewTest::wait(double seconds)
+{
+    g_timeout_add_seconds(seconds, reinterpret_cast&lt;GSourceFunc&gt;(quitMainLoopIdleCallback), this);
+    g_main_loop_run(m_mainLoop);
+}
+
+static void loadChanged(WebKitWebView* webView, WebKitLoadEvent loadEvent, WebViewTest* test)
+{
+    if (loadEvent != WEBKIT_LOAD_FINISHED)
+        return;
+    g_signal_handlers_disconnect_by_func(webView, reinterpret_cast&lt;void*&gt;(loadChanged), test);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+void WebViewTest::waitUntilLoadFinished()
+{
+    g_signal_connect(m_webView, &quot;load-changed&quot;, G_CALLBACK(loadChanged), this);
+    g_main_loop_run(m_mainLoop);
+}
+
+static void titleChanged(WebKitWebView* webView, GParamSpec*, WebViewTest* test)
+{
+    if (!test-&gt;m_expectedTitle.isNull() &amp;&amp; test-&gt;m_expectedTitle != webkit_web_view_get_title(webView))
+        return;
+
+    g_signal_handlers_disconnect_by_func(webView, reinterpret_cast&lt;void*&gt;(titleChanged), test);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+void WebViewTest::waitUntilTitleChangedTo(const char* expectedTitle)
+{
+    m_expectedTitle = expectedTitle;
+    g_signal_connect(m_webView, &quot;notify::title&quot;, G_CALLBACK(titleChanged), this);
+    g_main_loop_run(m_mainLoop);
+    m_expectedTitle = CString();
+}
+
+void WebViewTest::waitUntilTitleChanged()
+{
+    waitUntilTitleChangedTo(0);
+}
+
+static gboolean parentWindowMapped(GtkWidget* widget, GdkEvent*, WebViewTest* test)
+{
+    g_signal_handlers_disconnect_by_func(widget, reinterpret_cast&lt;void*&gt;(parentWindowMapped), test);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+
+    return FALSE;
+}
+
+void WebViewTest::showInWindow(GtkWindowType windowType)
+{
+    g_assert(!m_parentWindow);
+    m_parentWindow = gtk_window_new(windowType);
+    gtk_container_add(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
+    gtk_widget_show(GTK_WIDGET(m_webView));
+    gtk_widget_show(m_parentWindow);
+}
+
+void WebViewTest::showInWindowAndWaitUntilMapped(GtkWindowType windowType)
+{
+    g_assert(!m_parentWindow);
+    m_parentWindow = gtk_window_new(windowType);
+    gtk_container_add(GTK_CONTAINER(m_parentWindow), GTK_WIDGET(m_webView));
+    gtk_widget_show(GTK_WIDGET(m_webView));
+
+    g_signal_connect(m_parentWindow, &quot;map-event&quot;, G_CALLBACK(parentWindowMapped), this);
+    gtk_widget_show(m_parentWindow);
+    g_main_loop_run(m_mainLoop);
+}
+
+void WebViewTest::resizeView(int width, int height)
+{
+    GtkAllocation allocation;
+    gtk_widget_get_allocation(GTK_WIDGET(m_webView), &amp;allocation);
+    if (width != -1)
+        allocation.width = width;
+    if (height != -1)
+        allocation.height = height;
+    gtk_widget_size_allocate(GTK_WIDGET(m_webView), &amp;allocation);
+}
+
+void WebViewTest::selectAll()
+{
+    webkit_web_view_execute_editing_command(m_webView, &quot;SelectAll&quot;);
+}
+
+static void resourceGetDataCallback(GObject* object, GAsyncResult* result, gpointer userData)
+{
+    size_t dataSize;
+    GOwnPtr&lt;GError&gt; error;
+    unsigned char* data = webkit_web_resource_get_data_finish(WEBKIT_WEB_RESOURCE(object), result, &amp;dataSize, &amp;error.outPtr());
+    g_assert(data);
+
+    WebViewTest* test = static_cast&lt;WebViewTest*&gt;(userData);
+    test-&gt;m_resourceData.set(reinterpret_cast&lt;char*&gt;(data));
+    test-&gt;m_resourceDataSize = dataSize;
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+const char* WebViewTest::mainResourceData(size_t&amp; mainResourceDataSize)
+{
+    m_resourceDataSize = 0;
+    m_resourceData.clear();
+    WebKitWebResource* resource = webkit_web_view_get_main_resource(m_webView);
+    g_assert(resource);
+
+    webkit_web_resource_get_data(resource, 0, resourceGetDataCallback, this);
+    g_main_loop_run(m_mainLoop);
+
+    mainResourceDataSize = m_resourceDataSize;
+    return m_resourceData.get();
+}
+
+void WebViewTest::mouseMoveTo(int x, int y, unsigned mouseModifiers)
+{
+    g_assert(m_parentWindow);
+    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
+    g_assert(gtk_widget_get_realized(viewWidget));
+
+    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(GDK_MOTION_NOTIFY));
+    event-&gt;motion.x = x;
+    event-&gt;motion.y = y;
+
+    event-&gt;motion.time = GDK_CURRENT_TIME;
+    event-&gt;motion.window = gtk_widget_get_window(viewWidget);
+    g_object_ref(event-&gt;motion.window);
+    event-&gt;motion.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
+    event-&gt;motion.state = mouseModifiers;
+    event-&gt;motion.axes = 0;
+
+    int xRoot, yRoot;
+    gdk_window_get_root_coords(gtk_widget_get_window(viewWidget), x, y, &amp;xRoot, &amp;yRoot);
+    event-&gt;motion.x_root = xRoot;
+    event-&gt;motion.y_root = yRoot;
+    gtk_main_do_event(event.get());
+}
+
+void WebViewTest::clickMouseButton(int x, int y, unsigned button, unsigned mouseModifiers)
+{
+    doMouseButtonEvent(GDK_BUTTON_PRESS, x, y, button, mouseModifiers);
+    doMouseButtonEvent(GDK_BUTTON_RELEASE, x, y, button, mouseModifiers);
+}
+
+void WebViewTest::keyStroke(unsigned keyVal, unsigned keyModifiers)
+{
+    g_assert(m_parentWindow);
+    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
+    g_assert(gtk_widget_get_realized(viewWidget));
+
+    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(GDK_KEY_PRESS));
+    event-&gt;key.keyval = keyVal;
+
+    event-&gt;key.time = GDK_CURRENT_TIME;
+    event-&gt;key.window = gtk_widget_get_window(viewWidget);
+    g_object_ref(event-&gt;key.window);
+    gdk_event_set_device(event.get(), gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget))));
+    event-&gt;key.state = keyModifiers;
+
+    // When synthesizing an event, an invalid hardware_keycode value can cause it to be badly processed by GTK+.
+    GOwnPtr&lt;GdkKeymapKey&gt; keys;
+    int keysCount;
+    if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keyVal, &amp;keys.outPtr(), &amp;keysCount))
+        event-&gt;key.hardware_keycode = keys.get()[0].keycode;
+
+    gtk_main_do_event(event.get());
+    event-&gt;key.type = GDK_KEY_RELEASE;
+    gtk_main_do_event(event.get());
+}
+
+void WebViewTest::doMouseButtonEvent(GdkEventType eventType, int x, int y, unsigned button, unsigned mouseModifiers)
+{
+    g_assert(m_parentWindow);
+    GtkWidget* viewWidget = GTK_WIDGET(m_webView);
+    g_assert(gtk_widget_get_realized(viewWidget));
+
+    GOwnPtr&lt;GdkEvent&gt; event(gdk_event_new(eventType));
+    event-&gt;button.window = gtk_widget_get_window(viewWidget);
+    g_object_ref(event-&gt;button.window);
+
+    event-&gt;button.time = GDK_CURRENT_TIME;
+    event-&gt;button.x = x;
+    event-&gt;button.y = y;
+    event-&gt;button.axes = 0;
+    event-&gt;button.state = mouseModifiers;
+    event-&gt;button.button = button;
+
+    event-&gt;button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)));
+
+    int xRoot, yRoot;
+    gdk_window_get_root_coords(gtk_widget_get_window(viewWidget), x, y, &amp;xRoot, &amp;yRoot);
+    event-&gt;button.x_root = xRoot;
+    event-&gt;button.y_root = yRoot;
+    gtk_main_do_event(event.get());
+}
+
+static void runJavaScriptReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test)
+{
+    test-&gt;m_javascriptResult = webkit_web_view_run_javascript_finish(test-&gt;m_webView, result, test-&gt;m_javascriptError);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+static void runJavaScriptFromGResourceReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test)
+{
+    test-&gt;m_javascriptResult = webkit_web_view_run_javascript_from_gresource_finish(test-&gt;m_webView, result, test-&gt;m_javascriptError);
+    g_main_loop_quit(test-&gt;m_mainLoop);
+}
+
+WebKitJavascriptResult* WebViewTest::runJavaScriptAndWaitUntilFinished(const char* javascript, GError** error)
+{
+    if (m_javascriptResult)
+        webkit_javascript_result_unref(m_javascriptResult);
+    m_javascriptResult = 0;
+    m_javascriptError = error;
+    webkit_web_view_run_javascript(m_webView, javascript, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptReadyCallback), this);
+    g_main_loop_run(m_mainLoop);
+
+    return m_javascriptResult;
+}
+
+WebKitJavascriptResult* WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished(const char* resource, GError** error)
+{
+    if (m_javascriptResult)
+        webkit_javascript_result_unref(m_javascriptResult);
+    m_javascriptResult = 0;
+    m_javascriptError = error;
+    webkit_web_view_run_javascript_from_gresource(m_webView, resource, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(runJavaScriptFromGResourceReadyCallback), this);
+    g_main_loop_run(m_mainLoop);
+
+    return m_javascriptResult;
+}
+
+static char* jsValueToCString(JSGlobalContextRef context, JSValueRef value)
+{
+    g_assert(value);
+    g_assert(JSValueIsString(context, value));
+
+    JSRetainPtr&lt;JSStringRef&gt; stringValue(Adopt, JSValueToStringCopy(context, value, 0));
+    g_assert(stringValue);
+
+    size_t cStringLength = JSStringGetMaximumUTF8CStringSize(stringValue.get());
+    char* cString = static_cast&lt;char*&gt;(g_malloc(cStringLength));
+    JSStringGetUTF8CString(stringValue.get(), cString, cStringLength);
+    return cString;
+}
+
+char* WebViewTest::javascriptResultToCString(WebKitJavascriptResult* javascriptResult)
+{
+    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
+    g_assert(context);
+    return jsValueToCString(context, webkit_javascript_result_get_value(javascriptResult));
+}
+
+double WebViewTest::javascriptResultToNumber(WebKitJavascriptResult* javascriptResult)
+{
+    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
+    g_assert(context);
+    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
+    g_assert(value);
+    g_assert(JSValueIsNumber(context, value));
+
+    return JSValueToNumber(context, value, 0);
+}
+
+bool WebViewTest::javascriptResultToBoolean(WebKitJavascriptResult* javascriptResult)
+{
+    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
+    g_assert(context);
+    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
+    g_assert(value);
+    g_assert(JSValueIsBoolean(context, value));
+
+    return JSValueToBoolean(context, value);
+}
+
+bool WebViewTest::javascriptResultIsNull(WebKitJavascriptResult* javascriptResult)
+{
+    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
+    g_assert(context);
+    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
+    g_assert(value);
+
+    return JSValueIsNull(context, value);
+}
+
+bool WebViewTest::javascriptResultIsUndefined(WebKitJavascriptResult* javascriptResult)
+{
+    JSGlobalContextRef context = webkit_javascript_result_get_global_context(javascriptResult);
+    g_assert(context);
+    JSValueRef value = webkit_javascript_result_get_value(javascriptResult);
+    g_assert(value);
+
+    return JSValueIsUndefined(context, value);
+}
+
+static void onSnapshotReady(WebKitWebView* web_view, GAsyncResult* res, WebViewTest* test)
+{
+    GOwnPtr&lt;GError&gt; error;
+    test-&gt;m_surface = webkit_web_view_get_snapshot_finish(web_view, res, &amp;error.outPtr());
+    g_assert(!test-&gt;m_surface || !error.get());
+    if (error)
+        g_assert_error(error.get(), WEBKIT_SNAPSHOT_ERROR, WEBKIT_SNAPSHOT_ERROR_FAILED_TO_CREATE);
+    test-&gt;quitMainLoop();
+}
+
+cairo_surface_t* WebViewTest::getSnapshotAndWaitUntilReady(WebKitSnapshotRegion region, WebKitSnapshotOptions options)
+{
+    if (m_surface)
+        cairo_surface_destroy(m_surface);
+    m_surface = 0;
+    webkit_web_view_get_snapshot(m_webView, region, options, 0, reinterpret_cast&lt;GAsyncReadyCallback&gt;(onSnapshotReady), this);
+    g_main_loop_run(m_mainLoop);
+    return m_surface;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit22ToolsTestWebKitAPIgtkWebKit2GtkWebViewTesthfromrev162335releasesWebKitGTKwebkit22SourceWebKit2UIProcessAPIgtktestsWebViewTesth"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h (from rev 162335, releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h) (0 => 162336)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.2/Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h        2014-01-20 13:29:36 UTC (rev 162336)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+/*
+ * Copyright (C) 2011 Igalia S.L.
+ * Portions Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebViewTest_h
+#define WebViewTest_h
+
+#include &quot;TestMain.h&quot;
+#include &lt;webkit2/webkit2.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+class WebViewTest: public Test {
+public:
+    MAKE_GLIB_TEST_FIXTURE(WebViewTest);
+    WebViewTest();
+    virtual ~WebViewTest();
+
+    virtual void loadURI(const char* uri);
+    virtual void loadHtml(const char* html, const char* baseURI);
+    virtual void loadPlainText(const char* plainText);
+    virtual void loadRequest(WebKitURIRequest*);
+    void loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI);
+    void goBack();
+    void goForward();
+    void goToBackForwardListItem(WebKitBackForwardListItem*);
+
+    void quitMainLoop();
+    void quitMainLoopAfterProcessingPendingEvents();
+    void wait(double seconds);
+    void waitUntilLoadFinished();
+    void waitUntilTitleChangedTo(const char* expectedTitle);
+    void waitUntilTitleChanged();
+    void showInWindow(GtkWindowType = GTK_WINDOW_POPUP);
+    void showInWindowAndWaitUntilMapped(GtkWindowType = GTK_WINDOW_POPUP);
+    void resizeView(int width, int height);
+    void selectAll();
+    const char* mainResourceData(size_t&amp; mainResourceDataSize);
+
+    void mouseMoveTo(int x, int y, unsigned mouseModifiers = 0);
+    void clickMouseButton(int x, int y, unsigned button = 1, unsigned mouseModifiers = 0);
+    void keyStroke(unsigned keyVal, unsigned keyModifiers = 0);
+
+    WebKitJavascriptResult* runJavaScriptAndWaitUntilFinished(const char* javascript, GError**);
+    WebKitJavascriptResult* runJavaScriptFromGResourceAndWaitUntilFinished(const char* resource, GError**);
+
+    // Javascript result helpers.
+    static char* javascriptResultToCString(WebKitJavascriptResult*);
+    static double javascriptResultToNumber(WebKitJavascriptResult*);
+    static bool javascriptResultToBoolean(WebKitJavascriptResult*);
+    static bool javascriptResultIsNull(WebKitJavascriptResult*);
+    static bool javascriptResultIsUndefined(WebKitJavascriptResult*);
+
+    cairo_surface_t* getSnapshotAndWaitUntilReady(WebKitSnapshotRegion, WebKitSnapshotOptions);
+
+    WebKitWebView* m_webView;
+    GMainLoop* m_mainLoop;
+    CString m_activeURI;
+    GtkWidget* m_parentWindow;
+    CString m_expectedTitle;
+    WebKitJavascriptResult* m_javascriptResult;
+    GError** m_javascriptError;
+    GOwnPtr&lt;char&gt; m_resourceData;
+    size_t m_resourceDataSize;
+    cairo_surface_t* m_surface;
+
+private:
+    void doMouseButtonEvent(GdkEventType, int, int, unsigned, unsigned);
+};
+
+#endif // WebViewTest_h
</ins></span></pre>
</div>
</div>

</body>
</html>