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

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

Issue 2845973005: Reland of name 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( 100 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests);
101 switches::kDisableGestureRequirementForMediaPlayback);
102 #if !defined(OS_ANDROID) 101 #if !defined(OS_ANDROID)
103 command_line->AppendSwitch(switches::kEnableDefaultMediaSession); 102 command_line->AppendSwitch(switches::kEnableDefaultMediaSession);
104 #endif // !defined(OS_ANDROID) 103 #endif // !defined(OS_ANDROID)
105 104
106 VisibilityTestData params = GetVisibilityTestData(); 105 VisibilityTestData params = GetVisibilityTestData();
107 106
108 if (params.media_suspend == MediaSuspend::ENABLED) 107 if (params.media_suspend == MediaSuspend::ENABLED)
109 command_line->AppendSwitch(switches::kEnableMediaSuspend); 108 command_line->AppendSwitch(switches::kEnableMediaSuspend);
110 else 109 else
111 command_line->AppendSwitch(switches::kDisableMediaSuspend); 110 command_line->AppendSwitch(switches::kDisableMediaSuspend);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 MaybePausePlayer(); 270 MaybePausePlayer();
272 HideTab(); 271 HideTab();
273 CheckSessionStateAfterHide(); 272 CheckSessionStateAfterHide();
274 } 273 }
275 274
276 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances, 275 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances,
277 MediaSessionImplVisibilityBrowserTest, 276 MediaSessionImplVisibilityBrowserTest,
278 ::testing::ValuesIn(kTestParams)); 277 ::testing::ValuesIn(kTestParams));
279 278
280 } // namespace content 279 } // 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