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

Side by Side Diff: components/autofill/browser/autofill_regexes_unittest.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 "chrome/browser/autofill/autofill_regexes.h" 5 #include "components/autofill/browser/autofill_regexes.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autofill/autofill_regex_constants.h" 9 #include "components/autofill/browser/autofill_regex_constants.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 TEST(AutofillRegexesTest, AutofillRegexes) { 12 TEST(AutofillRegexesTest, AutofillRegexes) {
13 struct TestCase { 13 struct TestCase {
14 const char* const input; 14 const char* const input;
15 const char* const pattern; 15 const char* const pattern;
16 }; 16 };
17 17
18 const TestCase kPositiveCases[] = { 18 const TestCase kPositiveCases[] = {
19 // Empty pattern 19 // Empty pattern
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 {"string", "rin$"}, 51 {"string", "rin$"},
52 }; 52 };
53 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNegativeCases); ++i) { 53 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNegativeCases); ++i) {
54 const TestCase& test_case = kNegativeCases[i]; 54 const TestCase& test_case = kNegativeCases[i];
55 SCOPED_TRACE(test_case.input); 55 SCOPED_TRACE(test_case.input);
56 SCOPED_TRACE(test_case.pattern); 56 SCOPED_TRACE(test_case.pattern);
57 EXPECT_FALSE(autofill::MatchesPattern(ASCIIToUTF16(test_case.input), 57 EXPECT_FALSE(autofill::MatchesPattern(ASCIIToUTF16(test_case.input),
58 ASCIIToUTF16(test_case.pattern))); 58 ASCIIToUTF16(test_case.pattern)));
59 } 59 }
60 } 60 }
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_regexes.cc ('k') | components/autofill/browser/autofill_scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698