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

Unified Diff: base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java

Issue 2772483002: Commment signed webapks working and verified. (Closed)
Patch Set: Remove unused import. Created 3 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: base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java
diff --git a/base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java b/base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java
index 7433d8e0481076edab908f2e3ed3af4f9f3d9508..4536f50f27a7b5c2b9ebfbf936b52ab23fb30ab1 100644
--- a/base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java
+++ b/base/test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java
@@ -37,6 +37,10 @@ public class UrlUtils {
* Returns the root of the test data directory.
*/
public static String getIsolatedTestRoot() {
+ String junitRoot = System.getProperty("dir.source.root");
+ if (junitRoot != null) {
+ return junitRoot;
+ }
return PathUtils.getExternalStorageDirectory() + "/chromium_tests_root";
}
@@ -68,8 +72,7 @@ public class UrlUtils {
// URLEncoder encodes into application/x-www-form-encoded, so
// ' '->'+' needs to be undone and replaced with ' '->'%20'
// to match the Data URI requirements.
- String encoded =
- "data:text/html;utf-8," + java.net.URLEncoder.encode(html, "UTF-8");
+ String encoded = "data:text/html;utf-8," + java.net.URLEncoder.encode(html, "UTF-8");
encoded = encoded.replace("+", "%20");
return encoded;
} catch (java.io.UnsupportedEncodingException e) {

Powered by Google App Engine
This is Rietveld 408576698