Add a webstorePrivate API to show a permission prompt for delegated bundle installs
[chromium-blink-merge.git] / chrome / browser / extensions / extension_fullscreen_apitest.cc
blob198fd71fba0af4dc0b9f00707a006e5ef950d05d
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.
5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/ui/browser_window.h"
8 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
9 ExtensionFullscreenAccessFail) {
10 // Test that fullscreen cannot be accessed from an extension without
11 // permission.
12 ASSERT_TRUE(RunPlatformAppTest("fullscreen/no_permission")) << message_;
15 #if defined(OS_MACOSX)
16 // Fails on MAC: http://crbug.com/480370
17 #define MAYBE_ExtensionFullscreenAccessPass \
18 DISABLED_ExtensionFullscreenAccessPass
19 #else
20 #define MAYBE_ExtensionFullscreenAccessPass ExtensionFullscreenAccessPass
21 #endif // defined(OS_MACOSX)
22 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_ExtensionFullscreenAccessPass) {
23 // Test that fullscreen can be accessed from an extension with permission.
24 ASSERT_TRUE(RunPlatformAppTest("fullscreen/has_permission")) << message_;
27 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
28 FocusWindowDoesNotExitFullscreen) {
29 browser()->window()->EnterFullscreen(
30 GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION,
31 false);
32 bool is_fullscreen = browser()->window()->IsFullscreen();
33 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
34 ASSERT_EQ(is_fullscreen, browser()->window()->IsFullscreen());
37 // Fails flakily: http://crbug.com/308041
38 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
39 DISABLED_UpdateWindowSizeExitsFullscreen) {
40 browser()->window()->EnterFullscreen(
41 GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION,
42 false);
43 ASSERT_TRUE(RunExtensionTest("window_update/sizing")) << message_;
44 ASSERT_FALSE(browser()->window()->IsFullscreen());
47 #if defined(OS_MACOSX)
48 // Fails on MAC: http://crbug.com/480370
49 #define MAYBE_DisplayModeWindowIsInFullscreen DISABLED_DisplayModeWindowIsInFullscreen
50 #else
51 #define MAYBE_DisplayModeWindowIsInFullscreen DisplayModeWindowIsInFullscreen
52 #endif // defined(OS_MACOSX)
54 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
55 MAYBE_DisplayModeWindowIsInFullscreen) {
56 ASSERT_TRUE(RunPlatformAppTest("fullscreen/mq_display_mode")) << message_;