Chromium Code Reviews| Index: Source/web/tests/FrameLoaderClientImplTest.cpp |
| diff --git a/Source/web/tests/FrameLoaderClientImplTest.cpp b/Source/web/tests/FrameLoaderClientImplTest.cpp |
| index e41062f3849016891920538a7b17eb8172a8adaf..18579d126af04a8b544d80610c2351adca761279 100644 |
| --- a/Source/web/tests/FrameLoaderClientImplTest.cpp |
| +++ b/Source/web/tests/FrameLoaderClientImplTest.cpp |
| @@ -74,7 +74,6 @@ protected: |
| m_webView->settings()->setAcceleratedCompositingEnabled(false); |
| m_mainFrame = WebLocalFrame::create(WebTreeScopeType::Document, &m_webFrameClient); |
| m_webView->setMainFrame(m_mainFrame); |
| - m_frameLoaderClientImpl = toFrameLoaderClientImpl(toWebLocalFrameImpl(m_webView->mainFrame())->frame()->loader().client()); |
| } |
| void TearDown() override |
| @@ -87,18 +86,18 @@ protected: |
| { |
| // The test always returns the same user agent, regardless of the URL passed in. |
| KURL dummyURL(ParsedURLString, "about:blank"); |
| - WTF::CString userAgent = m_frameLoaderClientImpl->userAgent(dummyURL).utf8(); |
| + WTF::CString userAgent = frameLoaderClientImpl().userAgent(dummyURL).utf8(); |
|
sof
2015/08/25 10:37:14
You can use frameLoaderClient() for this also (and
Yuta Kitamura
2015/08/26 05:32:30
OK, I'll follow up on this. Follow-up of a follow-
|
| return WebString::fromUTF8(userAgent.data(), userAgent.length()); |
| } |
| WebLocalFrameImpl* mainFrame() { return toWebLocalFrameImpl(m_webView->mainFrame()); } |
| Document& document() { return *toWebLocalFrameImpl(m_mainFrame)->frame()->document(); } |
| MockWebFrameClient& webFrameClient() { return m_webFrameClient; } |
| - FrameLoaderClient& frameLoaderClient() { return *m_frameLoaderClientImpl; } |
| + FrameLoaderClient& frameLoaderClient() { return frameLoaderClientImpl(); } |
| + FrameLoaderClientImpl& frameLoaderClientImpl() { return *toFrameLoaderClientImpl(toWebLocalFrameImpl(m_webView->mainFrame())->frame()->loader().client()); } |
| private: |
| MockWebFrameClient m_webFrameClient; |
| - FrameLoaderClientImpl* m_frameLoaderClientImpl; |
| WebView* m_webView; |
| WebFrame* m_mainFrame; |
| }; |