| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/zoom_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
| 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" | 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 ZoomBubbleView::ShowBubble(web_contents, ZoomBubbleView::AUTOMATIC); | 105 ZoomBubbleView::ShowBubble(web_contents, ZoomBubbleView::AUTOMATIC); |
| 106 ASSERT_TRUE(ZoomBubbleView::GetZoomBubble()); | 106 ASSERT_TRUE(ZoomBubbleView::GetZoomBubble()); |
| 107 zoom_bubble = ZoomBubbleView::GetZoomBubble(); | 107 zoom_bubble = ZoomBubbleView::GetZoomBubble(); |
| 108 EXPECT_TRUE(zoom_bubble->GetAnchorView()); | 108 EXPECT_TRUE(zoom_bubble->GetAnchorView()); |
| 109 | 109 |
| 110 // The top-of-window views should not hide till the zoom bubble hides. (It | 110 // The top-of-window views should not hide till the zoom bubble hides. (It |
| 111 // would be weird if the view to which the zoom bubble is anchored hid while | 111 // would be weird if the view to which the zoom bubble is anchored hid while |
| 112 // the zoom bubble was still visible.) | 112 // the zoom bubble was still visible.) |
| 113 immersive_reveal_lock.reset(); | 113 immersive_reveal_lock.reset(); |
| 114 EXPECT_TRUE(immersive_controller->IsRevealed()); | 114 EXPECT_TRUE(immersive_controller->IsRevealed()); |
| 115 ZoomBubbleView::CloseBubble(); | 115 ZoomBubbleView::CloseCurrentBubble(); |
| 116 // The zoom bubble is deleted on a task. | 116 // The zoom bubble is deleted on a task. |
| 117 content::RunAllPendingInMessageLoop(); | 117 content::RunAllPendingInMessageLoop(); |
| 118 EXPECT_FALSE(immersive_controller->IsRevealed()); | 118 EXPECT_FALSE(immersive_controller->IsRevealed()); |
| 119 | 119 |
| 120 // Exit fullscreen before ending the test for the sake of sanity. | 120 // Exit fullscreen before ending the test for the sake of sanity. |
| 121 { | 121 { |
| 122 scoped_ptr<FullscreenNotificationObserver> waiter( | 122 scoped_ptr<FullscreenNotificationObserver> waiter( |
| 123 new FullscreenNotificationObserver()); | 123 new FullscreenNotificationObserver()); |
| 124 chrome::ToggleFullscreenMode(browser()); | 124 chrome::ToggleFullscreenMode(browser()); |
| 125 waiter->Wait(); | 125 waiter->Wait(); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 #endif // OS_CHROMEOS | 128 #endif // OS_CHROMEOS |
| OLD | NEW |