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

Side by Side Diff: extensions/common/url_pattern_set_unittest.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 years, 1 month 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/url_pattern_set.cc ('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
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/common/extensions/extension.h" 5 #include "extensions/common/url_pattern_set.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace extensions {
12
11 namespace { 13 namespace {
12 14
13 void AddPattern(URLPatternSet* set, const std::string& pattern) { 15 void AddPattern(URLPatternSet* set, const std::string& pattern) {
14 int schemes = URLPattern::SCHEME_ALL; 16 int schemes = URLPattern::SCHEME_ALL;
15 set->AddPattern(URLPattern(schemes, pattern)); 17 set->AddPattern(URLPattern(schemes, pattern));
16 } 18 }
17 19
18 URLPatternSet Patterns(const std::string& pattern) { 20 URLPatternSet Patterns(const std::string& pattern) {
19 URLPatternSet set; 21 URLPatternSet set;
20 AddPattern(&set, pattern); 22 AddPattern(&set, pattern);
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 AddPattern(&expected, google_c); 385 AddPattern(&expected, google_c);
384 AddPattern(&expected, yahoo_a); 386 AddPattern(&expected, yahoo_a);
385 AddPattern(&expected, yahoo_b); 387 AddPattern(&expected, yahoo_b);
386 AddPattern(&expected, yahoo_c); 388 AddPattern(&expected, yahoo_c);
387 AddPattern(&expected, reddit_a); 389 AddPattern(&expected, reddit_a);
388 AddPattern(&expected, reddit_b); 390 AddPattern(&expected, reddit_b);
389 AddPattern(&expected, reddit_c); 391 AddPattern(&expected, reddit_c);
390 EXPECT_EQ(expected, result); 392 EXPECT_EQ(expected, result);
391 } 393 }
392 } 394 }
395
396 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/url_pattern_set.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698