| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); | 878 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); |
| 879 fullscreen_observer.Wait(); | 879 fullscreen_observer.Wait(); |
| 880 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 880 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 881 ASSERT_TRUE(browser()->window()->InPresentationMode()); | 881 ASSERT_TRUE(browser()->window()->InPresentationMode()); |
| 882 } | 882 } |
| 883 | 883 |
| 884 { | 884 { |
| 885 ui_test_utils::WindowedNotificationObserver fullscreen_observer( | 885 ui_test_utils::WindowedNotificationObserver fullscreen_observer( |
| 886 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 886 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
| 887 NotificationService::AllSources()); | 887 NotificationService::AllSources()); |
| 888 browser()->TogglePresentationMode(); | 888 browser()->TogglePresentationMode(false); |
| 889 fullscreen_observer.Wait(); | 889 fullscreen_observer.Wait(); |
| 890 ASSERT_FALSE(browser()->window()->IsFullscreen()); | 890 ASSERT_FALSE(browser()->window()->IsFullscreen()); |
| 891 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 891 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 892 } | 892 } |
| 893 | 893 |
| 894 if (base::mac::IsOSLionOrLater()) { | 894 if (base::mac::IsOSLionOrLater()) { |
| 895 // Test that tab fullscreen mode doesn't make presentation mode the default | 895 // Test that tab fullscreen mode doesn't make presentation mode the default |
| 896 // on Lion. | 896 // on Lion. |
| 897 ui_test_utils::WindowedNotificationObserver fullscreen_observer( | 897 ui_test_utils::WindowedNotificationObserver fullscreen_observer( |
| 898 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 898 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
| 899 NotificationService::AllSources()); | 899 NotificationService::AllSources()); |
| 900 browser()->ToggleFullscreenMode(); | 900 browser()->ToggleFullscreenMode(false); |
| 901 fullscreen_observer.Wait(); | 901 fullscreen_observer.Wait(); |
| 902 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 902 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 903 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 903 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 904 } | 904 } |
| 905 } | 905 } |
| 906 #endif | 906 #endif |
| 907 | 907 |
| 908 // Chromeos defaults to restoring the last session, so this test isn't | 908 // Chromeos defaults to restoring the last session, so this test isn't |
| 909 // applicable. | 909 // applicable. |
| 910 #if !defined(OS_CHROMEOS) | 910 #if !defined(OS_CHROMEOS) |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 | 1178 |
| 1179 // The normal browser should now have four. | 1179 // The normal browser should now have four. |
| 1180 EXPECT_EQ(4, browser()->tab_count()); | 1180 EXPECT_EQ(4, browser()->tab_count()); |
| 1181 | 1181 |
| 1182 // Close the additional browsers. | 1182 // Close the additional browsers. |
| 1183 popup_browser->CloseAllTabs(); | 1183 popup_browser->CloseAllTabs(); |
| 1184 app_browser->CloseAllTabs(); | 1184 app_browser->CloseAllTabs(); |
| 1185 app_popup_browser->CloseAllTabs(); | 1185 app_popup_browser->CloseAllTabs(); |
| 1186 } | 1186 } |
| 1187 #endif | 1187 #endif |
| OLD | NEW |