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

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

Issue 1754453002: Change preload's as values audio/video to media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and test alignment Created 4 years, 9 months 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
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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 TEST_F(HTMLPreloadScannerTest, testLinkRelPreload) 365 TEST_F(HTMLPreloadScannerTest, testLinkRelPreload)
366 { 366 {
367 TestCase testCases[] = { 367 TestCase testCases[] = {
368 {"http://example.test", "<link rel=preload href=bla>", "bla", "http://ex ample.test/", Resource::LinkPreload, 0}, 368 {"http://example.test", "<link rel=preload href=bla>", "bla", "http://ex ample.test/", Resource::LinkPreload, 0},
369 {"http://example.test", "<link rel=preload href=bla as=script>", "bla", "http://example.test/", Resource::Script, 0}, 369 {"http://example.test", "<link rel=preload href=bla as=script>", "bla", "http://example.test/", Resource::Script, 0},
370 {"http://example.test", "<link rel=preload href=bla as=style>", "bla", " http://example.test/", Resource::CSSStyleSheet, 0}, 370 {"http://example.test", "<link rel=preload href=bla as=style>", "bla", " http://example.test/", Resource::CSSStyleSheet, 0},
371 {"http://example.test", "<link rel=preload href=bla as=image>", "bla", " http://example.test/", Resource::Image, 0}, 371 {"http://example.test", "<link rel=preload href=bla as=image>", "bla", " http://example.test/", Resource::Image, 0},
372 {"http://example.test", "<link rel=preload href=bla as=font>", "bla", "h ttp://example.test/", Resource::Font, 0}, 372 {"http://example.test", "<link rel=preload href=bla as=font>", "bla", "h ttp://example.test/", Resource::Font, 0},
373 {"http://example.test", "<link rel=preload href=bla as=audio>", "bla", " http://example.test/", Resource::Media, 0}, 373 {"http://example.test", "<link rel=preload href=bla as=media>", "bla", " http://example.test/", Resource::Media, 0},
374 {"http://example.test", "<link rel=preload href=bla as=video>", "bla", " http://example.test/", Resource::Media, 0},
375 {"http://example.test", "<link rel=preload href=bla as=track>", "bla", " http://example.test/", Resource::TextTrack, 0}, 374 {"http://example.test", "<link rel=preload href=bla as=track>", "bla", " http://example.test/", Resource::TextTrack, 0},
376 }; 375 };
377 376
378 for (const auto& testCase : testCases) 377 for (const auto& testCase : testCases)
379 test(testCase); 378 test(testCase);
380 } 379 }
381 380
382 } // namespace blink 381 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698