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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm

Issue 1312053006: Remove CONTENT_SETTINGS_NUM_TYPES (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@website-settings-registry-4
Patch Set: Created 5 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/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
index 9ca8b974c7c88e7194fcfe16aa6cda0fe5f95a9d..ae14698b2233c6b19c9f91327836919283698fc9 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
@@ -102,29 +102,12 @@ ContentSettingBubbleControllerTest::CreateBubbleController(
// Check that the bubble doesn't crash or leak for any settings type
TEST_F(ContentSettingBubbleControllerTest, Init) {
- for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
- if (i == CONTENT_SETTINGS_TYPE_NOTIFICATIONS ||
- i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE ||
- i == CONTENT_SETTINGS_TYPE_FULLSCREEN ||
- i == CONTENT_SETTINGS_TYPE_MOUSELOCK ||
- i == CONTENT_SETTINGS_TYPE_MEDIASTREAM ||
- i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
- i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA ||
- i == CONTENT_SETTINGS_TYPE_PPAPI_BROKER ||
- i == CONTENT_SETTINGS_TYPE_MIDI_SYSEX ||
- i == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING ||
- i == CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS ||
- i == CONTENT_SETTINGS_TYPE_APP_BANNER ||
- i == CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT ||
- i == CONTENT_SETTINGS_TYPE_DURABLE_STORAGE) {
- // These types have no bubble.
+ for (ContentSettingsType type :
+ ContentSettingBubbleModel::GetSupportedBubbleTypes()) {
+ // Media stream is tested in the MediaStreamBubble test below.
+ if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM)
continue;
- }
-
- ContentSettingsType settingsType = static_cast<ContentSettingsType>(i);
-
- ContentSettingBubbleController* controller =
- CreateBubbleController(settingsType);
+ ContentSettingBubbleController* controller = CreateBubbleController(type);
EXPECT_EQ(0u, [controller mediaMenus]->size());
[parent_ close];
}

Powered by Google App Engine
This is Rietveld 408576698