Prevent chrome://net-internals/#export from flickering
[chromium-blink-merge.git] / chrome / browser / extensions / extension_fullscreen_apitest.cc
blobf05b2ef7393a5e3860327df2c1d7484ab7d56c8f
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 can be accessed from an extension without permission.
11 ASSERT_TRUE(RunPlatformAppTest("fullscreen/no_permission")) << message_;
14 // Disabled, a user gesture is required for fullscreen. http://crbug.com/174178
15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
16 DISABLED_ExtensionFullscreenAccessPass) {
17 // Test that fullscreen can be accessed from an extension with permission.
18 ASSERT_TRUE(RunPlatformAppTest("fullscreen/has_permission")) << message_;
21 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
22 FocusWindowDoesNotExitFullscreen) {
23 browser()->window()->EnterFullscreen(
24 GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION,
25 false);
26 bool is_fullscreen = browser()->window()->IsFullscreen();
27 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
28 ASSERT_EQ(is_fullscreen, browser()->window()->IsFullscreen());
31 // Fails flakily: http://crbug.com/308041
32 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
33 DISABLED_UpdateWindowSizeExitsFullscreen) {
34 browser()->window()->EnterFullscreen(
35 GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION,
36 false);
37 ASSERT_TRUE(RunExtensionTest("window_update/sizing")) << message_;
38 ASSERT_FALSE(browser()->window()->IsFullscreen());