OLD | NEW |
1 #include "DMExpectationsTask.h" | 1 #include "DMExpectationsTask.h" |
2 #include "DMUtil.h" | 2 #include "DMUtil.h" |
3 | 3 |
4 namespace DM { | 4 namespace DM { |
5 | 5 |
6 ExpectationsTask::ExpectationsTask(const Task& parent, | 6 ExpectationsTask::ExpectationsTask(const Task& parent, |
7 const Expectations& expectations, | 7 const Expectations& expectations, |
8 SkBitmap bitmap) | 8 SkBitmap bitmap) |
9 : Task(parent) | 9 : CpuTask(parent) |
10 , fName(parent.name()) // Masquerade as parent so failures are attributed t
o it. | 10 , fName(parent.name()) // Masquerade as parent so failures are attributed t
o it. |
11 , fExpectations(expectations) | 11 , fExpectations(expectations) |
12 , fBitmap(bitmap) | 12 , fBitmap(bitmap) |
13 {} | 13 {} |
14 | 14 |
15 void ExpectationsTask::draw() { | 15 void ExpectationsTask::draw() { |
16 if (!fExpectations.check(*this, fBitmap)) { | 16 if (!fExpectations.check(*this, fBitmap)) { |
17 this->fail(); | 17 this->fail(); |
18 } | 18 } |
19 } | 19 } |
20 | 20 |
21 } // namespace DM | 21 } // namespace DM |
OLD | NEW |