OLD | NEW |
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 "media/base/media_switches.h" | 8 #include "content/public/common/content_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 Loading... |
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(switches::kIgnoreAutoplayRestrictionsForTests); | 47 command_line->AppendSwitch( |
| 48 switches::kDisableGestureRequirementForMediaPlayback); |
48 } | 49 } |
49 }; | 50 }; |
50 | 51 |
51 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { | 52 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { |
52 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); | 53 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); |
53 } | 54 } |
54 | 55 |
55 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { | 56 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { |
56 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); | 57 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); |
57 } | 58 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 #endif | 109 #endif |
109 | 110 |
110 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 111 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
111 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) | 112 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) |
112 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) { | 113 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) { |
113 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded); | 114 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded); |
114 } | 115 } |
115 #endif | 116 #endif |
116 #endif | 117 #endif |
117 } // namespace content | 118 } // namespace content |
OLD | NEW |