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 "chrome/common/content_settings_pattern.h" | 5 #include "components/content_settings/core/common/content_settings_pattern.h" |
6 #include "chrome/common/content_settings_pattern_parser.h" | 6 #include "components/content_settings/core/common/content_settings_pattern_parse
r.h" |
7 | 7 |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 typedef ContentSettingsPattern::BuilderInterface BuilderInterface; | 12 typedef ContentSettingsPattern::BuilderInterface BuilderInterface; |
13 } // namespace | 13 } // namespace |
14 | 14 |
15 class MockBuilder : public ContentSettingsPattern::BuilderInterface { | 15 class MockBuilder : public ContentSettingsPattern::BuilderInterface { |
16 public: | 16 public: |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 parts.path = "/foo/bar/test.html"; | 221 parts.path = "/foo/bar/test.html"; |
222 EXPECT_STREQ("file:///foo/bar/test.html", | 222 EXPECT_STREQ("file:///foo/bar/test.html", |
223 content_settings::PatternParser::ToString(parts).c_str()); | 223 content_settings::PatternParser::ToString(parts).c_str()); |
224 | 224 |
225 parts = ContentSettingsPattern::PatternParts(); | 225 parts = ContentSettingsPattern::PatternParts(); |
226 parts.scheme = "file"; | 226 parts.scheme = "file"; |
227 parts.path = ""; | 227 parts.path = ""; |
228 parts.is_path_wildcard = true; | 228 parts.is_path_wildcard = true; |
229 EXPECT_EQ("file:///*", content_settings::PatternParser::ToString(parts)); | 229 EXPECT_EQ("file:///*", content_settings::PatternParser::ToString(parts)); |
230 } | 230 } |
OLD | NEW |