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

Unified Diff: chrome/browser/ui/webui/web_ui_unittest.cc

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 4 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/constrained_web_dialog_delegate_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/web_ui_unittest.cc
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index caa1d3026af6439784787197ce02cc1e75cdfe4a..c3679162dd91bf7edc152c8b25ac162c6e76d78d 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -26,6 +26,14 @@ using content::SiteInstance;
using content::WebContents;
using content::WebContentsTester;
+// TODO(avi): Kill this when TabContents goes away.
+class WebUITestContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
class WebUITest : public TabContentsTestHarness {
public:
WebUITest() : ui_thread_(BrowserThread::UI, MessageLoop::current()) {}
@@ -109,9 +117,10 @@ TEST_F(WebUITest, WebUIToStandard) {
// alive), which will trigger different behavior in RenderViewHostManager.
WebContents* contents2 =
WebContentsTester::CreateTestWebContents(profile(), NULL);
- TabContents tab_contents2(contents2);
+ scoped_ptr<TabContents> tab_contents2(
+ WebUITestContentsCreator::CreateTabContents(contents2));
- DoNavigationTest(&tab_contents2, 101);
+ DoNavigationTest(tab_contents2.get(), 101);
}
TEST_F(WebUITest, WebUIToWebUI) {
« no previous file with comments | « chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698