Chromium Code Reviews| 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 | 313 |
| 314 content::WebContents* web_contents = | 314 content::WebContents* web_contents = |
| 315 browser()->tab_strip_model()->GetActiveWebContents(); | 315 browser()->tab_strip_model()->GetActiveWebContents(); |
| 316 | 316 |
| 317 EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)-> | 317 EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)-> |
| 318 IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); | 318 IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES)); |
| 319 } | 319 } |
| 320 | 320 |
| 321 #if defined(ENABLE_PLUGINS) | 321 #if defined(ENABLE_PLUGINS) |
| 322 class PepperContentSettingsSpecialCasesTest : public ContentSettingsTest { | 322 class PepperContentSettingsSpecialCasesTest : public ContentSettingsTest { |
| 323 public: | |
| 324 PepperContentSettingsSpecialCasesTest() { enable_component_update(); } | |
|
ddorwin
2016/05/20 16:56:15
Ditto with next comment, especially since this wil
xhwang
2016/05/20 21:23:28
Done.
| |
| 325 | |
| 323 protected: | 326 protected: |
| 324 // Registers any CDM plugins not registered by default. | 327 // Registers any CDM plugins not registered by default. |
| 325 void SetUpCommandLine(base::CommandLine* command_line) override { | 328 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 326 #if defined(ENABLE_PEPPER_CDMS) | 329 #if defined(ENABLE_PEPPER_CDMS) |
| 327 // Append the switch to register the External Clear Key CDM. | 330 // Append the switch to register the External Clear Key CDM. |
| 328 base::FilePath::StringType pepper_plugins = BuildPepperCdmRegistration( | 331 base::FilePath::StringType pepper_plugins = BuildPepperCdmRegistration( |
| 329 kClearKeyCdmBaseDirectory, kClearKeyCdmAdapterFileName, | 332 kClearKeyCdmBaseDirectory, kClearKeyCdmAdapterFileName, |
| 330 kClearKeyCdmDisplayName, kClearKeyCdmPepperMimeType); | 333 kClearKeyCdmDisplayName, kClearKeyCdmPepperMimeType); |
| 331 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | |
| 332 // The CDM must be registered when it is a component. | |
| 333 pepper_plugins.append(FILE_PATH_LITERAL(",")); | |
| 334 pepper_plugins.append(BuildPepperCdmRegistration( | |
| 335 kWidevineCdmBaseDirectory, kWidevineCdmAdapterFileName, | |
| 336 kWidevineCdmDisplayName, kWidevineCdmPluginMimeType)); | |
| 337 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | |
| 338 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, | 334 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, |
| 339 pepper_plugins); | 335 pepper_plugins); |
| 340 #endif // defined(ENABLE_PEPPER_CDMS) | 336 #endif // defined(ENABLE_PEPPER_CDMS) |
| 341 | 337 |
| 342 #if !defined(DISABLE_NACL) | 338 #if !defined(DISABLE_NACL) |
| 343 // Ensure NaCl can run. | 339 // Ensure NaCl can run. |
| 344 command_line->AppendSwitch(switches::kEnableNaCl); | 340 command_line->AppendSwitch(switches::kEnableNaCl); |
| 345 #endif | 341 #endif |
| 346 } | 342 } |
| 347 | 343 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 #endif // defined(ENABLE_PEPPER_CDMS) | 498 #endif // defined(ENABLE_PEPPER_CDMS) |
| 503 | 499 |
| 504 #if !defined(DISABLE_NACL) | 500 #if !defined(DISABLE_NACL) |
| 505 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, | 501 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, |
| 506 NaCl) { | 502 NaCl) { |
| 507 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 503 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); |
| 508 } | 504 } |
| 509 #endif // !defined(DISABLE_NACL) | 505 #endif // !defined(DISABLE_NACL) |
| 510 | 506 |
| 511 #endif // defined(ENABLE_PLUGINS) | 507 #endif // defined(ENABLE_PLUGINS) |
| OLD | NEW |