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

Side by Side Diff: extensions/common/matcher/regex_set_matcher_unittest.cc

Issue 18919005: Migrate from googleurl/ includes to url/ ones in the remaining top-level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make googleurl a temp include rule - to prevent others including it again Created 7 years, 5 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
« no previous file with comments | « extensions/common/event_filtering_info.h ('k') | extensions/common/matcher/url_matcher.cc » ('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 (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 "extensions/common/matcher/regex_set_matcher.h"
6
5 #include <set> 7 #include <set>
6 8
7 #include "base/stl_util.h" 9 #include "base/stl_util.h"
8 #include "extensions/common/matcher/regex_set_matcher.h" 10 #include "url/gurl.h"
9 #include "googleurl/src/gurl.h"
10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using extensions::StringPattern; 13 using extensions::StringPattern;
14 using extensions::RegexSetMatcher; 14 using extensions::RegexSetMatcher;
15 15
16 TEST(RegexSetMatcherTest, MatchRegexes) { 16 TEST(RegexSetMatcherTest, MatchRegexes) {
17 StringPattern pattern_1("ab.*c", 42); 17 StringPattern pattern_1("ab.*c", 42);
18 StringPattern pattern_2("f*f", 17); 18 StringPattern pattern_2("f*f", 17);
19 StringPattern pattern_3("c(ar|ra)b|brac", 239); 19 StringPattern pattern_3("c(ar|ra)b|brac", 239);
20 std::vector<const StringPattern*> regexes; 20 std::vector<const StringPattern*> regexes;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 std::set<StringPattern::ID> result1; 53 std::set<StringPattern::ID> result1;
54 matcher.Match("http://aaa.net/", &result1); 54 matcher.Match("http://aaa.net/", &result1);
55 EXPECT_EQ(0U, result1.size()); 55 EXPECT_EQ(0U, result1.size());
56 56
57 std::set<StringPattern::ID> result2; 57 std::set<StringPattern::ID> result2;
58 matcher.Match("http://aaa.net/quaaACK", &result2); 58 matcher.Match("http://aaa.net/quaaACK", &result2);
59 EXPECT_EQ(1U, result2.size()); 59 EXPECT_EQ(1U, result2.size());
60 EXPECT_TRUE(ContainsKey(result2, 57)); 60 EXPECT_TRUE(ContainsKey(result2, 57));
61 } 61 }
OLDNEW
« no previous file with comments | « extensions/common/event_filtering_info.h ('k') | extensions/common/matcher/url_matcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698