OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/frame/csp/SourceListDirective.h" | 5 #include "core/frame/csp/SourceListDirective.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/frame/csp/CSPSource.h" | 8 #include "core/frame/csp/CSPSource.h" |
9 #include "core/frame/csp/ContentSecurityPolicy.h" | 9 #include "core/frame/csp/ContentSecurityPolicy.h" |
10 #include "platform/network/ResourceRequest.h" | 10 #include "platform/network/ResourceRequest.h" |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 {"*", {""}, true}, | 1233 {"*", {""}, true}, |
1234 {"*", {"'none'"}, true}, | 1234 {"*", {"'none'"}, true}, |
1235 {"*", {"*"}, true}, | 1235 {"*", {"*"}, true}, |
1236 {"*", {"*", "*", "*"}, true}, | 1236 {"*", {"*", "*", "*"}, true}, |
1237 {"*", {"*", "* https: http: ftp: ws: wss:"}, true}, | 1237 {"*", {"*", "* https: http: ftp: ws: wss:"}, true}, |
1238 {"*", {"*", "https: http: ftp: ws: wss:"}, true}, | 1238 {"*", {"*", "https: http: ftp: ws: wss:"}, true}, |
1239 {"https: http: ftp: ws: wss:", {"*", "https: http: ftp: ws: wss:"}, true}, | 1239 {"https: http: ftp: ws: wss:", {"*", "https: http: ftp: ws: wss:"}, true}, |
1240 {"http: ftp: ws:", {"*", "https: http: ftp: ws: wss:"}, true}, | 1240 {"http: ftp: ws:", {"*", "https: http: ftp: ws: wss:"}, true}, |
1241 {"http: ftp: ws:", {"*", "https: 'strict-dynamic'"}, true}, | 1241 {"http: ftp: ws:", {"*", "https: 'strict-dynamic'"}, true}, |
1242 {"http://another.test", {"*", "'self'"}, true}, | 1242 {"http://another.test", {"*", "'self'"}, true}, |
1243 // TODO(amalika): Fix the test below that should have the same behavior as | 1243 {"http://another.test/", {"*", "'self'"}, true}, |
1244 // the test above. | |
1245 // {"http://another.test/", {"*", "'self'"}, true}, | |
1246 {"http://another.test", {"https:", "'self'"}, true}, | 1244 {"http://another.test", {"https:", "'self'"}, true}, |
1247 {"'self'", {"*", "'self'"}, true}, | 1245 {"'self'", {"*", "'self'"}, true}, |
1248 {"'unsafe-eval' * ", {"'unsafe-eval'"}, true}, | 1246 {"'unsafe-eval' * ", {"'unsafe-eval'"}, true}, |
1249 {"'unsafe-hashed-attributes' * ", {"'unsafe-hashed-attributes'"}, true}, | 1247 {"'unsafe-hashed-attributes' * ", {"'unsafe-hashed-attributes'"}, true}, |
1250 {"'unsafe-inline' * ", {"'unsafe-inline'"}, true}, | 1248 {"'unsafe-inline' * ", {"'unsafe-inline'"}, true}, |
1251 {"*", {"*", "http://a.com ws://b.com ftp://c.com"}, true}, | 1249 {"*", {"*", "http://a.com ws://b.com ftp://c.com"}, true}, |
1252 {"*", {"* data: blob:", "http://a.com ws://b.com ftp://c.com"}, true}, | 1250 {"*", {"* data: blob:", "http://a.com ws://b.com ftp://c.com"}, true}, |
1253 {"*", {"data: blob:", "http://a.com ws://b.com ftp://c.com"}, true}, | 1251 {"*", {"data: blob:", "http://a.com ws://b.com ftp://c.com"}, true}, |
1254 {"*", {"*", "data://a.com ws://b.com ftp://c.com"}, true}, | 1252 {"*", {"*", "data://a.com ws://b.com ftp://c.com"}, true}, |
1255 {"* data:", | 1253 {"* data:", |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 expected[i]->m_hostWildcard, expected[i]->m_portWildcard}; | 1326 expected[i]->m_hostWildcard, expected[i]->m_portWildcard}; |
1329 Source b = {normalized[i]->m_scheme, normalized[i]->m_host, | 1327 Source b = {normalized[i]->m_scheme, normalized[i]->m_host, |
1330 normalized[i]->m_port, normalized[i]->m_path, | 1328 normalized[i]->m_port, normalized[i]->m_path, |
1331 normalized[i]->m_hostWildcard, normalized[i]->m_portWildcard}; | 1329 normalized[i]->m_hostWildcard, normalized[i]->m_portWildcard}; |
1332 EXPECT_TRUE(equalSources(a, b)); | 1330 EXPECT_TRUE(equalSources(a, b)); |
1333 } | 1331 } |
1334 } | 1332 } |
1335 } | 1333 } |
1336 | 1334 |
1337 } // namespace blink | 1335 } // namespace blink |
OLD | NEW |