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

Side by Side Diff: chrome/browser/infobars/infobars_browsertest.cc

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 #include "chrome/browser/extensions/extension_install_prompt.h" 6 #include "chrome/browser/extensions/extension_install_prompt.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/infobars/infobar_tab_helper.h" 8 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 69 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
70 content::NotificationService::AllSources()); 70 content::NotificationService::AllSources());
71 content::WindowedNotificationObserver infobar_removed_1( 71 content::WindowedNotificationObserver infobar_removed_1(
72 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 72 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
73 content::NotificationService::AllSources()); 73 content::NotificationService::AllSources());
74 InstallExtension("theme2.crx"); 74 InstallExtension("theme2.crx");
75 infobar_added_2.Wait(); 75 infobar_added_2.Wait();
76 infobar_removed_1.Wait(); 76 infobar_removed_1.Wait();
77 EXPECT_EQ(0u, 77 EXPECT_EQ(0u,
78 chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()-> 78 chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()->
79 infobar_count()); 79 GetInfoBarCount());
80 80
81 content::WindowedNotificationObserver infobar_removed_2( 81 content::WindowedNotificationObserver infobar_removed_2(
82 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 82 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
83 content::NotificationService::AllSources()); 83 content::NotificationService::AllSources());
84 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 84 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
85 infobar_removed_2.Wait(); 85 infobar_removed_2.Wait();
86 EXPECT_EQ(0u, 86 EXPECT_EQ(0u,
87 chrome::GetActiveTabContents(browser())->infobar_tab_helper()-> 87 chrome::GetActiveTabContents(browser())->infobar_tab_helper()->
88 infobar_count()); 88 GetInfoBarCount());
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar_tab_helper.cc ('k') | chrome/browser/infobars/insecure_content_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698