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

Side by Side Diff: content/browser/media/session/media_session_impl_visibility_browsertest.cc

Issue 2851453003: Revert of Rename kDisableGestureRequirementForMediaPlayback and make it a test-only flag. (Closed)
Patch Set: Created 3 years, 7 months 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <tuple> 5 #include <tuple>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void EnableDisableResumingBackgroundVideos(bool enable) { 92 void EnableDisableResumingBackgroundVideos(bool enable) {
93 if (enable) 93 if (enable)
94 scoped_feature_list_.InitAndEnableFeature(media::kResumeBackgroundVideo); 94 scoped_feature_list_.InitAndEnableFeature(media::kResumeBackgroundVideo);
95 else 95 else
96 scoped_feature_list_.InitAndDisableFeature(media::kResumeBackgroundVideo); 96 scoped_feature_list_.InitAndDisableFeature(media::kResumeBackgroundVideo);
97 } 97 }
98 98
99 void SetUpCommandLine(base::CommandLine* command_line) override { 99 void SetUpCommandLine(base::CommandLine* command_line) override {
100 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests); 100 command_line->AppendSwitch(
101 switches::kDisableGestureRequirementForMediaPlayback);
101 #if !defined(OS_ANDROID) 102 #if !defined(OS_ANDROID)
102 command_line->AppendSwitch(switches::kEnableDefaultMediaSession); 103 command_line->AppendSwitch(switches::kEnableDefaultMediaSession);
103 #endif // !defined(OS_ANDROID) 104 #endif // !defined(OS_ANDROID)
104 105
105 VisibilityTestData params = GetVisibilityTestData(); 106 VisibilityTestData params = GetVisibilityTestData();
106 107
107 if (params.media_suspend == MediaSuspend::ENABLED) 108 if (params.media_suspend == MediaSuspend::ENABLED)
108 command_line->AppendSwitch(switches::kEnableMediaSuspend); 109 command_line->AppendSwitch(switches::kEnableMediaSuspend);
109 else 110 else
110 command_line->AppendSwitch(switches::kDisableMediaSuspend); 111 command_line->AppendSwitch(switches::kDisableMediaSuspend);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 MaybePausePlayer(); 271 MaybePausePlayer();
271 HideTab(); 272 HideTab();
272 CheckSessionStateAfterHide(); 273 CheckSessionStateAfterHide();
273 } 274 }
274 275
275 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances, 276 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances,
276 MediaSessionImplVisibilityBrowserTest, 277 MediaSessionImplVisibilityBrowserTest,
277 ::testing::ValuesIn(kTestParams)); 278 ::testing::ValuesIn(kTestParams));
278 279
279 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_source_browsertest.cc ('k') | content/browser/renderer_host/render_process_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698