summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/http/tests/misc/no-last-modified.html
blob: d1b3d6258f8104281382557c40093f27d9ac7f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script>
if (window.testRunner)
    testRunner.dumpAsText();

function test(text) {
    document.write('<iframe src="../resources/last-modified.php?date=' + escape(text) + '"></iframe>');
}

test('');

window.onload = function() {
    var lastModified = Date.parse(frames[0].document.body.textContent);
    var now = new Date();
    if (lastModified > now - (24+1)*60*60*1000)
        alert('PASS');
    else
        alert('FAIL');
}
</script>