| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
| 6 #include "chrome/common/extensions/url_pattern.h" | 6 #include "chrome/common/extensions/url_pattern.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "googleurl/src/gurl.h" |
| 8 | 9 |
| 9 // See url_pattern.h for examples of valid and invalid patterns. | 10 // See url_pattern.h for examples of valid and invalid patterns. |
| 10 | 11 |
| 11 static const int kAllSchemes = | 12 static const int kAllSchemes = |
| 12 URLPattern::SCHEME_HTTP | | 13 URLPattern::SCHEME_HTTP | |
| 13 URLPattern::SCHEME_HTTPS | | 14 URLPattern::SCHEME_HTTPS | |
| 14 URLPattern::SCHEME_FILE | | 15 URLPattern::SCHEME_FILE | |
| 15 URLPattern::SCHEME_FTP | | 16 URLPattern::SCHEME_FTP | |
| 16 URLPattern::SCHEME_CHROMEUI; | 17 URLPattern::SCHEME_CHROMEUI; |
| 17 | 18 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 EXPECT_EQ("https://*/*", all_urls[1].GetAsString()); | 244 EXPECT_EQ("https://*/*", all_urls[1].GetAsString()); |
| 244 EXPECT_EQ("file:///*", all_urls[2].GetAsString()); | 245 EXPECT_EQ("file:///*", all_urls[2].GetAsString()); |
| 245 EXPECT_EQ("ftp://*/*", all_urls[3].GetAsString()); | 246 EXPECT_EQ("ftp://*/*", all_urls[3].GetAsString()); |
| 246 EXPECT_EQ("chrome://*/*", all_urls[4].GetAsString()); | 247 EXPECT_EQ("chrome://*/*", all_urls[4].GetAsString()); |
| 247 | 248 |
| 248 EXPECT_EQ("http://google.com/foo", all_schemes[0].GetAsString()); | 249 EXPECT_EQ("http://google.com/foo", all_schemes[0].GetAsString()); |
| 249 EXPECT_EQ("https://google.com/foo", all_schemes[1].GetAsString()); | 250 EXPECT_EQ("https://google.com/foo", all_schemes[1].GetAsString()); |
| 250 | 251 |
| 251 EXPECT_EQ("http://google.com/monkey", monkey[0].GetAsString()); | 252 EXPECT_EQ("http://google.com/monkey", monkey[0].GetAsString()); |
| 252 } | 253 } |
| OLD | NEW |