Index: dm/DMWriteTask.h |
diff --git a/dm/DMWriteTask.h b/dm/DMWriteTask.h |
index 82a26bc928bb7215c7ba1f03478c4b6c2f4a00ff..49a5c746a64fbed20a2ec6bb26860d349af58130 100644 |
--- a/dm/DMWriteTask.h |
+++ b/dm/DMWriteTask.h |
@@ -1,11 +1,13 @@ |
#ifndef DMWriteTask_DEFINED |
#define DMWriteTask_DEFINED |
+#include "DMExpectations.h" |
#include "DMTask.h" |
#include "SkBitmap.h" |
#include "SkString.h" |
#include "SkTArray.h" |
+ |
// Writes a bitmap to a file. |
namespace DM { |
@@ -21,6 +23,16 @@ public: |
virtual bool shouldSkip() const SK_OVERRIDE; |
virtual SkString name() const SK_OVERRIDE; |
+ // Reads image files WriteTask wrote under root and compares them with bitmap. |
+ class Expectations : public DM::Expectations { |
+ public: |
+ explicit Expectations(const char* root) : fRoot(root) {} |
+ |
+ bool check(const Task& task, SkBitmap bitmap) const SK_OVERRIDE; |
+ private: |
+ const char* fRoot; |
+ }; |
+ |
private: |
SkTArray<SkString> fSuffixes; |
SkString fGmName; |