commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 1 | #include "DMExpectationsTask.h" |
| 2 | #include "DMUtil.h" |
| 3 | |
| 4 | namespace DM { |
| 5 | |
| 6 | ExpectationsTask::ExpectationsTask(const Task& parent, |
| 7 | const Expectations& expectations, |
| 8 | SkBitmap bitmap) |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 9 | : CpuTask(parent) |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 10 | , fName(parent.name()) // Masquerade as parent so failures are attributed to it. |
| 11 | , fExpectations(expectations) |
| 12 | , fBitmap(bitmap) |
| 13 | {} |
| 14 | |
| 15 | void ExpectationsTask::draw() { |
| 16 | if (!fExpectations.check(*this, fBitmap)) { |
| 17 | this->fail(); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | } // namespace DM |