1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/ui/browser_window.h" 7 #include "chrome/test/base/ui_test_utils.h" 8 9 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 10 ExtensionFullscreenAccessFail) { 11 // Test that fullscreen can be accessed from an extension without permission. 12 ASSERT_TRUE(RunPlatformAppTest("fullscreen/no_permission")) << message_; 13 } 14 15 // Disabled, a user gesture is required for fullscreen. http://crbug.com/174178 16 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 17 DISABLED_ExtensionFullscreenAccessPass) { 18 // Test that fullscreen can be accessed from an extension with permission. 19 ASSERT_TRUE(RunPlatformAppTest("fullscreen/has_permission")) << message_; 20 } 21 22 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 23 FocusWindowDoesNotExitFullscreen) { 24 browser()->window()->EnterFullscreen( 25 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); 26 bool is_fullscreen = browser()->window()->IsFullscreen(); 27 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; 28 ASSERT_EQ(is_fullscreen, browser()->window()->IsFullscreen()); 29 } 30 31 // Fails flakily: http://crbug.com/308041 32 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 33 DISABLED_UpdateWindowSizeExitsFullscreen) { 34 browser()->window()->EnterFullscreen( 35 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); 36 ASSERT_TRUE(RunExtensionTest("window_update/sizing")) << message_; 37 ASSERT_FALSE(browser()->window()->IsFullscreen()); 38 } 39