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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser_unittest.cpp

Issue 2386423004: Move core/fpdfapi/fpdf_page to core/fpdfapi/page (Closed)
Patch Set: Rebase to master Created 4 years, 2 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 unified diff | Download patch
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/fpdfapi/fpdf_page/pageint.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 TEST(fpdf_page_parser, PDF_FindKeyAbbreviation) {
9 EXPECT_EQ(CFX_ByteStringC("BitsPerComponent"),
10 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("BPC")));
11 EXPECT_EQ(CFX_ByteStringC("Width"),
12 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("W")));
13 EXPECT_EQ(CFX_ByteStringC(""),
14 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("")));
15 EXPECT_EQ(CFX_ByteStringC(""),
16 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("NoInList")));
17 // Prefix should not match.
18 EXPECT_EQ(CFX_ByteStringC(""),
19 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("WW")));
20 }
21
22 TEST(fpdf_page_parser, PDF_FindValueAbbreviation) {
23 EXPECT_EQ(CFX_ByteStringC("DeviceGray"),
24 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("G")));
25 EXPECT_EQ(CFX_ByteStringC("DCTDecode"),
26 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("DCT")));
27 EXPECT_EQ(CFX_ByteStringC(""),
28 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("")));
29 EXPECT_EQ(CFX_ByteStringC(""),
30 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("NoInList")));
31 // Prefix should not match.
32 EXPECT_EQ(CFX_ByteStringC(""),
33 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("II")));
34 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp ('k') | core/fpdfapi/fpdf_page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698