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

Side by Side Diff: chrome/browser/ui/views/location_bar/star_view_browsertest.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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 | Annotate | Revision Log
OLDNEW
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/location_bar/star_view.h" 5 #include "chrome/browser/ui/views/location_bar/star_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 25 matching lines...) Expand all
36 #else 36 #else
37 #define MAYBE_HideOnSecondClick HideOnSecondClick 37 #define MAYBE_HideOnSecondClick HideOnSecondClick
38 #endif 38 #endif
39 IN_PROC_BROWSER_TEST_F(StarViewTest, MAYBE_HideOnSecondClick) { 39 IN_PROC_BROWSER_TEST_F(StarViewTest, MAYBE_HideOnSecondClick) {
40 BrowserView* browser_view = reinterpret_cast<BrowserView*>( 40 BrowserView* browser_view = reinterpret_cast<BrowserView*>(
41 browser()->window()); 41 browser()->window());
42 views::View* star_view = 42 views::View* star_view =
43 browser_view->GetToolbarView()->location_bar()->star_view(); 43 browser_view->GetToolbarView()->location_bar()->star_view();
44 44
45 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 45 ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
46 ui::EF_LEFT_MOUSE_BUTTON); 46 ui::EF_LEFT_MOUSE_BUTTON,
47 ui::EF_LEFT_MOUSE_BUTTON);
47 ui::MouseEvent released_event(ui::ET_MOUSE_RELEASED, gfx::Point(), 48 ui::MouseEvent released_event(ui::ET_MOUSE_RELEASED, gfx::Point(),
48 gfx::Point(), ui::EF_LEFT_MOUSE_BUTTON); 49 gfx::Point(), ui::EF_LEFT_MOUSE_BUTTON,
50 ui::EF_LEFT_MOUSE_BUTTON);
49 51
50 // Verify that clicking once shows the bookmark bubble. 52 // Verify that clicking once shows the bookmark bubble.
51 EXPECT_FALSE(BookmarkBubbleView::IsShowing()); 53 EXPECT_FALSE(BookmarkBubbleView::IsShowing());
52 star_view->OnMousePressed(pressed_event); 54 star_view->OnMousePressed(pressed_event);
53 EXPECT_FALSE(BookmarkBubbleView::IsShowing()); 55 EXPECT_FALSE(BookmarkBubbleView::IsShowing());
54 star_view->OnMouseReleased(released_event); 56 star_view->OnMouseReleased(released_event);
55 EXPECT_TRUE(BookmarkBubbleView::IsShowing()); 57 EXPECT_TRUE(BookmarkBubbleView::IsShowing());
56 58
57 // Verify that clicking again doesn't reshow it. 59 // Verify that clicking again doesn't reshow it.
58 star_view->OnMousePressed(pressed_event); 60 star_view->OnMousePressed(pressed_event);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 region_before.left == region_after.left && 156 region_before.left == region_after.left &&
155 region_before.top == region_after.top && 157 region_before.top == region_after.top &&
156 region_before.right == region_after.right && 158 region_before.right == region_after.right &&
157 region_before.bottom == region_after.bottom; 159 region_before.bottom == region_after.bottom;
158 ASSERT_FALSE(rects_equal); 160 ASSERT_FALSE(rects_equal);
159 } 161 }
160 162
161 #endif 163 #endif
162 164
163 } // namespace 165 } // namespace
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | chrome/browser/ui/views/new_avatar_menu_button_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698