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

Unified Diff: chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.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/webui/html_dialog_tab_contents_delegate_unittest.cc
diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc
index 01d61783de2f76c7cbc593a4db3d1c28c8f5c49e..cc07b5c28b4e919190578ead1463ea5baa6b2b34 100644
--- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc
+++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.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.
@@ -15,7 +15,8 @@
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/web_contents.h"
+#include "content/test/web_contents_tester.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -23,6 +24,8 @@
using content::OpenURLParams;
using content::Referrer;
+using content::WebContents;
+using content::WebContentsTester;
namespace {
@@ -83,8 +86,8 @@ TEST_F(HtmlDialogTabContentsDelegateTest, OpenURLFromTabTest) {
}
TEST_F(HtmlDialogTabContentsDelegateTest, AddNewContentsForegroundTabTest) {
- TabContents* contents =
- new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
+ WebContents* contents =
+ WebContentsTester::CreateTestWebContents(profile(), NULL);
test_tab_contents_delegate_->AddNewContents(
NULL, contents, NEW_FOREGROUND_TAB, gfx::Rect(), false);
// This should create a new foreground tab in the existing browser.
« no previous file with comments | « chrome/browser/ui/views/stubs_aura.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698