Chromium Code Reviews| 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 // Immersive fullscreen is CrOS only for now. |
|
pkotwicz
2014/03/18 19:35:28
Nit: might as well edit the comment here too
zturner
2014/03/18 20:54:55
Done.
| |
| 99 // TODO(zturner): Enable this test on Windows. | |
| 99 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
| 100 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { | 101 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { |
| 101 // We know we're using Views, so static cast. | 102 // We know we're using Views, so static cast. |
| 102 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); | 103 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); |
| 103 content::WebContents* web_contents = browser_view->GetActiveWebContents(); | 104 content::WebContents* web_contents = browser_view->GetActiveWebContents(); |
| 104 Widget* widget = browser_view->GetWidget(); | 105 Widget* widget = browser_view->GetWidget(); |
| 105 // We know we're using Ash, so static cast. | 106 // We know we're using Ash, so static cast. |
| 106 BrowserNonClientFrameViewAsh* frame_view = | 107 BrowserNonClientFrameViewAsh* frame_view = |
| 107 static_cast<BrowserNonClientFrameViewAsh*>( | 108 static_cast<BrowserNonClientFrameViewAsh*>( |
| 108 widget->non_client_view()->frame_view()); | 109 widget->non_client_view()->frame_view()); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 waiter->Wait(); | 193 waiter->Wait(); |
| 193 } | 194 } |
| 194 EXPECT_FALSE(immersive_mode_controller->IsEnabled()); | 195 EXPECT_FALSE(immersive_mode_controller->IsEnabled()); |
| 195 EXPECT_TRUE(frame_view->ShouldPaint()); | 196 EXPECT_TRUE(frame_view->ShouldPaint()); |
| 196 EXPECT_TRUE(frame_view->caption_button_container_->visible()); | 197 EXPECT_TRUE(frame_view->caption_button_container_->visible()); |
| 197 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); | 198 EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle()); |
| 198 EXPECT_LT(Tab::GetImmersiveHeight(), | 199 EXPECT_LT(Tab::GetImmersiveHeight(), |
| 199 frame_view->header_painter_->header_height()); | 200 frame_view->header_painter_->header_height()); |
| 200 } | 201 } |
| 201 #endif // defined(OS_CHROMEOS) | 202 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |