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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp

Issue 2011783002: Rename OwnPtr::clear() to reset() in platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 m_layerTreeView = adoptPtr(new WebLayerTreeViewImplForTesting); 61 m_layerTreeView = adoptPtr(new WebLayerTreeViewImplForTesting);
62 ASSERT(m_layerTreeView); 62 ASSERT(m_layerTreeView);
63 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer()); 63 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer());
64 m_layerTreeView->registerViewportLayers( 64 m_layerTreeView->registerViewportLayers(
65 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer (), m_graphicsLayer->platformLayer(), 0); 65 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer (), m_graphicsLayer->platformLayer(), 0);
66 m_layerTreeView->setViewportSize(WebSize(1, 1)); 66 m_layerTreeView->setViewportSize(WebSize(1, 1));
67 } 67 }
68 68
69 ~GraphicsLayerTest() override 69 ~GraphicsLayerTest() override
70 { 70 {
71 m_graphicsLayer.clear(); 71 m_graphicsLayer.reset();
72 m_layerTreeView.clear(); 72 m_layerTreeView.reset();
73 } 73 }
74 74
75 WebLayerTreeView* layerTreeView() { return m_layerTreeView.get(); } 75 WebLayerTreeView* layerTreeView() { return m_layerTreeView.get(); }
76 76
77 protected: 77 protected:
78 WebLayer* m_platformLayer; 78 WebLayer* m_platformLayer;
79 OwnPtr<FakeGraphicsLayer> m_graphicsLayer; 79 OwnPtr<FakeGraphicsLayer> m_graphicsLayer;
80 OwnPtr<FakeGraphicsLayer> m_scrollElasticityLayer; 80 OwnPtr<FakeGraphicsLayer> m_scrollElasticityLayer;
81 OwnPtr<FakeGraphicsLayer> m_clipLayer; 81 OwnPtr<FakeGraphicsLayer> m_clipLayer;
82 82
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 WebDoublePoint scrollPosition(7, 9); 194 WebDoublePoint scrollPosition(7, 9);
195 m_platformLayer->setScrollPositionDouble(scrollPosition); 195 m_platformLayer->setScrollPositionDouble(scrollPosition);
196 m_graphicsLayer->didScroll(); 196 m_graphicsLayer->didScroll();
197 197
198 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() ); 198 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() );
199 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() ); 199 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() );
200 } 200 }
201 201
202 } // namespace blink 202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698