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

Unified Diff: Source/core/layout/LayoutTestHelper.cpp

Issue 1291903003: Oilpan: Move ChromeClient classes into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a raw reference in InspectorOverlayImpl.cpp. 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 | « Source/core/layout/LayoutTestHelper.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTestHelper.cpp
diff --git a/Source/core/layout/LayoutTestHelper.cpp b/Source/core/layout/LayoutTestHelper.cpp
index 2b980dcabff05bd9eabf7a9f0789fc703f516e1f..8a10aeb27ee8ae1fc6dec2ec082297a01cda6948 100644
--- a/Source/core/layout/LayoutTestHelper.cpp
+++ b/Source/core/layout/LayoutTestHelper.cpp
@@ -21,6 +21,8 @@ public:
class FakeChromeClient : public EmptyChromeClient {
public:
+ static PassOwnPtrWillBeRawPtr<FakeChromeClient> create() { return adoptPtrWillBeNoop(new FakeChromeClient); }
+
virtual GraphicsLayerFactory* graphicsLayerFactory() const
{
static FakeGraphicsLayerFactory* factory = adoptPtr(new FakeGraphicsLayerFactory).leakPtr();
@@ -30,10 +32,11 @@ public:
void RenderingTest::SetUp()
{
- fillWithEmptyClients(m_pageClients);
- static FakeChromeClient* chromeClient = adoptPtr(new FakeChromeClient).leakPtr();
- m_pageClients.chromeClient = chromeClient;
- m_pageHolder = DummyPageHolder::create(IntSize(800, 600), &m_pageClients);
+ Page::PageClients pageClients;
+ fillWithEmptyClients(pageClients);
+ DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FakeChromeClient>, chromeClient, (FakeChromeClient::create()));
+ pageClients.chromeClient = chromeClient.get();
+ m_pageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients);
// This ensures that the minimal DOM tree gets attached
// correctly for tests that don't call setBodyInnerHTML.
« no previous file with comments | « Source/core/layout/LayoutTestHelper.h ('k') | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698