Index: chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc |
=================================================================== |
--- chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc (revision 116244) |
+++ chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc (working copy) |
@@ -6,9 +6,10 @@ |
#include "chrome/common/url_constants.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
-#include "content/browser/tab_contents/tab_contents.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/notification_types.h" |
+#include "content/public/browser/render_process_host.h" |
+#include "content/public/browser/web_contents.h" |
#include "googleurl/src/gurl.h" |
using content::OpenURLParams; |
@@ -29,7 +30,7 @@ |
ui_test_utils::NavigateToURL(browser(), GURL("chrome-internal:")); |
bool empty_inner_html = false; |
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
- browser()->GetTabContentsAt(0)->GetRenderViewHost(), L"", |
+ browser()->GetWebContentsAt(0)->GetRenderViewHost(), L"", |
L"window.domAutomationController.send(document.body.innerHTML == '')", |
&empty_inner_html)); |
ASSERT_FALSE(empty_inner_html); |
@@ -48,7 +49,7 @@ |
ui_test_utils::NavigateToURLWithDisposition( |
browser(), GURL(chrome::kChromeUINewTabURL), NEW_FOREGROUND_TAB, |
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
- EXPECT_EQ(1, browser()->GetTabContentsAt(1)->GetMaxPageID()); |
+ EXPECT_EQ(1, browser()->GetWebContentsAt(1)->GetMaxPageID()); |
// Navigate that tab to another site. This allows the NTP process to exit, |
// but it keeps the NTP SiteInstance (and its max_page_id) alive in history. |
@@ -69,25 +70,25 @@ |
ui_test_utils::NavigateToURLWithDisposition( |
browser(), GURL(chrome::kChromeUINewTabURL), NEW_FOREGROUND_TAB, |
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
- EXPECT_EQ(1, browser()->GetTabContentsAt(2)->GetMaxPageID()); |
+ EXPECT_EQ(1, browser()->GetWebContentsAt(2)->GetMaxPageID()); |
browser()->CloseTab(); |
// Open another Web UI page in a new tab. |
ui_test_utils::NavigateToURLWithDisposition( |
browser(), GURL(chrome::kChromeUISettingsURL), NEW_FOREGROUND_TAB, |
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
- EXPECT_EQ(1, browser()->GetTabContentsAt(2)->GetMaxPageID()); |
+ EXPECT_EQ(1, browser()->GetWebContentsAt(2)->GetMaxPageID()); |
// At this point, opening another NTP will use the old SiteInstance in the |
// existing Web UI process, but the page IDs shouldn't affect each other. |
ui_test_utils::NavigateToURLWithDisposition( |
browser(), GURL(chrome::kChromeUINewTabURL), NEW_FOREGROUND_TAB, |
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
- EXPECT_EQ(1, browser()->GetTabContentsAt(3)->GetMaxPageID()); |
+ EXPECT_EQ(1, browser()->GetWebContentsAt(3)->GetMaxPageID()); |
// Only navigating to the NTP in the original tab should have a higher |
// page ID. |
browser()->ActivateTabAt(1, true); |
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); |
- EXPECT_EQ(2, browser()->GetTabContentsAt(1)->GetMaxPageID()); |
+ EXPECT_EQ(2, browser()->GetWebContentsAt(1)->GetMaxPageID()); |
} |