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

Unified Diff: Source/core/fetch/MemoryCacheTest.cpp

Issue 962053003: tests: Use runPendingTasks instead of WebThread::enterRunLoop()/exitRunLoop() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 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: Source/core/fetch/MemoryCacheTest.cpp
diff --git a/Source/core/fetch/MemoryCacheTest.cpp b/Source/core/fetch/MemoryCacheTest.cpp
index 9f9e4e063978b3dd6fde5335f9f95de46aeb0214..abae5649c2d0cb580295d9c06aba74814526eea5 100644
--- a/Source/core/fetch/MemoryCacheTest.cpp
+++ b/Source/core/fetch/MemoryCacheTest.cpp
@@ -34,6 +34,7 @@
#include "core/fetch/MockImageResourceClient.h"
#include "core/fetch/RawResource.h"
#include "core/fetch/ResourcePtr.h"
+#include "core/testing/UnitTestHelpers.h"
#include "platform/network/ResourceRequest.h"
#include "public/platform/Platform.h"
#include "wtf/OwnPtr.h"
@@ -249,7 +250,6 @@ static void TestLiveResourceEvictionAtEndOfTask(Resource* cachedDeadResource, co
// Next task: now, the live resource was evicted.
ASSERT_EQ(0u, memoryCache()->deadSize());
ASSERT_EQ(m_liveSizeWithoutDecode, memoryCache()->liveSize());
- blink::Platform::current()->currentThread()->exitRunLoop();
}
private:
@@ -259,7 +259,7 @@ static void TestLiveResourceEvictionAtEndOfTask(Resource* cachedDeadResource, co
blink::Platform::current()->currentThread()->postTask(FROM_HERE, new Task1(cachedLiveResource, cachedDeadResource));
blink::Platform::current()->currentThread()->postTask(FROM_HERE, new Task2(cachedLiveResource->encodedSize() + cachedLiveResource->overheadSize()));
- blink::Platform::current()->currentThread()->enterRunLoop();
+ testing::runPendingTasks();
cachedLiveResource->removeClient(&client);
}

Powered by Google App Engine
This is Rietveld 408576698