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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 640203002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr [part-… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 2fc8fff4793976ce564716670828b49a6dc262fa..8c2fe457df337b298edc11d17366a326e05b202d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -3426,7 +3426,7 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) {
// the root scrollable layer.
current_offset = gfx::ScrollOffset(13.f, 12.f);
scroll_delegate.set_getter_return_value(current_offset);
- host_impl_->SetRootLayerScrollOffsetDelegate(NULL);
+ host_impl_->SetRootLayerScrollOffsetDelegate(nullptr);
EXPECT_EQ(current_offset.ToString(),
scroll_layer->TotalScrollOffset().ToString());
@@ -3465,7 +3465,7 @@ TEST_F(LayerTreeHostImplTest,
DrawFrame();
CheckLayerScrollDelta(scroll_layer, ScrollOffsetToVector2dF(scroll_offset));
- host_impl_->SetRootLayerScrollOffsetDelegate(NULL);
+ host_impl_->SetRootLayerScrollOffsetDelegate(nullptr);
}
TEST_F(LayerTreeHostImplTest, OverscrollRoot) {
@@ -4043,7 +4043,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest {
protected:
LayerTreeHostImplViewportCoveredTest() :
gutter_quad_material_(DrawQuad::SOLID_COLOR),
- child_(NULL),
+ child_(nullptr),
did_activate_pending_tree_(false) {}
scoped_ptr<OutputSurface> CreateFakeOutputSurface(bool always_draw) {
@@ -5843,7 +5843,7 @@ TEST_F(LayerTreeHostImplTest, ForcedDrawToSoftwareDeviceBasicRender) {
EXPECT_EQ(1, software_device->frames_began_);
EXPECT_EQ(1, software_device->frames_ended_);
- // Call other API methods that are likely to hit NULL pointer in this mode.
+ // Call other API methods that are likely to hit nullptr pointer in this mode.
EXPECT_TRUE(host_impl_->AsValue().get());
EXPECT_TRUE(host_impl_->ActivationStateAsValue().get());
}
@@ -6004,7 +6004,7 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) {
// GPU rasterization should be disabled by default on the tree(s)
EXPECT_FALSE(host_impl_->active_tree()->use_gpu_rasterization());
- EXPECT_TRUE(host_impl_->pending_tree() == NULL);
+ EXPECT_TRUE(host_impl_->pending_tree() == nullptr);
host_impl_->SetVisible(true);
host_impl_->SetMemoryPolicy(policy1);
@@ -6024,7 +6024,7 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) {
LayerTreeSettings settings;
settings.gpu_rasterization_enabled = true;
host_impl_ = LayerTreeHostImpl::Create(
- settings, this, &proxy_, &stats_instrumentation_, NULL, 0);
+ settings, this, &proxy_, &stats_instrumentation_, nullptr, 0);
host_impl_->SetUseGpuRasterization(true);
host_impl_->SetVisible(true);
host_impl_->SetMemoryPolicy(policy1);
@@ -6563,7 +6563,7 @@ TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) {
fake_output_surface->last_sent_frame().metadata.latency_info;
EXPECT_EQ(1u, metadata_latency_after.size());
EXPECT_TRUE(metadata_latency_after[0].FindLatency(
- ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, NULL));
+ ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, nullptr));
}
TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
@@ -6660,7 +6660,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
{
scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
- new SimpleSwapPromiseMonitor(NULL,
+ new SimpleSwapPromiseMonitor(nullptr,
host_impl_.get(),
&set_needs_commit_count,
&set_needs_redraw_count,
@@ -6680,7 +6680,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
{
scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
- new SimpleSwapPromiseMonitor(NULL,
+ new SimpleSwapPromiseMonitor(nullptr,
host_impl_.get(),
&set_needs_commit_count,
&set_needs_redraw_count,
@@ -6693,7 +6693,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
{
scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
- new SimpleSwapPromiseMonitor(NULL,
+ new SimpleSwapPromiseMonitor(nullptr,
host_impl_.get(),
&set_needs_commit_count,
&set_needs_redraw_count,
@@ -6710,7 +6710,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
set_needs_redraw_count = 0;
forward_to_main_count = 0;
scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
- new SimpleSwapPromiseMonitor(NULL,
+ new SimpleSwapPromiseMonitor(nullptr,
host_impl_.get(),
&set_needs_commit_count,
&set_needs_redraw_count,
@@ -7151,7 +7151,7 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
EXPECT_VECTOR_EQ(gfx::ScrollOffset(0, 100),
scrolling_layer->TotalScrollOffset());
- EXPECT_EQ(NULL, host_impl_->CurrentlyScrollingLayer());
+ EXPECT_EQ(nullptr, host_impl_->CurrentlyScrollingLayer());
}
TEST_F(LayerTreeHostImplTest, GetPictureLayerImplPairs) {
@@ -7174,18 +7174,18 @@ TEST_F(LayerTreeHostImplTest, GetPictureLayerImplPairs) {
EXPECT_EQ(2u, layer_pairs.size());
if (layer_pairs[0].active) {
EXPECT_EQ(active_layer.get(), layer_pairs[0].active);
- EXPECT_EQ(NULL, layer_pairs[0].pending);
+ EXPECT_EQ(nullptr, layer_pairs[0].pending);
} else {
EXPECT_EQ(pending_layer.get(), layer_pairs[0].pending);
- EXPECT_EQ(NULL, layer_pairs[0].active);
+ EXPECT_EQ(nullptr, layer_pairs[0].active);
}
if (layer_pairs[1].active) {
EXPECT_EQ(active_layer.get(), layer_pairs[1].active);
- EXPECT_EQ(NULL, layer_pairs[1].pending);
+ EXPECT_EQ(nullptr, layer_pairs[1].pending);
} else {
EXPECT_EQ(pending_layer.get(), layer_pairs[1].pending);
- EXPECT_EQ(NULL, layer_pairs[1].active);
+ EXPECT_EQ(nullptr, layer_pairs[1].active);
}
active_layer->set_twin_layer(pending_layer.get());

Powered by Google App Engine
This is Rietveld 408576698