1 // Copyright 2016 PDFium Authors. All rights reserved. 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 <memory> 6 7 #include "public/cpp/fpdf_scopers.h" 8 #include "testing/embedder_test.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 class FXGETextEmbedderTest : public EmbedderTest {}; 12 TEST_F(FXGETextEmbedderTest,BadItalic)13TEST_F(FXGETextEmbedderTest, BadItalic) { 14 // Shouldn't crash. 15 EXPECT_TRUE(OpenDocument("bug_601362.pdf")); 16 FPDF_PAGE page = LoadPage(0); 17 ASSERT_TRUE(page); 18 ScopedFPDFBitmap bitmap = RenderLoadedPage(page); 19 EXPECT_EQ(612, FPDFBitmap_GetWidth(bitmap.get())); 20 EXPECT_EQ(792, FPDFBitmap_GetHeight(bitmap.get())); 21 UnloadPage(page); 22 } 23