summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/bookmarks
diff options
context:
space:
mode:
authorjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 21:43:04 +0000
committerjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-04 21:43:04 +0000
commit1ea754ffc7596fb1dde22cec1025689c3d85b965 (patch)
tree2e5f41179aa24baee764043c9a1486d4dbf580d2 /chrome/browser/ui/views/bookmarks
parent8973f0d89288dfbe36cde2510ad7e1a7cdd2469f (diff)
downloadchromium_src-1ea754ffc7596fb1dde22cec1025689c3d85b965.zip
chromium_src-1ea754ffc7596fb1dde22cec1025689c3d85b965.tar.gz
chromium_src-1ea754ffc7596fb1dde22cec1025689c3d85b965.tar.bz2
Aura Menu Spec: Change the menu top/bottom padding to 2 and left/right padding to 0 and menu item height to 30 pixels.
BUG=122858 TEST=Aura menu UI change according to the details in cl description. Review URL: http://codereview.chromium.org/10376005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135445 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/bookmarks')
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index cb5d34d..61667ac 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -75,6 +75,14 @@ using content::WebContents;
namespace {
+void MoveMouseAndPress(const gfx::Point& screen_pos,
+ ui_controls::MouseButton button,
+ int state,
+ const base::Closure& closure) {
+ ui_controls::SendMouseMove(screen_pos.x(), screen_pos.y());
+ ui_controls::SendMouseEventsNotifyWhenDone(button, state, closure);
+}
+
class ViewsDelegateImpl : public views::ViewsDelegate {
public:
ViewsDelegateImpl() {}
@@ -1467,8 +1475,15 @@ class BookmarkBarViewTest17 : public BookmarkBarViewEventTestBase {
views::MenuItemView* child_menu = menu->GetSubmenu()->GetMenuItemAt(1);
ASSERT_TRUE(child_menu != NULL);
+ // The context menu and child_menu can be overlapped, calculate the
+ // non-intersected Rect of the child menu and click on its center to make
+ // sure the click is always on the child menu.
+ gfx::Rect context_rect = context_menu->GetSubmenu()->GetScreenBounds();
+ gfx::Rect child_menu_rect = child_menu->GetScreenBounds();
+ gfx::Rect clickable_rect = child_menu_rect.Subtract(context_rect);
+ ASSERT_FALSE(clickable_rect.IsEmpty());
observer_.set_task(CreateEventTask(this, &BookmarkBarViewTest17::Step4));
- ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
+ MoveMouseAndPress(clickable_rect.CenterPoint(), ui_controls::RIGHT,
ui_controls::DOWN | ui_controls::UP, base::Closure());
// Step4 will be invoked by ContextMenuNotificationObserver.
}