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

Unified Diff: Source/web/tests/FrameTestHelpers.cpp

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 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
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/SpinLockTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/FrameTestHelpers.cpp
diff --git a/Source/web/tests/FrameTestHelpers.cpp b/Source/web/tests/FrameTestHelpers.cpp
index 62232f33dfd0534703f96db2701ae80f44a7113d..1fd60002fc38ec8950ff7837227b839fdf96c5a1 100644
--- a/Source/web/tests/FrameTestHelpers.cpp
+++ b/Source/web/tests/FrameTestHelpers.cpp
@@ -72,7 +72,7 @@ TestWebFrameClient* testClientForFrame(WebFrame* frame)
return static_cast<TestWebFrameClient*>(toWebLocalFrameImpl(frame)->client());
}
-class ServeAsyncRequestsTask : public WebThread::Task {
+class ServeAsyncRequestsTask : public WebTaskRunner::Task {
public:
explicit ServeAsyncRequestsTask(TestWebFrameClient* client)
: m_client(client)
@@ -83,7 +83,7 @@ public:
{
Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
if (m_client->isLoading())
- Platform::current()->currentThread()->postTask(FROM_HERE, new ServeAsyncRequestsTask(m_client));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new ServeAsyncRequestsTask(m_client));
else
Platform::current()->unitTestSupport()->exitRunLoop();
}
@@ -94,11 +94,11 @@ private:
void pumpPendingRequests(WebFrame* frame)
{
- Platform::current()->currentThread()->postTask(FROM_HERE, new ServeAsyncRequestsTask(testClientForFrame(frame)));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new ServeAsyncRequestsTask(testClientForFrame(frame)));
Platform::current()->unitTestSupport()->enterRunLoop();
}
-class LoadTask : public WebThread::Task {
+class LoadTask : public WebTaskRunner::Task {
public:
LoadTask(WebFrame* frame, const WebURLRequest& request)
: m_frame(frame)
@@ -116,7 +116,7 @@ private:
const WebURLRequest m_request;
};
-class LoadHTMLStringTask : public WebThread::Task {
+class LoadHTMLStringTask : public WebTaskRunner::Task {
public:
LoadHTMLStringTask(WebFrame* frame, const std::string& html, const WebURL& baseURL)
: m_frame(frame)
@@ -136,7 +136,7 @@ private:
const WebURL m_baseURL;
};
-class LoadHistoryItemTask : public WebThread::Task {
+class LoadHistoryItemTask : public WebTaskRunner::Task {
public:
LoadHistoryItemTask(WebFrame* frame, const WebHistoryItem& item, WebHistoryLoadType loadType, WebURLRequest::CachePolicy cachePolicy)
: m_frame(frame)
@@ -158,7 +158,7 @@ private:
const WebURLRequest::CachePolicy m_cachePolicy;
};
-class ReloadTask : public WebThread::Task {
+class ReloadTask : public WebTaskRunner::Task {
public:
ReloadTask(WebFrame* frame, bool ignoreCache)
: m_frame(frame)
@@ -196,31 +196,31 @@ void loadFrame(WebFrame* frame, const std::string& url)
urlRequest.initialize();
urlRequest.setURL(URLTestHelpers::toKURL(url));
- Platform::current()->currentThread()->postTask(FROM_HERE, new LoadTask(frame, urlRequest));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new LoadTask(frame, urlRequest));
pumpPendingRequests(frame);
}
void loadHTMLString(WebFrame* frame, const std::string& html, const WebURL& baseURL)
{
- Platform::current()->currentThread()->postTask(FROM_HERE, new LoadHTMLStringTask(frame, html, baseURL));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new LoadHTMLStringTask(frame, html, baseURL));
pumpPendingRequests(frame);
}
void loadHistoryItem(WebFrame* frame, const WebHistoryItem& item, WebHistoryLoadType loadType, WebURLRequest::CachePolicy cachePolicy)
{
- Platform::current()->currentThread()->postTask(FROM_HERE, new LoadHistoryItemTask(frame, item, loadType, cachePolicy));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new LoadHistoryItemTask(frame, item, loadType, cachePolicy));
pumpPendingRequests(frame);
}
void reloadFrame(WebFrame* frame)
{
- Platform::current()->currentThread()->postTask(FROM_HERE, new ReloadTask(frame, false));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new ReloadTask(frame, false));
pumpPendingRequests(frame);
}
void reloadFrameIgnoringCache(WebFrame* frame)
{
- Platform::current()->currentThread()->postTask(FROM_HERE, new ReloadTask(frame, true));
+ Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new ReloadTask(frame, true));
pumpPendingRequests(frame);
}
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/SpinLockTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698