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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/link-preload-redirect-unused.html

Issue 1635263002: Add a test to make sure preloaded redirects are not reused Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/link-preload-redirect-unused-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/link-preload-redirect-unused.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/link-preload-redirect-unused.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/link-preload-redirect-unused.html
new file mode 100644
index 0000000000000000000000000000000000000000..a9fe136ac3e4b60f05e12d7a6b5c1d6ed4d8680d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/link-preload-redirect-unused.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../inspector-test.js"></script>
+<script src="../network-test.js"></script>
+<link rel=preload href="resources/dummy.js" as=script>
+<script>
+function loadRedirectedScript() {
+ var script = document.createElement('script');
+ script.src = 'resources/dummy_js_redirect.php';
+ document.body.appendChild(script);
+}
+
+function test() {
+ InspectorTest.addConsoleSniffer(step1);
+ InspectorTest.evaluateInPage("loadRedirectedScript()");
+
+ function step1() {
+ var requests = InspectorTest.findRequestsByURLPattern(/dummy.js/);
+ InspectorTest.assertTrue(requests.length === 2);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body>
+<script>runTest();</script>
+<p>Verify that two requests are made for preload script requests that a redirect later tries to reuse.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/link-preload-redirect-unused-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698