| 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/html/parser/HTMLPreloadScanner.h" | 5 #include "core/html/parser/HTMLPreloadScanner.h" |
| 6 | 6 |
| 7 #include "core/MediaTypeNames.h" | 7 #include "core/MediaTypeNames.h" |
| 8 #include "core/css/MediaValuesCached.h" | 8 #include "core/css/MediaValuesCached.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/html/CrossOriginAttribute.h" | 10 #include "core/html/CrossOriginAttribute.h" |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 "<link rel=preload href=bla as=image type='image/bla'>", nullptr, | 743 "<link rel=preload href=bla as=image type='image/bla'>", nullptr, |
| 744 "http://example.test/", Resource::Image, 0}, | 744 "http://example.test/", Resource::Image, 0}, |
| 745 {"http://example.test", "<link rel=preload href=bla as=font>", "bla", | 745 {"http://example.test", "<link rel=preload href=bla as=font>", "bla", |
| 746 "http://example.test/", Resource::Font, 0}, | 746 "http://example.test/", Resource::Font, 0}, |
| 747 {"http://example.test", | 747 {"http://example.test", |
| 748 "<link rel=preload href=bla as=font type='font/woff2'>", "bla", | 748 "<link rel=preload href=bla as=font type='font/woff2'>", "bla", |
| 749 "http://example.test/", Resource::Font, 0}, | 749 "http://example.test/", Resource::Font, 0}, |
| 750 {"http://example.test", | 750 {"http://example.test", |
| 751 "<link rel=preload href=bla as=font type='font/bla'>", nullptr, | 751 "<link rel=preload href=bla as=font type='font/bla'>", nullptr, |
| 752 "http://example.test/", Resource::Font, 0}, | 752 "http://example.test/", Resource::Font, 0}, |
| 753 {"http://example.test", "<link rel=preload href=bla as=media>", "bla", | 753 {"http://example.test", "<link rel=preload href=bla as=video>", "bla", |
| 754 "http://example.test/", Resource::Media, 0}, | 754 "http://example.test/", Resource::Media, 0}, |
| 755 {"http://example.test", "<link rel=preload href=bla as=track>", "bla", | 755 {"http://example.test", "<link rel=preload href=bla as=track>", "bla", |
| 756 "http://example.test/", Resource::TextTrack, 0}, | 756 "http://example.test/", Resource::TextTrack, 0}, |
| 757 {"http://example.test", | 757 {"http://example.test", |
| 758 "<link rel=preload href=bla as=image media=\"(max-width: 800px)\">", | 758 "<link rel=preload href=bla as=image media=\"(max-width: 800px)\">", |
| 759 "bla", "http://example.test/", Resource::Image, 0}, | 759 "bla", "http://example.test/", Resource::Image, 0}, |
| 760 {"http://example.test", | 760 {"http://example.test", |
| 761 "<link rel=preload href=bla as=image media=\"(max-width: 400px)\">", | 761 "<link rel=preload href=bla as=image media=\"(max-width: 400px)\">", |
| 762 nullptr, "http://example.test/", Resource::Image, 0}, | 762 nullptr, "http://example.test/", Resource::Image, 0}, |
| 763 }; | 763 }; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 "http://example.test/", Resource::Script, 0}, | 836 "http://example.test/", Resource::Script, 0}, |
| 837 {"http://example.test", "<link rel=preload href=bla as=fOnT>", "bla", | 837 {"http://example.test", "<link rel=preload href=bla as=fOnT>", "bla", |
| 838 "http://example.test/", Resource::Font, 0}, | 838 "http://example.test/", Resource::Font, 0}, |
| 839 }; | 839 }; |
| 840 | 840 |
| 841 for (const auto& testCase : testCases) | 841 for (const auto& testCase : testCases) |
| 842 test(testCase); | 842 test(testCase); |
| 843 } | 843 } |
| 844 | 844 |
| 845 } // namespace blink | 845 } // namespace blink |
| OLD | NEW |