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