OLD | NEW |
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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 testRecord->fBitmapHeap->count(), testStep->assertMessage()); | 688 testRecord->fBitmapHeap->count(), testStep->assertMessage()); |
689 REPORTER_ASSERT_MESSAGE(reporter, | 689 REPORTER_ASSERT_MESSAGE(reporter, |
690 referenceRecord->fPaints.count() == | 690 referenceRecord->fPaints.count() == |
691 testRecord->fPaints.count(), testStep->assertMessage()); | 691 testRecord->fPaints.count(), testStep->assertMessage()); |
692 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) { | 692 for (int i = 0; i < referenceRecord->fPaints.count(); ++i) { |
693 REPORTER_ASSERT_MESSAGE(reporter, | 693 REPORTER_ASSERT_MESSAGE(reporter, |
694 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]), | 694 EQ(referenceRecord->fPaints[i], testRecord->fPaints[i]), |
695 testStep->assertMessage()); | 695 testStep->assertMessage()); |
696 } | 696 } |
697 REPORTER_ASSERT_MESSAGE(reporter, | 697 REPORTER_ASSERT_MESSAGE(reporter, |
698 !referenceRecord->fPathHeap == | 698 !referenceRecord->fPicture->fPathHeap == |
699 !testRecord->fPathHeap, | 699 !testRecord->fPicture->fPathHeap, |
700 testStep->assertMessage()); | 700 testStep->assertMessage()); |
701 // The following tests are commented out because they currently | 701 // The following tests are commented out because they currently |
702 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507 | 702 // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507 |
703 /* | 703 /* |
704 if (referenceRecord->fPathHeap) { | 704 if (referenceRecord->fPathHeap) { |
705 REPORTER_ASSERT_MESSAGE(reporter, | 705 REPORTER_ASSERT_MESSAGE(reporter, |
706 referenceRecord->fPathHeap->count() == | 706 referenceRecord->fPathHeap->count() == |
707 testRecord->fPathHeap->count(), | 707 testRecord->fPathHeap->count(), |
708 testStep->assertMessage()); | 708 testStep->assertMessage()); |
709 for (int i = 0; i < referenceRecord->fPathHeap->count(); ++i) { | 709 for (int i = 0; i < referenceRecord->fPathHeap->count(); ++i) { |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 if (testStepArray()[testStep]->enablePdfTesting()) { | 952 if (testStepArray()[testStep]->enablePdfTesting()) { |
953 TestPdfDevice(reporter, testStepArray()[testStep]); | 953 TestPdfDevice(reporter, testStepArray()[testStep]); |
954 } | 954 } |
955 } | 955 } |
956 | 956 |
957 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i
s a global) | 957 // Explicitly call reset(), so we don't leak the pixels (since kTestBitmap i
s a global) |
958 kTestBitmap.reset(); | 958 kTestBitmap.reset(); |
959 | 959 |
960 test_newraster(reporter); | 960 test_newraster(reporter); |
961 } | 961 } |
OLD | NEW |