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

Side by Side Diff: chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc

Issue 14366004: cros: Turn immersive fullscreen on by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_chromeos test expectation Created 7 years, 8 months 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/immersive_mode_controller_ash.h" 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Callback for when the onbeforeunload dialog closes for the sake of testing 52 // Callback for when the onbeforeunload dialog closes for the sake of testing
53 // the dialog with immersive mode. 53 // the dialog with immersive mode.
54 void OnBeforeUnloadJavaScriptDialogClosed( 54 void OnBeforeUnloadJavaScriptDialogClosed(
55 bool success, 55 bool success,
56 const string16& user_input) { 56 const string16& user_input) {
57 } 57 }
58 58
59 // content::BrowserTestBase overrides: 59 // content::BrowserTestBase overrides:
60 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 60 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
61 command_line->AppendSwitch(ash::switches::kAshImmersiveFullscreen); 61 chrome::EnableImmersiveFullscreenForTest();
62 } 62 }
63 63
64 private: 64 private:
65 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAshTest); 65 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAshTest);
66 }; 66 };
67 67
68 IN_PROC_BROWSER_TEST_F(ImmersiveModeControllerAshTest, ImmersiveMode) { 68 IN_PROC_BROWSER_TEST_F(ImmersiveModeControllerAshTest, ImmersiveMode) {
69 ui::ScopedAnimationDurationScaleMode zero_duration_mode( 69 ui::ScopedAnimationDurationScaleMode zero_duration_mode(
70 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); 70 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
71 ASSERT_TRUE(chrome::UseImmersiveFullscreen()); 71 ASSERT_TRUE(chrome::UseImmersiveFullscreen());
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 // Setting the window property directly toggles immersive mode. 554 // Setting the window property directly toggles immersive mode.
555 aura::Window* window = browser_view->GetWidget()->GetNativeWindow(); 555 aura::Window* window = browser_view->GetWidget()->GetNativeWindow();
556 window->SetProperty(ash::internal::kImmersiveModeKey, true); 556 window->SetProperty(ash::internal::kImmersiveModeKey, true);
557 EXPECT_TRUE(immersive_controller->IsEnabled()); 557 EXPECT_TRUE(immersive_controller->IsEnabled());
558 window->SetProperty(ash::internal::kImmersiveModeKey, false); 558 window->SetProperty(ash::internal::kImmersiveModeKey, false);
559 EXPECT_FALSE(immersive_controller->IsEnabled()); 559 EXPECT_FALSE(immersive_controller->IsEnabled());
560 } 560 }
561 561
562 #endif // defined(OS_CHROMEOS) 562 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698