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/browser/browsing_data/browsing_data_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" | 8 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
11 #include "extensions/common/constants.h" | 11 #include "extensions/common/constants.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 const char kTestOrigin1[] = "http://host1:1/"; | 18 const char kTestOrigin1[] = "http://host1:1/"; |
19 const char kTestOrigin2[] = "http://host2:1/"; | 19 const char kTestOrigin2[] = "http://host2:1/"; |
20 const char kTestOrigin3[] = "http://host3:1/"; | 20 const char kTestOrigin3[] = "http://host3:1/"; |
21 const char kTestOriginExt[] = "chrome-extension://abcdefghijklmnopqrstuvwxyz/"; | 21 const char kTestOriginExt[] = "chrome-extension://abcdefghijklmnopqrstuvwxyz/"; |
22 const char kTestOriginDevTools[] = "chrome-devtools://abcdefghijklmnopqrstuvw/"; | 22 const char kTestOriginDevTools[] = "chrome-devtools://abcdefghijklmnopqrstuvw/"; |
23 | 23 |
24 const GURL kOrigin1(kTestOrigin1); | 24 const GURL kOrigin1(kTestOrigin1); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 mock_policy)); | 151 mock_policy)); |
152 EXPECT_TRUE(Match(kOrigin2, kUnprotected | kProtected | kExtension, | 152 EXPECT_TRUE(Match(kOrigin2, kUnprotected | kProtected | kExtension, |
153 mock_policy)); | 153 mock_policy)); |
154 EXPECT_TRUE(Match(kOriginExt, kUnprotected | kProtected | kExtension, | 154 EXPECT_TRUE(Match(kOriginExt, kUnprotected | kProtected | kExtension, |
155 mock_policy)); | 155 mock_policy)); |
156 EXPECT_FALSE(Match(kOriginDevTools, kUnprotected | kProtected | kExtension, | 156 EXPECT_FALSE(Match(kOriginDevTools, kUnprotected | kProtected | kExtension, |
157 mock_policy)); | 157 mock_policy)); |
158 } | 158 } |
159 | 159 |
160 } // namespace | 160 } // namespace |
OLD | NEW |