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

Side by Side Diff: cc/test/layer_tree_pixel_test.cc

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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/test/fake_web_scrollbar_theme_geometry.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "cc/test/paths.h" 8 #include "cc/test/paths.h"
9 #include "cc/test/pixel_test_utils.h" 9 #include "cc/test/pixel_test_utils.h"
10 #include "cc/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 device_viewport_rect.width(), 57 device_viewport_rect.width(),
58 device_viewport_rect.height()); 58 device_viewport_rect.height());
59 bitmap.allocPixels(); 59 bitmap.allocPixels();
60 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels()); 60 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels());
61 host_impl->Readback(pixels, device_viewport_rect); 61 host_impl->Readback(pixels, device_viewport_rect);
62 62
63 base::FilePath test_data_dir; 63 base::FilePath test_data_dir;
64 EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)); 64 EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir));
65 65
66 // To rebaseline: 66 // To rebaseline:
67 //EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_))); 67 // EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_)));
68 68
69 EXPECT_TRUE(IsSameAsPNGFile(bitmap, test_data_dir.Append(ref_file_))); 69 EXPECT_TRUE(IsSameAsPNGFile(bitmap, test_data_dir.Append(ref_file_)));
70 70
71 EndTest(); 71 EndTest();
72 } 72 }
73 73
74 void LayerTreePixelTest::BeginTest() { 74 void LayerTreePixelTest::BeginTest() {
75 PostSetNeedsCommitToMainThread(); 75 PostSetNeedsCommitToMainThread();
76 } 76 }
77 77
(...skipping 20 matching lines...) Expand all
98 98
99 void LayerTreePixelTest::SetupTree() { 99 void LayerTreePixelTest::SetupTree() {
100 scoped_refptr<Layer> root = Layer::Create(); 100 scoped_refptr<Layer> root = Layer::Create();
101 root->SetBounds(content_root_->bounds()); 101 root->SetBounds(content_root_->bounds());
102 root->AddChild(content_root_); 102 root->AddChild(content_root_);
103 layer_tree_host()->SetRootLayer(root); 103 layer_tree_host()->SetRootLayer(root);
104 LayerTreeTest::SetupTree(); 104 LayerTreeTest::SetupTree();
105 } 105 }
106 106
107 } // namespace cc 107 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_web_scrollbar_theme_geometry.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698