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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebPluginContainerTest.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 30 matching lines...) Expand all
41 #include "platform/PlatformEvent.h" 41 #include "platform/PlatformEvent.h"
42 #include "platform/graphics/GraphicsContext.h" 42 #include "platform/graphics/GraphicsContext.h"
43 #include "platform/graphics/paint/CullRect.h" 43 #include "platform/graphics/paint/CullRect.h"
44 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" 44 #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
45 #include "platform/graphics/paint/PaintController.h" 45 #include "platform/graphics/paint/PaintController.h"
46 #include "platform/graphics/paint/PaintRecorder.h" 46 #include "platform/graphics/paint/PaintRecorder.h"
47 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" 47 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
48 #include "platform/testing/URLTestHelpers.h" 48 #include "platform/testing/URLTestHelpers.h"
49 #include "platform/testing/UnitTestHelpers.h" 49 #include "platform/testing/UnitTestHelpers.h"
50 #include "public/platform/Platform.h" 50 #include "public/platform/Platform.h"
51 #include "public/platform/WebCache.h"
52 #include "public/platform/WebClipboard.h" 51 #include "public/platform/WebClipboard.h"
53 #include "public/platform/WebCompositorSupport.h" 52 #include "public/platform/WebCompositorSupport.h"
54 #include "public/platform/WebLayer.h" 53 #include "public/platform/WebLayer.h"
55 #include "public/platform/WebMouseWheelEvent.h" 54 #include "public/platform/WebMouseWheelEvent.h"
56 #include "public/platform/WebThread.h" 55 #include "public/platform/WebThread.h"
57 #include "public/platform/WebURLLoaderMockFactory.h" 56 #include "public/platform/WebURLLoaderMockFactory.h"
58 #include "public/web/WebDocument.h" 57 #include "public/web/WebDocument.h"
59 #include "public/web/WebElement.h" 58 #include "public/web/WebElement.h"
60 #include "public/web/WebFrame.h" 59 #include "public/web/WebFrame.h"
61 #include "public/web/WebFrameClient.h" 60 #include "public/web/WebFrameClient.h"
(...skipping 11 matching lines...) Expand all
73 using blink::testing::runPendingTasks; 72 using blink::testing::runPendingTasks;
74 73
75 namespace blink { 74 namespace blink {
76 75
77 class WebPluginContainerTest : public ::testing::Test { 76 class WebPluginContainerTest : public ::testing::Test {
78 public: 77 public:
79 WebPluginContainerTest() : m_baseURL("http://www.test.com/") {} 78 WebPluginContainerTest() : m_baseURL("http://www.test.com/") {}
80 79
81 void TearDown() override { 80 void TearDown() override {
82 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs(); 81 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
83 WebCache::clear();
84 } 82 }
85 83
86 void calculateGeometry(WebPluginContainerImpl* pluginContainerImpl, 84 void calculateGeometry(WebPluginContainerImpl* pluginContainerImpl,
87 IntRect& windowRect, 85 IntRect& windowRect,
88 IntRect& clipRect, 86 IntRect& clipRect,
89 IntRect& unobscuredRect, 87 IntRect& unobscuredRect,
90 Vector<IntRect>& cutOutRects) { 88 Vector<IntRect>& cutOutRects) {
91 pluginContainerImpl->calculateGeometry(windowRect, clipRect, unobscuredRect, 89 pluginContainerImpl->calculateGeometry(windowRect, clipRect, unobscuredRect,
92 cutOutRects); 90 cutOutRects);
93 } 91 }
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 WebString::fromUTF8("translated-plugin")); 784 WebString::fromUTF8("translated-plugin"));
787 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); 785 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true);
788 786
789 runPendingTasks(); 787 runPendingTasks();
790 EXPECT_TRUE( 788 EXPECT_TRUE(
791 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( 789 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers(
792 EventHandlerRegistry::WheelEventBlocking)); 790 EventHandlerRegistry::WheelEventBlocking));
793 } 791 }
794 792
795 } // namespace blink 793 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698