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

Side by Side Diff: core/fpdfapi/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
« no previous file with comments | « core/fpdfapi/page/fpdf_page_parser_old_unittest.cpp ('k') | core/fpdfapi/page/pageint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/fpdfapi/fpdf_page/pageint.h" 5 #include "core/fpdfapi/page/pageint.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 TEST(fpdf_page_parser, PDF_FindKeyAbbreviation) { 8 TEST(fpdf_page_parser, PDF_FindKeyAbbreviation) {
9 EXPECT_EQ(CFX_ByteStringC("BitsPerComponent"), 9 EXPECT_EQ(CFX_ByteStringC("BitsPerComponent"),
10 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("BPC"))); 10 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("BPC")));
11 EXPECT_EQ(CFX_ByteStringC("Width"), 11 EXPECT_EQ(CFX_ByteStringC("Width"),
12 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("W"))); 12 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("W")));
13 EXPECT_EQ(CFX_ByteStringC(""), 13 EXPECT_EQ(CFX_ByteStringC(""),
14 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC(""))); 14 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("")));
15 EXPECT_EQ(CFX_ByteStringC(""), 15 EXPECT_EQ(CFX_ByteStringC(""),
16 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("NoInList"))); 16 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("NoInList")));
17 // Prefix should not match. 17 // Prefix should not match.
18 EXPECT_EQ(CFX_ByteStringC(""), 18 EXPECT_EQ(CFX_ByteStringC(""),
19 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("WW"))); 19 PDF_FindKeyAbbreviationForTesting(CFX_ByteStringC("WW")));
20 } 20 }
21 21
22 TEST(fpdf_page_parser, PDF_FindValueAbbreviation) { 22 TEST(fpdf_page_parser, PDF_FindValueAbbreviation) {
23 EXPECT_EQ(CFX_ByteStringC("DeviceGray"), 23 EXPECT_EQ(CFX_ByteStringC("DeviceGray"),
24 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("G"))); 24 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("G")));
25 EXPECT_EQ(CFX_ByteStringC("DCTDecode"), 25 EXPECT_EQ(CFX_ByteStringC("DCTDecode"),
26 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("DCT"))); 26 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("DCT")));
27 EXPECT_EQ(CFX_ByteStringC(""), 27 EXPECT_EQ(CFX_ByteStringC(""),
28 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC(""))); 28 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("")));
29 EXPECT_EQ(CFX_ByteStringC(""), 29 EXPECT_EQ(CFX_ByteStringC(""),
30 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("NoInList"))); 30 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("NoInList")));
31 // Prefix should not match. 31 // Prefix should not match.
32 EXPECT_EQ(CFX_ByteStringC(""), 32 EXPECT_EQ(CFX_ByteStringC(""),
33 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("II"))); 33 PDF_FindValueAbbreviationForTesting(CFX_ByteStringC("II")));
34 } 34 }
OLDNEW
« no previous file with comments | « core/fpdfapi/page/fpdf_page_parser_old_unittest.cpp ('k') | core/fpdfapi/page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698