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

Unified Diff: chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 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/ui/tab_contents/test_tab_contents_wrapper.cc
diff --git a/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
index 5e40c7d7f742b670d2ebdece08073efaa2d57898..620a9c992a1c51780a886a190a94a6b3c83df22d 100644
--- a/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,9 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/web_contents.h"
+
+using content::WebContents;
TabContentsWrapperTestHarness::TabContentsWrapperTestHarness()
: ChromeRenderViewHostTestHarness() {
@@ -15,22 +17,21 @@ TabContentsWrapperTestHarness::TabContentsWrapperTestHarness()
TabContentsWrapperTestHarness::~TabContentsWrapperTestHarness() {
}
-TestTabContents* TabContentsWrapperTestHarness::contents() {
- return contents_wrapper_.get() ?
- static_cast<TestTabContents*>(contents_wrapper_->web_contents()) : NULL;
+WebContents* TabContentsWrapperTestHarness::web_contents() {
+ return contents_wrapper_.get() ? contents_wrapper_->web_contents() : NULL;
}
TabContentsWrapper* TabContentsWrapperTestHarness::contents_wrapper() {
return contents_wrapper_.get();
}
-void TabContentsWrapperTestHarness::SetContents(TestTabContents* contents) {
+void TabContentsWrapperTestHarness::SetContents(WebContents* contents) {
contents_wrapper_.reset(contents ? new TabContentsWrapper(contents) : NULL);
}
void TabContentsWrapperTestHarness::SetUp() {
ChromeRenderViewHostTestHarness::SetUp();
- SetContents(CreateTestTabContents());
+ SetContents(CreateTestWebContents());
}
void TabContentsWrapperTestHarness::TearDown() {

Powered by Google App Engine
This is Rietveld 408576698