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

Side by Side Diff: chrome/browser/ui/exclusive_access/fullscreen_controller_browsertest.cc

Issue 1378123003: Adding SSL ETS Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ets
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/content_settings/host_content_settings_map_factory.h" 5 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_commands.h" 7 #include "chrome/browser/ui/browser_commands.h"
8 #include "chrome/browser/ui/browser_tabstrip.h" 8 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 GURL file_url(ui_test_utils::GetTestUrl( 88 GURL file_url(ui_test_utils::GetTestUrl(
89 base::FilePath(base::FilePath::kCurrentDirectory), 89 base::FilePath(base::FilePath::kCurrentDirectory),
90 base::FilePath(kEmptyFile))); 90 base::FilePath(kEmptyFile)));
91 AddTabAtIndex(0, file_url, PAGE_TRANSITION_TYPED); 91 AddTabAtIndex(0, file_url, PAGE_TRANSITION_TYPED);
92 RequestToLockMouse(true, false); 92 RequestToLockMouse(true, false);
93 ASSERT_TRUE(IsFullscreenBubbleDisplayed()); 93 ASSERT_TRUE(IsFullscreenBubbleDisplayed());
94 ASSERT_TRUE(IsFullscreenBubbleDisplayingButtons()); 94 ASSERT_TRUE(IsFullscreenBubbleDisplayingButtons());
95 } 95 }
96 96
97 IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, PermissionContentSettings) { 97 IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, PermissionContentSettings) {
98 GURL url = test_server()->GetURL(kFullscreenMouseLockHTML); 98 ASSERT_TRUE(embedded_test_server()->Start());
99 ASSERT_TRUE(test_server()->Start()); 99 GURL url = embedded_test_server()->GetURL(kFullscreenMouseLockHTML);
100 ui_test_utils::NavigateToURL(browser(), url); 100 ui_test_utils::NavigateToURL(browser(), url);
101 101
102 EXPECT_FALSE(browser()->window()->IsFullscreen()); 102 EXPECT_FALSE(browser()->window()->IsFullscreen());
103 103
104 // The content's origin is not allowed to go fullscreen. 104 // The content's origin is not allowed to go fullscreen.
105 EXPECT_EQ( 105 EXPECT_EQ(
106 CONTENT_SETTING_ASK, 106 CONTENT_SETTING_ASK,
107 HostContentSettingsMapFactory::GetForProfile(browser()->profile()) 107 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
108 ->GetContentSetting(url.GetOrigin(), 108 ->GetContentSetting(url.GetOrigin(),
109 url.GetOrigin(), 109 url.GetOrigin(),
(...skipping 30 matching lines...) Expand all
140 CONTENT_SETTING_ASK, 140 CONTENT_SETTING_ASK,
141 HostContentSettingsMapFactory::GetForProfile(browser()->profile()) 141 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
142 ->GetContentSetting(url.GetOrigin(), 142 ->GetContentSetting(url.GetOrigin(),
143 GURL("https://test.com"), 143 GURL("https://test.com"),
144 CONTENT_SETTINGS_TYPE_FULLSCREEN, 144 CONTENT_SETTINGS_TYPE_FULLSCREEN,
145 std::string())); 145 std::string()));
146 146
147 HostContentSettingsMapFactory::GetForProfile(browser()->profile()) 147 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
148 ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_FULLSCREEN); 148 ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_FULLSCREEN);
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698