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

Unified Diff: content/test/web_contents_tester.cc

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT 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 | « content/test/test_renderer_host.cc ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/web_contents_tester.cc
diff --git a/content/test/web_contents_tester.cc b/content/test/web_contents_tester.cc
index c6403119219806b74df4f9340b4621d2d9786814..e2b249b1a0fac7443823cc60f8b5ad1ea8f20c55 100644
--- a/content/test/web_contents_tester.cc
+++ b/content/test/web_contents_tester.cc
@@ -15,9 +15,8 @@ namespace {
class TestWebContentsCountFocus : public TestWebContents {
public:
- TestWebContentsCountFocus(content::BrowserContext* browser_context,
- content::SiteInstance* instance)
- : TestWebContents(browser_context, instance), focus_called_(0) {
+ explicit TestWebContentsCountFocus(content::BrowserContext* browser_context)
+ : TestWebContents(browser_context), focus_called_(0) {
}
virtual int GetNumberOfFocusCalls() OVERRIDE {
@@ -34,10 +33,9 @@ class TestWebContentsCountFocus : public TestWebContents {
class TestWebContentsCountSetFocusToLocationBar : public TestWebContents {
public:
- TestWebContentsCountSetFocusToLocationBar(
- content::BrowserContext* browser_context,
- SiteInstance* instance)
- : TestWebContents(browser_context, instance), focus_called_(0) {
+ explicit TestWebContentsCountSetFocusToLocationBar(
+ content::BrowserContext* browser_context)
+ : TestWebContents(browser_context), focus_called_(0) {
}
virtual void SetFocusToLocationBar(bool select_all) { ++focus_called_; }
@@ -60,22 +58,27 @@ WebContentsTester* WebContentsTester::For(WebContents* contents) {
WebContents* WebContentsTester::CreateTestWebContents(
BrowserContext* browser_context,
SiteInstance* instance) {
- return new TestWebContents(browser_context, instance);
+ return TestWebContents::Create(browser_context, instance);
}
// static
WebContents* WebContentsTester::CreateTestWebContentsCountSetFocusToLocationBar(
BrowserContext* browser_context,
SiteInstance* instance) {
- return new TestWebContentsCountSetFocusToLocationBar(
- browser_context, instance);
+ TestWebContentsCountSetFocusToLocationBar* web_contents =
+ new TestWebContentsCountSetFocusToLocationBar(browser_context);
+ web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
+ return web_contents;
}
// static
WebContents* WebContentsTester::CreateTestWebContentsCountFocus(
BrowserContext* browser_context,
SiteInstance* instance) {
- return new TestWebContentsCountFocus(browser_context, instance);
+ TestWebContentsCountFocus* web_contents =
+ new TestWebContentsCountFocus(browser_context);
+ web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
+ return web_contents;
}
} // namespace content
« no previous file with comments | « content/test/test_renderer_host.cc ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698