Refactor how we handle resources path in Tests.

This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c8f7fc2e9c57134134c883baf66e538).

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/346453002
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index f70a7fa..f4b67c9 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -7,6 +7,7 @@
 
 #include "CrashHandler.h"
 #include "OverwriteLine.h"
+#include "Resources.h"
 #include "SkCommandLineFlags.h"
 #include "SkGraphics.h"
 #include "SkOSFile.h"
@@ -40,7 +41,6 @@
 DEFINE_bool(gpu, true, "whether or not to run GPU tests.");
 DEFINE_int32(threads, SkThreadPool::kThreadPerCore,
              "Run threadsafe tests on a threadpool with this many threads.");
-DEFINE_string2(resourcePath, i, "resources", "directory for test resources.");
 
 // need to explicitly declare this, or we get some weird infinite loop llist
 template TestRegistry* TestRegistry::gHead;
@@ -136,7 +136,6 @@
     SetupCrashHandler();
     SkCommandLineFlags::SetUsage("");
     SkCommandLineFlags::Parse(argc, argv);
-    Test::SetResourcePath(FLAGS_resourcePath[0]);
 
 #if SK_ENABLE_INST_COUNT
     if (FLAGS_leaks) {
@@ -158,7 +157,7 @@
         if (!tmpDir.isEmpty()) {
             header.appendf(" --tmpDir %s", tmpDir.c_str());
         }
-        SkString resourcePath = Test::GetResourcePath();
+        SkString resourcePath = GetResourcePath();
         if (!resourcePath.isEmpty()) {
             header.appendf(" --resourcePath %s", resourcePath.c_str());
         }