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

Side by Side Diff: LayoutTests/http/tests/cache/subresource-revalidation-referrer.html

Issue 201973002: Re-set referrer on issuing a validation request for a cached resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Emit header()s first Created 6 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
(Empty)
1 <!DOCTYPE HTML>
2 <script src="/js-test-resources/js-test.js"></script>
3 <script src="resources/referrer-echo.php" type="text/javascript"></script>
4 <script>
5 description("Check that Referrer: for validation requests are correctly set.");
6 window.jsTestIsAsync = true;
7
8 // The above script adds the 'referrer' global.
9 shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer.html") >= 0');
10
11 var first = true;
12 function iframeLoaded(ref) {
13 if (first) {
14 // Navigating the iframe-embedded anchor will use the iframe's
15 // URL as referrer.
16 first = false;
17 window.frames[0].document.getElementsByTagName("a")[0].click();
18 } else {
19 referrer = ref;
20 shouldBeTrue('referrer.indexOf("subresource-revalidation-referrer-iframe .html") >= 0');
21 finishJSTest();
22 }
23 }
24 </script>
25 <iframe src="resources/subresource-revalidation-referrer-iframe.html"></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698