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

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

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics Created 3 years, 8 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 GraphicsLayerTest() { 58 GraphicsLayerTest() {
59 m_clipLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client)); 59 m_clipLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client));
60 m_scrollElasticityLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client)); 60 m_scrollElasticityLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client));
61 m_graphicsLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client)); 61 m_graphicsLayer = WTF::wrapUnique(new FakeGraphicsLayer(&m_client));
62 m_clipLayer->addChild(m_scrollElasticityLayer.get()); 62 m_clipLayer->addChild(m_scrollElasticityLayer.get());
63 m_scrollElasticityLayer->addChild(m_graphicsLayer.get()); 63 m_scrollElasticityLayer->addChild(m_graphicsLayer.get());
64 m_graphicsLayer->platformLayer()->setScrollClipLayer( 64 m_graphicsLayer->platformLayer()->setScrollClipLayer(
65 m_clipLayer->platformLayer()); 65 m_clipLayer->platformLayer());
66 m_platformLayer = m_graphicsLayer->platformLayer(); 66 m_platformLayer = m_graphicsLayer->platformLayer();
67 m_layerTreeView = WTF::wrapUnique(new WebLayerTreeViewImplForTesting); 67 m_layerTreeView = WTF::wrapUnique(new WebLayerTreeViewImplForTesting);
68 ASSERT(m_layerTreeView); 68 DCHECK(m_layerTreeView);
69 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer()); 69 m_layerTreeView->setRootLayer(*m_clipLayer->platformLayer());
70 m_layerTreeView->registerViewportLayers( 70 m_layerTreeView->registerViewportLayers(
71 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer(), 71 m_scrollElasticityLayer->platformLayer(), m_clipLayer->platformLayer(),
72 m_graphicsLayer->platformLayer(), 0); 72 m_graphicsLayer->platformLayer(), 0);
73 m_layerTreeView->setViewportSize(WebSize(1, 1)); 73 m_layerTreeView->setViewportSize(WebSize(1, 1));
74 } 74 }
75 75
76 ~GraphicsLayerTest() override { 76 ~GraphicsLayerTest() override {
77 m_graphicsLayer.reset(); 77 m_graphicsLayer.reset();
78 m_layerTreeView.reset(); 78 m_layerTreeView.reset();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return Platform::current()->currentThread()->scheduler()->timerTaskRunner(); 195 return Platform::current()->currentThread()->scheduler()->timerTaskRunner();
196 } 196 }
197 197
198 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::trace(visitor); } 198 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::trace(visitor); }
199 199
200 private: 200 private:
201 ScrollOffset m_scrollOffset; 201 ScrollOffset m_scrollOffset;
202 }; 202 };
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698