| 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/frame/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 9 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
| 10 #include "ash/frame/header_painter.h" | 10 #include "ash/frame/header_painter.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 { | 88 { |
| 89 scoped_ptr<FullscreenNotificationObserver> waiter( | 89 scoped_ptr<FullscreenNotificationObserver> waiter( |
| 90 new FullscreenNotificationObserver()); | 90 new FullscreenNotificationObserver()); |
| 91 chrome::ToggleFullscreenMode(browser()); | 91 chrome::ToggleFullscreenMode(browser()); |
| 92 waiter->Wait(); | 92 waiter->Wait(); |
| 93 } | 93 } |
| 94 EXPECT_TRUE(frame_view->ShouldPaint()); | 94 EXPECT_TRUE(frame_view->ShouldPaint()); |
| 95 EXPECT_TRUE(frame_view->caption_button_container_->visible()); | 95 EXPECT_TRUE(frame_view->caption_button_container_->visible()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // Immersive fullscreen is CrOS only for now. | 98 // TODO(zturner): Change this to USE_ASH after fixing the test on Windows. |
| 99 #if defined(OS_CHROMEOS) | 99 #if defined(OS_CHROMEOS) |
| 100 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { | 100 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { |
| 101 // We know we're using Views, so static cast. | 101 // We know we're using Views, so static cast. |
| 102 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); | 102 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); |
| 103 content::WebContents* web_contents = browser_view->GetActiveWebContents(); | 103 content::WebContents* web_contents = browser_view->GetActiveWebContents(); |
| 104 Widget* widget = browser_view->GetWidget(); | 104 Widget* widget = browser_view->GetWidget(); |
| 105 // We know we're using Ash, so static cast. | 105 // We know we're using Ash, so static cast. |
| 106 BrowserNonClientFrameViewAsh* frame_view = | 106 BrowserNonClientFrameViewAsh* frame_view = |
| 107 static_cast<BrowserNonClientFrameViewAsh*>( | 107 static_cast<BrowserNonClientFrameViewAsh*>( |
| 108 widget->non_client_view()->frame_view()); | 108 widget->non_client_view()->frame_view()); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 waiter->Wait(); | 192 waiter->Wait(); |
| 193 } | 193 } |
| 194 EXPECT_FALSE(immersive_mode_controller->IsEnabled()); | 194 EXPECT_FALSE(immersive_mode_controller->IsEnabled()); |
| 195 EXPECT_TRUE(frame_view->ShouldPaint()); | 195 EXPECT_TRUE(frame_view->ShouldPaint()); |
| 196 EXPECT_TRUE(frame_view->caption_button_container_->visible()); | 196 EXPECT_TRUE(frame_view->caption_button_container_->visible()); |
| 197 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); | 197 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); |
| 198 EXPECT_LT(Tab::GetImmersiveHeight(), | 198 EXPECT_LT(Tab::GetImmersiveHeight(), |
| 199 frame_view->header_painter_->header_height()); | 199 frame_view->header_painter_->header_height()); |
| 200 } | 200 } |
| 201 #endif // defined(OS_CHROMEOS) | 201 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |