OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/content_settings/cookie_settings.h" | 10 #include "chrome/browser/content_settings/cookie_settings.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 std::string()); | 524 std::string()); |
525 | 525 |
526 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 526 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
527 } | 527 } |
528 | 528 |
529 #endif // !defined(USE_AURA) || defined(OS_WIN) | 529 #endif // !defined(USE_AURA) || defined(OS_WIN) |
530 | 530 |
531 #if defined(ENABLE_PLUGINS) | 531 #if defined(ENABLE_PLUGINS) |
532 class PepperContentSettingsSpecialCasesTest : public ContentSettingsTest { | 532 class PepperContentSettingsSpecialCasesTest : public ContentSettingsTest { |
533 protected: | 533 protected: |
534 static const char* const kExternalClearKeyMimeType; | 534 static const char kExternalClearKeyMimeType[]; |
535 | 535 |
536 // Registers any CDM plugins not registered by default. | 536 // Registers any CDM plugins not registered by default. |
537 void SetUpCommandLine(base::CommandLine* command_line) override { | 537 void SetUpCommandLine(base::CommandLine* command_line) override { |
538 #if defined(ENABLE_PEPPER_CDMS) | 538 #if defined(ENABLE_PEPPER_CDMS) |
539 // Platform-specific filename relative to the chrome executable. | 539 // Platform-specific filename relative to the chrome executable. |
540 #if defined(OS_WIN) | 540 #if defined(OS_WIN) |
541 const char kLibraryName[] = "clearkeycdmadapter.dll"; | 541 const char kLibraryName[] = "clearkeycdmadapter.dll"; |
542 #else // !defined(OS_WIN) | 542 #else // !defined(OS_WIN) |
543 #if defined(OS_MACOSX) | 543 #if defined(OS_MACOSX) |
544 const char kLibraryName[] = "clearkeycdmadapter.plugin"; | 544 const char kLibraryName[] = "clearkeycdmadapter.plugin"; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 #if defined(OS_WIN) | 666 #if defined(OS_WIN) |
667 pepper_plugin.append(base::ASCIIToUTF16(string_to_append)); | 667 pepper_plugin.append(base::ASCIIToUTF16(string_to_append)); |
668 #else | 668 #else |
669 pepper_plugin.append(string_to_append); | 669 pepper_plugin.append(string_to_append); |
670 #endif | 670 #endif |
671 | 671 |
672 return pepper_plugin; | 672 return pepper_plugin; |
673 } | 673 } |
674 }; | 674 }; |
675 | 675 |
676 const char* const | 676 const char |
677 PepperContentSettingsSpecialCasesTest::kExternalClearKeyMimeType = | 677 PepperContentSettingsSpecialCasesTest::kExternalClearKeyMimeType[] = |
678 "application/x-ppapi-clearkey-cdm"; | 678 "application/x-ppapi-clearkey-cdm"; |
679 | 679 |
680 class PepperContentSettingsSpecialCasesPluginsBlockedTest | 680 class PepperContentSettingsSpecialCasesPluginsBlockedTest |
681 : public PepperContentSettingsSpecialCasesTest { | 681 : public PepperContentSettingsSpecialCasesTest { |
682 public: | 682 public: |
683 void SetUpOnMainThread() override { | 683 void SetUpOnMainThread() override { |
684 PepperContentSettingsSpecialCasesTest::SetUpOnMainThread(); | 684 PepperContentSettingsSpecialCasesTest::SetUpOnMainThread(); |
685 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( | 685 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( |
686 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); | 686 CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK); |
687 } | 687 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 796 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
797 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 797 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
798 switches::kAshBrowserTests)) | 798 switches::kAshBrowserTests)) |
799 return; | 799 return; |
800 #endif | 800 #endif |
801 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 801 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); |
802 } | 802 } |
803 #endif // !defined(DISABLE_NACL) | 803 #endif // !defined(DISABLE_NACL) |
804 | 804 |
805 #endif // defined(ENABLE_PLUGINS) | 805 #endif // defined(ENABLE_PLUGINS) |
OLD | NEW |