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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/importer/importer_host.cc ('k') | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 10 #include "chrome/browser/themes/theme_service_factory.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents.h" 13 #include "chrome/browser/ui/tab_contents/tab_contents.h"
13 #include "chrome/common/chrome_notification_types.h" 14 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "content/public/browser/notification_service.h" 17 #include "content/public/browser/notification_service.h"
17 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
18 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
19 #include "chrome/test/ui/ui_test.h" 20 #include "chrome/test/ui/ui_test.h"
20 #include "net/test/test_server.h" 21 #include "net/test/test_server.h"
21 22
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ui_test_utils::WindowedNotificationObserver infobar_added_2( 67 ui_test_utils::WindowedNotificationObserver infobar_added_2(
67 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 68 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
68 content::NotificationService::AllSources()); 69 content::NotificationService::AllSources());
69 ui_test_utils::WindowedNotificationObserver infobar_removed_1( 70 ui_test_utils::WindowedNotificationObserver infobar_removed_1(
70 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 71 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
71 content::NotificationService::AllSources()); 72 content::NotificationService::AllSources());
72 InstallExtension("theme2.crx"); 73 InstallExtension("theme2.crx");
73 infobar_added_2.Wait(); 74 infobar_added_2.Wait();
74 infobar_removed_1.Wait(); 75 infobar_removed_1.Wait();
75 EXPECT_EQ(0u, 76 EXPECT_EQ(0u,
76 browser()->GetTabContentsAt(0)->infobar_tab_helper()-> 77 chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()->
77 infobar_count()); 78 infobar_count());
78 79
79 ui_test_utils::WindowedNotificationObserver infobar_removed_2( 80 ui_test_utils::WindowedNotificationObserver infobar_removed_2(
80 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
81 content::NotificationService::AllSources()); 82 content::NotificationService::AllSources());
82 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 83 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
83 infobar_removed_2.Wait(); 84 infobar_removed_2.Wait();
84 EXPECT_EQ(0u, 85 EXPECT_EQ(0u,
85 browser()->GetActiveTabContents()->infobar_tab_helper()-> 86 chrome::GetActiveTabContents(browser())->infobar_tab_helper()->
86 infobar_count()); 87 infobar_count());
87 } 88 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer_host.cc ('k') | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698