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

Unified Diff: testing/android/junit/java/src/org/chromium/testing/local/TestDir.java

Issue 2772483002: Commment signed webapks working and verified. (Closed)
Patch Set: Wrong package order. 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: testing/android/junit/java/src/org/chromium/testing/local/TestDir.java
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/TestDir.java b/testing/android/junit/java/src/org/chromium/testing/local/TestDir.java
new file mode 100644
index 0000000000000000000000000000000000000000..04ae55537f30c665a441e323d4009d53daab6433
--- /dev/null
+++ b/testing/android/junit/java/src/org/chromium/testing/local/TestDir.java
@@ -0,0 +1,26 @@
+// Copyright 2017 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.testing.local;
+
+import java.io.File;
+
+/**
+ * Tools to get the junit test path.
+ */
+public class TestDir {
pkotwicz 2017/03/26 01:37:05 This change should be in a separate CL
+ private static final String TEST_FOLDER = "/chrome/test/data/";
+
+ /**
+ * Construct the full path of a test data file.
+ * @param path Pathname relative to chrome/test/data.
+ */
+ public static String getTestFilePath(String path) {
+ String junitRoot = System.getProperty("dir.source.root");
+ if (junitRoot == null) {
+ junitRoot = "";
+ }
+ return new File(junitRoot + TEST_FOLDER + path).getPath();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698