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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/color_analysis.h ('k') | ui/gfx/display_change_notifier_unittest.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/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 current_result_index_(0) { 113 current_result_index_(0) {
114 } 114 }
115 115
116 virtual ~MockKMeanImageSampler() { 116 virtual ~MockKMeanImageSampler() {
117 } 117 }
118 118
119 void AddSample(int sample) { 119 void AddSample(int sample) {
120 prebaked_sample_results_.push_back(sample); 120 prebaked_sample_results_.push_back(sample);
121 } 121 }
122 122
123 virtual int GetSample(int width, int height) OVERRIDE { 123 virtual int GetSample(int width, int height) override {
124 if (current_result_index_ >= prebaked_sample_results_.size()) { 124 if (current_result_index_ >= prebaked_sample_results_.size()) {
125 current_result_index_ = 0; 125 current_result_index_ = 0;
126 } 126 }
127 127
128 if (prebaked_sample_results_.empty()) { 128 if (prebaked_sample_results_.empty()) {
129 return 0; 129 return 0;
130 } 130 }
131 131
132 return prebaked_sample_results_[current_result_index_++]; 132 return prebaked_sample_results_[current_result_index_++];
133 } 133 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl); 496 Calculate8bitBitmapMinMax(result, &min_gl, &max_gl);
497 497
498 EXPECT_EQ(0, min_gl); 498 EXPECT_EQ(0, min_gl);
499 EXPECT_EQ(255, max_gl); 499 EXPECT_EQ(255, max_gl);
500 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0))); 500 EXPECT_EQ(min_gl, SkColorGetA(result.getColor(0, 0)));
501 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199))); 501 EXPECT_EQ(max_gl, SkColorGetA(result.getColor(299, 199)));
502 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0))); 502 EXPECT_EQ(93U, SkColorGetA(result.getColor(150, 0)));
503 } 503 }
504 504
505 } // namespace color_utils 505 } // namespace color_utils
OLDNEW
« no previous file with comments | « ui/gfx/color_analysis.h ('k') | ui/gfx/display_change_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698