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

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: Dana comments 1 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after
5690 output_surface->set_forced_draw_to_software_device(true); 5690 output_surface->set_forced_draw_to_software_device(true);
5691 EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice()); 5691 EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice());
5692 5692
5693 EXPECT_EQ(0, software_device->frames_began_); 5693 EXPECT_EQ(0, software_device->frames_began_);
5694 EXPECT_EQ(0, software_device->frames_ended_); 5694 EXPECT_EQ(0, software_device->frames_ended_);
5695 5695
5696 DrawFrame(); 5696 DrawFrame();
5697 5697
5698 EXPECT_EQ(1, software_device->frames_began_); 5698 EXPECT_EQ(1, software_device->frames_began_);
5699 EXPECT_EQ(1, software_device->frames_ended_); 5699 EXPECT_EQ(1, software_device->frames_ended_);
5700
5701 // Call other API methods that are likely to hit NULL pointer in this mode.
5702 EXPECT_TRUE(host_impl_->AsValue());
5703 EXPECT_TRUE(host_impl_->ActivationStateAsValue());
5700 } 5704 }
5701 5705
5702 } // namespace 5706 } // namespace
5703 } // namespace cc 5707 } // namespace cc
OLDNEW
« no previous file with comments | « 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