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]; |
} |