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

Unified Diff: components/autofill/browser/autofill_regexes_unittest.cc

Issue 17392006: In components/autofill, move browser/ to core/browser/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix conflicts Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/browser/autofill_regexes.cc ('k') | components/autofill/browser/autofill_scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/autofill_regexes_unittest.cc
diff --git a/components/autofill/browser/autofill_regexes_unittest.cc b/components/autofill/browser/autofill_regexes_unittest.cc
deleted file mode 100644
index cac969111aedc8570a330c6bc9328e7286fd47a4..0000000000000000000000000000000000000000
--- a/components/autofill/browser/autofill_regexes_unittest.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/autofill/browser/autofill_regexes.h"
-
-#include "base/strings/string16.h"
-#include "base/strings/utf_string_conversions.h"
-#include "components/autofill/browser/autofill_regex_constants.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace autofill {
-
-TEST(AutofillRegexesTest, AutofillRegexes) {
- struct TestCase {
- const char* const input;
- const char* const pattern;
- };
-
- const TestCase kPositiveCases[] = {
- // Empty pattern
- {"", ""},
- {"Look, ma' -- a non-empty string!", ""},
- // Substring
- {"string", "tri"},
- // Substring at beginning
- {"string", "str"},
- {"string", "^str"},
- // Substring at end
- {"string", "ring"},
- {"string", "ring$"},
- // Case-insensitive
- {"StRiNg", "string"},
- };
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPositiveCases); ++i) {
- const TestCase& test_case = kPositiveCases[i];
- SCOPED_TRACE(test_case.input);
- SCOPED_TRACE(test_case.pattern);
- EXPECT_TRUE(autofill::MatchesPattern(ASCIIToUTF16(test_case.input),
- ASCIIToUTF16(test_case.pattern)));
- }
-
- const TestCase kNegativeCases[] = {
- // Empty string
- {"", "Look, ma' -- a non-empty pattern!"},
- // Substring
- {"string", "trn"},
- // Substring at beginning
- {"string", " str"},
- {"string", "^tri"},
- // Substring at end
- {"string", "ring "},
- {"string", "rin$"},
- };
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNegativeCases); ++i) {
- const TestCase& test_case = kNegativeCases[i];
- SCOPED_TRACE(test_case.input);
- SCOPED_TRACE(test_case.pattern);
- EXPECT_FALSE(autofill::MatchesPattern(ASCIIToUTF16(test_case.input),
- ASCIIToUTF16(test_case.pattern)));
- }
-}
-
-} // namespace autofill
« 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