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

Unified Diff: chrome/browser/extensions/app_process_apitest.cc

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
Index: chrome/browser/extensions/app_process_apitest.cc
===================================================================
--- chrome/browser/extensions/app_process_apitest.cc (revision 116109)
+++ chrome/browser/extensions/app_process_apitest.cc (working copy)
@@ -24,6 +24,8 @@
#include "content/test/test_navigation_observer.h"
#include "net/base/mock_host_resolver.h"
+using content::WebContents;
+
class AppApiTest : public ExtensionApiTest {
protected:
// Gets the base URL for files for a specific test, making sure that it uses
@@ -55,7 +57,7 @@
// Now the active tab in last active window should be the new tab.
Browser* last_active_browser = BrowserList::GetLastActive();
EXPECT_TRUE(last_active_browser);
- TabContents* newtab = last_active_browser->GetSelectedTabContents();
+ WebContents* newtab = last_active_browser->GetSelectedWebContents();
EXPECT_TRUE(newtab);
observer.Wait();
EXPECT_EQ(url, newtab->GetController().GetLastCommittedEntry()->GetURL());
@@ -505,7 +507,7 @@
Browser* last_active_browser = BrowserList::GetLastActive();
EXPECT_TRUE(last_active_browser);
ASSERT_NE(browser(), last_active_browser);
- TabContents* newtab = last_active_browser->GetSelectedTabContents();
+ WebContents* newtab = last_active_browser->GetSelectedWebContents();
EXPECT_TRUE(newtab);
if (!newtab->GetController().GetLastCommittedEntry() ||
newtab->GetController().GetLastCommittedEntry()->GetURL() != app_url) {
@@ -560,7 +562,7 @@
// App has loaded, and chrome.app.isInstalled should be true.
bool is_installed = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(chrome.app.isInstalled)",
&is_installed));
ASSERT_TRUE(is_installed);
@@ -614,7 +616,7 @@
Browser* last_active_browser = BrowserList::GetLastActive();
EXPECT_TRUE(last_active_browser);
ASSERT_NE(browser(), last_active_browser);
- TabContents* newtab = last_active_browser->GetSelectedTabContents();
+ WebContents* newtab = last_active_browser->GetSelectedWebContents();
EXPECT_TRUE(newtab);
GURL non_app_url = base_url.Resolve("path3/empty.html");
observer.Wait();
@@ -649,7 +651,7 @@
ASSERT_TRUE(is_installed);
// Crash the tab and reload it, chrome.app.isInstalled should still be true.
- ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
+ ui_test_utils::CrashTab(browser()->GetSelectedWebContents());
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/browser_action_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698