summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/accessibility/renderer_accessibility_browsertest.cc4
-rw-r--r--content/browser/device_orientation/device_orientation_browsertest.cc4
-rw-r--r--content/browser/download/mhtml_generation_browsertest.cc6
-rw-r--r--content/browser/download/mhtml_generation_manager.cc11
-rw-r--r--content/browser/download/mhtml_generation_manager.h9
-rw-r--r--content/browser/file_system/file_system_browsertest.cc4
-rw-r--r--content/browser/in_process_webkit/indexed_db_browsertest.cc6
-rw-r--r--content/browser/renderer_host/render_process_host_browsertest.cc8
-rw-r--r--content/browser/renderer_host/render_view_host_browsertest.cc12
-rw-r--r--content/browser/renderer_host/render_view_host_manager_browsertest.cc54
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_browsertest.cc2
-rw-r--r--content/browser/speech/speech_input_browsertest.cc12
-rw-r--r--content/browser/tab_contents/tab_contents.cc4
-rw-r--r--content/browser/webkit_browsertest.cc10
14 files changed, 80 insertions, 66 deletions
diff --git a/content/browser/accessibility/renderer_accessibility_browsertest.cc b/content/browser/accessibility/renderer_accessibility_browsertest.cc
index 82ee0d6..8a07a7b 100644
--- a/content/browser/accessibility/renderer_accessibility_browsertest.cc
+++ b/content/browser/accessibility/renderer_accessibility_browsertest.cc
@@ -12,9 +12,9 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.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/web_contents.h"
#if defined(OS_WIN)
#include <atlbase.h>
@@ -39,7 +39,7 @@ class RendererAccessibilityBrowserTest : public InProcessBrowserTest {
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
content::NotificationService::AllSources());
RenderWidgetHostView* host_view =
- browser()->GetSelectedTabContents()->GetRenderWidgetHostView();
+ browser()->GetSelectedWebContents()->GetRenderWidgetHostView();
RenderWidgetHost* host = host_view->GetRenderWidgetHost();
RenderViewHost* view_host = static_cast<RenderViewHost*>(host);
view_host->set_save_accessibility_tree_for_testing(true);
diff --git a/content/browser/device_orientation/device_orientation_browsertest.cc b/content/browser/device_orientation/device_orientation_browsertest.cc
index 03a2c7f..7fb2899 100644
--- a/content/browser/device_orientation/device_orientation_browsertest.cc
+++ b/content/browser/device_orientation/device_orientation_browsertest.cc
@@ -10,7 +10,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/device_orientation/orientation.h"
#include "content/browser/device_orientation/provider.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
namespace device_orientation {
@@ -62,7 +62,7 @@ IN_PROC_BROWSER_TEST_F(DeviceOrientationBrowserTest, BasicTest) {
// Check that the page got the event it expected and that the provider
// saw requests for adding and removing an observer.
- EXPECT_EQ("pass", browser()->GetSelectedTabContents()->GetURL().ref());
+ EXPECT_EQ("pass", browser()->GetSelectedWebContents()->GetURL().ref());
EXPECT_TRUE(provider->added_observer_);
EXPECT_TRUE(provider->removed_observer_);
}
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc
index 4b81e35..ec91405 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -10,10 +10,12 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/download/mhtml_generation_manager.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "net/test/test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
+using content::WebContents;
+
namespace {
class MHTMLGenerationTest : public InProcessBrowserTest {
@@ -55,7 +57,7 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/google/google.html"));
- TabContents* tab = browser()->GetSelectedTabContents();
+ WebContents* tab = browser()->GetSelectedWebContents();
MHTMLGenerationManager* mhtml_generation_manager =
g_browser_process->mhtml_generation_manager();
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index d263662..8e0ab7e 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -8,12 +8,13 @@
#include "base/platform_file.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_types.h"
using content::BrowserThread;
+using content::WebContents;
MHTMLGenerationManager::Job::Job()
: browser_file(base::kInvalidPlatformFileValue),
@@ -31,7 +32,7 @@ MHTMLGenerationManager::MHTMLGenerationManager() {
MHTMLGenerationManager::~MHTMLGenerationManager() {
}
-void MHTMLGenerationManager::GenerateMHTML(TabContents* tab_contents,
+void MHTMLGenerationManager::GenerateMHTML(WebContents* web_contents,
const FilePath& file,
const GenerateMHTMLCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -40,13 +41,13 @@ void MHTMLGenerationManager::GenerateMHTML(TabContents* tab_contents,
int job_id = id_counter++;
Job job;
job.file_path = file;
- job.process_id = tab_contents->GetRenderProcessHost()->GetID();
- job.routing_id = tab_contents->GetRenderViewHost()->routing_id();
+ job.process_id = web_contents->GetRenderProcessHost()->GetID();
+ job.routing_id = web_contents->GetRenderViewHost()->routing_id();
job.callback = callback;
id_to_job_[job_id] = job;
base::ProcessHandle renderer_process =
- tab_contents->GetRenderProcessHost()->GetHandle();
+ web_contents->GetRenderProcessHost()->GetHandle();
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&MHTMLGenerationManager::CreateFile, this,
job_id, file, renderer_process));
diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h
index 0190657..8c3635d 100644
--- a/content/browser/download/mhtml_generation_manager.h
+++ b/content/browser/download/mhtml_generation_manager.h
@@ -15,7 +15,10 @@
#include "ipc/ipc_platform_file.h"
class FilePath;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
class CONTENT_EXPORT MHTMLGenerationManager
: public base::RefCountedThreadSafe<
@@ -28,8 +31,8 @@ class CONTENT_EXPORT MHTMLGenerationManager
int64 /* size of the file */)> GenerateMHTMLCallback;
// Instructs the render view to generate a MHTML representation of the current
- // page for |tab_contents|.
- void GenerateMHTML(TabContents* tab_contents,
+ // page for |web_contents|.
+ void GenerateMHTML(content::WebContents* web_contents,
const FilePath& file,
const GenerateMHTMLCallback& callback);
diff --git a/content/browser/file_system/file_system_browsertest.cc b/content/browser/file_system/file_system_browsertest.cc
index 75fac0f..582cd08 100644
--- a/content/browser/file_system/file_system_browsertest.cc
+++ b/content/browser/file_system/file_system_browsertest.cc
@@ -40,11 +40,11 @@ class FileSystemBrowserTest : public InProcessBrowserTest {
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
the_browser, test_url, 2);
LOG(INFO) << "Navigation done.";
- std::string result = the_browser->GetSelectedTabContents()->GetURL().ref();
+ std::string result = the_browser->GetSelectedWebContents()->GetURL().ref();
if (result != "pass") {
std::string js_result;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- the_browser->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ the_browser->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(getLog())", &js_result));
FAIL() << "Failed: " << js_result;
}
diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc
index 6617ed4..ac375ed 100644
--- a/content/browser/in_process_webkit/indexed_db_browsertest.cc
+++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc
@@ -49,11 +49,11 @@ class IndexedDBBrowserTest : public InProcessBrowserTest {
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
the_browser, test_url, 2);
LOG(INFO) << "Navigation done.";
- std::string result = the_browser->GetSelectedTabContents()->GetURL().ref();
+ std::string result = the_browser->GetSelectedWebContents()->GetURL().ref();
if (result != "pass") {
std::string js_result;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- the_browser->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ the_browser->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(getLog())", &js_result));
FAIL() << "Failed: " << js_result;
}
@@ -113,7 +113,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DISABLED_TransactionTest) {
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DISABLED_DoesntHangTest) {
SimpleTest(testUrl(FilePath(
FILE_PATH_LITERAL("transaction_run_forever.html"))));
- ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
+ ui_test_utils::CrashTab(browser()->GetSelectedWebContents());
SimpleTest(testUrl(FilePath(FILE_PATH_LITERAL("transaction_test.html"))));
}
diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc
index 5740395..9db2c2f 100644
--- a/content/browser/renderer_host/render_process_host_browsertest.cc
+++ b/content/browser/renderer_host/render_process_host_browsertest.cc
@@ -15,6 +15,8 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
+using content::WebContents;
+
RenderProcessHostTest::RenderProcessHostTest() {
EnableDOMAutomation();
}
@@ -42,8 +44,8 @@ void DoNothing() {}
// handle.
base::ProcessHandle RenderProcessHostTest::ShowSingletonTab(const GURL& page) {
browser()->ShowSingletonTab(page);
- TabContents* tc = browser()->GetSelectedTabContents();
- CHECK(tc->GetURL() == page);
+ WebContents* wc = browser()->GetSelectedWebContents();
+ CHECK(wc->GetURL() == page);
// Ensure that the backgrounding / foregrounding gets a chance to run.
content::BrowserThread::PostTaskAndReply(
@@ -51,7 +53,7 @@ base::ProcessHandle RenderProcessHostTest::ShowSingletonTab(const GURL& page) {
base::Bind(DoNothing), MessageLoop::QuitClosure());
MessageLoop::current()->Run();
- return tc->GetRenderProcessHost()->GetHandle();
+ return wc->GetRenderProcessHost()->GetHandle();
}
IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) {
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 22204ce..e8c44df 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -17,6 +17,8 @@
#include "net/base/net_util.h"
#include "net/test/test_server.h"
+using content::WebContents;
+
class RenderViewHostTest : public InProcessBrowserTest {
public:
RenderViewHostTest() {}
@@ -30,7 +32,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest,
ui_test_utils::NavigateToURL(browser(), empty_url);
RenderViewHost* rvh =
- browser()->GetSelectedTabContents()->GetRenderViewHost();
+ browser()->GetSelectedWebContents()->GetRenderViewHost();
{
Value* value = rvh->ExecuteJavascriptAndGetValue(string16(),
@@ -164,8 +166,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest,
class RenderViewHostTestWebContentsObserver
: public content::WebContentsObserver {
public:
- explicit RenderViewHostTestWebContentsObserver(TabContents* tab_contents)
- : content::WebContentsObserver(tab_contents),
+ explicit RenderViewHostTestWebContentsObserver(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents),
navigation_count_(0) {}
virtual ~RenderViewHostTestWebContentsObserver() {}
@@ -198,7 +200,7 @@ class RenderViewHostTestWebContentsObserver
IN_PROC_BROWSER_TEST_F(RenderViewHostTest, FrameNavigateSocketAddress) {
ASSERT_TRUE(test_server()->Start());
RenderViewHostTestWebContentsObserver observer(
- browser()->GetSelectedTabContents());
+ browser()->GetSelectedWebContents());
GURL test_url = test_server()->GetURL("files/simple.html");
ui_test_utils::NavigateToURL(browser(), test_url);
@@ -211,7 +213,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest, FrameNavigateSocketAddress) {
IN_PROC_BROWSER_TEST_F(RenderViewHostTest, BaseURLParam) {
ASSERT_TRUE(test_server()->Start());
RenderViewHostTestWebContentsObserver observer(
- browser()->GetSelectedTabContents());
+ browser()->GetSelectedWebContents());
// Base URL is not set if it is the same as the URL.
GURL test_url = test_server()->GetURL("files/simple.html");
diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc
index d9582da..e14db12 100644
--- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc
@@ -60,13 +60,13 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_TRUE(orig_site_instance != NULL);
// Test clicking a rel=noreferrer + target=blank link.
bool success = false;
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(clickNoRefTargetBlankLink());",
&success));
EXPECT_TRUE(success);
@@ -79,16 +79,16 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
EXPECT_EQ(2, browser()->tab_count());
EXPECT_EQ(1, browser()->active_index());
EXPECT_EQ("/files/title2.html",
- browser()->GetSelectedTabContents()->GetURL().path());
+ browser()->GetSelectedWebContents()->GetURL().path());
// Wait for the cross-site transition in the new tab to finish.
- ui_test_utils::WaitForLoadStop(browser()->GetSelectedTabContents());
- EXPECT_FALSE(browser()->GetSelectedTabContents()->
+ ui_test_utils::WaitForLoadStop(browser()->GetSelectedWebContents());
+ EXPECT_FALSE(browser()->GetSelectedWebContents()->
GetRenderManagerForTesting()->pending_render_view_host());
// Should have a new SiteInstance.
scoped_refptr<SiteInstance> noref_blank_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_NE(orig_site_instance, noref_blank_site_instance);
}
@@ -114,13 +114,13 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_TRUE(orig_site_instance != NULL);
// Test clicking a target=blank link.
bool success = false;
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(clickTargetBlankLink());",
&success));
EXPECT_TRUE(success);
@@ -134,13 +134,13 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
EXPECT_EQ(1, browser()->active_index());
// Wait for the cross-site transition in the new tab to finish.
- ui_test_utils::WaitForLoadStop(browser()->GetSelectedTabContents());
+ ui_test_utils::WaitForLoadStop(browser()->GetSelectedWebContents());
EXPECT_EQ("/files/title2.html",
- browser()->GetSelectedTabContents()->GetURL().path());
+ browser()->GetSelectedWebContents()->GetURL().path());
// Should have the same SiteInstance.
scoped_refptr<SiteInstance> blank_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_EQ(orig_site_instance, blank_site_instance);
}
@@ -166,29 +166,29 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_TRUE(orig_site_instance != NULL);
// Test clicking a rel=noreferrer link.
bool success = false;
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(clickNoRefLink());",
&success));
EXPECT_TRUE(success);
// Wait for the cross-site transition in the current tab to finish.
- ui_test_utils::WaitForLoadStop(browser()->GetSelectedTabContents());
+ ui_test_utils::WaitForLoadStop(browser()->GetSelectedWebContents());
// Opens in same tab.
EXPECT_EQ(1, browser()->tab_count());
EXPECT_EQ(0, browser()->active_index());
EXPECT_EQ("/files/title2.html",
- browser()->GetSelectedTabContents()->GetURL().path());
+ browser()->GetSelectedWebContents()->GetURL().path());
// Should have the same SiteInstance.
scoped_refptr<SiteInstance> noref_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_EQ(orig_site_instance, noref_site_instance);
}
@@ -214,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, ClickLinkAfter204Error) {
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_TRUE(orig_site_instance != NULL);
// Load a cross-site page that fails with a 204 error.
@@ -222,31 +222,31 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, ClickLinkAfter204Error) {
// We should still be looking at the normal page.
scoped_refptr<SiteInstance> post_nav_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_EQ(orig_site_instance, post_nav_site_instance);
EXPECT_EQ("/files/click-noreferrer-links.html",
- browser()->GetSelectedTabContents()->GetURL().path());
+ browser()->GetSelectedWebContents()->GetURL().path());
// Renderer-initiated navigations should work.
bool success = false;
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->GetRenderViewHost(), L"",
+ browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(clickNoRefLink());",
&success));
EXPECT_TRUE(success);
// Wait for the cross-site transition in the current tab to finish.
- ui_test_utils::WaitForLoadStop(browser()->GetSelectedTabContents());
+ ui_test_utils::WaitForLoadStop(browser()->GetSelectedWebContents());
// Opens in same tab.
EXPECT_EQ(1, browser()->tab_count());
EXPECT_EQ(0, browser()->active_index());
EXPECT_EQ("/files/title2.html",
- browser()->GetSelectedTabContents()->GetURL().path());
+ browser()->GetSelectedWebContents()->GetURL().path());
// Should have the same SiteInstance.
scoped_refptr<SiteInstance> noref_site_instance(
- browser()->GetSelectedTabContents()->GetSiteInstance());
+ browser()->GetSelectedWebContents()->GetSiteInstance());
EXPECT_EQ(orig_site_instance, noref_site_instance);
}
@@ -316,22 +316,22 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, LeakingRenderViewHosts) {
// Observe the newly created render_view_host to make sure it will not leak.
RenderViewHostObserverArray rvh_observers;
- rvh_observers.AddObserverToRVH(browser()->GetSelectedTabContents()->
+ rvh_observers.AddObserverToRVH(browser()->GetSelectedWebContents()->
GetRenderViewHost());
GURL view_source_url(chrome::kViewSourceScheme + std::string(":") +
navigated_url.spec());
ui_test_utils::NavigateToURL(browser(), view_source_url);
- rvh_observers.AddObserverToRVH(browser()->GetSelectedTabContents()->
+ rvh_observers.AddObserverToRVH(browser()->GetSelectedWebContents()->
GetRenderViewHost());
// Now navigate to a different instance so that we swap out again.
ui_test_utils::NavigateToURL(browser(),
https_server.GetURL("files/title2.html"));
- rvh_observers.AddObserverToRVH(browser()->GetSelectedTabContents()->
+ rvh_observers.AddObserverToRVH(browser()->GetSelectedWebContents()->
GetRenderViewHost());
// This used to leak a render view host.
- browser()->CloseTabContents(browser()->GetSelectedTabContents());
+ browser()->CloseTabContents(browser()->GetSelectedWebContents());
EXPECT_EQ(0U, rvh_observers.GetNumObservers());
}
diff --git a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc
index c8ef3ed..74e4546 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc
@@ -20,7 +20,7 @@ class ResourceDispatcherHostBrowserTest : public InProcessBrowserTest {
protected:
RenderViewHost* render_view_host() {
- return browser()->GetSelectedTabContents()->GetRenderViewHost();
+ return browser()->GetSelectedWebContents()->GetRenderViewHost();
}
bool GetPopupTitle(const GURL& url, string16* title);
diff --git a/content/browser/speech/speech_input_browsertest.cc b/content/browser/speech/speech_input_browsertest.cc
index 204d988..f0f9f2b 100644
--- a/content/browser/speech/speech_input_browsertest.cc
+++ b/content/browser/speech/speech_input_browsertest.cc
@@ -19,6 +19,8 @@
#include "content/public/common/speech_input_result.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
+using content::WebContents;
+
namespace speech_input {
class FakeSpeechInputManager;
}
@@ -160,13 +162,13 @@ class SpeechInputBrowserTest : public InProcessBrowserTest {
mouse_event.x = 0;
mouse_event.y = 0;
mouse_event.clickCount = 1;
- TabContents* tab_contents = browser()->GetSelectedTabContents();
+ WebContents* web_contents = browser()->GetSelectedWebContents();
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab_contents->GetController()));
- tab_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
+ content::Source<NavigationController>(&web_contents->GetController()));
+ web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
mouse_event.type = WebKit::WebInputEvent::MouseUp;
- tab_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
+ web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
observer.Wait();
}
@@ -176,7 +178,7 @@ class SpeechInputBrowserTest : public InProcessBrowserTest {
// then sets the URL fragment as 'pass' if it received the expected string.
LoadAndStartSpeechInputTest(filename);
- EXPECT_EQ("pass", browser()->GetSelectedTabContents()->GetURL().ref());
+ EXPECT_EQ("pass", browser()->GetSelectedWebContents()->GetURL().ref());
}
// InProcessBrowserTest methods.
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 8b26b57..f8399ff 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1560,8 +1560,8 @@ void TabContents::NotifySwapped() {
// pointer. See Bug 1230284.
notify_disconnection_ = true;
content::NotificationService::current()->Notify(
- content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- content::Source<TabContents>(this),
+ content::NOTIFICATION_WEB_CONTENTS_SWAPPED,
+ content::Source<WebContents>(this),
content::NotificationService::NoDetails());
}
diff --git a/content/browser/webkit_browsertest.cc b/content/browser/webkit_browsertest.cc
index 4970828..4126826 100644
--- a/content/browser/webkit_browsertest.cc
+++ b/content/browser/webkit_browsertest.cc
@@ -10,6 +10,8 @@
typedef InProcessBrowserTest WebKitBrowserTest;
+using content::WebContents;
+
const char kAsyncScriptThatAbortsOnEndPage[] =
"files/webkit/async_script_abort_on_end.html";
@@ -26,12 +28,12 @@ IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, AbortOnEnd) {
ui_test_utils::NavigateToURL(browser(), url);
- TabContents* tab_contents = browser()->GetSelectedTabContents();
+ WebContents* web_contents = browser()->GetSelectedWebContents();
// If you are seeing this test fail, please strongly investigate the
// possibility that http://crbug.com/75604 and
// https://bugs.webkit.org/show_bug.cgi?id=71122 have reverted before
// marking this as flakey.
- EXPECT_FALSE(tab_contents->IsCrashed());
+ EXPECT_FALSE(web_contents->IsCrashed());
}
// This is a browser test because the DumpRenderTree framework holds
@@ -50,6 +52,6 @@ IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, XsltBadImport) {
ui_test_utils::NavigateToURL(browser(), url);
- TabContents* tab_contents = browser()->GetSelectedTabContents();
- EXPECT_FALSE(tab_contents->IsCrashed());
+ WebContents* web_contents = browser()->GetSelectedWebContents();
+ EXPECT_FALSE(web_contents->IsCrashed());
}