| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 8 #include "chrome/browser/fullscreen.h" | 8 #include "chrome/browser/fullscreen.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" | 13 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" |
| 14 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" | 14 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/common/chrome_features.h" |
| 16 #include "chrome/test/base/interactive_test_utils.h" | 17 #include "chrome/test/base/interactive_test_utils.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "components/content_settings/core/browser/host_content_settings_map.h" | 19 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 19 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
| 20 #include "content/public/browser/render_widget_host.h" | 21 #include "content/public/browser/render_widget_host.h" |
| 21 #include "content/public/browser/render_widget_host_view.h" | 22 #include "content/public/browser/render_widget_host_view.h" |
| 22 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 23 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 24 #include "content/public/common/url_constants.h" | 25 #include "content/public/common/url_constants.h" |
| 25 #include "net/test/embedded_test_server/embedded_test_server.h" | 26 #include "net/test/embedded_test_server/embedded_test_server.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 class ParamaterizedFullscreenControllerInteractiveTest | 84 class ParamaterizedFullscreenControllerInteractiveTest |
| 84 : public FullscreenControllerInteractiveTest, | 85 : public FullscreenControllerInteractiveTest, |
| 85 public ::testing::WithParamInterface<int> { | 86 public ::testing::WithParamInterface<int> { |
| 86 public: | 87 public: |
| 87 ParamaterizedFullscreenControllerInteractiveTest() {} | 88 ParamaterizedFullscreenControllerInteractiveTest() {} |
| 88 | 89 |
| 89 // content::BrowserTestBase: | 90 // content::BrowserTestBase: |
| 90 void SetUpCommandLine(base::CommandLine* command_line) override { | 91 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 91 switch (GetParam()) { | 92 switch (GetParam()) { |
| 92 case PROMPTING: | 93 case PROMPTING: |
| 93 command_line->AppendSwitchASCII( | 94 command_line->AppendSwitchASCII(switches::kDisableFeatures, |
| 94 switches::kDisableFeatures, | 95 features::kSimplifiedFullscreenUI.name); |
| 95 ExclusiveAccessManager::kSimplifiedUIFeature.name); | |
| 96 break; | 96 break; |
| 97 case SIMPLIFIED: | 97 case SIMPLIFIED: |
| 98 command_line->AppendSwitchASCII( | 98 command_line->AppendSwitchASCII(switches::kEnableFeatures, |
| 99 switches::kEnableFeatures, | 99 features::kSimplifiedFullscreenUI.name); |
| 100 ExclusiveAccessManager::kSimplifiedUIFeature.name); | |
| 101 break; | 100 break; |
| 102 default: | 101 default: |
| 103 NOTREACHED(); | 102 NOTREACHED(); |
| 104 } | 103 } |
| 105 } | 104 } |
| 106 | 105 |
| 107 // Whether the test should be prompting the user (i.e. non-simplified UI). | 106 // Whether the test should be prompting the user (i.e. non-simplified UI). |
| 108 bool ShouldPrompt() { return GetParam() == PROMPTING; } | 107 bool ShouldPrompt() { return GetParam() == PROMPTING; } |
| 109 | 108 |
| 110 private: | 109 private: |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 ASSERT_FALSE(IsFullscreenPermissionRequested()); | 1000 ASSERT_FALSE(IsFullscreenPermissionRequested()); |
| 1002 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); | 1001 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); |
| 1003 ASSERT_TRUE(IsFullscreenPermissionRequested()); | 1002 ASSERT_TRUE(IsFullscreenPermissionRequested()); |
| 1004 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); | 1003 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); |
| 1005 } | 1004 } |
| 1006 | 1005 |
| 1007 INSTANTIATE_TEST_CASE_P( | 1006 INSTANTIATE_TEST_CASE_P( |
| 1008 ParamaterizedFullscreenControllerInteractiveTestInstance, | 1007 ParamaterizedFullscreenControllerInteractiveTestInstance, |
| 1009 ParamaterizedFullscreenControllerInteractiveTest, | 1008 ParamaterizedFullscreenControllerInteractiveTest, |
| 1010 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 1009 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
| OLD | NEW |