| Index: third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp
|
| similarity index 97%
|
| rename from third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
|
| rename to third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp
|
| index a6465be606cb37fec618d7f70f210ff48a02ce84..182fbcb8e5cb67374df7a212ceea796ec1560fec 100644
|
| --- a/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp
|
| @@ -28,11 +28,12 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#include "core/fetch/MemoryCache.h"
|
| +#include "platform/loader/fetch/MemoryCache.h"
|
|
|
| -#include "core/fetch/MockResourceClient.h"
|
| -#include "core/fetch/RawResource.h"
|
| +#include "platform/loader/fetch/MockResourceClient.h"
|
| +#include "platform/loader/fetch/RawResource.h"
|
| #include "platform/network/ResourceRequest.h"
|
| +#include "platform/testing/TestingPlatformSupport.h"
|
| #include "platform/testing/UnitTestHelpers.h"
|
| #include "public/platform/Platform.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -88,6 +89,8 @@ class MemoryCacheTest : public ::testing::Test {
|
| }
|
|
|
| Persistent<MemoryCache> m_globalMemoryCache;
|
| + ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
|
| + m_platform;
|
| };
|
|
|
| // Verifies that setters and getters for cache capacities work correcty.
|
| @@ -180,7 +183,8 @@ static void testResourcePruningAtEndOfTask(Resource* resource1,
|
| WTF::bind(&runTask2,
|
| resource1->encodedSize() + resource1->overheadSize() +
|
| resource2->encodedSize() + resource2->overheadSize()));
|
| - testing::runPendingTasks();
|
| + static_cast<TestingPlatformSupportWithMockScheduler*>(Platform::current())
|
| + ->runUntilIdle();
|
| }
|
|
|
| // Verified that when ordering a prune in a runLoop task, the prune
|
|
|