| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); | 958 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); |
| 959 fullscreen_observer.Wait(); | 959 fullscreen_observer.Wait(); |
| 960 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 960 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 961 ASSERT_TRUE(browser()->window()->InPresentationMode()); | 961 ASSERT_TRUE(browser()->window()->InPresentationMode()); |
| 962 } | 962 } |
| 963 | 963 |
| 964 { | 964 { |
| 965 ui_test_utils::WindowedNotificationObserver fullscreen_observer( | 965 ui_test_utils::WindowedNotificationObserver fullscreen_observer( |
| 966 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 966 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
| 967 content::NotificationService::AllSources()); | 967 content::NotificationService::AllSources()); |
| 968 browser()->TogglePresentationMode(false); | 968 browser()->TogglePresentationMode(); |
| 969 fullscreen_observer.Wait(); | 969 fullscreen_observer.Wait(); |
| 970 ASSERT_FALSE(browser()->window()->IsFullscreen()); | 970 ASSERT_FALSE(browser()->window()->IsFullscreen()); |
| 971 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 971 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 972 } | 972 } |
| 973 | 973 |
| 974 if (base::mac::IsOSLionOrLater()) { | 974 if (base::mac::IsOSLionOrLater()) { |
| 975 // Test that tab fullscreen mode doesn't make presentation mode the default | 975 // Test that tab fullscreen mode doesn't make presentation mode the default |
| 976 // on Lion. | 976 // on Lion. |
| 977 ui_test_utils::WindowedNotificationObserver fullscreen_observer( | 977 ui_test_utils::WindowedNotificationObserver fullscreen_observer( |
| 978 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 978 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
| 979 content::NotificationService::AllSources()); | 979 content::NotificationService::AllSources()); |
| 980 browser()->ToggleFullscreenMode(false); | 980 browser()->ToggleFullscreenMode(); |
| 981 fullscreen_observer.Wait(); | 981 fullscreen_observer.Wait(); |
| 982 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 982 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 983 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 983 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 #endif | 986 #endif |
| 987 | 987 |
| 988 // Chromeos defaults to restoring the last session, so this test isn't | 988 // Chromeos defaults to restoring the last session, so this test isn't |
| 989 // applicable. | 989 // applicable. |
| 990 #if !defined(OS_CHROMEOS) | 990 #if !defined(OS_CHROMEOS) |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 | 1513 |
| 1514 // The normal browser should now have four. | 1514 // The normal browser should now have four. |
| 1515 EXPECT_EQ(4, browser()->tab_count()); | 1515 EXPECT_EQ(4, browser()->tab_count()); |
| 1516 | 1516 |
| 1517 // Close the additional browsers. | 1517 // Close the additional browsers. |
| 1518 popup_browser->CloseAllTabs(); | 1518 popup_browser->CloseAllTabs(); |
| 1519 app_browser->CloseAllTabs(); | 1519 app_browser->CloseAllTabs(); |
| 1520 app_popup_browser->CloseAllTabs(); | 1520 app_popup_browser->CloseAllTabs(); |
| 1521 } | 1521 } |
| 1522 #endif | 1522 #endif |
| OLD | NEW |