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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_highlight_manager_interactive_uitest.cc

Issue 2087623002: Move AccessibilityHighlightManagerTest to interactive_ui_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize two variables Created 4 years, 6 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
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 "chrome/browser/chromeos/accessibility/accessibility_highlight_manager. h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_highlight_manager. h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 base::Bind(&AccessibilityHighlightManagerTest::GotSnapshot, this)); 131 base::Bind(&AccessibilityHighlightManagerTest::GotSnapshot, this));
132 base::RunLoop run_loop; 132 base::RunLoop run_loop;
133 run_loop_quitter_ = run_loop.QuitClosure(); 133 run_loop_quitter_ = run_loop.QuitClosure();
134 run_loop.Run(); 134 run_loop.Run();
135 } 135 }
136 136
137 base::Closure run_loop_quitter_; 137 base::Closure run_loop_quitter_;
138 gfx::Image image_; 138 gfx::Image image_;
139 SkBitmap before_bmp_; 139 SkBitmap before_bmp_;
140 SkBitmap after_bmp_; 140 SkBitmap after_bmp_;
141 int diff_count_; 141 int diff_count_ = 0;
142 SkColor average_diff_color_; 142 SkColor average_diff_color_ = 0;
143 143
144 DISALLOW_COPY_AND_ASSIGN(AccessibilityHighlightManagerTest); 144 DISALLOW_COPY_AND_ASSIGN(AccessibilityHighlightManagerTest);
145 }; 145 };
146 146
147 IN_PROC_BROWSER_TEST_F(AccessibilityHighlightManagerTest, 147 IN_PROC_BROWSER_TEST_F(AccessibilityHighlightManagerTest,
148 TestCaretRingDrawsBluePixels) { 148 TestCaretRingDrawsBluePixels) {
149 gfx::Rect capture_bounds(200, 300, 100, 100); 149 gfx::Rect capture_bounds(200, 300, 100, 100);
150 gfx::Rect caret_bounds(230, 330, 1, 25); 150 gfx::Rect caret_bounds(230, 330, 1, 25);
151 151
152 CaptureBeforeImage(capture_bounds); 152 CaptureBeforeImage(capture_bounds);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // This is a smoke test to assert that something is drawn in the right 212 // This is a smoke test to assert that something is drawn in the right
213 // part of the screen of approximately the right size and color. 213 // part of the screen of approximately the right size and color.
214 // There's deliberately some tolerance for tiny errors. 214 // There's deliberately some tolerance for tiny errors.
215 EXPECT_NEAR(1608, diff_count(), 50); 215 EXPECT_NEAR(1608, diff_count(), 50);
216 EXPECT_NEAR(255, SkColorGetR(average_diff_color()), 5); 216 EXPECT_NEAR(255, SkColorGetR(average_diff_color()), 5);
217 EXPECT_NEAR(201, SkColorGetG(average_diff_color()), 5); 217 EXPECT_NEAR(201, SkColorGetG(average_diff_color()), 5);
218 EXPECT_NEAR(152, SkColorGetB(average_diff_color()), 5); 218 EXPECT_NEAR(152, SkColorGetB(average_diff_color()), 5);
219 } 219 }
220 220
221 } // namespace chromeos 221 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_highlight_manager_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698