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

Side by Side Diff: fpdfsdk/fpdf_flatten_embeddertest.cpp

Issue 2489653003: Fix abort above FPDFPage_Flatten (Closed)
Patch Set: Fix issue Created 4 years, 1 month 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 unified diff | Download patch
« fpdfsdk/fpdf_flatten.cpp ('K') | « fpdfsdk/fpdf_flatten.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 "core/fxcrt/fx_basic.h"
6 #include "public/fpdf_flatten.h"
7 #include "public/fpdfview.h"
8 #include "testing/embedder_test.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/test_support.h"
11
12 namespace {
13
14 class FPDFFlattenEmbeddertest : public EmbedderTest {};
15
16 } // namespace
17
18 TEST_F(FPDFFlattenEmbeddertest, FlatNothing) {
19 EXPECT_TRUE(OpenDocument("hello_world.pdf"));
20 FPDF_PAGE page = LoadPage(0);
21 EXPECT_TRUE(page);
22 EXPECT_EQ(FLATTEN_NOTHINGTODO, FPDFPage_Flatten(page, FLAT_NORMALDISPLAY));
23 }
24
25 TEST_F(FPDFFlattenEmbeddertest, FlatNormal) {
26 EXPECT_TRUE(OpenDocument("annotiter.pdf"));
27 FPDF_PAGE page = LoadPage(0);
28 EXPECT_TRUE(page);
29 EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_NORMALDISPLAY));
30 }
31
32 TEST_F(FPDFFlattenEmbeddertest, FlatPrint) {
33 EXPECT_TRUE(OpenDocument("annotiter.pdf"));
34 FPDF_PAGE page = LoadPage(0);
35 EXPECT_TRUE(page);
36 EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_PRINT));
37 }
OLDNEW
« fpdfsdk/fpdf_flatten.cpp ('K') | « fpdfsdk/fpdf_flatten.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698