| Index: chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc
|
| diff --git a/chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc b/chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc
|
| index ce9295c3c68b57997bd87cc2765a44072eb56a03..9841ff817541ecb4009081949e67bc1c6a53e086 100644
|
| --- a/chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc
|
| +++ b/chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h"
|
|
|
| #include "base/basictypes.h"
|
| +#include "extensions/common/constants.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| using options::MediaException;
|
| @@ -22,10 +23,14 @@ MediaExceptions ConvertAndSort(const MediaException* items, size_t count) {
|
| } // namespace
|
|
|
| TEST(PepperFlashContentSettingsUtilsTest, SortMediaExceptions) {
|
| - MediaException entry_1(ContentSettingsPattern::FromString("www.google.com"),
|
| - CONTENT_SETTING_ALLOW, CONTENT_SETTING_ASK);
|
| - MediaException entry_2(ContentSettingsPattern::FromString("www.youtube.com"),
|
| - CONTENT_SETTING_BLOCK, CONTENT_SETTING_DEFAULT);
|
| + MediaException entry_1(
|
| + ContentSettingsPattern::FromString(extensions::kExtensionScheme,
|
| + "www.google.com"),
|
| + CONTENT_SETTING_ALLOW, CONTENT_SETTING_ASK);
|
| + MediaException entry_2(
|
| + ContentSettingsPattern::FromString(extensions::kExtensionScheme,
|
| + "www.youtube.com"),
|
| + CONTENT_SETTING_BLOCK, CONTENT_SETTING_DEFAULT);
|
| MediaException entry_3(ContentSettingsPattern::Wildcard(),
|
| CONTENT_SETTING_ASK, CONTENT_SETTING_BLOCK);
|
| MediaException entry_4(ContentSettingsPattern(),
|
| @@ -77,14 +82,17 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
|
|
|
| {
|
| MediaException exceptions_1[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW),
|
| - MediaException(ContentSettingsPattern::FromString("www.youtube.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.youtube.com"),
|
| CONTENT_SETTING_ASK, CONTENT_SETTING_ASK)
|
| };
|
|
|
| MediaException exceptions_2[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
| @@ -118,14 +126,17 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
|
| // Similar to the previous block, but reoder the exceptions. The outcome
|
| // should be the same.
|
| MediaException exceptions_1[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.youtube.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.youtube.com"),
|
| CONTENT_SETTING_ASK, CONTENT_SETTING_ASK),
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
| MediaException exceptions_2[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
| @@ -147,12 +158,14 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
|
|
|
| {
|
| MediaException exceptions_1[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)
|
| };
|
|
|
| MediaException exceptions_2[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
| @@ -175,12 +188,14 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
|
|
|
| {
|
| MediaException exceptions_1[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_BLOCK, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
| MediaException exceptions_2[] = {
|
| - MediaException(ContentSettingsPattern::FromString("www.google.com"),
|
| + MediaException(ContentSettingsPattern::FromString(
|
| + extensions::kExtensionScheme, "www.google.com"),
|
| CONTENT_SETTING_ALLOW, CONTENT_SETTING_ALLOW)
|
| };
|
|
|
|
|