diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 00:40:43 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 00:40:43 +0000 |
commit | d4515eb94ad33ac2ab9bfd1094c8e1edd1eefa1b (patch) | |
tree | add4a98df5bcdbb3ca0e1f4471c77f453d52a1f4 /base | |
parent | 0815731ac884b41853725e51e26b0697449747b4 (diff) | |
download | chromium_src-d4515eb94ad33ac2ab9bfd1094c8e1edd1eefa1b.zip chromium_src-d4515eb94ad33ac2ab9bfd1094c8e1edd1eefa1b.tar.gz chromium_src-d4515eb94ad33ac2ab9bfd1094c8e1edd1eefa1b.tar.bz2 |
Provides the ability to write a unit test that brings up a browser. As
a proof of concept I converted
FindInPageControllerTest.FindInPageFrames over to this.
See the description in InProcessBrowserTest for how it all works.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/19644
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/command_line.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/command_line.h b/base/command_line.h index f1a2005..9a02546 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -27,6 +27,8 @@ #include "base/logging.h" #include "base/scoped_ptr.h" +class InProcessBrowserTest; + class CommandLine { public: #if defined(OS_WIN) @@ -113,8 +115,16 @@ class CommandLine { bool include_program); private: + friend class InProcessBrowserTest; + CommandLine() {} + // Used by InProcessBrowserTest. + static CommandLine* ForCurrentProcessMutable() { + DCHECK(current_process_commandline_); + return current_process_commandline_; + } + // The singleton CommandLine instance representing the current process's // command line. static CommandLine* current_process_commandline_; |