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

Side by Side Diff: fpdfsdk/fpdf_flatten_embeddertest.cpp

Issue 2489653003: Fix abort above FPDFPage_Flatten (Closed)
Patch Set: rebased 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
« no previous file with comments | « 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 UnloadPage(page);
24 }
25
26 TEST_F(FPDFFlattenEmbeddertest, FlatNormal) {
27 EXPECT_TRUE(OpenDocument("annotiter.pdf"));
28 FPDF_PAGE page = LoadPage(0);
29 EXPECT_TRUE(page);
30 EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_NORMALDISPLAY));
31 UnloadPage(page);
32 }
33
34 TEST_F(FPDFFlattenEmbeddertest, FlatPrint) {
35 EXPECT_TRUE(OpenDocument("annotiter.pdf"));
36 FPDF_PAGE page = LoadPage(0);
37 EXPECT_TRUE(page);
38 EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_PRINT));
39 UnloadPage(page);
40 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdf_flatten.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698