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

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

Issue 2917463002: Enable vp09 codec string in WebM by default (Closed)
Patch Set: Rebase (depends-on patch landed), browser_test tweaks Created 3 years, 6 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 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 23 matching lines...) Expand all
34 34
35 namespace content { 35 namespace content {
36 36
37 class MediaCapabilitiesTest : public ContentBrowserTest { 37 class MediaCapabilitiesTest : public ContentBrowserTest {
38 public: 38 public:
39 MediaCapabilitiesTest() = default; 39 MediaCapabilitiesTest() = default;
40 40
41 void SetUpCommandLine(base::CommandLine* command_line) override { 41 void SetUpCommandLine(base::CommandLine* command_line) override {
42 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, 42 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures,
43 "MediaCapabilities"); 43 "MediaCapabilities");
44 command_line->AppendSwitch(switches::kEnableNewVp9CodecString);
45 } 44 }
46 45
47 std::string CanDecodeAudio(const std::string& content_type) { 46 std::string CanDecodeAudio(const std::string& content_type) {
48 return CanDecode(content_type, ConfigType::AUDIO); 47 return CanDecode(content_type, ConfigType::AUDIO);
49 } 48 }
50 49
51 std::string CanDecodeVideo(const std::string& content_type) { 50 std::string CanDecodeVideo(const std::string& content_type) {
52 return CanDecode(content_type, ConfigType::VIDEO); 51 return CanDecode(content_type, ConfigType::VIDEO);
53 } 52 }
54 53
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 EXPECT_EQ(kPropSupported, 135 EXPECT_EQ(kPropSupported,
137 CanDecodeAudio("'audio/mp4; codecs=\"mp4a.40.02\"'")); 136 CanDecodeAudio("'audio/mp4; codecs=\"mp4a.40.02\"'"));
138 EXPECT_EQ(kPropSupported, CanDecodeAudio("'audio/aac'")); 137 EXPECT_EQ(kPropSupported, CanDecodeAudio("'audio/aac'"));
139 138
140 // Test a handful of invalid strings. 139 // Test a handful of invalid strings.
141 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/wav; codecs=\"mp3\"'")); 140 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/wav; codecs=\"mp3\"'"));
142 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/webm; codecs=\"vp8\"'")); 141 EXPECT_EQ(kUnsupported, CanDecodeAudio("'audio/webm; codecs=\"vp8\"'"));
143 } 142 }
144 143
145 } // namespace content 144 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698