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(); } | |
| 
 
xhwang
2016/05/20 05:35:36
This just shows how this new method could be used.
 
 | |
| 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) | 334 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 
| 332 // The CDM must be registered when it is a component. | 335 // The CDM must be registered when it is a component. | 
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 #endif // defined(ENABLE_PEPPER_CDMS) | 505 #endif // defined(ENABLE_PEPPER_CDMS) | 
| 503 | 506 | 
| 504 #if !defined(DISABLE_NACL) | 507 #if !defined(DISABLE_NACL) | 
| 505 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, | 508 IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesJavaScriptBlockedTest, | 
| 506 NaCl) { | 509 NaCl) { | 
| 507 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 510 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 
| 508 } | 511 } | 
| 509 #endif // !defined(DISABLE_NACL) | 512 #endif // !defined(DISABLE_NACL) | 
| 510 | 513 | 
| 511 #endif // defined(ENABLE_PLUGINS) | 514 #endif // defined(ENABLE_PLUGINS) | 
| OLD | NEW |