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

Unified Diff: third_party/WebKit/Source/web/LinkHighlightImplTest.cpp

Issue 2683033005: URLLoaderMockFactory: clear MemoryCache in unregisterAllURLs (Closed)
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/LinkHighlightImplTest.cpp
diff --git a/third_party/WebKit/Source/web/LinkHighlightImplTest.cpp b/third_party/WebKit/Source/web/LinkHighlightImplTest.cpp
index 28c879fbe5a747c59aacbe1bce13d88f6384a9d3..ef8d70ebe0ba4bc0959dbf27bf506c2d61fa5549 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImplTest.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImplTest.cpp
@@ -36,7 +36,6 @@
#include "platform/testing/URLTestHelpers.h"
#include "platform/testing/UnitTestHelpers.h"
#include "public/platform/Platform.h"
-#include "public/platform/WebCache.h"
#include "public/platform/WebContentLayer.h"
#include "public/platform/WebFloatPoint.h"
#include "public/platform/WebInputEvent.h"
@@ -127,8 +126,9 @@ TEST(LinkHighlightImplTest, verifyWebViewImplIntegration) {
getTargetedEvent(webViewImpl, touchEvent));
ASSERT_EQ(0U, webViewImpl->numLinkHighlights());
- Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
- WebCache::clear();
+ Platform::current()
+ ->getURLLoaderMockFactory()
+ ->unregisterAllURLsAndClearMemoryCache();
}
namespace {
@@ -181,8 +181,9 @@ TEST(LinkHighlightImplTest, resetDuringNodeRemoval) {
webViewImpl->updateAllLifecyclePhases();
ASSERT_EQ(0U, highlightLayer->numLinkHighlights());
- Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
- WebCache::clear();
+ Platform::current()
+ ->getURLLoaderMockFactory()
+ ->unregisterAllURLsAndClearMemoryCache();
}
// A lifetime test: delete LayerTreeView while running LinkHighlights.
@@ -224,8 +225,9 @@ TEST(LinkHighlightImplTest, resetLayerTreeView) {
webViewImpl->willCloseLayerTreeView();
webViewHelper.reset();
- Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
- WebCache::clear();
+ Platform::current()
+ ->getURLLoaderMockFactory()
+ ->unregisterAllURLsAndClearMemoryCache();
}
TEST(LinkHighlightImplTest, multipleHighlights) {
@@ -256,8 +258,9 @@ TEST(LinkHighlightImplTest, multipleHighlights) {
webViewImpl->enableTapHighlights(highlightNodes);
EXPECT_EQ(2U, webViewImpl->numLinkHighlights());
- Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
- WebCache::clear();
+ Platform::current()
+ ->getURLLoaderMockFactory()
+ ->unregisterAllURLsAndClearMemoryCache();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698