Reland "Clean up Test's resourcePath code."

This relands commit 91359bed48bc006a4319da86eb26db3b2e6d4afb (Clean up
Test's resourcePath code."

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/321723002
diff --git a/tests/Test.cpp b/tests/Test.cpp
index e57427a..b904d5a 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -1,10 +1,10 @@
-
 /*
  * Copyright 2011 Google Inc.
  *
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+
 #include "Test.h"
 
 #include "SkCommandLineFlags.h"
@@ -41,6 +41,8 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
+const char* Test::gResourcePath;
+
 Test::Test() : fReporter(NULL), fPassed(true) {}
 
 Test::~Test() {
@@ -121,8 +123,9 @@
     return SkString(tmpDir);
 }
 
-static const char* gResourcePath = NULL;
-void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourcePath; }
+void Test::SetResourcePath(const char* resourcePath) {
+    gResourcePath = resourcePath;
+}
 
 SkString Test::GetResourcePath() {
     return SkString(gResourcePath);