Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: third_party/WebKit/Source/web/tests/TouchActionTest.cpp

Issue 1845323002: Remove WebUnitTestSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/dom/shadow/ShadowRoot.h" 36 #include "core/dom/shadow/ShadowRoot.h"
37 #include "core/frame/FrameView.h" 37 #include "core/frame/FrameView.h"
38 #include "core/frame/LocalFrame.h" 38 #include "core/frame/LocalFrame.h"
39 #include "core/html/HTMLIFrameElement.h" 39 #include "core/html/HTMLIFrameElement.h"
40 #include "core/input/EventHandler.h" 40 #include "core/input/EventHandler.h"
41 #include "core/layout/HitTestResult.h" 41 #include "core/layout/HitTestResult.h"
42 #include "core/layout/LayoutTreeAsText.h" 42 #include "core/layout/LayoutTreeAsText.h"
43 #include "platform/testing/URLTestHelpers.h" 43 #include "platform/testing/URLTestHelpers.h"
44 #include "platform/testing/UnitTestHelpers.h" 44 #include "platform/testing/UnitTestHelpers.h"
45 #include "public/platform/Platform.h" 45 #include "public/platform/Platform.h"
46 #include "public/platform/WebUnitTestSupport.h" 46 #include "public/platform/WebURLLoaderMockFactory.h"
47 #include "public/web/WebCache.h"
47 #include "public/web/WebDocument.h" 48 #include "public/web/WebDocument.h"
48 #include "public/web/WebFrame.h" 49 #include "public/web/WebFrame.h"
49 #include "public/web/WebHitTestResult.h" 50 #include "public/web/WebHitTestResult.h"
50 #include "public/web/WebInputEvent.h" 51 #include "public/web/WebInputEvent.h"
51 #include "public/web/WebTouchAction.h" 52 #include "public/web/WebTouchAction.h"
52 #include "public/web/WebView.h" 53 #include "public/web/WebView.h"
53 #include "public/web/WebViewClient.h" 54 #include "public/web/WebViewClient.h"
54 #include "public/web/WebWidgetClient.h" 55 #include "public/web/WebWidgetClient.h"
55 #include "testing/gtest/include/gtest/gtest.h" 56 #include "testing/gtest/include/gtest/gtest.h"
56 #include "web/WebFrameImplBase.h" 57 #include "web/WebFrameImplBase.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 TouchActionTest() 106 TouchActionTest()
106 : m_baseURL("http://www.test.com/") 107 : m_baseURL("http://www.test.com/")
107 { 108 {
108 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.css"); 109 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.css");
109 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.js"); 110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "touch-action-tests.js");
110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "white-1x1.png"); 111 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU RL), "white-1x1.png");
111 } 112 }
112 113
113 void TearDown() override 114 void TearDown() override
114 { 115 {
115 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); 116 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
117 WebCache::clear();
116 } 118 }
117 119
118 protected: 120 protected:
119 void runTouchActionTest(std::string file); 121 void runTouchActionTest(std::string file);
120 void runShadowDOMTest(std::string file); 122 void runShadowDOMTest(std::string file);
121 void runIFrameTest(std::string file); 123 void runIFrameTest(std::string file);
122 void sendTouchEvent(WebView*, WebInputEvent::Type, IntPoint clientPoint); 124 void sendTouchEvent(WebView*, WebInputEvent::Type, IntPoint clientPoint);
123 WebView* setupTest(std::string file, TouchActionTrackingWebViewClient&); 125 WebView* setupTest(std::string file, TouchActionTrackingWebViewClient&);
124 void runTestOnTree(ContainerNode* root, WebView*, TouchActionTrackingWebView Client&); 126 void runTestOnTree(ContainerNode* root, WebView*, TouchActionTrackingWebView Client&);
125 127
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 { 367 {
366 runShadowDOMTest("touch-action-shadow-dom.html"); 368 runShadowDOMTest("touch-action-shadow-dom.html");
367 } 369 }
368 370
369 TEST_F(TouchActionTest, Pan) 371 TEST_F(TouchActionTest, Pan)
370 { 372 {
371 runTouchActionTest("touch-action-pan.html"); 373 runTouchActionTest("touch-action-pan.html");
372 } 374 }
373 375
374 } // namespace blink 376 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/TopControlsTest.cpp ('k') | third_party/WebKit/Source/web/tests/ViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698