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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java

Issue 1745623002: Fix SELinux violation when opening Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movetestonlytofixture
Patch Set: nyquist comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
index f5d133dd346aa85d5713d2a7a856cea133385fc8..65eb683667b2b570e6ec1247cda1f3cfce47890d 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
@@ -36,6 +36,7 @@ import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageButton;
+import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
@@ -101,6 +102,7 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
private static final String TEST_PAGE = "/chrome/test/data/android/google.html";
private static final String TEST_PAGE_2 = "/chrome/test/data/android/test.html";
private static final String TEST_MENU_TITLE = "testMenuTitle";
+ private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chrome";
private static int sIdToIncrement = 1;
@@ -116,6 +118,8 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
getInstrumentation().getContext(), Environment.getExternalStorageDirectory());
mTestPage = mTestServer.getURL(TEST_PAGE);
mTestPage2 = mTestServer.getURL(TEST_PAGE_2);
+ PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX,
+ getInstrumentation().getTargetContext().getApplicationContext());
LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)
.ensureInitialized(getInstrumentation().getTargetContext().getApplicationContext());
}

Powered by Google App Engine
This is Rietveld 408576698