Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp

Issue 2496343002: Support as=<UPPERCASE VALUE> for link preloads in preload scanner (Closed)
Patch Set: add another test case Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698