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

Unified Diff: chrome/browser/ui/panels/base_panel_browser_test.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/panels/base_panel_browser_test.cc
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 0429173ec4e48dc0001fa6c4ecd032ae1e2996f5..f468b1843387cac9f4aaee407e2ced0005dd1b55 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -24,15 +24,21 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/string_ordinal.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/test/web_contents_tester.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
+#if defined(OS_LINUX)
+#include "ui/base/x/x11_util.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
#include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
#endif
+using content::WebContentsTester;
+
namespace {
const int kTestingWorkAreaWidth = 800;
@@ -431,7 +437,8 @@ Panel* BasePanelBrowserTest::CreateOverflowPanel(const std::string& name,
void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) {
TabContentsWrapper* tab_contents =
- new TabContentsWrapper(new TestTabContents(browser->profile(), NULL));
+ new TabContentsWrapper(
+ WebContentsTester::CreateTestWebContents(browser->profile(), NULL));
browser->AddTab(tab_contents, content::PAGE_TRANSITION_LINK);
}
« no previous file with comments | « chrome/browser/ui/media_stream_infobar_delegate.h ('k') | chrome/browser/ui/prefs/prefs_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698