Index: base/android/javatests/src/org/chromium/base/test/UrlUtils.java |
diff --git a/base/android/javatests/src/org/chromium/base/test/UrlUtils.java b/base/android/javatests/src/org/chromium/base/test/UrlUtils.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be48b2cc0a815ca908fccf957e8f96473c726732 |
--- /dev/null |
+++ b/base/android/javatests/src/org/chromium/base/test/UrlUtils.java |
@@ -0,0 +1,32 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.base.test; |
+ |
+/** |
+ * Collection of URL utilities. |
+ */ |
+public class UrlUtils { |
+ private final static String DATA_DIR = "file:///data/local/tmp/chrome/test/data/"; |
+ |
+ /** |
+ * Construct a suitable URL for loading a test data file. |
+ * |
+ * @param path Pathname relative to <chrome_src>/chrome/test/data/android/device_files/ |
joth
2012/09/05 20:13:06
See https://chromiumcodereview.appspot.com/1091109
|
+ */ |
+ public static String getTestFileUrl(String path) { |
+ return DATA_DIR + path; |
+ } |
+ |
+ /** |
+ * Construct a suitable URL for loading a test data file from the hosts's |
joth
2012/09/05 20:13:06
nit: remove one s, and make less ambiguous: the lo
|
+ * http server. |
+ * |
+ * @param path Pathname relative to the document root. |
+ * @return an http url. |
+ */ |
+ public static String getTestHttpUrl(String path) { |
+ return TestHttpServerClient.getUrl(path); |
+ } |
+} |