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

Side by Side Diff: fpdfsdk/fpdfformfill_embeddertest.cpp

Issue 2258333002: Fix page leaks in an embedder test (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: new approach 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 | « no previous file | fpdfsdk/fsdk_baseform_embeddertest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "public/fpdf_formfill.h" 5 #include "public/fpdf_formfill.h"
6 #include "testing/embedder_test.h" 6 #include "testing/embedder_test.h"
7 #include "testing/embedder_test_mock_delegate.h" 7 #include "testing/embedder_test_mock_delegate.h"
8 #include "testing/embedder_test_timer_handling_delegate.h" 8 #include "testing/embedder_test_timer_handling_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"
(...skipping 27 matching lines...) Expand all
38 DoOpenActions(); 38 DoOpenActions();
39 delegate.AdvanceTime(5000); 39 delegate.AdvanceTime(5000);
40 UnloadPage(page); 40 UnloadPage(page);
41 } 41 }
42 42
43 TEST_F(FPDFFormFillEmbeddertest, BUG_507316) { 43 TEST_F(FPDFFormFillEmbeddertest, BUG_507316) {
44 EmbedderTestTimerHandlingDelegate delegate; 44 EmbedderTestTimerHandlingDelegate delegate;
45 SetDelegate(&delegate); 45 SetDelegate(&delegate);
46 46
47 EXPECT_TRUE(OpenDocument("bug_507316.pdf")); 47 EXPECT_TRUE(OpenDocument("bug_507316.pdf"));
48 FPDF_PAGE page = LoadAndCachePage(2); 48 FPDF_PAGE page = LoadPage(2);
49 EXPECT_TRUE(page); 49 EXPECT_TRUE(page);
50 DoOpenActions(); 50 DoOpenActions();
51 delegate.AdvanceTime(4000); 51 delegate.AdvanceTime(4000);
52 UnloadPage(page); 52 UnloadPage(page);
53 } 53 }
54 54
55 TEST_F(FPDFFormFillEmbeddertest, BUG_514690) { 55 TEST_F(FPDFFormFillEmbeddertest, BUG_514690) {
56 EXPECT_TRUE(OpenDocument("hello_world.pdf")); 56 EXPECT_TRUE(OpenDocument("hello_world.pdf"));
57 FPDF_PAGE page = LoadPage(0); 57 FPDF_PAGE page = LoadPage(0);
58 EXPECT_TRUE(page); 58 EXPECT_TRUE(page);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 delegate.AdvanceTime(1000); 173 delegate.AdvanceTime(1000);
174 delegate.AdvanceTime(1000); 174 delegate.AdvanceTime(1000);
175 delegate.AdvanceTime(1000); 175 delegate.AdvanceTime(1000);
176 UnloadPage(page); 176 UnloadPage(page);
177 177
178 const auto& alerts = delegate.GetAlerts(); 178 const auto& alerts = delegate.GetAlerts();
179 EXPECT_EQ(2U, alerts.size()); 179 EXPECT_EQ(2U, alerts.size());
180 } 180 }
181 181
182 #endif // PDF_ENABLE_V8 182 #endif // PDF_ENABLE_V8
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/fsdk_baseform_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698