| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 33 SetDelegate(&delegate); | 33 SetDelegate(&delegate); |
| 34 | 34 |
| 35 EXPECT_TRUE(OpenDocument("testing/resources/bug_487928.pdf")); | 35 EXPECT_TRUE(OpenDocument("testing/resources/bug_487928.pdf")); |
| 36 FPDF_PAGE page = LoadPage(0); | 36 FPDF_PAGE page = LoadPage(0); |
| 37 EXPECT_NE(nullptr, page); | 37 EXPECT_NE(nullptr, page); |
| 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) { |
| 44 EmbedderTestTimerHandlingDelegate delegate; |
| 45 SetDelegate(&delegate); |
| 46 |
| 47 EXPECT_TRUE(OpenDocument("testing/resources/bug_507316.pdf")); |
| 48 FPDF_PAGE page = LoadAndCachePage(2); |
| 49 EXPECT_NE(nullptr, page); |
| 50 DoOpenActions(); |
| 51 delegate.AdvanceTime(4000); |
| 52 UnloadPage(page); |
| 53 } |
| 54 |
| 43 TEST_F(FPDFFormFillEmbeddertest, BUG_514690) { | 55 TEST_F(FPDFFormFillEmbeddertest, BUG_514690) { |
| 44 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf")); | 56 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf")); |
| 45 FPDF_PAGE page = LoadPage(0); | 57 FPDF_PAGE page = LoadPage(0); |
| 46 EXPECT_NE(nullptr, page); | 58 EXPECT_NE(nullptr, page); |
| 47 | 59 |
| 48 // Test that FORM_OnMouseMove() etc. permit null HANDLES and PAGES. | 60 // Test that FORM_OnMouseMove() etc. permit null HANDLES and PAGES. |
| 49 FORM_OnMouseMove(nullptr, page, 0, 10.0, 10.0); | 61 FORM_OnMouseMove(nullptr, page, 0, 10.0, 10.0); |
| 50 FORM_OnMouseMove(form_handle(), nullptr, 0, 10.0, 10.0); | 62 FORM_OnMouseMove(form_handle(), nullptr, 0, 10.0, 10.0); |
| 51 | 63 |
| 52 UnloadPage(page); | 64 UnloadPage(page); |
| 53 } | 65 } |
| OLD | NEW |