| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|  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 | 
| OLD | NEW |