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

Side by Side Diff: dm/DMTestTask.h

Issue 179403010: Revert of Let DM run unit tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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 | « dm/DMTaskRunner.cpp ('k') | dm/DMTestTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef DMTestTask_DEFINED
2 #define DMTestTask_DEFINED
3
4 #include "DMReporter.h"
5 #include "DMTask.h"
6 #include "DMTaskRunner.h"
7 #include "SkString.h"
8 #include "SkTemplates.h"
9 #include "Test.h"
10
11 // Runs a unit test.
12 namespace DM {
13
14 class TestTask : public Task {
15 public:
16 TestTask(Reporter*, TaskRunner*, skiatest::TestRegistry::Factory);
17
18 virtual void draw() SK_OVERRIDE;
19 virtual bool usesGpu() const SK_OVERRIDE { return fTest->isGPUTest(); }
20 virtual bool shouldSkip() const SK_OVERRIDE { return false; }
21 virtual SkString name() const SK_OVERRIDE { return fName; }
22
23 private:
24 class TestReporter : public skiatest::Reporter {
25 public:
26 TestReporter() {}
27
28 const char* failure() const { return fFailure.c_str(); }
29
30 private:
31 virtual bool allowExtendedTest() const SK_OVERRIDE;
32 virtual bool allowThreaded() const SK_OVERRIDE;
33 virtual bool verbose() const SK_OVERRIDE;
34
35 virtual void onReportFailed(const SkString& desc) SK_OVERRIDE {
36 fFailure = desc;
37 }
38
39 SkString fFailure;
40 };
41
42 TaskRunner* fTaskRunner;
43 TestReporter fTestReporter;
44 SkAutoTDelete<skiatest::Test> fTest;
45 const SkString fName;
46 };
47
48 } // namespace DM
49
50 #endif // DMTestTask_DEFINED
OLDNEW
« no previous file with comments | « dm/DMTaskRunner.cpp ('k') | dm/DMTestTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698