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

Unified Diff: third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp

Issue 2072613002: Make ResourceLoadPriority calculation simpler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop a default arg Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
index e43d2e1c85bfac46c392c1b1b20114975a462f0f..25bd8ceff52370e7601551d866baddb66f2e2a0a 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
@@ -105,9 +105,8 @@ TEST(LinkLoaderTest, Preload)
{"http://example.test/cat.mp4", "media", "", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextVideo, true, true},
{"http://example.test/cat.vtt", "track", "", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextTrack, true, true},
{"http://example.test/cat.woff", "font", "", "", ResourceLoadPriorityVeryHigh, WebURLRequest::RequestContextFont, true, true},
- // TODO(yoav): subresource should be *very* low priority (rather than low).
- {"http://example.test/cat.empty", "", "", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextSubresource, true, true},
- {"http://example.test/cat.blob", "blabla", "", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextSubresource, false, false},
+ {"http://example.test/cat.empty", "", "", "", ResourceLoadPriorityVeryLow, WebURLRequest::RequestContextSubresource, true, true},
+ {"http://example.test/cat.blob", "blabla", "", "", ResourceLoadPriorityVeryLow, WebURLRequest::RequestContextSubresource, false, false},
{"bla://example.test/cat.gif", "image", "", "", ResourceLoadPriorityUnresolved, WebURLRequest::RequestContextImage, false, false},
// MIME type tests
{"http://example.test/cat.webp", "image", "image/webp", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextImage, true, true},
@@ -125,8 +124,8 @@ TEST(LinkLoaderTest, Preload)
{"http://example.test/cat.vtt", "track", "text/subtitlething", "", ResourceLoadPriorityUnresolved, WebURLRequest::RequestContextTrack, false, false},
{"http://example.test/cat.woff", "font", "font/woff2", "", ResourceLoadPriorityVeryHigh, WebURLRequest::RequestContextFont, true, true},
{"http://example.test/cat.woff", "font", "font/woff84", "", ResourceLoadPriorityUnresolved, WebURLRequest::RequestContextFont, false, false},
- {"http://example.test/cat.empty", "", "foo/bar", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextSubresource, true, true},
- {"http://example.test/cat.blob", "blabla", "foo/bar", "", ResourceLoadPriorityLow, WebURLRequest::RequestContextSubresource, false, false},
+ {"http://example.test/cat.empty", "", "foo/bar", "", ResourceLoadPriorityVeryLow, WebURLRequest::RequestContextSubresource, true, true},
+ {"http://example.test/cat.blob", "blabla", "foo/bar", "", ResourceLoadPriorityVeryLow, WebURLRequest::RequestContextSubresource, false, false},
// Media tests
{"http://example.test/cat.gif", "image", "image/gif", "(max-width: 600px)", ResourceLoadPriorityLow, WebURLRequest::RequestContextImage, true, true},
{"http://example.test/cat.gif", "image", "image/gif", "(max-width: 400px)", ResourceLoadPriorityUnresolved, WebURLRequest::RequestContextImage, true, false},

Powered by Google App Engine
This is Rietveld 408576698