• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 "public/cpp/fpdf_scopers.h"
6 #include "testing/embedder_test.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8 
9 class JBig2EmbedderTest : public EmbedderTest {};
10 
11 #if defined(PDF_USE_SKIA)
12 // TODO(crbug.com/pdfium/11): Fix this test and enable.
13 #define MAYBE_Bug631912 DISABLED_Bug631912
14 #else
15 #define MAYBE_Bug631912 Bug631912
16 #endif
TEST_F(JBig2EmbedderTest,MAYBE_Bug631912)17 TEST_F(JBig2EmbedderTest, MAYBE_Bug631912) {
18   // Test jbig2 image in PDF file can be loaded successfully.
19   // Should not crash.
20   ASSERT_TRUE(OpenDocument("bug_631912.pdf"));
21   ScopedEmbedderTestPage page = LoadScopedPage(0);
22   ASSERT_TRUE(page);
23   ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get());
24   CompareBitmap(bitmap.get(), 691, 432, "726c2b8c89df0ab40627322d1dddd521");
25 }
26