Fix crash when querying a runtime config that is defined in environment

Fix crash when querying a runtime config in case when there's no
skia.conf file and the config variable is still defined in the
environment.

Runs the added SkRTConf::UnitTest test as part of new "UnitTest" test.

Previous version of the patch failed Windows build due to setenv usage.
On Windows, use _putenv_s instead.

BUG=skia:1494
R=bsalomon@google.com, humper@google.com

Author: kkinnunen@nvidia.com

Review URL: https://chromiumcodereview.appspot.com/23174002

git-svn-id: http://skia.googlecode.com/svn/trunk@10715 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/UnitTestTest.cpp b/tests/UnitTestTest.cpp
new file mode 100644
index 0000000..e3e1b97
--- /dev/null
+++ b/tests/UnitTestTest.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkRTConf.h"
+#include "Test.h"
+
+static void test_runUnitTests(skiatest::Reporter* reporter) {
+#ifdef SK_SUPPORT_UNITTEST
+    SkRTConfRegistry::UnitTest();
+#endif
+}
+
+#include "TestClassDef.h"
+DEFINE_TESTCLASS("UnitTest", UnitTestTestClass, test_runUnitTests)