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

Side by Side Diff: ui/gfx/color_analysis_unittest.cc

Issue 10905053: ui: Fix clang warnings about missing virtual and OVERRIDE annotations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « ui/base/resource/resource_bundle.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/gfx/color_analysis.h" 5 #include "ui/gfx/color_analysis.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void Reset() { 102 void Reset() {
103 prebaked_sample_results_.clear(); 103 prebaked_sample_results_.clear();
104 ResetCounter(); 104 ResetCounter();
105 } 105 }
106 106
107 void ResetCounter() { 107 void ResetCounter() {
108 current_result_index_ = 0; 108 current_result_index_ = 0;
109 } 109 }
110 110
111 virtual int GetSample(int width, int height) { 111 virtual int GetSample(int width, int height) OVERRIDE {
112 if (current_result_index_ >= prebaked_sample_results_.size()) { 112 if (current_result_index_ >= prebaked_sample_results_.size()) {
113 current_result_index_ = 0; 113 current_result_index_ = 0;
114 } 114 }
115 115
116 if (prebaked_sample_results_.empty()) { 116 if (prebaked_sample_results_.empty()) {
117 return 0; 117 return 0;
118 } 118 }
119 119
120 return prebaked_sample_results_[current_result_index_++]; 120 return prebaked_sample_results_[current_result_index_++];
121 } 121 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 scoped_refptr<base::RefCountedBytes> png( 171 scoped_refptr<base::RefCountedBytes> png(
172 new base::RefCountedBytes( 172 new base::RefCountedBytes(
173 std::vector<unsigned char>( 173 std::vector<unsigned char>(
174 k1x3BlueRed, 174 k1x3BlueRed,
175 k1x3BlueRed + sizeof(k1x3BlueRed) / sizeof(unsigned char)))); 175 k1x3BlueRed + sizeof(k1x3BlueRed) / sizeof(unsigned char))));
176 176
177 SkColor color = CalculateKMeanColorOfPNG(png, 100, 600, test_sampler); 177 SkColor color = CalculateKMeanColorOfPNG(png, 100, 600, test_sampler);
178 178
179 EXPECT_EQ(color, SkColorSetARGB(0xFF, 0xFF, 0x00, 0x00)); 179 EXPECT_EQ(color, SkColorSetARGB(0xFF, 0xFF, 0x00, 0x00));
180 } 180 }
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698