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

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

Issue 1314703003: Oilpan: Fix a raw pointer in FrameLoaderClientImplTest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove the field. Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698