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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.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/CustomTabsConnectionTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
index 7655cb024ef6d4fe2e8d8aafed3aab89a0dde9ff..b7c9ae1f056bb1a855a8755664b6b1876b0a0b98 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
@@ -19,6 +19,7 @@ import android.support.customtabs.ICustomTabsCallback;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
@@ -34,6 +35,7 @@ public class CustomTabsConnectionTest extends InstrumentationTestCase {
private static final String URL = "http://www.google.com";
private static final String URL2 = "https://www.android.com";
private static final String INVALID_SCHEME_URL = "intent://www.google.com";
+ private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chrome";
private Context mContext;
@@ -41,6 +43,8 @@ public class CustomTabsConnectionTest extends InstrumentationTestCase {
protected void setUp() throws Exception {
super.setUp();
mContext = getInstrumentation().getTargetContext().getApplicationContext();
+ PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX,
+ mContext);
LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)
.ensureInitialized(mContext);
mCustomTabsConnection = CustomTabsTestUtils.setUpConnection((Application) mContext);

Powered by Google App Engine
This is Rietveld 408576698