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

Unified Diff: chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc

Issue 2004353002: Delete unused code for exclusive access permission prompting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen-mac-remove-window-controller
Patch Set: Remove changes to content settings UI (spun out to CL 2045163002). Created 4 years, 6 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/exclusive_access/fullscreen_controller_browsertest.cc
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc
index 8248e5086c973f00da2a8ab2b6b8e00db46da70e..73ab38a011f793b8e9a99e96b3ab21f3e690ff9b 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc
@@ -19,68 +19,6 @@
using content::WebContents;
using ui::PAGE_TRANSITION_TYPED;
-IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
- PendingMouseLockExitsOnTabSwitch) {
- // This test doesn't make sense in simplified mode, since we never prompt for
- // mouse lock.
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- return;
-
- AddTabAtIndex(0, GURL(url::kAboutBlankURL), PAGE_TRANSITION_TYPED);
- AddTabAtIndex(0, GURL(url::kAboutBlankURL), PAGE_TRANSITION_TYPED);
- WebContents* tab1 = browser()->tab_strip_model()->GetActiveWebContents();
-
- // Request mouse lock. Bubble is displayed.
- RequestToLockMouse(true, false);
- ASSERT_TRUE(IsFullscreenBubbleDisplayed());
-
- // Activate current tab. Mouse lock bubble remains.
- browser()->tab_strip_model()->ActivateTabAt(0, true);
- ASSERT_TRUE(IsFullscreenBubbleDisplayed());
-
- // Activate second tab. Mouse lock bubble clears.
- {
- MouseLockNotificationObserver mouse_lock_observer;
- browser()->tab_strip_model()->ActivateTabAt(1, true);
- mouse_lock_observer.Wait();
- }
- ASSERT_FALSE(IsFullscreenBubbleDisplayed());
-
- // Now, test that closing an unrelated tab does not disturb a request.
-
- // Request mouse lock. Bubble is displayed.
- RequestToLockMouse(true, false);
- ASSERT_TRUE(IsFullscreenBubbleDisplayed());
-
- // Close first tab while second active. Mouse lock bubble remains.
- chrome::CloseWebContents(browser(), tab1, false);
- ASSERT_TRUE(IsFullscreenBubbleDisplayed());
-}
-
-IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
- PendingMouseLockExitsOnTabClose) {
- // This test doesn't make sense in simplified mode, since we never prompt for
- // mouse lock.
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- return;
-
- // Add more tabs.
- AddTabAtIndex(0, GURL(url::kAboutBlankURL), PAGE_TRANSITION_TYPED);
- AddTabAtIndex(0, GURL(url::kAboutBlankURL), PAGE_TRANSITION_TYPED);
-
- // Request mouse lock. Bubble is displayed.
- RequestToLockMouse(true, false);
- ASSERT_TRUE(IsFullscreenBubbleDisplayed());
-
- // Close tab. Bubble is cleared.
- {
- MouseLockNotificationObserver mouse_lock_observer;
- chrome::CloseTab(browser());
- mouse_lock_observer.Wait();
- }
- ASSERT_FALSE(IsFullscreenBubbleDisplayed());
-}
-
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, MouseLockOnFileURL) {
static const base::FilePath::CharType* kEmptyFile =
FILE_PATH_LITERAL("empty.html");
@@ -90,10 +28,6 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, MouseLockOnFileURL) {
AddTabAtIndex(0, file_url, PAGE_TRANSITION_TYPED);
RequestToLockMouse(true, false);
ASSERT_TRUE(IsFullscreenBubbleDisplayed());
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- ASSERT_FALSE(IsFullscreenBubbleDisplayingButtons());
- else
- ASSERT_TRUE(IsFullscreenBubbleDisplayingButtons());
}
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, FullscreenOnFileURL) {
@@ -107,10 +41,6 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, FullscreenOnFileURL) {
browser()->tab_strip_model()->GetActiveWebContents(),
file_url.GetOrigin());
ASSERT_TRUE(IsFullscreenBubbleDisplayed());
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- ASSERT_FALSE(IsFullscreenBubbleDisplayingButtons());
- else
- ASSERT_TRUE(IsFullscreenBubbleDisplayingButtons());
}
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, PermissionContentSettings) {
@@ -142,23 +72,6 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, PermissionContentSettings) {
CONTENT_SETTINGS_TYPE_FULLSCREEN,
std::string()));
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) {
- ASSERT_FALSE(IsFullscreenBubbleDisplayingButtons());
- } else {
- ASSERT_TRUE(IsFullscreenBubbleDisplayingButtons());
- // It only makes sense to test this on the non-simplified mode. In the
- // simplified mode, you cannot accept the request (as it is auto-accepted)
- // so you can't set ALLOW.
- AcceptCurrentFullscreenOrMouseLockRequest();
-
- // The content's origin is allowed to go fullscreen.
- EXPECT_EQ(CONTENT_SETTING_ALLOW,
- HostContentSettingsMapFactory::GetForProfile(browser()->profile())
- ->GetContentSetting(url.GetOrigin(), url.GetOrigin(),
- CONTENT_SETTINGS_TYPE_FULLSCREEN,
- std::string()));
- }
-
// The primary and secondary patterns have been set when setting the
// permission, thus setting another secondary pattern shouldn't work.
EXPECT_EQ(

Powered by Google App Engine
This is Rietveld 408576698