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

Unified Diff: Source/web/tests/WebFrameTest.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/tests/SpinLockTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 4a3f112917626400b361734eda6193e2b88165a5..9a22a7a1b07ca5969617d236a26809c467825d30 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -3244,7 +3244,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadDoesntSetRedirect)
FrameTestHelpers::reloadFrameIgnoringCache(webViewHelper.webView()->mainFrame());
}
-class ReloadWithOverrideURLTask : public WebThread::Task {
+class ReloadWithOverrideURLTask : public WebTaskRunner::Task {
public:
ReloadWithOverrideURLTask(WebFrame* frame, const KURL& url, bool ignoreCache)
: m_frame(frame), m_url(url), m_ignoreCache(ignoreCache)
@@ -3294,7 +3294,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState)
float previousScale = webViewHelper.webViewImpl()->pageScaleFactor();
// Reload the page and end up at the same url. State should be propagated.
- Platform::current()->currentThread()->postTask(
+ Platform::current()->currentThread()->taskRunner()->postTask(
FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + firstURL), false));
FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame());
EXPECT_EQ(previousOffset.width, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width);
@@ -3302,7 +3302,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState)
EXPECT_EQ(previousScale, webViewHelper.webViewImpl()->pageScaleFactor());
// Reload the page using the cache. State should not be propagated.
- Platform::current()->currentThread()->postTask(
+ Platform::current()->currentThread()->taskRunner()->postTask(
FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + secondURL), false));
FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame());
EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width);
@@ -3310,7 +3310,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState)
EXPECT_EQ(1.0f, webViewHelper.webViewImpl()->pageScaleFactor());
// Reload the page while ignoring the cache. State should not be propagated.
- Platform::current()->currentThread()->postTask(
+ Platform::current()->currentThread()->taskRunner()->postTask(
FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + thirdURL), true));
FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame());
EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width);
« no previous file with comments | « Source/web/tests/SpinLockTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698