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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings_unittest.cc

Issue 588153003: Remove MediaSettingChangedInfobar and show latest state in bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits, add tests, refactor to use bitmask instead of enum. Created 6 years, 3 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/content_settings/tab_specific_content_settings_unittest.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
index 5d08a4b018b52ab7f8856d65f07e01a204646c24..520d8c9cac7232ee78ad3210480136878a082f9b 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
@@ -226,7 +226,9 @@ TEST_F(TabSpecificContentSettingsTest, AllowedBlockedMediaContent) {
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
ASSERT_FALSE(content_settings->IsContentBlocked(
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
- ASSERT_EQ(TabSpecificContentSettings::MICROPHONE_CAMERA_ACCESSED,
+ ASSERT_EQ(static_cast<unsigned>(
Peter Kasting 2014/09/24 01:33:00 Note: Following my suggestions in the header shoul
robwu 2014/09/24 23:38:44 Done. though I had to add "| 0" in 5 places though
Peter Kasting 2014/09/25 00:53:25 This means that your constants have a declaration,
robwu 2014/09/25 08:57:57 The error actually showed up in GCC 4.9.1. I've pu
+ TabSpecificContentSettings::MICROPHONE_ACCESSED |
+ TabSpecificContentSettings::CAMERA_ACCESSED),
content_settings->GetMicrophoneCameraState());
// Request and block microphone access.
@@ -252,7 +254,9 @@ TEST_F(TabSpecificContentSettingsTest, AllowedBlockedMediaContent) {
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
ASSERT_TRUE(content_settings->IsContentBlocked(
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
- ASSERT_EQ(TabSpecificContentSettings::MICROPHONE_CAMERA_BLOCKED,
+ ASSERT_EQ(static_cast<unsigned>(
+ TabSpecificContentSettings::MICROPHONE_BLOCKED |
+ TabSpecificContentSettings::CAMERA_BLOCKED),
content_settings->GetMicrophoneCameraState());
// Request and allow microphone and camera access.
@@ -270,7 +274,9 @@ TEST_F(TabSpecificContentSettingsTest, AllowedBlockedMediaContent) {
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
ASSERT_FALSE(content_settings->IsContentBlocked(
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
- ASSERT_EQ(TabSpecificContentSettings::MICROPHONE_CAMERA_ACCESSED,
+ ASSERT_EQ(static_cast<unsigned>(
+ TabSpecificContentSettings::MICROPHONE_ACCESSED |
+ TabSpecificContentSettings::CAMERA_ACCESSED),
content_settings->GetMicrophoneCameraState());
// Request and block microphone and camera access.
@@ -288,7 +294,11 @@ TEST_F(TabSpecificContentSettingsTest, AllowedBlockedMediaContent) {
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
ASSERT_TRUE(content_settings->IsContentBlocked(
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
- ASSERT_EQ(TabSpecificContentSettings::MICROPHONE_CAMERA_BLOCKED,
+ ASSERT_EQ(static_cast<unsigned>(
+ TabSpecificContentSettings::MICROPHONE_ACCESSED |
+ TabSpecificContentSettings::MICROPHONE_BLOCKED |
+ TabSpecificContentSettings::CAMERA_ACCESSED |
+ TabSpecificContentSettings::CAMERA_BLOCKED),
content_settings->GetMicrophoneCameraState());
// Request microphone and camera access. Allow microphone, block camera.

Powered by Google App Engine
This is Rietveld 408576698