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

Side by Side Diff: content/browser/media/media_source_browsertest.cc

Issue 251583003: Ensure DiscardPadding is parsed as a signed integer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove bad rebase. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/media/media_browsertest.h" 6 #include "content/browser/media/media_browsertest.h"
7 #include "content/public/common/content_switches.h" 7 #include "content/public/common/content_switches.h"
8 #if defined(OS_ANDROID) 8 #if defined(OS_ANDROID)
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #endif 10 #endif
11 11
12 // Common media types. 12 // Common media types.
13 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; 13 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
14 #if !defined(OS_ANDROID) 14 #if !defined(OS_ANDROID)
15 // TODO(dalecurtis): Disabled while the test data file is updated. 15 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\"";
16 // const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\"";
17 #endif 16 #endif
18 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; 17 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
19 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; 18 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
20 19
21 namespace content { 20 namespace content {
22 21
23 // MSE is available on all desktop platforms and on Android 4.1 and later. 22 // MSE is available on all desktop platforms and on Android 4.1 and later.
24 static bool IsMSESupported() { 23 static bool IsMSESupported() {
25 #if defined(OS_ANDROID) 24 #if defined(OS_ANDROID)
26 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { 25 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { 57 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) {
59 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); 58 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded);
60 } 59 }
61 60
62 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { 61 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) {
63 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); 62 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded);
64 } 63 }
65 64
66 // Opus is not supported in Android as of now. 65 // Opus is not supported in Android as of now.
67 #if !defined(OS_ANDROID) 66 #if !defined(OS_ANDROID)
68 // TODO(dalecurtis): Disabled while the test data file is updated. 67 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioOnly_Opus_WebM) {
69 // IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioOnly_Opus_WebM) { 68 TestSimplePlayback("bear-opus.webm", kWebMOpusAudioOnly, kEnded);
70 // TestSimplePlayback("bear-opus.webm", kWebMOpusAudioOnly, kEnded); 69 }
71 // }
72 #endif 70 #endif
73 71
74 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioOnly_WebM) { 72 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioOnly_WebM) {
75 TestSimplePlayback("bear-320x240-audio-only.webm", kWebMAudioOnly, kEnded); 73 TestSimplePlayback("bear-320x240-audio-only.webm", kWebMAudioOnly, kEnded);
76 } 74 }
77 75
78 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_Type_Error) { 76 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_Type_Error) {
79 TestSimplePlayback("bear-320x240-video-only.webm", kWebMAudioOnly, kError); 77 TestSimplePlayback("bear-320x240-video-only.webm", kWebMAudioOnly, kError);
80 } 78 }
81 79
82 // Flaky test crbug.com/246308 80 // Flaky test crbug.com/246308
83 // Test changed to skip checks resulting in flakiness. Proper fix still needed. 81 // Test changed to skip checks resulting in flakiness. Proper fix still needed.
84 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) { 82 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) {
85 if (!IsMSESupported()) { 83 if (!IsMSESupported()) {
86 VLOG(0) << "Skipping test - MSE not supported."; 84 VLOG(0) << "Skipping test - MSE not supported.";
87 return; 85 return;
88 } 86 }
89 RunMediaTestPage("mse_config_change.html", NULL, kEnded, true); 87 RunMediaTestPage("mse_config_change.html", NULL, kEnded, true);
90 } 88 }
91 89
92 } // namespace content 90 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698