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

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

Issue 2864593003: Add MimeUtil::Parse{Audio|Video}CodecString (Closed)
Patch Set: Feedback && Proprietary Codecs fix && Rebase 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
« no previous file with comments | « no previous file | media/base/media.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Cover basic codec support. See media_canplaytype_browsertest.cc for more 81 // Cover basic codec support. See media_canplaytype_browsertest.cc for more
82 // exhaustive codec string testing. 82 // exhaustive codec string testing.
83 IN_PROC_BROWSER_TEST_F(MediaCapabilitiesTest, VideoDecodeTypes) { 83 IN_PROC_BROWSER_TEST_F(MediaCapabilitiesTest, VideoDecodeTypes) {
84 base::FilePath file_path = media::GetTestDataFilePath(kDecodeTestFile); 84 base::FilePath file_path = media::GetTestDataFilePath(kDecodeTestFile);
85 85
86 EXPECT_TRUE( 86 EXPECT_TRUE(
87 NavigateToURL(shell(), content::GetFileUrlWithQuery(file_path, ""))); 87 NavigateToURL(shell(), content::GetFileUrlWithQuery(file_path, "")));
88 88
89 EXPECT_EQ(kSupported, CanDecodeVideo("'video/webm; codecs=\"vp8\"'")); 89 EXPECT_EQ(kSupported, CanDecodeVideo("'video/webm; codecs=\"vp8\"'"));
90 90
91 // TODO(chcunningham): Drop support for the old VP9 string. Only support 91 // Only support the new vp09 format which provides critical profile
92 // the new vp09 format which provides critical profile information. 92 // information.
93 EXPECT_EQ(kSupported, CanDecodeVideo("'video/webm; codecs=\"vp9\"'")); 93 EXPECT_EQ(kUnsupported, CanDecodeVideo("'video/webm; codecs=\"vp9\"'"));
94 // Requires command line flag switches::kEnableNewVp9CodecString 94 // Requires command line flag switches::kEnableNewVp9CodecString
95 EXPECT_EQ(kSupported, 95 EXPECT_EQ(kSupported,
96 CanDecodeVideo("'video/webm; codecs=\"vp09.00.10.08\"'")); 96 CanDecodeVideo("'video/webm; codecs=\"vp09.00.10.08\"'"));
97 97
98 // Supported when built with USE_PROPRIETARY_CODECS 98 // Supported when built with USE_PROPRIETARY_CODECS
99 EXPECT_EQ(kPropSupported, 99 EXPECT_EQ(kPropSupported,
100 CanDecodeVideo("'video/mp4; codecs=\"avc1.42E01E\"'")); 100 CanDecodeVideo("'video/mp4; codecs=\"avc1.42E01E\"'"));
101 EXPECT_EQ(kPropSupported, 101 EXPECT_EQ(kPropSupported,
102 CanDecodeVideo("'video/mp4; codecs=\"avc1.42101E\"'")); 102 CanDecodeVideo("'video/mp4; codecs=\"avc1.42101E\"'"));
103 EXPECT_EQ(kPropSupported, 103 EXPECT_EQ(kPropSupported,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 EXPECT_EQ(kPropSupported, 138 EXPECT_EQ(kPropSupported,
139 CanDecodeAudio("'audio/mp4; codecs=\"mp4a.40.02\"'")); 139 CanDecodeAudio("'audio/mp4; codecs=\"mp4a.40.02\"'"));
140 EXPECT_EQ(kPropSupported, CanDecodeAudio("'audio/aac'")); 140 EXPECT_EQ(kPropSupported, CanDecodeAudio("'audio/aac'"));
141 141
142 // Test a handful of invalid strings. 142 // Test a handful of invalid strings.
143 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/wav; codecs=\"mp3\"'")); 143 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/wav; codecs=\"mp3\"'"));
144 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/webm; codecs=\"vp8\"'")); 144 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/webm; codecs=\"vp8\"'"));
145 } 145 }
146 146
147 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/media.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698