Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cxfa_layoutitem_embeddertest.cpp
Go to the documentation of this file.
1// Copyright 2019 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "testing/gtest/include/gtest/gtest.h"
6#include "testing/xfa_js_embedder_test.h"
7
9
11 ASSERT_TRUE(OpenDocument("bug_1265.pdf"));
12 FPDF_PAGE page0 = LoadPage(0);
13 FPDF_PAGE page1 = LoadPage(1);
14 EXPECT_TRUE(page0);
15 EXPECT_FALSE(page1);
16 UnloadPage(page0);
17}
18
20 ASSERT_TRUE(OpenDocument("bug_1301.pdf"));
21 FPDF_PAGE page0 = LoadPage(0);
22 FPDF_PAGE page1 = LoadPage(1);
23 FPDF_PAGE page2 = LoadPage(2);
24 EXPECT_TRUE(page0);
25 EXPECT_TRUE(page1);
26 EXPECT_FALSE(page2);
27 UnloadPage(page0);
28 UnloadPage(page1);
29}
30
32 ASSERT_TRUE(OpenDocument("bug_306123.pdf"));
33 FPDF_PAGE page0 = LoadPage(0);
34 FPDF_PAGE page1 = LoadPage(1);
35 FPDF_PAGE page2 = LoadPage(2);
36 EXPECT_TRUE(page0);
37 EXPECT_TRUE(page1);
38 EXPECT_FALSE(page2);
39 UnloadPage(page0);
40 UnloadPage(page1);
41}
42
44 static constexpr int kExpectedPageCount = 10;
45 ASSERT_TRUE(OpenDocument("xfa/xfa_break_before_after.pdf"));
46 for (int i = 0; i < kExpectedPageCount; ++i) {
47 FPDF_PAGE page = LoadPage(i);
48 EXPECT_TRUE(page);
49 UnloadPage(page);
50 }
51}
TEST_F(CXFALayoutItemEmbedderTest, Bug_1265)