OLD | NEW |
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 <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
5 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
6 #include "extensions/common/url_pattern.h" | 9 #include "extensions/common/url_pattern.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "url/gurl.h" | 11 #include "url/gurl.h" |
9 | 12 |
10 namespace { | 13 namespace { |
11 | 14 |
12 // See url_pattern.h for examples of valid and invalid patterns. | 15 // See url_pattern.h for examples of valid and invalid patterns. |
13 | 16 |
14 static const int kAllSchemes = | 17 static const int kAllSchemes = |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 EXPECT_TRUE(URLPattern(URLPattern::SCHEME_HTTPS, "https://www.google.com/") | 841 EXPECT_TRUE(URLPattern(URLPattern::SCHEME_HTTPS, "https://www.google.com/") |
839 .MatchesSingleOrigin()); | 842 .MatchesSingleOrigin()); |
840 EXPECT_FALSE(URLPattern(URLPattern::SCHEME_HTTP, | 843 EXPECT_FALSE(URLPattern(URLPattern::SCHEME_HTTP, |
841 "http://*.google.com/foo/bar").MatchesSingleOrigin()); | 844 "http://*.google.com/foo/bar").MatchesSingleOrigin()); |
842 EXPECT_TRUE( | 845 EXPECT_TRUE( |
843 URLPattern(URLPattern::SCHEME_HTTP, "http://www.google.com/foo/bar") | 846 URLPattern(URLPattern::SCHEME_HTTP, "http://www.google.com/foo/bar") |
844 .MatchesSingleOrigin()); | 847 .MatchesSingleOrigin()); |
845 } | 848 } |
846 | 849 |
847 } // namespace | 850 } // namespace |
OLD | NEW |