Commit c272c07c authored by yutak@chromium.org's avatar yutak@chromium.org

Oilpan: Fix a raw pointer in FrameLoaderClientImplTest.

A simple follow-up of https://codereview.chromium.org/1306793003/.

BUG=509911
R=haraken@chromium.org, oilpan-reviews@chromium.org, sigbjornf@opera.com

Review URL: https://codereview.chromium.org/1314703003

git-svn-id: svn://svn.chromium.org/blink/trunk@201125 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6f34bcf3
......@@ -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();
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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment