| OLD | NEW |
| 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/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
| 9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
| 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | |
| 15 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
| 16 #include "content/public/browser/notification_types.h" | 15 #include "content/public/browser/notification_types.h" |
| 16 #include "content/public/test/test_utils.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 | 18 |
| 19 using content::OpenURLParams; | 19 using content::OpenURLParams; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 typedef InProcessBrowserTest OomPriorityManagerTest; | 23 typedef InProcessBrowserTest OomPriorityManagerTest; |
| 24 | 24 |
| 25 IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { | 25 IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { |
| 26 using ui_test_utils::WindowedNotificationObserver; | 26 using content::WindowedNotificationObserver; |
| 27 | 27 |
| 28 // Get three tabs open. | 28 // Get three tabs open. |
| 29 WindowedNotificationObserver load1( | 29 WindowedNotificationObserver load1( |
| 30 content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 30 content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
| 31 content::NotificationService::AllSources()); | 31 content::NotificationService::AllSources()); |
| 32 OpenURLParams open1(GURL(chrome::kChromeUIAboutURL), content::Referrer(), | 32 OpenURLParams open1(GURL(chrome::kChromeUIAboutURL), content::Referrer(), |
| 33 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); | 33 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); |
| 34 browser()->OpenURL(open1); | 34 browser()->OpenURL(open1); |
| 35 load1.Wait(); | 35 load1.Wait(); |
| 36 | 36 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 WindowedNotificationObserver back2( | 143 WindowedNotificationObserver back2( |
| 144 content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 144 content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
| 145 content::NotificationService::AllSources()); | 145 content::NotificationService::AllSources()); |
| 146 chrome::GoBack(browser(), CURRENT_TAB); | 146 chrome::GoBack(browser(), CURRENT_TAB); |
| 147 back2.Wait(); | 147 back2.Wait(); |
| 148 EXPECT_FALSE(chrome::CanGoBack(browser())); | 148 EXPECT_FALSE(chrome::CanGoBack(browser())); |
| 149 EXPECT_TRUE(chrome::CanGoForward(browser())); | 149 EXPECT_TRUE(chrome::CanGoForward(browser())); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace | 152 } // namespace |
| OLD | NEW |