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

Unified Diff: core/fxcodec/codec/fx_codec_embeddertest.cpp

Issue 2205573004: Fix Jbig2 document context creation by checking proper pointer (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/fx_codec_embeddertest.cpp
diff --git a/core/fxge/ge/fx_ge_text_embeddertest.cpp b/core/fxcodec/codec/fx_codec_embeddertest.cpp
similarity index 63%
copy from core/fxge/ge/fx_ge_text_embeddertest.cpp
copy to core/fxcodec/codec/fx_codec_embeddertest.cpp
index 045b6dc8690cbcfe36c0a4d98b9259a2d96c0113..441494c0e6c4449b9df4bd0675e11058ad060219 100644
--- a/core/fxge/ge/fx_ge_text_embeddertest.cpp
+++ b/core/fxcodec/codec/fx_codec_embeddertest.cpp
@@ -5,11 +5,12 @@
#include "testing/embedder_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-class FXGETextEmbedderTest : public EmbedderTest {};
+class FXCodecEmbeddertest : public EmbedderTest {};
-TEST_F(FXGETextEmbedderTest, BadItalic) {
- // Shouldn't crash.
- EXPECT_TRUE(OpenDocument("bug_601362.pdf"));
+TEST_F(FXCodecEmbeddertest, Bug_631912) {
+ // Test jbig2 image in PDF file can be loaded successfully.
+ // Should not crash.
+ EXPECT_TRUE(OpenDocument("bug_631912.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
FPDF_BITMAP bitmap = RenderPage(page);
« no previous file with comments | « BUILD.gn ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698