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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: another try Created 3 years, 11 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/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

Powered by Google App Engine
This is Rietveld 408576698