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

Side by Side Diff: LayoutTests/http/tests/misc/no-last-modified.html

Issue 394903004: document.lastModified should consider user's local time zone (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and take review comments into consideration Created 6 years, 4 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
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>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/misc/last-modified-parsing-expected.txt ('k') | LayoutTests/http/tests/resources/last-modified.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698