Mass assert OpenDocument*() in tests
Opening a document is a prerequisite to all tests that open a document,
and success should be tested with an ASSERT instead of an EXPECT.
Done with simple search and replace with
sed -i 's/EXPECT_TRUE(OpenDocument/ASSERT_TRUE(OpenDocument/g'
Change-Id: Ia2ad22a3863b138d9222b821ddec372915c784df
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71654
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
diff --git a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
index e8bee8d..d015aef 100644
--- a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
+++ b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
@@ -47,7 +47,7 @@
}
TEST_F(CPDF_CreatorEmbedderTest, BUG_873) {
- EXPECT_TRUE(OpenDocument("embedded_attachments.pdf"));
+ ASSERT_TRUE(OpenDocument("embedded_attachments.pdf"));
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
// Cannot match second part of the ID since it is randomly generated.
diff --git a/core/fpdfapi/parser/cpdf_parser_embeddertest.cpp b/core/fpdfapi/parser/cpdf_parser_embeddertest.cpp
index 9294534..814bfa2 100644
--- a/core/fpdfapi/parser/cpdf_parser_embeddertest.cpp
+++ b/core/fpdfapi/parser/cpdf_parser_embeddertest.cpp
@@ -16,7 +16,7 @@
TEST_F(CPDFParserEmbedderTest, Bug_481363) {
// Test colorspace object with malformed dictionary.
- EXPECT_TRUE(OpenDocument("bug_481363.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_481363.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);
@@ -24,7 +24,7 @@
TEST_F(CPDFParserEmbedderTest, Bug_544880) {
// Test self referencing /Pages object.
- EXPECT_TRUE(OpenDocument("bug_544880.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_544880.pdf"));
// Shouldn't crash. We don't check the return value here because we get the
// the count from the "/Count 1" in the testcase (at the time of writing)
// rather than the actual count (0).
@@ -42,7 +42,7 @@
TEST_F(CPDFParserEmbedderTest, Bug_602650) {
// Test the case that cross reference entries, which are well formed,
// but do not match with the objects.
- EXPECT_TRUE(OpenDocument("bug_602650.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_602650.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
FPDF_TEXTPAGE text_page = FPDFText_LoadPage(page);
@@ -55,11 +55,11 @@
}
TEST_F(CPDFParserEmbedderTest, Bug_757705) {
- EXPECT_TRUE(OpenDocument("bug_757705.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_757705.pdf"));
}
TEST_F(CPDFParserEmbedderTest, LoadMainCrossRefTable) {
- EXPECT_TRUE(OpenDocumentLinearized("feature_linearized_loading.pdf"));
+ ASSERT_TRUE(OpenDocumentLinearized("feature_linearized_loading.pdf"));
// To check that main cross ref table is loaded correctly,will be enough to
// check that the second page was correctly loaded. Because it is contains
// crossrefs for second page.
@@ -75,7 +75,7 @@
}
TEST_F(CPDFParserEmbedderTest, Bug_828049) {
- EXPECT_TRUE(OpenDocument("bug_828049.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_828049.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
index 3b1160e..84b76e3 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
@@ -20,7 +20,7 @@
TEST_F(FPDFParserDecodeEmbedderTest, Bug_552046) {
// Tests specifying multiple image filters for a stream. Should not cause a
// crash when rendered.
- EXPECT_TRUE(OpenDocument("bug_552046.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_552046.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
@@ -31,7 +31,7 @@
TEST_F(FPDFParserDecodeEmbedderTest, Bug_555784) {
// Tests bad input to the run length decoder that caused a heap overflow.
// Should not cause a crash when rendered.
- EXPECT_TRUE(OpenDocument("bug_555784.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_555784.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
@@ -48,7 +48,7 @@
TEST_F(FPDFParserDecodeEmbedderTest, MAYBE_Bug_455199) {
// Tests object numbers with a value > 01000000.
// Should open successfully.
- EXPECT_TRUE(OpenDocument("bug_455199.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_455199.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
diff --git a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
index 236d22f..d84ab65 100644
--- a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
+++ b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
@@ -224,7 +224,7 @@
// Test rendering of page content using progressive render APIs
// without pausing the rendering.
- EXPECT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
+ ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FakePause pause(false);
@@ -251,7 +251,7 @@
// Test rendering of page content using progressive render APIs
// with pause in rendering.
- EXPECT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
+ ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FakePause pause(true);
@@ -286,7 +286,7 @@
// Test rendering of the page with annotations using progressive render APIs
// with pause in rendering.
- EXPECT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
+ ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FakePause pause(true);
@@ -321,7 +321,7 @@
// Test rendering of the page with forms using progressive render APIs
// with pause in rendering.
- EXPECT_TRUE(OpenDocument("text_form.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FakePause pause(true);
diff --git a/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp b/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp
index b61ceb8..29a4706 100644
--- a/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp
+++ b/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp
@@ -13,7 +13,7 @@
TEST_F(FPDFRenderPatternEmbedderTest, LoadError_547706) {
// Test shading where object is a dictionary instead of a stream.
- EXPECT_TRUE(OpenDocument("bug_547706.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_547706.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
diff --git a/core/fxcodec/jbig2/jbig2_embeddertest.cpp b/core/fxcodec/jbig2/jbig2_embeddertest.cpp
index e2523fc..aa9237d 100644
--- a/core/fxcodec/jbig2/jbig2_embeddertest.cpp
+++ b/core/fxcodec/jbig2/jbig2_embeddertest.cpp
@@ -19,7 +19,7 @@
TEST_F(JBig2EmbedderTest, MAYBE_Bug_631912) {
// Test jbig2 image in PDF file can be loaded successfully.
// Should not crash.
- EXPECT_TRUE(OpenDocument("bug_631912.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_631912.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
diff --git a/core/fxge/fx_ge_text_embeddertest.cpp b/core/fxge/fx_ge_text_embeddertest.cpp
index e47ed5f..77d591b 100644
--- a/core/fxge/fx_ge_text_embeddertest.cpp
+++ b/core/fxge/fx_ge_text_embeddertest.cpp
@@ -12,7 +12,7 @@
TEST_F(FXGETextEmbedderTest, BadItalic) {
// Shouldn't crash.
- EXPECT_TRUE(OpenDocument("bug_601362.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_601362.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
diff --git a/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp b/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
index 556eb8b..bcb4aab 100644
--- a/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
+++ b/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
@@ -26,7 +26,7 @@
class CPDFSDK_AnnotIteratorTest : public EmbedderTest {};
TEST_F(CPDFSDK_AnnotIteratorTest, CPDFSDK_AnnotIterator) {
- EXPECT_TRUE(OpenDocument("annotiter.pdf"));
+ ASSERT_TRUE(OpenDocument("annotiter.pdf"));
FPDF_PAGE page0 = LoadPage(0);
FPDF_PAGE page1 = LoadPage(1);
FPDF_PAGE page2 = LoadPage(2);
diff --git a/fpdfsdk/cpdfsdk_baannothandler_embeddertest.cpp b/fpdfsdk/cpdfsdk_baannothandler_embeddertest.cpp
index e22409f..5539056 100644
--- a/fpdfsdk/cpdfsdk_baannothandler_embeddertest.cpp
+++ b/fpdfsdk/cpdfsdk_baannothandler_embeddertest.cpp
@@ -24,7 +24,7 @@
}
void SetUpBAAnnotHandler() {
- EXPECT_TRUE(OpenDocument("links_highlights_annots.pdf"));
+ ASSERT_TRUE(OpenDocument("links_highlights_annots.pdf"));
m_page = LoadPage(0);
ASSERT_TRUE(m_page);
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp
index 2689b19..7ed02ee 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -1888,7 +1888,7 @@
TEST_F(FPDFAnnotEmbedderTest, GetFormAnnotNull) {
// Open file with form text fields.
- EXPECT_TRUE(OpenDocument("text_form.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1916,7 +1916,7 @@
TEST_F(FPDFAnnotEmbedderTest, GetFormAnnotAndCheckFlagsTextField) {
// Open file with form text fields.
- EXPECT_TRUE(OpenDocument("text_form_multiple.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form_multiple.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1949,7 +1949,7 @@
TEST_F(FPDFAnnotEmbedderTest, GetFormAnnotAndCheckFlagsComboBox) {
// Open file with form comboboxes.
- EXPECT_TRUE(OpenDocument("combobox_form.pdf"));
+ ASSERT_TRUE(OpenDocument("combobox_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp
index b0918a6..652d565 100644
--- a/fpdfsdk/fpdf_doc_embeddertest.cpp
+++ b/fpdfsdk/fpdf_doc_embeddertest.cpp
@@ -20,7 +20,7 @@
class FPDFDocEmbedderTest : public EmbedderTest {};
TEST_F(FPDFDocEmbedderTest, MultipleSamePage) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document());
std::set<FPDF_PAGE> unique_pages;
@@ -39,7 +39,7 @@
}
TEST_F(FPDFDocEmbedderTest, DestGetPageIndex) {
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
// NULL argument cases.
EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(nullptr, nullptr));
@@ -67,7 +67,7 @@
}
TEST_F(FPDFDocEmbedderTest, DestGetView) {
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
unsigned long numParams;
FS_FLOAT params[4];
@@ -126,7 +126,7 @@
}
TEST_F(FPDFDocEmbedderTest, DestGetLocationInPage) {
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
EXPECT_TRUE(dest);
@@ -192,7 +192,7 @@
}
TEST_F(FPDFDocEmbedderTest, BUG_680376) {
- EXPECT_TRUE(OpenDocument("bug_680376.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_680376.pdf"));
// Page number directly in item from Dests NameTree.
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
@@ -201,7 +201,7 @@
}
TEST_F(FPDFDocEmbedderTest, BUG_821454) {
- EXPECT_TRUE(OpenDocument("bug_821454.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_821454.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -268,7 +268,7 @@
}
TEST_F(FPDFDocEmbedderTest, ActionBadArguments) {
- EXPECT_TRUE(OpenDocument("launch_action.pdf"));
+ ASSERT_TRUE(OpenDocument("launch_action.pdf"));
EXPECT_EQ(static_cast<unsigned long>(PDFACTION_UNSUPPORTED),
FPDFAction_GetType(nullptr));
@@ -280,7 +280,7 @@
}
TEST_F(FPDFDocEmbedderTest, ActionLaunch) {
- EXPECT_TRUE(OpenDocument("launch_action.pdf"));
+ ASSERT_TRUE(OpenDocument("launch_action.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -311,7 +311,7 @@
}
TEST_F(FPDFDocEmbedderTest, ActionURI) {
- EXPECT_TRUE(OpenDocument("uri_action.pdf"));
+ ASSERT_TRUE(OpenDocument("uri_action.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -342,7 +342,7 @@
}
TEST_F(FPDFDocEmbedderTest, LinkToAnnotConversion) {
- EXPECT_TRUE(OpenDocument("annots.pdf"));
+ ASSERT_TRUE(OpenDocument("annots.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
{
@@ -364,7 +364,7 @@
}
TEST_F(FPDFDocEmbedderTest, ActionGoto) {
- EXPECT_TRUE(OpenDocument("goto_action.pdf"));
+ ASSERT_TRUE(OpenDocument("goto_action.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -389,7 +389,7 @@
}
TEST_F(FPDFDocEmbedderTest, ActionNonesuch) {
- EXPECT_TRUE(OpenDocument("nonesuch_action.pdf"));
+ ASSERT_TRUE(OpenDocument("nonesuch_action.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -416,7 +416,7 @@
unsigned short buf[128];
// Open a file with no bookmarks.
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
// NULL argument cases.
EXPECT_EQ(0u, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
@@ -435,7 +435,7 @@
unsigned short buf[128];
// Open a file with two bookmarks.
- EXPECT_TRUE(OpenDocument("bookmarks.pdf"));
+ ASSERT_TRUE(OpenDocument("bookmarks.pdf"));
FPDF_BOOKMARK child = FPDFBookmark_GetFirstChild(document(), nullptr);
EXPECT_TRUE(child);
@@ -463,7 +463,7 @@
unsigned short buf[128];
// Open a file with two bookmarks.
- EXPECT_TRUE(OpenDocument("bookmarks.pdf"));
+ ASSERT_TRUE(OpenDocument("bookmarks.pdf"));
// Find the first one, based on its known title.
ScopedFPDFWideString title = GetFPDFWideString(L"A Good Beginning");
@@ -485,7 +485,7 @@
// Check circular bookmarks will not cause infinite loop.
TEST_F(FPDFDocEmbedderTest, FindBookmarks_bug420) {
// Open a file with circular bookmarks.
- EXPECT_TRUE(OpenDocument("bookmarks_circular.pdf"));
+ ASSERT_TRUE(OpenDocument("bookmarks_circular.pdf"));
// Try to find a title.
ScopedFPDFWideString title = GetFPDFWideString(L"anything");
@@ -493,7 +493,7 @@
}
TEST_F(FPDFDocEmbedderTest, DeletePage) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_EQ(1, FPDF_GetPageCount(document()));
FPDFPage_Delete(nullptr, 0);
@@ -636,14 +636,14 @@
}
TEST_F(FPDFDocEmbedderTest, NoPageLabels) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
EXPECT_EQ(1, FPDF_GetPageCount(document()));
ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 0, nullptr, 0));
}
TEST_F(FPDFDocEmbedderTest, GetPageLabels) {
- EXPECT_TRUE(OpenDocument("page_labels.pdf"));
+ ASSERT_TRUE(OpenDocument("page_labels.pdf"));
EXPECT_EQ(7, FPDF_GetPageCount(document()));
// We do not request labels, when use FPDFAvail_IsXXXAvail.
@@ -695,7 +695,7 @@
#ifdef PDF_ENABLE_XFA
TEST_F(FPDFDocEmbedderTest, GetXFALinks) {
- EXPECT_TRUE(OpenDocument("simple_xfa.pdf"));
+ ASSERT_TRUE(OpenDocument("simple_xfa.pdf"));
ScopedFPDFPage page(FPDF_LoadPage(document(), 0));
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 86a74d3..0cdcb9f 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -254,7 +254,7 @@
// Get the bitmap for the original document.
ScopedFPDFBitmap orig_bitmap;
{
- EXPECT_TRUE(OpenDocument("black.pdf"));
+ ASSERT_TRUE(OpenDocument("black.pdf"));
FPDF_PAGE orig_page = LoadPage(0);
ASSERT_TRUE(orig_page);
orig_bitmap = RenderLoadedPage(orig_page);
@@ -469,7 +469,7 @@
TEST_F(FPDFEditEmbedderTest, ClipPath) {
// Load document with a clipped rectangle.
- EXPECT_TRUE(OpenDocument("clip_path.pdf"));
+ ASSERT_TRUE(OpenDocument("clip_path.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -565,7 +565,7 @@
TEST_F(FPDFEditEmbedderTest, BUG_1399) {
// Load document with a clipped rectangle.
- EXPECT_TRUE(OpenDocument("bug_1399.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_1399.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -604,7 +604,7 @@
TEST_F(FPDFEditEmbedderTest, SetText) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -737,7 +737,7 @@
TEST_F(FPDFEditEmbedderTest, RemovePageObject) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -868,7 +868,7 @@
TEST_F(FPDFEditEmbedderTest, ReadMarkedObjectsIndirectDict) {
// Load document with some text marked with an indirect property.
- EXPECT_TRUE(OpenDocument("text_in_page_marked_indirect.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked_indirect.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -885,7 +885,7 @@
#endif
TEST_F(FPDFEditEmbedderTest, MAYBE_RemoveMarkedObjectsPrime) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -972,7 +972,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveMarks) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1025,7 +1025,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveMarkParam) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1109,7 +1109,7 @@
TEST_F(FPDFEditEmbedderTest, MaintainMarkedObjects) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1140,7 +1140,7 @@
TEST_F(FPDFEditEmbedderTest, MaintainIndirectMarkedObjects) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked_indirect.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked_indirect.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1171,7 +1171,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObject) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1200,7 +1200,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsNotLonely) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1255,7 +1255,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsLonely) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1295,7 +1295,7 @@
TEST_F(FPDFEditEmbedderTest, GetContentStream) {
// Load document with some text split across streams.
- EXPECT_TRUE(OpenDocument("split_streams.pdf"));
+ ASSERT_TRUE(OpenDocument("split_streams.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1327,7 +1327,7 @@
#endif
TEST_F(FPDFEditEmbedderTest, MAYBE_RemoveAllFromStream) {
// Load document with some text split across streams.
- EXPECT_TRUE(OpenDocument("split_streams.pdf"));
+ ASSERT_TRUE(OpenDocument("split_streams.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1429,7 +1429,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveAllFromSingleStream) {
// Load document with a single stream.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1482,7 +1482,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveFirstFromSingleStream) {
// Load document with a single stream.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1543,7 +1543,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveLastFromSingleStream) {
// Load document with a single stream.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1605,7 +1605,7 @@
TEST_F(FPDFEditEmbedderTest, RemoveAllFromMultipleStreams) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world_split_streams.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1656,7 +1656,7 @@
TEST_F(FPDFEditEmbedderTest, InsertPageObjectAndSave) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1685,7 +1685,7 @@
TEST_F(FPDFEditEmbedderTest, InsertPageObjectEditAndSave) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1726,7 +1726,7 @@
const int kOriginalObjectCount = 600;
// Load document with many objects.
- EXPECT_TRUE(OpenDocument("many_rectangles.pdf"));
+ ASSERT_TRUE(OpenDocument("many_rectangles.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1873,7 +1873,7 @@
#endif
TEST_F(FPDFEditEmbedderTest, MAYBE_PathOnTopOfText) {
// Load document with some text
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1913,7 +1913,7 @@
#endif
TEST_F(FPDFEditEmbedderTest, MAYBE_EditOverExistingContent) {
// Load document with existing content
- EXPECT_TRUE(OpenDocument("bug_717.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_717.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -2130,7 +2130,7 @@
}
TEST_F(FPDFEditEmbedderTest, GetTextRenderMode) {
- EXPECT_TRUE(OpenDocument("text_render_mode.pdf"));
+ ASSERT_TRUE(OpenDocument("text_render_mode.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(2, FPDFPage_CountObjects(page));
@@ -2165,7 +2165,7 @@
const char md5_stroke[] = "412e52e621b46bd77baf2162e1fb1a1d";
{
- EXPECT_TRUE(OpenDocument("text_render_mode.pdf"));
+ ASSERT_TRUE(OpenDocument("text_render_mode.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(2, FPDFPage_CountObjects(page));
@@ -2230,7 +2230,7 @@
}
TEST_F(FPDFEditEmbedderTest, TestGetTextFontName) {
- EXPECT_TRUE(OpenDocument("text_font.pdf"));
+ ASSERT_TRUE(OpenDocument("text_font.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(1, FPDFPage_CountObjects(page));
@@ -2258,7 +2258,7 @@
}
TEST_F(FPDFEditEmbedderTest, TestFormGetObjects) {
- EXPECT_TRUE(OpenDocument("form_object.pdf"));
+ ASSERT_TRUE(OpenDocument("form_object.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(1, FPDFPage_CountObjects(page));
@@ -2649,7 +2649,7 @@
TEST_F(FPDFEditEmbedderTest, NormalizeNegativeRotation) {
// Load document with a -90 degree rotation
- EXPECT_TRUE(OpenDocument("bug_713197.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_713197.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
@@ -2800,7 +2800,7 @@
TEST_F(FPDFEditEmbedderTest, MAYBE_SaveAndRender) {
const char md5[] = "3c20472b0552c0c22b88ab1ed8c6202b";
{
- EXPECT_TRUE(OpenDocument("bug_779.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_779.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_NE(nullptr, page);
@@ -2830,7 +2830,7 @@
TEST_F(FPDFEditEmbedderTest, AddMark) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -2868,7 +2868,7 @@
#endif
TEST_F(FPDFEditEmbedderTest, MAYBE_AddMarkCompressedStream) {
// Load document with some text in a compressed stream.
- EXPECT_TRUE(OpenDocument("hello_world_compressed_stream.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world_compressed_stream.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -2914,7 +2914,7 @@
TEST_F(FPDFEditEmbedderTest, SetMarkParam) {
// Load document with some text.
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -3093,7 +3093,7 @@
}
TEST_F(FPDFEditEmbedderTest, MarkGetName) {
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FPDF_PAGEOBJECT page_object = FPDFPage_GetObject(page, 18);
@@ -3126,7 +3126,7 @@
}
TEST_F(FPDFEditEmbedderTest, MarkGetParamKey) {
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FPDF_PAGEOBJECT page_object = FPDFPage_GetObject(page, 18);
@@ -3166,7 +3166,7 @@
}
TEST_F(FPDFEditEmbedderTest, MarkGetIntParam) {
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FPDF_PAGEOBJECT page_object = FPDFPage_GetObject(page, 8);
@@ -3202,7 +3202,7 @@
}
TEST_F(FPDFEditEmbedderTest, MarkGetStringParam) {
- EXPECT_TRUE(OpenDocument("text_in_page_marked.pdf"));
+ ASSERT_TRUE(OpenDocument("text_in_page_marked.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
FPDF_PAGEOBJECT page_object = FPDFPage_GetObject(page, 18);
@@ -3508,7 +3508,7 @@
}
TEST_F(FPDFEditEmbedderTest, GetImageData) {
- EXPECT_TRUE(OpenDocument("embedded_images.pdf"));
+ ASSERT_TRUE(OpenDocument("embedded_images.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(39, FPDFPage_CountObjects(page));
@@ -3643,7 +3643,7 @@
}
TEST_F(FPDFEditEmbedderTest, GetImageFilters) {
- EXPECT_TRUE(OpenDocument("embedded_images.pdf"));
+ ASSERT_TRUE(OpenDocument("embedded_images.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_editpage_embeddertest.cpp b/fpdfsdk/fpdf_editpage_embeddertest.cpp
index 084d57c..a630721 100644
--- a/fpdfsdk/fpdf_editpage_embeddertest.cpp
+++ b/fpdfsdk/fpdf_editpage_embeddertest.cpp
@@ -96,7 +96,7 @@
TEST_F(FPDFEditPageEmbedderTest, HasTransparencyPath) {
constexpr int kExpectedObjectCount = 8;
- EXPECT_TRUE(OpenDocument("rectangles.pdf"));
+ ASSERT_TRUE(OpenDocument("rectangles.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(kExpectedObjectCount, FPDFPage_CountObjects(page));
@@ -114,7 +114,7 @@
TEST_F(FPDFEditPageEmbedderTest, HasTransparencyText) {
constexpr int kExpectedObjectCount = 2;
- EXPECT_TRUE(OpenDocument("text_render_mode.pdf"));
+ ASSERT_TRUE(OpenDocument("text_render_mode.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ASSERT_EQ(kExpectedObjectCount, FPDFPage_CountObjects(page));
diff --git a/fpdfsdk/fpdf_ext_embeddertest.cpp b/fpdfsdk/fpdf_ext_embeddertest.cpp
index f3ae06e..01e389a 100644
--- a/fpdfsdk/fpdf_ext_embeddertest.cpp
+++ b/fpdfsdk/fpdf_ext_embeddertest.cpp
@@ -14,11 +14,11 @@
}
TEST_F(FPDFExtEmbedderTest, PageModeUseNone) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_EQ(PAGEMODE_USENONE, FPDFDoc_GetPageMode(document()));
}
TEST_F(FPDFExtEmbedderTest, PageModeUseOutlines) {
- EXPECT_TRUE(OpenDocument("use_outlines.pdf"));
+ ASSERT_TRUE(OpenDocument("use_outlines.pdf"));
EXPECT_EQ(PAGEMODE_USEOUTLINES, FPDFDoc_GetPageMode(document()));
}
diff --git a/fpdfsdk/fpdf_flatten_embeddertest.cpp b/fpdfsdk/fpdf_flatten_embeddertest.cpp
index 112a322..38ed906 100644
--- a/fpdfsdk/fpdf_flatten_embeddertest.cpp
+++ b/fpdfsdk/fpdf_flatten_embeddertest.cpp
@@ -15,7 +15,7 @@
} // namespace
TEST_F(FPDFFlattenEmbedderTest, FlatNothing) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
EXPECT_EQ(FLATTEN_NOTHINGTODO, FPDFPage_Flatten(page, FLAT_NORMALDISPLAY));
@@ -23,7 +23,7 @@
}
TEST_F(FPDFFlattenEmbedderTest, FlatNormal) {
- EXPECT_TRUE(OpenDocument("annotiter.pdf"));
+ ASSERT_TRUE(OpenDocument("annotiter.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_NORMALDISPLAY));
@@ -31,7 +31,7 @@
}
TEST_F(FPDFFlattenEmbedderTest, FlatPrint) {
- EXPECT_TRUE(OpenDocument("annotiter.pdf"));
+ ASSERT_TRUE(OpenDocument("annotiter.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_PRINT));
@@ -53,7 +53,7 @@
constexpr char kCheckboxHash[] = "594265790b81df2d93120d33b72a6ada";
#endif
- EXPECT_TRUE(OpenDocument("bug_861842.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_861842.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -82,7 +82,7 @@
constexpr char kFlattenedPageHash[] = "ef01f57507662ec9aef7cc7cff92f96c";
#endif
- EXPECT_TRUE(OpenDocument("bug_889099.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_889099.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -106,7 +106,7 @@
#endif
TEST_F(FPDFFlattenEmbedderTest, MAYBE_BUG_890322) {
constexpr char md5_hash[] = "6c674642154408e877d88c6c082d67e9";
- EXPECT_TRUE(OpenDocument("bug_890322.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_890322.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -129,7 +129,7 @@
#endif
TEST_F(FPDFFlattenEmbedderTest, MAYBE_BUG_896366) {
constexpr char md5_hash[] = "f71ab085c52c8445ae785eca3ec858b1";
- EXPECT_TRUE(OpenDocument("bug_896366.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_896366.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_formfill_embeddertest.cpp b/fpdfsdk/fpdf_formfill_embeddertest.cpp
index 3eaadee..5cf40cd 100644
--- a/fpdfsdk/fpdf_formfill_embeddertest.cpp
+++ b/fpdfsdk/fpdf_formfill_embeddertest.cpp
@@ -618,7 +618,7 @@
EXPECT_CALL(mock, DoGoToAction(_, _, _, _, _)).Times(0);
SetDelegate(&mock);
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
UnloadPage(page);
@@ -628,7 +628,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_487928.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_487928.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -640,7 +640,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_507316.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_507316.pdf"));
FPDF_PAGE page = LoadPage(2);
EXPECT_TRUE(page);
DoOpenActions();
@@ -649,7 +649,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, BUG_514690) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -664,7 +664,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_900552.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_900552.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
DoOpenActions();
@@ -682,7 +682,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_901654.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_901654.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
DoOpenActions();
@@ -701,7 +701,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_901654_2.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_901654_2.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
DoOpenActions();
@@ -890,7 +890,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, TabWithModifiers) {
- EXPECT_TRUE(OpenDocument("annotiter.pdf"));
+ ASSERT_TRUE(OpenDocument("annotiter.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -942,7 +942,7 @@
#ifdef PDF_ENABLE_XFA
TEST_F(FPDFFormFillEmbedderTest, XFAFormFillFirstTab) {
- EXPECT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
+ ASSERT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -953,7 +953,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, XFAFormFillFirstShiftTab) {
- EXPECT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
+ ASSERT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -965,7 +965,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, XFAFormFillContinuousTab) {
- EXPECT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
+ ASSERT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -983,7 +983,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, XFAFormFillContinuousShiftTab) {
- EXPECT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
+ ASSERT_TRUE(OpenDocument("xfa/email_recommended.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
@@ -1017,7 +1017,7 @@
DoURIActionBlockedDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("redirect.pdf"));
+ ASSERT_TRUE(OpenDocument("redirect.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1100,7 +1100,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocumentWithoutJavaScript("bug_551248.pdf"));
+ ASSERT_TRUE(OpenDocumentWithoutJavaScript("bug_551248.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1129,7 +1129,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("document_aactions.pdf"));
+ ASSERT_TRUE(OpenDocument("document_aactions.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -1153,7 +1153,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocumentWithoutJavaScript("document_aactions.pdf"));
+ ASSERT_TRUE(OpenDocumentWithoutJavaScript("document_aactions.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -1174,7 +1174,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_551248.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_551248.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1226,7 +1226,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_620428.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_620428.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1243,7 +1243,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_634394.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_634394.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1265,7 +1265,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_634716.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_634716.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
DoOpenActions();
@@ -1287,7 +1287,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_679649.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_679649.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -1304,7 +1304,7 @@
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
- EXPECT_TRUE(OpenDocument("bug_707673.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_707673.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -1319,7 +1319,7 @@
}
TEST_F(FPDFFormFillEmbedderTest, BUG_765384) {
- EXPECT_TRUE(OpenDocument("bug_765384.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_765384.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -1355,7 +1355,7 @@
#endif
#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
{
- EXPECT_TRUE(OpenDocument("text_form.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap1 = RenderLoadedPage(page);
@@ -1437,7 +1437,7 @@
#endif
#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
- EXPECT_TRUE(OpenDocument("text_form.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap bitmap1 = RenderLoadedPage(page);
@@ -1457,22 +1457,22 @@
}
TEST_F(FPDFFormFillEmbedderTest, HasFormInfoNone) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_EQ(FORMTYPE_NONE, FPDF_GetFormType(document_));
}
TEST_F(FPDFFormFillEmbedderTest, HasFormInfoAcroForm) {
- EXPECT_TRUE(OpenDocument("text_form.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form.pdf"));
EXPECT_EQ(FORMTYPE_ACRO_FORM, FPDF_GetFormType(document_));
}
TEST_F(FPDFFormFillEmbedderTest, HasFormInfoXFAFull) {
- EXPECT_TRUE(OpenDocument("simple_xfa.pdf"));
+ ASSERT_TRUE(OpenDocument("simple_xfa.pdf"));
EXPECT_EQ(FORMTYPE_XFA_FULL, FPDF_GetFormType(document_));
}
TEST_F(FPDFFormFillEmbedderTest, HasFormInfoXFAForeground) {
- EXPECT_TRUE(OpenDocument("bug_216.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_216.pdf"));
EXPECT_EQ(FORMTYPE_XFA_FOREGROUND, FPDF_GetFormType(document_));
}
diff --git a/fpdfsdk/fpdf_ppo_embeddertest.cpp b/fpdfsdk/fpdf_ppo_embeddertest.cpp
index 9fd2114..e063737 100644
--- a/fpdfsdk/fpdf_ppo_embeddertest.cpp
+++ b/fpdfsdk/fpdf_ppo_embeddertest.cpp
@@ -26,7 +26,7 @@
} // namespace
TEST_F(FPDFPPOEmbedderTest, NoViewerPreferences) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument();
EXPECT_TRUE(output_doc);
@@ -35,7 +35,7 @@
}
TEST_F(FPDFPPOEmbedderTest, ViewerPreferences) {
- EXPECT_TRUE(OpenDocument("viewer_ref.pdf"));
+ ASSERT_TRUE(OpenDocument("viewer_ref.pdf"));
FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument();
EXPECT_TRUE(output_doc);
@@ -161,7 +161,7 @@
}
TEST_F(FPDFPPOEmbedderTest, BadRanges) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -184,7 +184,7 @@
}
TEST_F(FPDFPPOEmbedderTest, GoodRanges) {
- EXPECT_TRUE(OpenDocument("viewer_ref.pdf"));
+ ASSERT_TRUE(OpenDocument("viewer_ref.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -206,7 +206,7 @@
}
TEST_F(FPDFPPOEmbedderTest, BUG_664284) {
- EXPECT_TRUE(OpenDocument("bug_664284.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_664284.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_NE(nullptr, page);
@@ -266,7 +266,7 @@
}
TEST_F(FPDFPPOEmbedderTest, ImportWithZeroLengthStream) {
- EXPECT_TRUE(OpenDocument("zero_length_stream.pdf"));
+ ASSERT_TRUE(OpenDocument("zero_length_stream.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_save_embeddertest.cpp b/fpdfsdk/fpdf_save_embeddertest.cpp
index 614b4f4..4b8cfed 100644
--- a/fpdfsdk/fpdf_save_embeddertest.cpp
+++ b/fpdfsdk/fpdf_save_embeddertest.cpp
@@ -18,20 +18,20 @@
class FPDFSaveEmbedderTest : public EmbedderTest {};
TEST_F(FPDFSaveEmbedderTest, SaveSimpleDoc) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
EXPECT_THAT(GetString(), testing::StartsWith("%PDF-1.7\r\n"));
EXPECT_EQ(805u, GetString().length());
}
TEST_F(FPDFSaveEmbedderTest, SaveSimpleDocWithVersion) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_TRUE(FPDF_SaveWithVersion(document(), this, 0, 14));
EXPECT_THAT(GetString(), testing::StartsWith("%PDF-1.4\r\n"));
EXPECT_EQ(805u, GetString().length());
}
TEST_F(FPDFSaveEmbedderTest, SaveSimpleDocWithBadVersion) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_TRUE(FPDF_SaveWithVersion(document(), this, 0, -1));
EXPECT_THAT(GetString(), testing::StartsWith("%PDF-1.7\r\n"));
@@ -45,7 +45,7 @@
}
TEST_F(FPDFSaveEmbedderTest, SaveCopiedDoc) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -63,7 +63,7 @@
const int kPageCount = 3;
std::string original_md5[kPageCount];
- EXPECT_TRUE(OpenDocument("linearized.pdf"));
+ ASSERT_TRUE(OpenDocument("linearized.pdf"));
for (int i = 0; i < kPageCount; ++i) {
FPDF_PAGE page = LoadPage(i);
ASSERT_TRUE(page);
@@ -104,7 +104,7 @@
#endif // PDF_ENABLE_XFA
TEST_F(FPDFSaveEmbedderTest, BUG_342) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
EXPECT_THAT(GetString(), testing::HasSubstr("0000000000 65535 f\r\n"));
EXPECT_THAT(GetString(),
@@ -112,7 +112,7 @@
}
TEST_F(FPDFSaveEmbedderTest, BUG_905142) {
- EXPECT_TRUE(OpenDocument("bug_905142.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_905142.pdf"));
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
EXPECT_THAT(GetString(), testing::HasSubstr("/Length 0"));
}
diff --git a/fpdfsdk/fpdf_signature_embeddertest.cpp b/fpdfsdk/fpdf_signature_embeddertest.cpp
index 3face6e..6d88d8c 100644
--- a/fpdfsdk/fpdf_signature_embeddertest.cpp
+++ b/fpdfsdk/fpdf_signature_embeddertest.cpp
@@ -8,12 +8,12 @@
class FPDFSignatureEmbedderTest : public EmbedderTest {};
TEST_F(FPDFSignatureEmbedderTest, GetSignatureCount) {
- EXPECT_TRUE(OpenDocument("two_signatures.pdf"));
+ ASSERT_TRUE(OpenDocument("two_signatures.pdf"));
EXPECT_EQ(2, FPDF_GetSignatureCount(document()));
}
TEST_F(FPDFSignatureEmbedderTest, GetSignatureCountZero) {
- EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ ASSERT_TRUE(OpenDocument("hello_world.pdf"));
EXPECT_EQ(0, FPDF_GetSignatureCount(document()));
// Provide no document.
@@ -21,7 +21,7 @@
}
TEST_F(FPDFSignatureEmbedderTest, GetSignatureObject) {
- EXPECT_TRUE(OpenDocument("two_signatures.pdf"));
+ ASSERT_TRUE(OpenDocument("two_signatures.pdf"));
// Different, non-null signature objects are returned.
FPDF_SIGNATURE signature1 = FPDF_GetSignatureObject(document(), 0);
EXPECT_NE(nullptr, signature1);
@@ -38,7 +38,7 @@
}
TEST_F(FPDFSignatureEmbedderTest, GetContents) {
- EXPECT_TRUE(OpenDocument("two_signatures.pdf"));
+ ASSERT_TRUE(OpenDocument("two_signatures.pdf"));
FPDF_SIGNATURE signature = FPDF_GetSignatureObject(document(), 0);
EXPECT_NE(nullptr, signature);
diff --git a/fpdfsdk/fpdf_text_embeddertest.cpp b/fpdfsdk/fpdf_text_embeddertest.cpp
index ce9c622..d82d327 100644
--- a/fpdfsdk/fpdf_text_embeddertest.cpp
+++ b/fpdfsdk/fpdf_text_embeddertest.cpp
@@ -1405,7 +1405,7 @@
}
TEST_F(FPDFTextEmbedderTest, GetTextRenderMode) {
- EXPECT_TRUE(OpenDocument("text_render_mode.pdf"));
+ ASSERT_TRUE(OpenDocument("text_render_mode.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_view_embeddertest.cpp b/fpdfsdk/fpdf_view_embeddertest.cpp
index 6387bb1..ec969e8 100644
--- a/fpdfsdk/fpdf_view_embeddertest.cpp
+++ b/fpdfsdk/fpdf_view_embeddertest.cpp
@@ -147,7 +147,7 @@
// Test for conversion of a point in device coordinates to page coordinates
TEST_F(FPDFViewEmbedderTest, DeviceCoordinatesToPageCoordinates) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
@@ -230,7 +230,7 @@
// Test for conversion of a point in page coordinates to device coordinates.
TEST_F(FPDFViewEmbedderTest, PageCoordinatesToDeviceCoordinates) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
@@ -313,7 +313,7 @@
FPDF_InitLibrary(); // Redundant given call in SetUp(), but safe.
FPDF_InitLibrary(); // Doubly-redundant even, but safe.
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
CloseDocument();
CloseDocument(); // Redundant given above, but safe.
CloseDocument(); // Doubly-redundant even, but safe.
@@ -323,7 +323,7 @@
}
TEST_F(FPDFViewEmbedderTest, Document) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
EXPECT_EQ(1, GetPageCount());
EXPECT_EQ(0, GetFirstPageNum());
@@ -420,7 +420,7 @@
}
TEST_F(FPDFViewEmbedderTest, LinearizedDocument) {
- EXPECT_TRUE(OpenDocumentLinearized("feature_linearized_loading.pdf"));
+ ASSERT_TRUE(OpenDocumentLinearized("feature_linearized_loading.pdf"));
int version;
EXPECT_TRUE(FPDF_GetFileVersion(document(), &version));
EXPECT_EQ(16, version);
@@ -462,7 +462,7 @@
}
TEST_F(FPDFViewEmbedderTest, Page) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_TRUE(page);
@@ -487,7 +487,7 @@
}
TEST_F(FPDFViewEmbedderTest, ViewerRefDummy) {
- EXPECT_TRUE(OpenDocument("about_blank.pdf"));
+ ASSERT_TRUE(OpenDocument("about_blank.pdf"));
EXPECT_TRUE(FPDF_VIEWERREF_GetPrintScaling(document()));
EXPECT_EQ(1, FPDF_VIEWERREF_GetNumCopies(document()));
EXPECT_EQ(DuplexUndefined, FPDF_VIEWERREF_GetDuplex(document()));
@@ -504,7 +504,7 @@
}
TEST_F(FPDFViewEmbedderTest, ViewerRef) {
- EXPECT_TRUE(OpenDocument("viewer_ref.pdf"));
+ ASSERT_TRUE(OpenDocument("viewer_ref.pdf"));
EXPECT_TRUE(FPDF_VIEWERREF_GetPrintScaling(document()));
EXPECT_EQ(5, FPDF_VIEWERREF_GetNumCopies(document()));
EXPECT_EQ(DuplexUndefined, FPDF_VIEWERREF_GetDuplex(document()));
@@ -552,7 +552,7 @@
}
TEST_F(FPDFViewEmbedderTest, NamedDests) {
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
EXPECT_EQ(6u, FPDF_CountNamedDests(document()));
long buffer_size;
@@ -655,7 +655,7 @@
}
TEST_F(FPDFViewEmbedderTest, NamedDestsByName) {
- EXPECT_TRUE(OpenDocument("named_dests.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests.pdf"));
// Null pointer returns nullptr.
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), nullptr);
@@ -692,7 +692,7 @@
}
TEST_F(FPDFViewEmbedderTest, NamedDestsOldStyle) {
- EXPECT_TRUE(OpenDocument("named_dests_old_style.pdf"));
+ ASSERT_TRUE(OpenDocument("named_dests_old_style.pdf"));
EXPECT_EQ(2u, FPDF_CountNamedDests(document()));
// Test bad parameters.
@@ -730,7 +730,7 @@
// The following tests pass if the document opens without crashing.
TEST_F(FPDFViewEmbedderTest, Crasher_113) {
- EXPECT_TRUE(OpenDocument("bug_113.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_113.pdf"));
}
TEST_F(FPDFViewEmbedderTest, Crasher_451830) {
@@ -739,7 +739,7 @@
}
TEST_F(FPDFViewEmbedderTest, Crasher_452455) {
- EXPECT_TRUE(OpenDocument("bug_452455.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_452455.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);
@@ -751,13 +751,13 @@
}
TEST_F(FPDFViewEmbedderTest, Crasher_572871) {
- EXPECT_TRUE(OpenDocument("bug_572871.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_572871.pdf"));
}
// It tests that document can still be loaded even the trailer has no 'Size'
// field if other information is right.
TEST_F(FPDFViewEmbedderTest, Failed_213) {
- EXPECT_TRUE(OpenDocument("bug_213.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_213.pdf"));
}
// The following tests pass if the document opens without infinite looping.
@@ -766,7 +766,7 @@
}
TEST_F(FPDFViewEmbedderTest, Crasher_773229) {
- EXPECT_TRUE(OpenDocument("bug_773229.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_773229.pdf"));
}
// Test if the document opens without infinite looping.
@@ -774,7 +774,7 @@
// the fix, LoadAllCrossRefV4 will return false after detecting a cross
// reference loop. Cross references will be rebuilt successfully.
TEST_F(FPDFViewEmbedderTest, CrossRefV4Loop) {
- EXPECT_TRUE(OpenDocument("bug_xrefv4_loop.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_xrefv4_loop.pdf"));
MockDownloadHints hints;
// Make sure calling FPDFAvail_IsDocAvail() on this file does not infinite
@@ -810,7 +810,7 @@
// Deliberately damaged version of linearized.pdf with bad data in the shared
// object hint table.
TEST_F(FPDFViewEmbedderTest, Hang_1055) {
- EXPECT_TRUE(OpenDocumentLinearized("linearized_bug_1055.pdf"));
+ ASSERT_TRUE(OpenDocumentLinearized("linearized_bug_1055.pdf"));
int version;
EXPECT_TRUE(FPDF_GetFileVersion(document(), &version));
EXPECT_EQ(16, version);
@@ -847,7 +847,7 @@
const char kLargerRotatedMD5[] = "115f13353ebfc82ddb392d1f0059eb12";
const char kLargerRotatedLandscapeMD5[] = "c901239d17d84ac84cb6f2124da71b0d";
- EXPECT_TRUE(OpenDocument("rectangles.pdf"));
+ ASSERT_TRUE(OpenDocument("rectangles.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
const int page_width = static_cast<int>(FPDF_GetPageWidthF(page));
@@ -991,7 +991,7 @@
}
TEST_F(FPDFViewEmbedderTest, FPDF_GetPageSizeByIndexF) {
- EXPECT_TRUE(OpenDocument("rectangles.pdf"));
+ ASSERT_TRUE(OpenDocument("rectangles.pdf"));
FS_SIZEF size;
EXPECT_FALSE(FPDF_GetPageSizeByIndexF(nullptr, 0, &size));
@@ -1026,7 +1026,7 @@
}
TEST_F(FPDFViewEmbedderTest, FPDF_GetPageSizeByIndex) {
- EXPECT_TRUE(OpenDocument("rectangles.pdf"));
+ ASSERT_TRUE(OpenDocument("rectangles.pdf"));
double width = 0;
double height = 0;
diff --git a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
index 5b5dd1d..31145ff 100644
--- a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
@@ -27,7 +27,7 @@
}
void CreateAndInitializeFormComboboxPDF() {
- EXPECT_TRUE(OpenDocument("combobox_form.pdf"));
+ ASSERT_TRUE(OpenDocument("combobox_form.pdf"));
m_page = LoadPage(0);
ASSERT_TRUE(m_page);
diff --git a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
index e17ba5d..36d23b0 100644
--- a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
@@ -27,7 +27,7 @@
}
void CreateAndInitializeFormPDF() {
- EXPECT_TRUE(OpenDocument("text_form_multiple.pdf"));
+ ASSERT_TRUE(OpenDocument("text_form_multiple.pdf"));
m_page = LoadPage(0);
ASSERT_TRUE(m_page);
diff --git a/fxjs/cjs_publicmethods_embeddertest.cpp b/fxjs/cjs_publicmethods_embeddertest.cpp
index 4685209..174153a 100644
--- a/fxjs/cjs_publicmethods_embeddertest.cpp
+++ b/fxjs/cjs_publicmethods_embeddertest.cpp
@@ -182,7 +182,7 @@
v8::HandleScope handle_scope(isolate());
v8::Context::Scope context_scope(GetV8Context());
- EXPECT_TRUE(OpenDocument("calculate.pdf"));
+ ASSERT_TRUE(OpenDocument("calculate.pdf"));
auto* page = LoadPage(0);
ASSERT_TRUE(page);
@@ -218,7 +218,7 @@
v8::HandleScope handle_scope(isolate());
v8::Context::Scope context_scope(GetV8Context());
- EXPECT_TRUE(OpenDocument("calculate.pdf"));
+ ASSERT_TRUE(OpenDocument("calculate.pdf"));
auto* page = LoadPage(0);
ASSERT_TRUE(page);
diff --git a/xfa/fwl/cfwl_edit_embeddertest.cpp b/xfa/fwl/cfwl_edit_embeddertest.cpp
index 6936b38..e9a741f 100644
--- a/xfa/fwl/cfwl_edit_embeddertest.cpp
+++ b/xfa/fwl/cfwl_edit_embeddertest.cpp
@@ -23,7 +23,7 @@
}
void CreateAndInitializeFormPDF(const char* filename) {
- EXPECT_TRUE(OpenDocument(filename));
+ ASSERT_TRUE(OpenDocument(filename));
page_ = LoadPage(0);
ASSERT_TRUE(page_);
}
diff --git a/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
index 0ba54ef..a022c7d 100644
--- a/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
+++ b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
@@ -17,7 +17,7 @@
#endif
TEST_F(CXFALayoutItemEmbedderTest, Bug_1265) {
- EXPECT_TRUE(OpenDocument("bug_1265.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_1265.pdf"));
FPDF_PAGE page0 = LoadPage(0);
FPDF_PAGE page1 = LoadPage(1);
EXPECT_NE(nullptr, page0);
@@ -26,7 +26,7 @@
}
TEST_F(CXFALayoutItemEmbedderTest, MAYBE_Bug_1301) {
- EXPECT_TRUE(OpenDocument("bug_1301.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_1301.pdf"));
FPDF_PAGE page0 = LoadPage(0);
FPDF_PAGE page1 = LoadPage(1);
FPDF_PAGE page2 = LoadPage(2);
@@ -38,7 +38,7 @@
}
TEST_F(CXFALayoutItemEmbedderTest, Bug_306123) {
- EXPECT_TRUE(OpenDocument("bug_306123.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_306123.pdf"));
FPDF_PAGE page0 = LoadPage(0);
FPDF_PAGE page1 = LoadPage(1);
FPDF_PAGE page2 = LoadPage(2);
diff --git a/xfa/fxfa/parser/cxfa_document_parser_embeddertest.cpp b/xfa/fxfa/parser/cxfa_document_parser_embeddertest.cpp
index 129c8bc..ce0e4cc 100644
--- a/xfa/fxfa/parser/cxfa_document_parser_embeddertest.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser_embeddertest.cpp
@@ -8,14 +8,14 @@
class CXFASimpleParserEmbedderTest : public EmbedderTest {};
TEST_F(CXFASimpleParserEmbedderTest, Bug_216) {
- EXPECT_TRUE(OpenDocument("bug_216.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_216.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);
}
TEST_F(CXFASimpleParserEmbedderTest, Bug_709793) {
- EXPECT_TRUE(OpenDocument("bug_709793.pdf"));
+ ASSERT_TRUE(OpenDocument("bug_709793.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);