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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html

Issue 2753053004: Improve preload related priorities (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html
index 8018de07ea7215740da5194ed70d2d2010cbf4e9..b385d09e4f6d4e808b539b476e9a16ac613ac946 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority.html
@@ -45,6 +45,24 @@ function sendStyleRequest()
document.head.appendChild(link);
}
+function sendScriptRequestPrecededByImage()
+{
+ var iframe = document.createElement("iframe");
+ document.body.appendChild(iframe);
+ iframe.srcdoc = '<html><body><img src="resources/abe.png?preceding">'
+ + '<script src="http://localhost:8000/inspector/network/resources/empty-script.js?preceded"></s'
+ + 'cript>;</body></html>';
+}
+
+function sendScriptRequestPrecededByPreloadedImage()
+{
+ var iframe = document.createElement("iframe");
+ document.body.appendChild(iframe);
+ iframe.srcdoc = '<html><body><link href="resources/abe.png?precedingPreload" rel=preload as=image>'
+ + '<script src="http://localhost:8000/inspector/network/resources/empty-script.js?precededByPreload"></s'
+ + 'cript>;</body></html>';
+}
+
function createIFrame()
{
var iframe = document.createElement("iframe");
@@ -57,6 +75,8 @@ function test()
var actions = [
"sendSyncScriptRequest",
"sendAsyncScriptRequest",
+ "sendScriptRequestPrecededByImage",
+ "sendScriptRequestPrecededByPreloadedImage",
"sendXHRSync",
"sendXHRAsync",
"sendImageRequest",
@@ -81,7 +101,8 @@ function test()
{
var request = event.data;
InspectorTest.addResult("Request: " + request.name() + " priority: " + request.initialPriority());
- performNextRequest();
+ if (request.name().indexOf("preceded") == -1)
+ performNextRequest();
}
}
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/resource-priority-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698