New issue
Advanced search Search tips

Issue 609855 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

chrome_app_unittests should be compiled and run on the bots on Android

Project Member Reported by brettw@chromium.org, May 6 2016

Issue description

//chrome/test:chrome_app_unittests does not compile on Android. Most of the test files are Windows-specific, but it looks like app/resources/resources_unittest.cc might apply to Android.

Currently, this target doesn't build on Android. I did not investigate why. It should also be run on the bots for consistency.
 
Components: Build
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e34d9d20536109581eabd0fe61f8b92ac51497a

commit 5e34d9d20536109581eabd0fe61f8b92ac51497a
Author: Paul Miller <paulmiller@google.com>
Date: Wed Apr 18 20:06:36 2018

Android: Restrict data directory for both Chrome and WebView

Context.getDir() creates Chrome's data directory, app_chrome/, with
rwxrwx--x. ChromeMainDelegateAndroid::RunProcess() then limits this to
rwx------. RunProcess() goes out of its way to avoid granting any user
permissions that weren't already present, but this seems like a mistake;
it shouldn't be possible for app_chrome/ to have fewer permissions than
rwx------. So RunProcess is simplified to set the permissions to exactly
rwx------. Also don't print data_path in the error message because if
PathService::Get() failed, data_path is empty.

Also restrict WebView's directory, app_webview/, using Os.chown(). Doing
this in PathUtils covers both Chrome and WebView. However, Os.chown()
requires API >= 21, which is the case for WebView but not Chrome, so
Chrome's RunProcess() code must stay for now.

Rehabilitate //chrome/test:chrome_app_unittests to run on Android (crbug
609855 says it was broken but it seems to work now) and add a unit test
for the simplified native code.

BUG=832388, 609855 
internal bug b/19993402

Change-Id: I1bcfe72940ddc1fb23f2b0bef50775853843ea76
Reviewed-on: https://chromium-review.googlesource.com/984773
Commit-Queue: Paul Miller <paulmiller@chromium.org>
Reviewed-by: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551795}
[modify] https://crrev.com/5e34d9d20536109581eabd0fe61f8b92ac51497a/base/android/java/src/org/chromium/base/PathUtils.java
[modify] https://crrev.com/5e34d9d20536109581eabd0fe61f8b92ac51497a/chrome/app/android/chrome_main_delegate_android.cc
[modify] https://crrev.com/5e34d9d20536109581eabd0fe61f8b92ac51497a/chrome/app/android/chrome_main_delegate_android.h
[add] https://crrev.com/5e34d9d20536109581eabd0fe61f8b92ac51497a/chrome/app/android/chrome_main_delegate_android_unittest.cc
[modify] https://crrev.com/5e34d9d20536109581eabd0fe61f8b92ac51497a/chrome/test/BUILD.gn

Owner: paulmiller@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment