blob: cb92486269890d8c2567ac4a660b8deb59468605 [file] [log] [blame]
commit-bot@chromium.org99589af2013-12-10 14:53:16 +00001#include "DMExpectationsTask.h"
2#include "DMUtil.h"
3
4namespace DM {
5
6ExpectationsTask::ExpectationsTask(const Task& parent,
7 const Expectations& expectations,
8 SkBitmap bitmap)
9 : Task(parent)
10 , fName(parent.name()) // Masquerade as parent so failures are attributed to it.
11 , fExpectations(expectations)
12 , fBitmap(bitmap)
13 {}
14
15void ExpectationsTask::draw() {
16 if (!fExpectations.check(*this, fBitmap)) {
17 this->fail();
18 }
19}
20
21} // namespace DM