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

Side by Side Diff: tests/CanvasTest.cpp

Issue 2354403002: document.close from bool to void (Closed)
Patch Set: keep endPortfolio returning a bool Created 4 years, 3 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 | « tests/AnnotationTest.cpp ('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 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 /* Description: 8 /* Description:
9 * This test defines a series of elementatry test steps that perform 9 * This test defines a series of elementatry test steps that perform
10 * a single or a small group of canvas API calls. Each test step is 10 * a single or a small group of canvas API calls. Each test step is
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 sk_sp<SkDocument> doc(SkDocument::MakePDF(&outStream)); 508 sk_sp<SkDocument> doc(SkDocument::MakePDF(&outStream));
509 REPORTER_ASSERT(reporter, doc); 509 REPORTER_ASSERT(reporter, doc);
510 if (!doc) { 510 if (!doc) {
511 return; 511 return;
512 } 512 }
513 SkCanvas* canvas = doc->beginPage(SkIntToScalar(d.fWidth), 513 SkCanvas* canvas = doc->beginPage(SkIntToScalar(d.fWidth),
514 SkIntToScalar(d.fHeight)); 514 SkIntToScalar(d.fHeight));
515 REPORTER_ASSERT(reporter, canvas); 515 REPORTER_ASSERT(reporter, canvas);
516 step->setAssertMessageFormat(kPdfAssertMessageFormat); 516 step->setAssertMessageFormat(kPdfAssertMessageFormat);
517 step->draw(canvas, d, reporter); 517 step->draw(canvas, d, reporter);
518
519 REPORTER_ASSERT(reporter, doc->close());
520 } 518 }
521 519
522 /* 520 /*
523 * This sub-test verifies that the test step passes when executed 521 * This sub-test verifies that the test step passes when executed
524 * with SkCanvas and with classes derrived from SkCanvas. It also verifies 522 * with SkCanvas and with classes derrived from SkCanvas. It also verifies
525 * that the all canvas derivatives report the same state as an SkCanvas 523 * that the all canvas derivatives report the same state as an SkCanvas
526 * after having executed the test step. 524 * after having executed the test step.
527 */ 525 */
528 static void TestOverrideStateConsistency(skiatest::Reporter* reporter, const Tes tData& d, 526 static void TestOverrideStateConsistency(skiatest::Reporter* reporter, const Tes tData& d,
529 CanvasTestStep* testStep) { 527 CanvasTestStep* testStep) {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 SkPaint paint; 729 SkPaint paint;
732 // paint.setShader(SkShader::MakeColorShader(SK_ColorRED)); 730 // paint.setShader(SkShader::MakeColorShader(SK_ColorRED));
733 731
734 canvas.save(); 732 canvas.save();
735 canvas.clipRect(SkRect::MakeWH(55, 55)); 733 canvas.clipRect(SkRect::MakeWH(55, 55));
736 canvas.translate(10, 20); 734 canvas.translate(10, 20);
737 canvas.drawRect(SkRect::MakeWH(50, 50), paint); 735 canvas.drawRect(SkRect::MakeWH(50, 50), paint);
738 canvas.restore(); 736 canvas.restore();
739 } 737 }
740 738
OLDNEW
« no previous file with comments | « tests/AnnotationTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698