Index: trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc |
=================================================================== |
--- trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc (revision 238401) |
+++ trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc (working copy) |
@@ -236,9 +236,13 @@ |
CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, |
std::string())); |
+ // Removing an |InfoBarDelegate| from the |InfoBarService| does not delete |
+ // it. Hence the |delegate| must be cleaned up after it was removed from the |
+ // |infobar_service|. |
InfoBarService* infobar_service = |
InfoBarService::FromWebContents(web_contents()); |
- infobar_service->RemoveInfoBar(infobar_service->infobar_at(0)); |
+ scoped_ptr<InfoBarDelegate> delegate(infobar_service->infobar_at(0)); |
+ infobar_service->RemoveInfoBar(delegate.get()); |
} |
TEST_F(ContentSettingBubbleModelTest, MediastreamMic) { |