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

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

Issue 10913074: Add WebView implementation for CookieManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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/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..031a57b36e06daf1372562cc13e0001e62658c20
--- /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 external/chrome/testing/data
Yaron 2012/09/05 06:10:43 Path could be <chrome_src>/testing/data. Or actual
Ted C 2012/09/05 18:45:35 Done. I prefer the <chrome_src> as that is easier
Yaron 2012/09/05 18:55:07 Ok. I think the path should be <chrome_src>/test/d
+ */
+ public static String getTestFileUrl(String path) {
+ return DATA_DIR + path;
+ }
+
+ /**
+ * Construct a suitable URL for loading a test data file from the hosts's
+ * http server.
+ *
+ * @param path Pathname relative to the document root.
+ * @return an http url.
+ */
+ public static String getTestHttpUrl(String path) {
+ return TestHttpServerClient.getUrl(path);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698