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 "base/strings/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/media/media_browsertest.h" | 9 #include "content/browser/media/media_browsertest.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 protected: | 143 protected: |
144 // We want to fail quickly when a test fails because an error is encountered. | 144 // We want to fail quickly when a test fails because an error is encountered. |
145 void AddTitlesToAwait(content::TitleWatcher* title_watcher) override { | 145 void AddTitlesToAwait(content::TitleWatcher* title_watcher) override { |
146 MediaBrowserTest::AddTitlesToAwait(title_watcher); | 146 MediaBrowserTest::AddTitlesToAwait(title_watcher); |
147 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError)); | 147 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError)); |
148 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError)); | 148 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError)); |
149 } | 149 } |
150 | 150 |
151 void SetUpCommandLine(base::CommandLine* command_line) override { | 151 void SetUpCommandLine(base::CommandLine* command_line) override { |
152 command_line->AppendSwitch( | 152 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests); |
153 switches::kDisableGestureRequirementForMediaPlayback); | |
154 #if defined(SUPPORTS_EXTERNAL_CLEAR_KEY_IN_CONTENT_SHELL) | 153 #if defined(SUPPORTS_EXTERNAL_CLEAR_KEY_IN_CONTENT_SHELL) |
155 command_line->AppendSwitchASCII(switches::kEnableFeatures, | 154 command_line->AppendSwitchASCII(switches::kEnableFeatures, |
156 media::kExternalClearKeyForTesting.name); | 155 media::kExternalClearKeyForTesting.name); |
157 #endif | 156 #endif |
158 } | 157 } |
159 }; | 158 }; |
160 | 159 |
161 using ::testing::Combine; | 160 using ::testing::Combine; |
162 using ::testing::Values; | 161 using ::testing::Values; |
163 | 162 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 TestFrameSizeChange(); | 260 TestFrameSizeChange(); |
262 } | 261 } |
263 | 262 |
264 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 263 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
265 RunEncryptedMediaTest(kDefaultEmePlayer, "bear-a_enc-a.webm", | 264 RunEncryptedMediaTest(kDefaultEmePlayer, "bear-a_enc-a.webm", |
266 kWebMVorbisAudioOnly, "com.example.foo", SrcType::MSE, | 265 kWebMVorbisAudioOnly, "com.example.foo", SrcType::MSE, |
267 kEmeNotSupportedError); | 266 kEmeNotSupportedError); |
268 } | 267 } |
269 | 268 |
270 } // namespace content | 269 } // namespace content |
OLD | NEW |