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

Side by Side Diff: content/browser/media/media_source_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 (c) 2013 The Chromium Authors. All rights reserved. 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 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 "content/browser/media/media_browsertest.h" 7 #include "content/browser/media/media_browsertest.h"
8 #include "content/public/common/content_switches.h" 8 #include "media/base/media_switches.h"
9 #include "media/media_features.h" 9 #include "media/media_features.h"
10 10
11 #if defined(OS_ANDROID) 11 #if defined(OS_ANDROID)
12 #include "base/android/build_info.h" 12 #include "base/android/build_info.h"
13 #endif 13 #endif
14 14
15 // Common media types. 15 // Common media types.
16 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID) 16 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID)
17 const char kAAC_ADTS_AudioOnly[] = "audio/aac"; 17 const char kAAC_ADTS_AudioOnly[] = "audio/aac";
18 #endif 18 #endif
(...skipping 18 matching lines...) Expand all
37 const std::string& media_type, 37 const std::string& media_type,
38 const std::string& expectation) { 38 const std::string& expectation) {
39 base::StringPairs query_params; 39 base::StringPairs query_params;
40 query_params.push_back(std::make_pair("mediaFile", media_file)); 40 query_params.push_back(std::make_pair("mediaFile", media_file));
41 query_params.push_back(std::make_pair("mediaType", media_type)); 41 query_params.push_back(std::make_pair("mediaType", media_type));
42 RunMediaTestPage("media_source_player.html", query_params, expectation, 42 RunMediaTestPage("media_source_player.html", query_params, expectation,
43 false); 43 false);
44 } 44 }
45 45
46 void SetUpCommandLine(base::CommandLine* command_line) override { 46 void SetUpCommandLine(base::CommandLine* command_line) override {
47 command_line->AppendSwitch( 47 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests);
48 switches::kDisableGestureRequirementForMediaPlayback);
49 } 48 }
50 }; 49 };
51 50
52 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { 51 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) {
53 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); 52 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded);
54 } 53 }
55 54
56 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { 55 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) {
57 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); 56 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded);
58 } 57 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #endif 108 #endif
110 109
111 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 110 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
112 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) 111 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
113 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) { 112 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) {
114 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded); 113 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded);
115 } 114 }
116 #endif 115 #endif
117 #endif 116 #endif
118 } // namespace content 117 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | content/browser/media/session/media_session_impl_visibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698