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

Side by Side Diff: chrome/browser/media/encrypted_media_browsertest.cc

Issue 865793003: Replace "enable-encrypted-media" flag with "disable-encrypted-media". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/browser/media/media_browsertest.h" 10 #include "chrome/browser/media/media_browsertest.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 protected: 331 protected:
332 void SetUpCommandLine(base::CommandLine* command_line) override { 332 void SetUpCommandLine(base::CommandLine* command_line) override {
333 EncryptedMediaTestBase::SetUpCommandLine(command_line); 333 EncryptedMediaTestBase::SetUpCommandLine(command_line);
334 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); 334 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line);
335 } 335 }
336 }; 336 };
337 337
338 // Tests encrypted media playback using ExternalClearKey key system in 338 // Tests encrypted media playback using ExternalClearKey key system in
339 // decrypt-and-decode mode for unprefixed EME. 339 // decrypt-and-decode mode for unprefixed EME.
340 // TODO(jrummell): Merge with ECKEncryptedMediaTest once unprefixed is 340 // TODO(jrummell): Merge into ECKEncryptedMediaTest once prefixed is removed.
xhwang 2015/01/22 22:25:42 What do we need to merge? When prefixed test is re
ddorwin 2015/01/22 22:37:20 When we disable prefixed by default, we'll need to
xhwang 2015/01/22 22:46:20 I see. I forgot we need to put the prefixed API be
341 // enabled by default.
342 class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase { 341 class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase {
343 protected: 342 protected:
344 void SetUpCommandLine(base::CommandLine* command_line) override { 343 void SetUpCommandLine(base::CommandLine* command_line) override {
345 EncryptedMediaTestBase::SetUpCommandLine(command_line); 344 EncryptedMediaTestBase::SetUpCommandLine(command_line);
346 command_line->AppendSwitch(switches::kEnableEncryptedMedia);
347 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); 345 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line);
348 } 346 }
349 }; 347 };
350 348
351 #if defined(WIDEVINE_CDM_AVAILABLE) 349 #if defined(WIDEVINE_CDM_AVAILABLE)
352 // Tests encrypted media playback using Widevine key system. 350 // Tests encrypted media playback using Widevine key system.
353 class WVEncryptedMediaTest : public EncryptedMediaTestBase { 351 class WVEncryptedMediaTest : public EncryptedMediaTestBase {
354 protected: 352 protected:
355 void SetUpCommandLine(base::CommandLine* command_line) override { 353 void SetUpCommandLine(base::CommandLine* command_line) override {
356 EncryptedMediaTestBase::SetUpCommandLine(command_line); 354 EncryptedMediaTestBase::SetUpCommandLine(command_line);
357 command_line->AppendSwitch(switches::kEnableEncryptedMedia);
358 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line); 355 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line);
359 } 356 }
360 }; 357 };
361 358
362 #endif // defined(WIDEVINE_CDM_AVAILABLE) 359 #endif // defined(WIDEVINE_CDM_AVAILABLE)
363 #endif // defined(ENABLE_PEPPER_CDMS) 360 #endif // defined(ENABLE_PEPPER_CDMS)
364 361
365 // Tests encrypted media playback with a combination of parameters: 362 // Tests encrypted media playback with a combination of parameters:
366 // - char*: Key system name. 363 // - char*: Key system name.
367 // - bool: True to load media using MSE, otherwise use src. 364 // - bool: True to load media using MSE, otherwise use src.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 RunEncryptedMediaTestPage("mse_config_change.html", 427 RunEncryptedMediaTestPage("mse_config_change.html",
431 CurrentKeySystem(), 428 CurrentKeySystem(),
432 query_params, 429 query_params,
433 kEnded); 430 kEnded);
434 } 431 }
435 432
436 protected: 433 protected:
437 void SetUpCommandLine(base::CommandLine* command_line) override { 434 void SetUpCommandLine(base::CommandLine* command_line) override {
438 EncryptedMediaTestBase::SetUpCommandLine(command_line); 435 EncryptedMediaTestBase::SetUpCommandLine(command_line);
439 SetUpCommandLineForKeySystem(CurrentKeySystem(), command_line); 436 SetUpCommandLineForKeySystem(CurrentKeySystem(), command_line);
440
441 if (CurrentEmeVersion() == UNPREFIXED)
442 command_line->AppendSwitch(switches::kEnableEncryptedMedia);
443 } 437 }
444 }; 438 };
445 439
446 using ::testing::Combine; 440 using ::testing::Combine;
447 using ::testing::Values; 441 using ::testing::Values;
448 442
449 #if !defined(OS_ANDROID) 443 #if !defined(OS_ANDROID)
450 INSTANTIATE_TEST_CASE_P(SRC_ClearKey_Prefixed, 444 INSTANTIATE_TEST_CASE_P(SRC_ClearKey_Prefixed,
451 EncryptedMediaTest, 445 EncryptedMediaTest,
452 Combine(Values(kPrefixedClearKeyKeySystem), 446 Combine(Values(kPrefixedClearKeyKeySystem),
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 "bear-320x240-v_enc-v.webm", 709 "bear-320x240-v_enc-v.webm",
716 kWebMVideoOnly, 710 kWebMVideoOnly,
717 kExternalClearKeyKeySystem, 711 kExternalClearKeyKeySystem,
718 SRC, 712 SRC,
719 UNPREFIXED, 713 UNPREFIXED,
720 kUnknownSession, 714 kUnknownSession,
721 false, 715 false,
722 kEmeKeyError); 716 kEmeKeyError);
723 } 717 }
724 #endif // defined(ENABLE_PEPPER_CDMS) 718 #endif // defined(ENABLE_PEPPER_CDMS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698