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/location_bar/star_view.h" | 5 #include "chrome/browser/ui/views/location_bar/star_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/browser_dialogs.h" | 7 #include "chrome/browser/ui/views/browser_dialogs.h" |
8 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
9 #include "chrome/browser/ui/views/toolbar_view.h" | 9 #include "chrome/browser/ui/views/toolbar_view.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 star_view->OnMousePressed(pressed_event); | 36 star_view->OnMousePressed(pressed_event); |
37 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); | 37 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); |
38 star_view->OnMouseReleased(released_event); | 38 star_view->OnMouseReleased(released_event); |
39 EXPECT_TRUE(chrome::IsBookmarkBubbleViewShowing()); | 39 EXPECT_TRUE(chrome::IsBookmarkBubbleViewShowing()); |
40 | 40 |
41 // Verify that clicking again doesn't reshow it. | 41 // Verify that clicking again doesn't reshow it. |
42 star_view->OnMousePressed(pressed_event); | 42 star_view->OnMousePressed(pressed_event); |
43 // Hide the bubble manually. In the browser this would normally happen during | 43 // Hide the bubble manually. In the browser this would normally happen during |
44 // the event processing. | 44 // the event processing. |
45 chrome::HideBookmarkBubbleView(); | 45 chrome::HideBookmarkBubbleView(); |
46 MessageLoop::current()->RunUntilIdle(); | 46 base::MessageLoop::current()->RunUntilIdle(); |
47 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); | 47 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); |
48 star_view->OnMouseReleased(released_event); | 48 star_view->OnMouseReleased(released_event); |
49 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); | 49 EXPECT_FALSE(chrome::IsBookmarkBubbleViewShowing()); |
50 } | 50 } |
51 | 51 |
52 } // namespace | 52 } // namespace |
OLD | NEW |