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

Unified Diff: chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc

Issue 23477051: Embed Flash Fullscreen widget within browser window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add caution comment to chrome_switches.cc. Created 7 years, 3 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
Index: chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc
index 1ab6665c4d8e956f22c0a022c2e7009a92690474..159686fc45df0ce2055bb519bb9516119663d31d 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc
@@ -625,6 +625,35 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerInteractiveTest,
ASSERT_FALSE(IsFullscreenPermissionRequested());
}
+// Tests mouse lock and fullscreen for the privileged fullscreen case (e.g.,
+// embedded flash fullscreen, since the Flash plugin handles user permissions
+// requests itself).
+IN_PROC_BROWSER_TEST_F(FullscreenControllerInteractiveTest,
+ PrivilegedMouseLockAndFullscreen) {
+ ASSERT_TRUE(test_server()->Start());
+ ui_test_utils::NavigateToURL(browser(),
+ test_server()->GetURL(kFullscreenMouseLockHTML));
+
+ ASSERT_FALSE(IsFullscreenBubbleDisplayed());
+
+ SetPrivilegedFullscreen(true);
+
+ // Request to lock the mouse and enter fullscreen.
+ FullscreenNotificationObserver fullscreen_observer;
+ ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
+ browser(), ui::VKEY_B, false, true, false, false,
+ chrome::NOTIFICATION_MOUSE_LOCK_CHANGED,
+ content::NotificationService::AllSources()));
+ fullscreen_observer.Wait();
+
+ // Confirm they are enabled and there is no prompt.
+ ASSERT_TRUE(IsFullscreenBubbleDisplayed());
+ ASSERT_FALSE(IsFullscreenPermissionRequested());
+ ASSERT_FALSE(IsMouseLockPermissionRequested());
+ ASSERT_TRUE(IsMouseLocked());
+ ASSERT_TRUE(IsFullscreenForTabOrPending());
+}
+
// Tests mouse lock can be exited and re-entered by an application silently
// with no UI distraction for users.
IN_PROC_BROWSER_TEST_F(FullscreenControllerInteractiveTest,
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_controller.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698