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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cache/freshness-header.html

Issue 2767853003: Remove stale-while-revalidate from blink (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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 description("Resource-Freshness header is sent when a revalidation request is in itiated by the Blink memory cache within the stale-while-revalidate window.");
5
6 var resourceFreshnessHeader;
7 function report(value) {
8 resourceFreshnessHeader = value;
9 }
10
11 window.jsTestIsAsync = true;
12
13 window.onload = function () {
14 // We set the timeout to 500 msec here because we expect age=1 in the
15 // ResourceFreshness header if the age is [0.5, 1.5) seconds.
16 setTimeout(
17 function() {
18 var script = document.createElement("script");
19 script.src = "resources/stale-while-revalidate.php";
20 script.onload = function() {
21 shouldBeEqualToString(
22 'resourceFreshnessHeader',
23 'max-age=0,stale-while-revalidate=1,age=1');
24 finishJSTest();
25 };
26 document.body.appendChild(script);
27 },
28 500);
29 };
30 </script>
31 <script src="resources/stale-while-revalidate.php"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698