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/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 #include "chrome/browser/ui/browser_command_controller.h" | 8 #include "chrome/browser/ui/browser_command_controller.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.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/browser_with_test_window_test.h" | 13 #include "chrome/test/base/browser_with_test_window_test.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
18 #include "content/public/test/test_browser_thread.h" | |
19 | 18 |
20 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
21 #include "chrome/browser/chromeos/login/mock_user_manager.h" | 20 #include "chrome/browser/chromeos/login/mock_user_manager.h" |
22 #endif | 21 #endif |
23 | 22 |
24 typedef BrowserWithTestWindowTest BrowserCommandsTest; | 23 typedef BrowserWithTestWindowTest BrowserCommandsTest; |
25 | 24 |
26 using content::OpenURLParams; | 25 using content::OpenURLParams; |
27 using content::Referrer; | 26 using content::Referrer; |
28 using content::WebContents; | 27 using content::WebContents; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Same thing again for forward. | 217 // Same thing again for forward. |
219 // TODO(brettw) bug 11055: see the comment above about why we need this. | 218 // TODO(brettw) bug 11055: see the comment above about why we need this. |
220 CommitPendingLoad(& | 219 CommitPendingLoad(& |
221 browser()->tab_strip_model()->GetActiveWebContents()->GetController()); | 220 browser()->tab_strip_model()->GetActiveWebContents()->GetController()); |
222 chrome::GoForward(browser(), NEW_FOREGROUND_TAB); | 221 chrome::GoForward(browser(), NEW_FOREGROUND_TAB); |
223 ASSERT_EQ(4, browser()->tab_strip_model()->active_index()); | 222 ASSERT_EQ(4, browser()->tab_strip_model()->active_index()); |
224 ASSERT_EQ(url2, | 223 ASSERT_EQ(url2, |
225 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 224 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
226 } | 225 } |
227 | 226 |
OLD | NEW |