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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 15743022: Fix potential NULL pointer in LayerTreeHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 5678 matching lines...) Expand 10 before | Expand all | Expand 10 after
5689 output_surface->set_forced_draw_to_software_device(true); 5689 output_surface->set_forced_draw_to_software_device(true);
5690 EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice()); 5690 EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice());
5691 5691
5692 EXPECT_EQ(0, software_device->frames_began_); 5692 EXPECT_EQ(0, software_device->frames_began_);
5693 EXPECT_EQ(0, software_device->frames_ended_); 5693 EXPECT_EQ(0, software_device->frames_ended_);
5694 5694
5695 DrawFrame(); 5695 DrawFrame();
5696 5696
5697 EXPECT_EQ(1, software_device->frames_began_); 5697 EXPECT_EQ(1, software_device->frames_began_);
5698 EXPECT_EQ(1, software_device->frames_ended_); 5698 EXPECT_EQ(1, software_device->frames_ended_);
5699
5700 // Call other API methods that are likely to hit NULL pointer in this mode.
5701 EXPECT_TRUE(host_impl_->AsValue());
5702 EXPECT_TRUE(host_impl_->ActivationStateAsValue());
5699 } 5703 }
5700 5704
5701 } // namespace 5705 } // namespace
5702 } // namespace cc 5706 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698