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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 7461059: Fullscreen JS API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 36cb4c12654e9bd6298c48604d5b07a770027ddc..6c5135c2448d8367ed850103e17e25d313cddf3d 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -635,6 +635,36 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_PageLanguageDetection) {
EXPECT_EQ("fr", helper->language_state().original_language());
}
+IN_PROC_BROWSER_TEST_F(BrowserTest, TestNewTabExitsFullscreen) {
+ ASSERT_TRUE(test_server()->Start());
+
+ AddTabAtIndex(0, GURL("about:blank"), PageTransition::TYPED);
+
+ TabContents* fullscreen_tab = browser()->GetSelectedTabContents();
+
+ browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
+ ui_test_utils::WaitForNotification(chrome::NOTIFICATION_FULLSCREEN_CHANGED);
+ ASSERT_TRUE(browser()->window()->IsFullscreen());
+ AddTabAtIndex(1, GURL("about:blank"), PageTransition::TYPED);
+ ui_test_utils::WaitForNotification(chrome::NOTIFICATION_FULLSCREEN_CHANGED);
+ ASSERT_FALSE(browser()->window()->IsFullscreen());
+}
+
+IN_PROC_BROWSER_TEST_F(BrowserTest, TestTabExitsItselfFromFullscreen) {
+ ASSERT_TRUE(test_server()->Start());
+
+ AddTabAtIndex(0, GURL("about:blank"), PageTransition::TYPED);
+
+ TabContents* fullscreen_tab = browser()->GetSelectedTabContents();
+
+ browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
+ ui_test_utils::WaitForNotification(chrome::NOTIFICATION_FULLSCREEN_CHANGED);
+ ASSERT_TRUE(browser()->window()->IsFullscreen());
+ browser()->ToggleFullscreenModeForTab(fullscreen_tab, false);
+ ui_test_utils::WaitForNotification(chrome::NOTIFICATION_FULLSCREEN_CHANGED);
+ ASSERT_FALSE(browser()->window()->IsFullscreen());
+}
+
// Chromeos defaults to restoring the last session, so this test isn't
// applicable.
#if !defined(OS_CHROMEOS)
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698