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 "config.h" | 5 #include "config.h" |
6 #include "core/html/parser/HTMLPreloadScanner.h" | 6 #include "core/html/parser/HTMLPreloadScanner.h" |
7 | 7 |
8 #include "core/MediaTypeNames.h" | 8 #include "core/MediaTypeNames.h" |
9 #include "core/css/MediaValuesCached.h" | 9 #include "core/css/MediaValuesCached.h" |
10 #include "core/fetch/ClientHintsPreferences.h" | 10 #include "core/fetch/ClientHintsPreferences.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void preconnectRequestVerification(const String& host, CrossOriginAttributeV
alue crossOrigin) | 55 void preconnectRequestVerification(const String& host, CrossOriginAttributeV
alue crossOrigin) |
56 { | 56 { |
57 if (!host.isNull()) { | 57 if (!host.isNull()) { |
58 EXPECT_TRUE(m_preloadRequest->isPreconnect()); | 58 EXPECT_TRUE(m_preloadRequest->isPreconnect()); |
59 EXPECT_STREQ(m_preloadRequest->resourceURL().ascii().data(), host.as
cii().data()); | 59 EXPECT_STREQ(m_preloadRequest->resourceURL().ascii().data(), host.as
cii().data()); |
60 EXPECT_EQ(m_preloadRequest->isCORS(), crossOrigin != CrossOriginAttr
ibuteNotSet); | 60 EXPECT_EQ(m_preloadRequest->isCORS(), crossOrigin != CrossOriginAttr
ibuteNotSet); |
61 EXPECT_EQ(m_preloadRequest->isAllowCredentials(), crossOrigin == Cro
ssOriginAttributeUseCredentials); | 61 EXPECT_EQ(m_preloadRequest->isAllowCredentials(), crossOrigin == Cro
ssOriginAttributeUseCredentials); |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
| 65 void preloadReferrerPolicy(const String& policy) override |
| 66 { |
| 67 return; |
| 68 } |
| 69 |
65 protected: | 70 protected: |
66 void preload(PassOwnPtr<PreloadRequest> preloadRequest) override | 71 void preload(PassOwnPtr<PreloadRequest> preloadRequest) override |
67 { | 72 { |
68 m_preloadRequest = preloadRequest; | 73 m_preloadRequest = preloadRequest; |
69 } | 74 } |
70 | 75 |
71 private: | 76 private: |
72 OwnPtr<PreloadRequest> m_preloadRequest; | 77 OwnPtr<PreloadRequest> m_preloadRequest; |
73 }; | 78 }; |
74 | 79 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 {"http://example.test", "<picture><source sizes='50vw' srcset='srcset_bl
a.gif'><img sizes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://exa
mple.test/", Resource::Image, 250}, | 296 {"http://example.test", "<picture><source sizes='50vw' srcset='srcset_bl
a.gif'><img sizes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://exa
mple.test/", Resource::Image, 250}, |
292 {"http://example.test", "<picture><source srcset='srcset_bla.gif' sizes=
'50vw'><img sizes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://exa
mple.test/", Resource::Image, 250}, | 297 {"http://example.test", "<picture><source srcset='srcset_bla.gif' sizes=
'50vw'><img sizes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://exa
mple.test/", Resource::Image, 250}, |
293 {"http://example.test", "<picture><source srcset='srcset_bla.gif'><img s
izes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://example.test/",
Resource::Image, 0}, | 298 {"http://example.test", "<picture><source srcset='srcset_bla.gif'><img s
izes='50w' src='bla.gif'></picture>", "srcset_bla.gif", "http://example.test/",
Resource::Image, 0}, |
294 }; | 299 }; |
295 | 300 |
296 for (const auto& testCase : testCases) | 301 for (const auto& testCase : testCases) |
297 test(testCase); | 302 test(testCase); |
298 } | 303 } |
299 | 304 |
300 } // namespace blink | 305 } // namespace blink |
OLD | NEW |