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

Unified Diff: chrome/browser/ui/webui/options/pepper_flash_content_settings_utils_unittest.cc

Issue 965103004: Stop using the MEDIASTREAM content setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over 1004733003. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
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..8ca94f370bb58a9e60fa61ecfbb115365ff9cea1 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
@@ -68,7 +68,9 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
// true when they are different.
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_BLOCK,
+ CONTENT_SETTING_ASK,
MediaExceptions(),
+ CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK,
MediaExceptions(),
false,
@@ -92,23 +94,29 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
// the result, because it has the same settings as |default_setting_2|.
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
false,
false));
// Changing |default_setting_2| should change the result.
EXPECT_FALSE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));
@@ -131,15 +139,19 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));
EXPECT_FALSE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_ALLOW,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));
@@ -159,15 +171,19 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
// Test that |ignore_video_setting| works.
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_BLOCK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
true));
EXPECT_FALSE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));
@@ -186,16 +202,20 @@ TEST(PepperFlashContentSettingsUtilsTest, AreMediaExceptionsEqual) {
// Test that |ignore_audio_setting| works.
EXPECT_TRUE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
+ CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
true,
false));
EXPECT_FALSE(PepperFlashContentSettingsUtils::AreMediaExceptionsEqual(
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_1, arraysize(exceptions_1)),
CONTENT_SETTING_ASK,
+ CONTENT_SETTING_ASK,
ConvertAndSort(exceptions_2, arraysize(exceptions_2)),
false,
false));

Powered by Google App Engine
This is Rietveld 408576698