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

Side by Side Diff: xfa/fxfa/app/xfa_textlayout_unittest.cpp

Issue 1996623002: Remove CFX_DSPATemplate usage in CXFA_TextParser (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 | « xfa/fxfa/app/xfa_textlayout.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 "xfa/fxfa/app/xfa_textlayout.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 class CXFA_TestTextParser : public CXFA_TextParser {
10 public:
11 CXFA_TestTextParser() : CXFA_TextParser() {}
12
13 private:
14 // Add test cases as friends to access protected member functions.
15 FRIEND_TEST(CXFA_TextParser, TagValidate);
16 };
17
18 TEST(CXFA_TextParser, TagValidate) {
19 CXFA_TestTextParser parser;
20 EXPECT_TRUE(parser.TagValidate(L"br"));
21 EXPECT_TRUE(parser.TagValidate(L"Br"));
22 EXPECT_TRUE(parser.TagValidate(L"BR"));
23 EXPECT_TRUE(parser.TagValidate(L"a"));
24 EXPECT_TRUE(parser.TagValidate(L"b"));
25 EXPECT_TRUE(parser.TagValidate(L"i"));
26 EXPECT_TRUE(parser.TagValidate(L"p"));
27 EXPECT_TRUE(parser.TagValidate(L"li"));
28 EXPECT_TRUE(parser.TagValidate(L"ol"));
29 EXPECT_TRUE(parser.TagValidate(L"ul"));
30 EXPECT_TRUE(parser.TagValidate(L"sub"));
31 EXPECT_TRUE(parser.TagValidate(L"sup"));
32 EXPECT_TRUE(parser.TagValidate(L"span"));
33 EXPECT_TRUE(parser.TagValidate(L"body"));
34 EXPECT_TRUE(parser.TagValidate(L"html"));
35
36 EXPECT_FALSE(parser.TagValidate(L""));
37 EXPECT_FALSE(parser.TagValidate(L"tml"));
38 EXPECT_FALSE(parser.TagValidate(L"xhtml"));
39 EXPECT_FALSE(parser.TagValidate(L"htmlx"));
40 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698