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

Side by Side Diff: ui/views/corewm/tooltip_controller_test_helper.cc

Issue 213833018: Aura tooltips do not move on mouse move in case of many neighboring views with the same label (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Write unit test for the case when a tooltip moves from one view to another with the same tooltip bu… Created 6 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/views/corewm/tooltip_controller_test_helper.h" 5 #include "ui/views/corewm/tooltip_controller_test_helper.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/views/corewm/tooltip.h"
8 #include "ui/views/corewm/tooltip_controller.h" 9 #include "ui/views/corewm/tooltip_controller.h"
9 10
10 namespace views { 11 namespace views {
11 namespace corewm { 12 namespace corewm {
12 namespace test { 13 namespace test {
13 14
14 TooltipControllerTestHelper::TooltipControllerTestHelper( 15 TooltipControllerTestHelper::TooltipControllerTestHelper(
15 TooltipController* controller) 16 TooltipController* controller)
16 : controller_(controller) { 17 : controller_(controller) {
17 } 18 }
18 19
19 TooltipControllerTestHelper::~TooltipControllerTestHelper() { 20 TooltipControllerTestHelper::~TooltipControllerTestHelper() {
20 } 21 }
21 22
23 gfx::Point TooltipControllerTestHelper::GetTooltipPosition() {
24 if (!controller_->tooltip_)
25 return gfx::Point();
26 return controller_->tooltip_->GetTooltipPosition();
27 }
28
22 base::string16 TooltipControllerTestHelper::GetTooltipText() { 29 base::string16 TooltipControllerTestHelper::GetTooltipText() {
23 return controller_->tooltip_text_; 30 return controller_->tooltip_text_;
24 } 31 }
25 32
26 aura::Window* TooltipControllerTestHelper::GetTooltipWindow() { 33 aura::Window* TooltipControllerTestHelper::GetTooltipWindow() {
27 return controller_->tooltip_window_; 34 return controller_->tooltip_window_;
28 } 35 }
29 36
30 void TooltipControllerTestHelper::FireTooltipTimer() { 37 void TooltipControllerTestHelper::FireTooltipTimer() {
31 controller_->TooltipTimerFired(); 38 controller_->TooltipTimerFired();
(...skipping 24 matching lines...) Expand all
56 63
57 bool TooltipTestView::GetTooltipText(const gfx::Point& p, 64 bool TooltipTestView::GetTooltipText(const gfx::Point& p,
58 base::string16* tooltip) const { 65 base::string16* tooltip) const {
59 *tooltip = tooltip_text_; 66 *tooltip = tooltip_text_;
60 return true; 67 return true;
61 } 68 }
62 69
63 } // namespace test 70 } // namespace test
64 } // namespace corewm 71 } // namespace corewm
65 } // namespace views 72 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698