| 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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); | 946 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); |
| 947 fullscreen_observer.Wait(); | 947 fullscreen_observer.Wait(); |
| 948 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 948 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 949 ASSERT_TRUE(browser()->window()->InPresentationMode()); | 949 ASSERT_TRUE(browser()->window()->InPresentationMode()); |
| 950 } | 950 } |
| 951 | 951 |
| 952 { | 952 { |
| 953 ui_test_utils::WindowedNotificationObserver fullscreen_observer( | 953 ui_test_utils::WindowedNotificationObserver fullscreen_observer( |
| 954 chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 954 chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
| 955 content::NotificationService::AllSources()); | 955 content::NotificationService::AllSources()); |
| 956 browser()->TogglePresentationMode(false); | 956 browser()->TogglePresentationMode(); |
| 957 fullscreen_observer.Wait(); | 957 fullscreen_observer.Wait(); |
| 958 ASSERT_FALSE(browser()->window()->IsFullscreen()); | 958 ASSERT_FALSE(browser()->window()->IsFullscreen()); |
| 959 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 959 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 960 } | 960 } |
| 961 | 961 |
| 962 if (base::mac::IsOSLionOrLater()) { | 962 if (base::mac::IsOSLionOrLater()) { |
| 963 // Test that tab fullscreen mode doesn't make presentation mode the default | 963 // Test that tab fullscreen mode doesn't make presentation mode the default |
| 964 // on Lion. | 964 // on Lion. |
| 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()->ToggleFullscreenMode(false); | 968 browser()->ToggleFullscreenMode(); |
| 969 fullscreen_observer.Wait(); | 969 fullscreen_observer.Wait(); |
| 970 ASSERT_TRUE(browser()->window()->IsFullscreen()); | 970 ASSERT_TRUE(browser()->window()->IsFullscreen()); |
| 971 ASSERT_FALSE(browser()->window()->InPresentationMode()); | 971 ASSERT_FALSE(browser()->window()->InPresentationMode()); |
| 972 } | 972 } |
| 973 } | 973 } |
| 974 #endif | 974 #endif |
| 975 | 975 |
| 976 // Chromeos defaults to restoring the last session, so this test isn't | 976 // Chromeos defaults to restoring the last session, so this test isn't |
| 977 // applicable. | 977 // applicable. |
| 978 #if !defined(OS_CHROMEOS) | 978 #if !defined(OS_CHROMEOS) |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 | 1502 |
| 1503 // The normal browser should now have four. | 1503 // The normal browser should now have four. |
| 1504 EXPECT_EQ(4, browser()->tab_count()); | 1504 EXPECT_EQ(4, browser()->tab_count()); |
| 1505 | 1505 |
| 1506 // Close the additional browsers. | 1506 // Close the additional browsers. |
| 1507 popup_browser->CloseAllTabs(); | 1507 popup_browser->CloseAllTabs(); |
| 1508 app_browser->CloseAllTabs(); | 1508 app_browser->CloseAllTabs(); |
| 1509 app_popup_browser->CloseAllTabs(); | 1509 app_popup_browser->CloseAllTabs(); |
| 1510 } | 1510 } |
| 1511 #endif | 1511 #endif |
| OLD | NEW |