| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 delegate.AdvanceTime(1000); | 172 delegate.AdvanceTime(1000); |
| 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 TEST_F(FPDFFormFillEmbeddertest, BUG_679649) { |
| 183 EmbedderTestTimerHandlingDelegate delegate; |
| 184 SetDelegate(&delegate); |
| 185 |
| 186 EXPECT_TRUE(OpenDocument("bug_679649.pdf")); |
| 187 FPDF_PAGE page = LoadPage(0); |
| 188 EXPECT_TRUE(page); |
| 189 |
| 190 delegate.SetFailNextTimer(); |
| 191 DoOpenActions(); |
| 192 delegate.AdvanceTime(2000); |
| 193 UnloadPage(page); |
| 194 |
| 195 const auto& alerts = delegate.GetAlerts(); |
| 196 EXPECT_EQ(0u, alerts.size()); |
| 197 } |
| 198 |
| 182 #endif // PDF_ENABLE_V8 | 199 #endif // PDF_ENABLE_V8 |
| OLD | NEW |