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

Side by Side Diff: content/test/content_browser_test.h

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_H_ 5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_H_
6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_H_ 6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/test/browser_test.h" 9 #include "content/public/test/browser_test.h"
10 #include "content/public/test/browser_test_base.h" 10 #include "content/public/test/browser_test_base.h"
(...skipping 10 matching lines...) Expand all
21 ContentBrowserTest(); 21 ContentBrowserTest();
22 virtual ~ContentBrowserTest(); 22 virtual ~ContentBrowserTest();
23 23
24 // testing::Test: 24 // testing::Test:
25 virtual void SetUp() OVERRIDE; 25 virtual void SetUp() OVERRIDE;
26 virtual void TearDown() OVERRIDE; 26 virtual void TearDown() OVERRIDE;
27 27
28 // BrowserTestBase: 28 // BrowserTestBase:
29 virtual void RunTestOnMainThreadLoop() OVERRIDE; 29 virtual void RunTestOnMainThreadLoop() OVERRIDE;
30 30
31 // Must be called before or during setup.
32 void SetContentRendererClient(
33 scoped_ptr<ContentRendererClient> renderer_client);
34
35 protected: 31 protected:
36 // Creates a new window and loads about:blank. 32 // Creates a new window and loads about:blank.
37 Shell* CreateBrowser(); 33 Shell* CreateBrowser();
38 34
39 // Creates an off-the-record window and loads about:blank. 35 // Creates an off-the-record window and loads about:blank.
40 Shell* CreateOffTheRecordBrowser(); 36 Shell* CreateOffTheRecordBrowser();
41 37
42 // Returns the window for the test. 38 // Returns the window for the test.
43 Shell* shell() const { return shell_; } 39 Shell* shell() const { return shell_; }
44 40
45 private: 41 private:
46 scoped_ptr<ShellMainDelegate> shell_main_delegate_;
47
48 Shell* shell_; 42 Shell* shell_;
49 43
50 bool setup_called_; 44 bool setup_called_;
51 45
46 #if defined(OS_ANDROID)
47 // For all other platforms, this is done automatically when calling into
48 // ContentMain. For Android we set things up manually.
49 scoped_ptr<ShellMainDelegate> shell_main_delegate_;
50
52 // ContentRendererClient when running in single-process mode. 51 // ContentRendererClient when running in single-process mode.
53 scoped_ptr<ContentRendererClient> single_process_renderer_client_; 52 scoped_ptr<ContentRendererClient> single_process_renderer_client_;
53 #endif
54 }; 54 };
55 55
56 } // namespace content 56 } // namespace content
57 57
58 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_ 58 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.cc ('k') | content/test/content_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698