#include "config.h"
-#include "FrameTestHelpers.h"
#include "RuntimeEnabledFeatures.h"
-#include "URLTestHelpers.h"
-#include "WebDocument.h"
-#include "WebFrame.h"
-#include "WebInputEvent.h"
-#include "WebView.h"
-#include "WebViewClient.h"
-#include "WebViewImpl.h"
#include "core/dom/ClientRect.h"
#include "core/dom/ClientRectList.h"
#include "core/dom/Document.h"
#include "core/rendering/RenderTreeAsText.h"
#include "public/platform/Platform.h"
#include "public/platform/WebUnitTestSupport.h"
+#include "public/web/WebDocument.h"
+#include "public/web/WebFrame.h"
#include "public/web/WebHitTestResult.h"
+#include "public/web/WebInputEvent.h"
#include "public/web/WebTouchAction.h"
+#include "public/web/WebView.h"
+#include "public/web/WebViewClient.h"
#include "public/web/WebWidgetClient.h"
+#include "web/WebViewImpl.h"
+#include "web/tests/FrameTestHelpers.h"
+#include "web/tests/URLTestHelpers.h"
#include <gtest/gtest.h>
namespace {
-class TouchActionTrackingWebViewClient : public WebViewClient {
+class TouchActionTrackingWebViewClient : public FrameTestHelpers::TestWebViewClient {
public:
TouchActionTrackingWebViewClient() :
m_actionSetCount(0),
WebView* webView = setupTest(file, client);
- RefPtr<WebCore::Document> document = static_cast<PassRefPtr<WebCore::Document> >(webView->mainFrame()->document());
+ RefPtrWillBeRawPtr<WebCore::Document> document = static_cast<PassRefPtrWillBeRawPtr<WebCore::Document> >(webView->mainFrame()->document());
runTestOnTree(document.get(), webView, client);
m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client.
WebView* webView = setupTest(file, client);
WebCore::TrackExceptionState es;
- RefPtr<WebCore::Document> document = static_cast<PassRefPtr<WebCore::Document> >(webView->mainFrame()->document());
+ RefPtrWillBeRawPtr<WebCore::Document> document = static_cast<PassRefPtrWillBeRawPtr<WebCore::Document> >(webView->mainFrame()->document());
RefPtr<WebCore::NodeList> hostNodes = document->querySelectorAll("[shadow-host]", es);
ASSERT_FALSE(es.hadException());
ASSERT_GE(hostNodes->length(), 1u);
// Scroll to verify the code properly transforms windows to client co-ords.
const int kScrollOffset = 100;
- RefPtr<WebCore::Document> document = static_cast<PassRefPtr<WebCore::Document> >(webView->mainFrame()->document());
+ RefPtrWillBeRawPtr<WebCore::Document> document = static_cast<PassRefPtrWillBeRawPtr<WebCore::Document> >(webView->mainFrame()->document());
document->frame()->view()->setScrollOffset(WebCore::IntPoint(0, kScrollOffset));
return webView;
// Note that we don't want the bounding box because our tests sometimes have elements with
// multiple border boxes with other elements in between. Use the first border box (which
// we can easily visualize in a browser for debugging).
- RefPtr<WebCore::ClientRectList> rects = element->getClientRects();
+ RefPtrWillBeRawPtr<WebCore::ClientRectList> rects = element->getClientRects();
ASSERT_GE(rects->length(), 0u) << failureContext;
- RefPtr<WebCore::ClientRect> r = rects->item(0);
+ RefPtrWillBeRawPtr<WebCore::ClientRect> r = rects->item(0);
WebCore::FloatRect clientFloatRect = WebCore::FloatRect(r->left(), r->top(), r->width(), r->height());
WebCore::IntRect clientRect = enclosedIntRect(clientFloatRect);
for (int locIdx = 0; locIdx < 3; locIdx++) {
WebTouchEvent webTouchEvent;
webTouchEvent.type = type;
+ if (type == WebInputEvent::TouchCancel)
+ webTouchEvent.cancelable = false;
webTouchEvent.touchesLength = 1;
webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ?
WebTouchPoint::StatePressed :