| OLD | NEW |
| 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 "chrome/browser/ui/views/tabs/tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" | 8 #include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" |
| 9 #include "chrome/browser/ui/views/tabs/tab.h" | 9 #include "chrome/browser/ui/views/tabs/tab.h" |
| 10 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 10 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
| 12 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" | 12 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "ui/gfx/geometry/rect_conversions.h" |
| 15 #include "ui/gfx/path.h" | 16 #include "ui/gfx/path.h" |
| 16 #include "ui/gfx/rect_conversions.h" | |
| 17 #include "ui/gfx/skia_util.h" | 17 #include "ui/gfx/skia_util.h" |
| 18 #include "ui/views/test/views_test_base.h" | 18 #include "ui/views/test/views_test_base.h" |
| 19 #include "ui/views/view.h" | 19 #include "ui/views/view.h" |
| 20 #include "ui/views/view_targeter.h" | 20 #include "ui/views/view_targeter.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Walks up the views hierarchy until it finds a tab view. It returns the | 25 // Walks up the views hierarchy until it finds a tab view. It returns the |
| 26 // found tab view, on NULL if none is found. | 26 // found tab view, on NULL if none is found. |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 ASSERT_TRUE(IsPointInTab(most_right_tab, unactive_overlap)); | 631 ASSERT_TRUE(IsPointInTab(most_right_tab, unactive_overlap)); |
| 632 | 632 |
| 633 EXPECT_EQ( | 633 EXPECT_EQ( |
| 634 right_tab, | 634 right_tab, |
| 635 FindTabView(tab_strip_->GetTooltipHandlerForPoint(unactive_overlap))); | 635 FindTabView(tab_strip_->GetTooltipHandlerForPoint(unactive_overlap))); |
| 636 | 636 |
| 637 // Confirm that tab strip doe not return tooltip handler for points that | 637 // Confirm that tab strip doe not return tooltip handler for points that |
| 638 // don't hit it. | 638 // don't hit it. |
| 639 EXPECT_FALSE(tab_strip_->GetTooltipHandlerForPoint(gfx::Point(-1, 2))); | 639 EXPECT_FALSE(tab_strip_->GetTooltipHandlerForPoint(gfx::Point(-1, 2))); |
| 640 } | 640 } |
| OLD | NEW |