Chromium Code Reviews| Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
| diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
| index 7242f225202833f92d52ce6c06fe41aeb562b8e0..3df78bc9a838c111f6ce978dadb7e65ca7a3506c 100644 |
| --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
| +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
| @@ -3234,23 +3234,14 @@ TEST_P(ParameterizedWebFrameTest, ReloadDoesntSetRedirect) |
| FrameTestHelpers::reloadFrameIgnoringCache(webViewHelper.webView()->mainFrame()); |
| } |
| -class ReloadWithOverrideURLTask : public WebTaskRunner::Task { |
|
dcheng
2016/02/22 05:02:28
I think kinuko@ just removed this so you might hav
|
| -public: |
| - ReloadWithOverrideURLTask(WebFrame* frame, const KURL& url, bool ignoreCache) |
| - : m_frame(frame), m_url(url), m_ignoreCache(ignoreCache) |
| - { |
| - } |
| +namespace { |
| - void run() override |
| - { |
| - m_frame->reloadWithOverrideURL(m_url, m_ignoreCache); |
| - } |
| +void runReloadWithOverrideURLTask(WebFrame* frame, const KURL& url, bool ignoreCache) |
| +{ |
| + frame->reloadWithOverrideURL(url, ignoreCache); |
| +} |
| -private: |
| - WebFrame* const m_frame; |
| - const KURL m_url; |
| - const bool m_ignoreCache; |
| -}; |
| +} // namespace |
| class ClearScrollStateOnCommitWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| public: |
| @@ -3285,7 +3276,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState) |
| // Reload the page and end up at the same url. State should be propagated. |
| Platform::current()->currentThread()->taskRunner()->postTask( |
| - BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + firstURL), false)); |
| + BLINK_FROM_HERE, bind(&runReloadWithOverrideURLTask, webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + firstURL), false)); |
| FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame()); |
| EXPECT_EQ(previousOffset.width, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width); |
| EXPECT_EQ(previousOffset.height, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height); |
| @@ -3293,7 +3284,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState) |
| // Reload the page using the cache. State should not be propagated. |
| Platform::current()->currentThread()->taskRunner()->postTask( |
| - BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + secondURL), false)); |
| + BLINK_FROM_HERE, bind(&runReloadWithOverrideURLTask, webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + secondURL), false)); |
| FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame()); |
| EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width); |
| EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height); |
| @@ -3301,7 +3292,7 @@ TEST_F(WebFrameTest, ReloadWithOverrideURLPreservesState) |
| // Reload the page while ignoring the cache. State should not be propagated. |
| Platform::current()->currentThread()->taskRunner()->postTask( |
| - BLINK_FROM_HERE, new ReloadWithOverrideURLTask(webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + thirdURL), true)); |
| + BLINK_FROM_HERE, bind(&runReloadWithOverrideURLTask, webViewHelper.webViewImpl()->mainFrame(), toKURL(m_baseURL + thirdURL), true)); |
| FrameTestHelpers::pumpPendingRequestsDoNotUse(webViewHelper.webViewImpl()->mainFrame()); |
| EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().width); |
| EXPECT_EQ(0, webViewHelper.webViewImpl()->mainFrame()->scrollOffset().height); |