OLD | NEW |
1 <script> | 1 <script> |
2 if (window.testRunner) | 2 if (window.testRunner) |
3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
4 | 4 |
5 function test(text) { | 5 function test(text) { |
6 document.write('<iframe src="../resources/last-modified.php?date=' + escape(
text) + '"></iframe>'); | 6 document.write('<iframe src="../resources/no-last-modified.php?date=' + esca
pe(text) + '"></iframe>'); |
7 } | 7 } |
8 | 8 |
9 test(''); | 9 test(''); |
10 | 10 |
11 window.onload = function() { | 11 window.onload = function() { |
12 var lastModified = Date.parse(frames[0].document.body.textContent); | 12 var lastModified = Date.parse(frames[0].document.body.textContent); |
13 var now = new Date(); | 13 var now = new Date(); |
14 if (lastModified > now - (24+1)*60*60*1000) | 14 if (lastModified > now - (24+1)*60*60*1000) |
15 alert('PASS'); | 15 alert('PASS'); |
16 else | 16 else |
17 alert('FAIL'); | 17 alert('FAIL'); |
18 } | 18 } |
19 </script> | 19 </script> |
OLD | NEW |