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

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

Issue 2683033005: URLLoaderMockFactory: clear MemoryCache in unregisterAllURLs (Closed)
Patch Set: Created 3 years, 10 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 26 matching lines...) Expand all
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 "core/layout/api/LayoutViewItem.h" 43 #include "core/layout/api/LayoutViewItem.h"
44 #include "platform/testing/URLTestHelpers.h" 44 #include "platform/testing/URLTestHelpers.h"
45 #include "platform/testing/UnitTestHelpers.h" 45 #include "platform/testing/UnitTestHelpers.h"
46 #include "public/platform/Platform.h" 46 #include "public/platform/Platform.h"
47 #include "public/platform/WebCache.h"
48 #include "public/platform/WebTouchEvent.h" 47 #include "public/platform/WebTouchEvent.h"
49 #include "public/platform/WebURLLoaderMockFactory.h" 48 #include "public/platform/WebURLLoaderMockFactory.h"
50 #include "public/web/WebDocument.h" 49 #include "public/web/WebDocument.h"
51 #include "public/web/WebFrame.h" 50 #include "public/web/WebFrame.h"
52 #include "public/web/WebHitTestResult.h" 51 #include "public/web/WebHitTestResult.h"
53 #include "public/web/WebTouchAction.h" 52 #include "public/web/WebTouchAction.h"
54 #include "public/web/WebView.h" 53 #include "public/web/WebView.h"
55 #include "public/web/WebViewClient.h" 54 #include "public/web/WebViewClient.h"
56 #include "public/web/WebWidgetClient.h" 55 #include "public/web/WebWidgetClient.h"
57 #include "testing/gtest/include/gtest/gtest.h" 56 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 URLTestHelpers::registerMockedURLLoadFromBase( 100 URLTestHelpers::registerMockedURLLoadFromBase(
102 WebString::fromUTF8(m_baseURL), testing::webTestDataPath(), 101 WebString::fromUTF8(m_baseURL), testing::webTestDataPath(),
103 "touch-action-tests.js"); 102 "touch-action-tests.js");
104 URLTestHelpers::registerMockedURLLoadFromBase( 103 URLTestHelpers::registerMockedURLLoadFromBase(
105 WebString::fromUTF8(m_baseURL), testing::webTestDataPath(), 104 WebString::fromUTF8(m_baseURL), testing::webTestDataPath(),
106 "white-1x1.png"); 105 "white-1x1.png");
107 } 106 }
108 107
109 void TearDown() override { 108 void TearDown() override {
110 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs(); 109 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
111 WebCache::clear();
112 } 110 }
113 111
114 protected: 112 protected:
115 void runTouchActionTest(std::string file); 113 void runTouchActionTest(std::string file);
116 void runShadowDOMTest(std::string file); 114 void runShadowDOMTest(std::string file);
117 void runIFrameTest(std::string file); 115 void runIFrameTest(std::string file);
118 void sendTouchEvent(WebView*, WebInputEvent::Type, IntPoint clientPoint); 116 void sendTouchEvent(WebView*, WebInputEvent::Type, IntPoint clientPoint);
119 WebView* setupTest(std::string file, TouchActionTrackingWebWidgetClient&); 117 WebView* setupTest(std::string file, TouchActionTrackingWebWidgetClient&);
120 void runTestOnTree(ContainerNode* root, 118 void runTestOnTree(ContainerNode* root,
121 WebView*, 119 WebView*,
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 410
413 TEST_F(TouchActionTest, ShadowDOM) { 411 TEST_F(TouchActionTest, ShadowDOM) {
414 runShadowDOMTest("touch-action-shadow-dom.html"); 412 runShadowDOMTest("touch-action-shadow-dom.html");
415 } 413 }
416 414
417 TEST_F(TouchActionTest, Pan) { 415 TEST_F(TouchActionTest, Pan) {
418 runTouchActionTest("touch-action-pan.html"); 416 runTouchActionTest("touch-action-pan.html");
419 } 417 }
420 418
421 } // namespace blink 419 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698