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

Side by Side Diff: tests/Test.h

Issue 320733002: Revert of Clean up Test's resourcePath code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « gm/gm.cpp ('k') | tests/Test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef skiatest_Test_DEFINED 8 #ifndef skiatest_Test_DEFINED
9 #define skiatest_Test_DEFINED 9 #define skiatest_Test_DEFINED
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 static SkString GetResourcePath(); 66 static SkString GetResourcePath();
67 67
68 virtual bool isGPUTest() const { return false; } 68 virtual bool isGPUTest() const { return false; }
69 virtual void setGrContextFactory(GrContextFactory* factory) {} 69 virtual void setGrContextFactory(GrContextFactory* factory) {}
70 70
71 protected: 71 protected:
72 virtual void onGetName(SkString*) = 0; 72 virtual void onGetName(SkString*) = 0;
73 virtual void onRun(Reporter*) = 0; 73 virtual void onRun(Reporter*) = 0;
74 74
75 private: 75 private:
76 static const char* gResourcePath;
77
78 Reporter* fReporter; 76 Reporter* fReporter;
79 SkString fName; 77 SkString fName;
80 bool fPassed; 78 bool fPassed;
81 SkMSec fElapsed; 79 SkMSec fElapsed;
82 }; 80 };
83 81
84 class GpuTest : public Test{ 82 class GpuTest : public Test{
85 public: 83 public:
86 GpuTest() : Test(), fGrContextFactory(NULL) {} 84 GpuTest() : Test(), fGrContextFactory(NULL) {}
87 85
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } \ 169 } \
172 virtual void onRun(Reporter* r) SK_OVERRIDE { \ 170 virtual void onRun(Reporter* r) SK_OVERRIDE { \
173 name(r, fGrContextFactory); \ 171 name(r, fGrContextFactory); \
174 } \ 172 } \
175 }; \ 173 }; \
176 static TestRegistry gReg_##name##Class(name##Class::Factory); \ 174 static TestRegistry gReg_##name##Class(name##Class::Factory); \
177 } \ 175 } \
178 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) 176 static void name(skiatest::Reporter* reporter, GrContextFactory* factory)
179 177
180 #endif 178 #endif
OLDNEW
« no previous file with comments | « gm/gm.cpp ('k') | tests/Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698