Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.testing.local; | |
| 6 | |
| 7 import java.io.File; | |
| 8 | |
| 9 /** | |
| 10 * Tools to get the junit test path. | |
| 11 */ | |
| 12 public class TestDir { | |
|
pkotwicz
2017/03/26 01:37:05
This change should be in a separate CL
| |
| 13 private static final String TEST_FOLDER = "/chrome/test/data/"; | |
| 14 | |
| 15 /** | |
| 16 * Construct the full path of a test data file. | |
| 17 * @param path Pathname relative to chrome/test/data. | |
| 18 */ | |
| 19 public static String getTestFilePath(String path) { | |
| 20 String junitRoot = System.getProperty("dir.source.root"); | |
| 21 if (junitRoot == null) { | |
| 22 junitRoot = ""; | |
| 23 } | |
| 24 return new File(junitRoot + TEST_FOLDER + path).getPath(); | |
| 25 } | |
| 26 } | |
| OLD | NEW |