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

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

Issue 1261923003: Fix segv above CPDFSDK_Document::GetPageView() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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 | « fpdfsdk/src/fpdfformfill.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 // 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/embedder_test_timer_handling_delegate.h" 9 #include "../../testing/embedder_test_timer_handling_delegate.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 23 matching lines...) Expand all
34 EmbedderTestTimerHandlingDelegate delegate; 34 EmbedderTestTimerHandlingDelegate delegate;
35 SetDelegate(&delegate); 35 SetDelegate(&delegate);
36 36
37 EXPECT_TRUE(OpenDocument("testing/resources/bug_487928.pdf")); 37 EXPECT_TRUE(OpenDocument("testing/resources/bug_487928.pdf"));
38 FPDF_PAGE page = LoadPage(0); 38 FPDF_PAGE page = LoadPage(0);
39 EXPECT_NE(nullptr, page); 39 EXPECT_NE(nullptr, page);
40 DoOpenActions(); 40 DoOpenActions();
41 delegate.AdvanceTime(5000); 41 delegate.AdvanceTime(5000);
42 UnloadPage(page); 42 UnloadPage(page);
43 } 43 }
44
45 TEST_F(FPDFFormFillEmbeddertest, BUG_514690) {
46 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf"));
47 FPDF_PAGE page = LoadPage(0);
48 EXPECT_NE(nullptr, page);
49
50 // Test that FORM_OnMouseMove() etc. permit null HANDLES and PAGES.
51 FORM_OnMouseMove(nullptr, page, 0, 10.0, 10.0);
52 FORM_OnMouseMove(form_handle(), nullptr, 0, 10.0, 10.0);
53
54 UnloadPage(page);
55 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfformfill.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698