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

Side by Side Diff: tests/RecordPatternTest.cpp

Issue 269543023: SaveLayer is not a draw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « src/record/SkRecordPattern.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "Test.h" 1 #include "Test.h"
2 2
3 #include "SkRecord.h" 3 #include "SkRecord.h"
4 #include "SkRecordPattern.h" 4 #include "SkRecordPattern.h"
5 #include "SkRecorder.h" 5 #include "SkRecorder.h"
6 #include "SkRecords.h" 6 #include "SkRecords.h"
7 7
8 using namespace SkRecords; 8 using namespace SkRecords;
9 typedef Pattern3<Is<Save>, 9 typedef Pattern3<Is<Save>,
10 Is<ClipRect>, 10 Is<ClipRect>,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); 183 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end));
184 REPORTER_ASSERT(r, begin == 6); 184 REPORTER_ASSERT(r, begin == 6);
185 REPORTER_ASSERT(r, end == 9); 185 REPORTER_ASSERT(r, end == 9);
186 186
187 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); 187 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end));
188 REPORTER_ASSERT(r, begin == 13); 188 REPORTER_ASSERT(r, begin == 13);
189 REPORTER_ASSERT(r, end == 19); 189 REPORTER_ASSERT(r, end == 19);
190 190
191 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end)); 191 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end));
192 } 192 }
193
194 DEF_TEST(RecordPattern_SaveLayerIsNotADraw, r) {
195 Pattern1<IsDraw> pattern;
196
197 SkRecord record;
198 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, 1920, 1200);
199 recorder.saveLayer(NULL, NULL);
200
201 REPORTER_ASSERT(r, !pattern.match(&record, 0));
202 }
OLDNEW
« no previous file with comments | « src/record/SkRecordPattern.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698