diff options
author | tkent@google.com <tkent@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-13 05:10:24 +0000 |
---|---|---|
committer | tkent@google.com <tkent@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-13 05:10:24 +0000 |
commit | 3f4bcb8fea284b0b59472b21e697254a4a2320e6 (patch) | |
tree | 82b6424ea2f6eb9377b0329b79d312451d7ac85f | |
parent | f9b1b9aa6717657be56a9f7e72c3cd164a68dfe7 (diff) | |
download | chromium_src-3f4bcb8fea284b0b59472b21e697254a4a2320e6.zip chromium_src-3f4bcb8fea284b0b59472b21e697254a4a2320e6.tar.gz chromium_src-3f4bcb8fea284b0b59472b21e697254a4a2320e6.tar.bz2 |
Initialize the singleton CommandLine instance with fixed values.
This fixes a DCHECK failure in webkit/glue/webmediaplayer_impl.cc.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2038013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47120 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/support/webkit_support.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 2f3d4bf5..7ab2e0b 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -5,6 +5,7 @@ #include "webkit/support/webkit_support.h" #include "base/at_exit.h" +#include "base/command_line.h" #include "base/debug_util.h" #include "base/file_path.h" #include "base/file_util.h" @@ -80,6 +81,18 @@ static TestEnvironment* test_environment; void SetUpTestEnvironment() { base::EnableTerminationOnHeapCorruption(); + + // Initialize the singleton CommandLine with fixed values. Some code refer to + // CommandLine::ForCurrentProcess(). We don't use the actual command-line + // arguments of DRT to avoid unexpected behavior change. + // + // webkit/glue/webmediaplayer_impl.cc checks --enable-openmax. + // webkit/glue/plugin/plugin_list_posix.cc checks --debug-plugin-loading. + // webkit/glue/plugin/plugin_list_win.cc checks --old-wmp. + // If DRT needs these flags, specify them in the following kFixedArguments. + const char* kFixedArguments[] = {"DumpRenderTree"}; + CommandLine::Init(arraysize(kFixedArguments), kFixedArguments); + BeforeInitialize(); test_environment = new TestEnvironment; AfterIniitalize(); |