diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 16:25:13 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 16:25:13 +0000 |
commit | 88dfc7c0216e6fe91a46334645f05fc81d06369f (patch) | |
tree | 9a6488e99fc791200ed805de924ec0946faf5b9e /android_webview | |
parent | c97496b98c8493f96867b5281ca9a468c2896c13 (diff) | |
download | chromium_src-88dfc7c0216e6fe91a46334645f05fc81d06369f.zip chromium_src-88dfc7c0216e6fe91a46334645f05fc81d06369f.tar.gz chromium_src-88dfc7c0216e6fe91a46334645f05fc81d06369f.tar.bz2 |
[Android] Fix the final crash in the android_webview test runner.
android_webview will require a specific rendering architecture that
hasn't landed yet. This change lets us run our tests (even though
we're not showing anything on screen).
BUG=152904
TEST=run_instrumentation_tests.py --test-apk AndroidWebViewTest
Review URL: https://codereview.chromium.org/10979075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r-- | android_webview/lib/main/webview_entry_point.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc index 8a4996f..506334c 100644 --- a/android_webview/lib/main/webview_entry_point.cc +++ b/android_webview/lib/main/webview_entry_point.cc @@ -8,6 +8,7 @@ #include "base/command_line.h" #include "content/public/app/android_library_loader_hooks.h" #include "content/public/app/content_main.h" +#include "content/public/browser/android/compositor.h" #include "content/public/common/content_switches.h" // This is called by the VM when the shared library is first loaded. @@ -26,6 +27,13 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { CommandLine::ForCurrentProcess()->AppendSwitch( switches::kEnableWebViewSynchronousAPIs); + // TODO: The next two lines are temporarily required for the renderer + // initialization to not crash. + // See BUG 152904. + CommandLine::ForCurrentProcess()->AppendSwitch( + switches::kSingleProcess); + content::Compositor::Initialize(); + content::SetContentMainDelegate(new android_webview::AwMainDelegate()); return JNI_VERSION_1_4; |