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

Unified Diff: tests/Test.cpp

Issue 179403010: Revert of Let DM run unit tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « tests/Test.h ('k') | tests/skia_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.cpp
diff --git a/tests/Test.cpp b/tests/Test.cpp
index 95b2f91c0cef974a23617c44fb64e46cee611dc2..daa23b132cccbebd67e4ab1a7cde4983669a49d6 100644
--- a/tests/Test.cpp
+++ b/tests/Test.cpp
@@ -7,7 +7,6 @@
*/
#include "Test.h"
-#include "SkCommandLineFlags.h"
#include "SkError.h"
#include "SkString.h"
#include "SkTArray.h"
@@ -19,8 +18,6 @@
#else
class GrContext;
#endif
-
-DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use.");
using namespace skiatest;
@@ -117,15 +114,23 @@
}
-SkString Test::GetTmpDir() {
- const char* tmpDir = FLAGS_tmpDir.isEmpty() ? NULL : FLAGS_tmpDir[0];
- return SkString(tmpDir);
+///////////////////////////////////////////////////////////////////////////////
+
+#if SK_SUPPORT_GPU
+#include "GrContextFactory.h"
+GrContextFactory gGrContextFactory;
+#endif
+
+GrContextFactory* GpuTest::GetGrContextFactory() {
+#if SK_SUPPORT_GPU
+ return &gGrContextFactory;
+#else
+ return NULL;
+#endif
}
-static const char* gResourcePath = NULL;
-void Test::SetResourcePath(const char* resourcePath) { gResourcePath = resourcePath; }
-
-SkString Test::GetResourcePath() {
- return SkString(gResourcePath);
+void GpuTest::DestroyContexts() {
+#if SK_SUPPORT_GPU
+ gGrContextFactory.destroyContexts();
+#endif
}
-
« no previous file with comments | « tests/Test.h ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698