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

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

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 | « extensions/common/url_pattern_set_unittest.cc ('k') | extensions/common/value_builder.h » ('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/url_pattern.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 8
9 #include <memory>
10
7 #include "base/macros.h" 11 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "extensions/common/url_pattern.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 #include "url/gurl.h" 13 #include "url/gurl.h"
12 14
13 namespace { 15 namespace {
14 16
15 // See url_pattern.h for examples of valid and invalid patterns. 17 // See url_pattern.h for examples of valid and invalid patterns.
16 18
17 static const int kAllSchemes = 19 static const int kAllSchemes =
18 URLPattern::SCHEME_HTTP | 20 URLPattern::SCHEME_HTTP |
19 URLPattern::SCHEME_HTTPS | 21 URLPattern::SCHEME_HTTPS |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 EXPECT_TRUE(URLPattern(URLPattern::SCHEME_HTTPS, "https://www.google.com/") 843 EXPECT_TRUE(URLPattern(URLPattern::SCHEME_HTTPS, "https://www.google.com/")
842 .MatchesSingleOrigin()); 844 .MatchesSingleOrigin());
843 EXPECT_FALSE(URLPattern(URLPattern::SCHEME_HTTP, 845 EXPECT_FALSE(URLPattern(URLPattern::SCHEME_HTTP,
844 "http://*.google.com/foo/bar").MatchesSingleOrigin()); 846 "http://*.google.com/foo/bar").MatchesSingleOrigin());
845 EXPECT_TRUE( 847 EXPECT_TRUE(
846 URLPattern(URLPattern::SCHEME_HTTP, "http://www.google.com/foo/bar") 848 URLPattern(URLPattern::SCHEME_HTTP, "http://www.google.com/foo/bar")
847 .MatchesSingleOrigin()); 849 .MatchesSingleOrigin());
848 } 850 }
849 851
850 } // namespace 852 } // namespace
OLDNEW
« no previous file with comments | « extensions/common/url_pattern_set_unittest.cc ('k') | extensions/common/value_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698