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/app/chrome_command_ids.h" | 5 #include "chrome/app/chrome_command_ids.h" |
6 #include "chrome/browser/bookmarks/bookmark_model.h" | 6 #include "chrome/browser/bookmarks/bookmark_model.h" |
7 #include "chrome/browser/ui/browser_list.h" | 7 #include "chrome/browser/ui/browser_list.h" |
8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
9 #include "chrome/test/base/browser_with_test_window_test.h" | 9 #include "chrome/test/base/browser_with_test_window_test.h" |
10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
12 #include "content/public/browser/navigation_entry.h" | 12 #include "content/public/browser/navigation_entry.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "content/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 | 15 |
16 #if defined(OS_CHROMEOS) | 16 #if defined(OS_CHROMEOS) |
17 #include "chrome/browser/chromeos/login/mock_user_manager.h" | 17 #include "chrome/browser/chromeos/login/mock_user_manager.h" |
18 #endif | 18 #endif |
19 | 19 |
20 typedef BrowserWithTestWindowTest BrowserCommandsTest; | 20 typedef BrowserWithTestWindowTest BrowserCommandsTest; |
21 | 21 |
22 using content::OpenURLParams; | 22 using content::OpenURLParams; |
23 using content::Referrer; | 23 using content::Referrer; |
24 using content::WebContents; | 24 using content::WebContents; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 ASSERT_EQ(url1, browser()->GetSelectedWebContents()->GetURL()); | 169 ASSERT_EQ(url1, browser()->GetSelectedWebContents()->GetURL()); |
170 | 170 |
171 // Same thing again for forward. | 171 // Same thing again for forward. |
172 // TODO(brettw) bug 11055: see the comment above about why we need this. | 172 // TODO(brettw) bug 11055: see the comment above about why we need this. |
173 CommitPendingLoad(&browser()->GetSelectedWebContents()->GetController()); | 173 CommitPendingLoad(&browser()->GetSelectedWebContents()->GetController()); |
174 browser()->GoForward(NEW_FOREGROUND_TAB); | 174 browser()->GoForward(NEW_FOREGROUND_TAB); |
175 ASSERT_EQ(4, browser()->active_index()); | 175 ASSERT_EQ(4, browser()->active_index()); |
176 ASSERT_EQ(url2, browser()->GetSelectedWebContents()->GetURL()); | 176 ASSERT_EQ(url2, browser()->GetSelectedWebContents()->GetURL()); |
177 } | 177 } |
178 | 178 |
OLD | NEW |