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

Side by Side Diff: chrome/browser/chromeos/oom_priority_manager_browsertest.cc

Issue 10532056: TabContentsWrapper -> TabContents, part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small Created 8 years, 6 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/chromeos/oom_priority_manager.cc ('k') | no next file » | 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/browser_process.h" 5 #include "chrome/browser/browser_process.h"
6 #include "chrome/browser/chromeos/oom_priority_manager.h" 6 #include "chrome/browser/chromeos/oom_priority_manager.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 8 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Force creation of the FindBarController. 101 // Force creation of the FindBarController.
102 browser()->GetFindBarController(); 102 browser()->GetFindBarController();
103 103
104 // Select the first tab. It should reload. 104 // Select the first tab. It should reload.
105 WindowedNotificationObserver reload1( 105 WindowedNotificationObserver reload1(
106 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 106 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
107 content::NotificationService::AllSources()); 107 content::NotificationService::AllSources());
108 browser()->SelectNumberedTab(0); 108 browser()->SelectNumberedTab(0);
109 reload1.Wait(); 109 reload1.Wait();
110 // Make sure the FindBarController gets the right TabContentsWrapper. 110 // Make sure the FindBarController gets the right TabContents.
111 EXPECT_EQ(browser()->GetFindBarController()->tab_contents(), 111 EXPECT_EQ(browser()->GetFindBarController()->tab_contents(),
112 browser()->GetSelectedTabContentsWrapper()); 112 browser()->GetActiveTabContents());
113 EXPECT_EQ(0, browser()->active_index()); 113 EXPECT_EQ(0, browser()->active_index());
114 EXPECT_FALSE(browser()->IsTabDiscarded(0)); 114 EXPECT_FALSE(browser()->IsTabDiscarded(0));
115 EXPECT_TRUE(browser()->IsTabDiscarded(1)); 115 EXPECT_TRUE(browser()->IsTabDiscarded(1));
116 EXPECT_TRUE(browser()->IsTabDiscarded(2)); 116 EXPECT_TRUE(browser()->IsTabDiscarded(2));
117 117
118 // Select the third tab. It should reload. 118 // Select the third tab. It should reload.
119 WindowedNotificationObserver reload2( 119 WindowedNotificationObserver reload2(
120 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 120 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
121 content::NotificationService::AllSources()); 121 content::NotificationService::AllSources());
122 browser()->SelectNumberedTab(2); 122 browser()->SelectNumberedTab(2);
(...skipping 17 matching lines...) Expand all
140 WindowedNotificationObserver back2( 140 WindowedNotificationObserver back2(
141 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 141 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
142 content::NotificationService::AllSources()); 142 content::NotificationService::AllSources());
143 browser()->GoBack(CURRENT_TAB); 143 browser()->GoBack(CURRENT_TAB);
144 back2.Wait(); 144 back2.Wait();
145 EXPECT_FALSE(browser()->CanGoBack()); 145 EXPECT_FALSE(browser()->CanGoBack());
146 EXPECT_TRUE(browser()->CanGoForward()); 146 EXPECT_TRUE(browser()->CanGoForward());
147 } 147 }
148 148
149 } // namespace 149 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/oom_priority_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698