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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 // The opened context menu should behave as it is from the folder button. | 1707 // The opened context menu should behave as it is from the folder button. |
1708 class BookmarkBarViewTest21 : public BookmarkBarViewEventTestBase { | 1708 class BookmarkBarViewTest21 : public BookmarkBarViewEventTestBase { |
1709 public: | 1709 public: |
1710 BookmarkBarViewTest21() | 1710 BookmarkBarViewTest21() |
1711 : observer_(CreateEventTask(this, &BookmarkBarViewTest21::Step3)) { | 1711 : observer_(CreateEventTask(this, &BookmarkBarViewTest21::Step3)) { |
1712 } | 1712 } |
1713 | 1713 |
1714 protected: | 1714 protected: |
1715 // Move the mouse to the empty folder on the bookmark bar and press the | 1715 // Move the mouse to the empty folder on the bookmark bar and press the |
1716 // left mouse button. | 1716 // left mouse button. |
1717 virtual void DoTestOnMessageLoop() { | 1717 virtual void DoTestOnMessageLoop() OVERRIDE { |
1718 views::TextButton* button = GetBookmarkButton(5); | 1718 views::TextButton* button = GetBookmarkButton(5); |
1719 ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT, | 1719 ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT, |
1720 ui_controls::DOWN | ui_controls::UP, | 1720 ui_controls::DOWN | ui_controls::UP, |
1721 CreateEventTask(this, &BookmarkBarViewTest21::Step2)); | 1721 CreateEventTask(this, &BookmarkBarViewTest21::Step2)); |
1722 } | 1722 } |
1723 | 1723 |
1724 private: | 1724 private: |
1725 // Confirm that a menu for empty folder shows and right click the menu. | 1725 // Confirm that a menu for empty folder shows and right click the menu. |
1726 void Step2() { | 1726 void Step2() { |
1727 // Menu should be showing. | 1727 // Menu should be showing. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); | 1768 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); |
1769 EXPECT_TRUE(bb_view_->GetMenu() == NULL); | 1769 EXPECT_TRUE(bb_view_->GetMenu() == NULL); |
1770 | 1770 |
1771 Done(); | 1771 Done(); |
1772 } | 1772 } |
1773 | 1773 |
1774 ContextMenuNotificationObserver observer_; | 1774 ContextMenuNotificationObserver observer_; |
1775 }; | 1775 }; |
1776 | 1776 |
1777 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) | 1777 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) |
OLD | NEW |