| 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/fetch/ClientHintsPreferences.h" | 9 #include "core/fetch/ClientHintsPreferences.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 "http://example.test/", Resource::Script, 0}, | 796 "http://example.test/", Resource::Script, 0}, |
| 797 {"http://example.test", | 797 {"http://example.test", |
| 798 "<script language='python' src='test.js'></script>", nullptr, | 798 "<script language='python' src='test.js'></script>", nullptr, |
| 799 "http://example.test/", Resource::Script, 0}, | 799 "http://example.test/", Resource::Script, 0}, |
| 800 }; | 800 }; |
| 801 | 801 |
| 802 for (const auto& testCase : testCases) | 802 for (const auto& testCase : testCases) |
| 803 test(testCase); | 803 test(testCase); |
| 804 } | 804 } |
| 805 | 805 |
| 806 // Regression test for crbug.com/664744. |
| 807 TEST_F(HTMLPreloadScannerTest, testUppercaseAsValues) { |
| 808 TestCase testCases[] = { |
| 809 {"http://example.test", "<link rel=preload href=bla as=SCRIPT>", "bla", |
| 810 "http://example.test/", Resource::Script, 0}, |
| 811 {"http://example.test", "<link rel=preload href=bla as=fOnT>", "bla", |
| 812 "http://example.test/", Resource::Font, 0}, |
| 813 }; |
| 814 |
| 815 for (const auto& testCase : testCases) |
| 816 test(testCase); |
| 817 } |
| 818 |
| 806 } // namespace blink | 819 } // namespace blink |
| OLD | NEW |