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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc

Issue 9085006: Replace Browser::GetTabContentsAt with GetWebContentsAt and update all callers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac yet again Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/net_internals_ui_browsertest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « chrome/browser/ui/webui/net_internals_ui_browsertest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698