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

Side by Side Diff: fpdfsdk/src/fpdfformfill_embeddertest.cpp

Issue 1138973004: Merge to XFA: Fix leaks in the embedder tests themselves. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #include "../../public/fpdf_formfill.h" 6 #include "../../public/fpdf_formfill.h"
7 #include "../../testing/embedder_test.h" 7 #include "../../testing/embedder_test.h"
8 #include "../../testing/embedder_test_mock_delegate.h" 8 #include "../../testing/embedder_test_mock_delegate.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using testing::_; 12 using testing::_;
13 using testing::Return; 13 using testing::Return;
14 14
15 class FPDFFormFillEmbeddertest : public EmbedderTest { 15 class FPDFFormFillEmbeddertest : public EmbedderTest {
16 }; 16 };
17 17
18 TEST_F(FPDFFormFillEmbeddertest, FirstTest) { 18 TEST_F(FPDFFormFillEmbeddertest, FirstTest) {
19 EmbedderTestMockDelegate mock; 19 EmbedderTestMockDelegate mock;
20 EXPECT_CALL(mock, Alert(_, _, _, _)).Times(0); 20 EXPECT_CALL(mock, Alert(_, _, _, _)).Times(0);
21 EXPECT_CALL(mock, UnsupportedHandler(_)).Times(0); 21 EXPECT_CALL(mock, UnsupportedHandler(_)).Times(0);
22 SetDelegate(&mock); 22 SetDelegate(&mock);
23 23
24 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf")); 24 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf"));
25 FPDF_PAGE page = LoadPage(0); 25 FPDF_PAGE page = LoadPage(0);
26 EXPECT_NE(nullptr, page); 26 EXPECT_NE(nullptr, page);
27 UnloadPage(page);
27 } 28 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp ('k') | fpdfsdk/src/fpdftext_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698