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

Unified Diff: LayoutTests/http/tests/misc/last-modified-parsing.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/last-modified-parsing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/misc/last-modified-parsing.html
diff --git a/LayoutTests/http/tests/misc/last-modified-parsing.html b/LayoutTests/http/tests/misc/last-modified-parsing.html
index e9bd793450755ab0bc5b8812d1c5b9e38d3d020d..db6bdc0c158b11930de90b12633943ecbfcfe574 100644
--- a/LayoutTests/http/tests/misc/last-modified-parsing.html
+++ b/LayoutTests/http/tests/misc/last-modified-parsing.html
@@ -4,8 +4,20 @@ if (window.testRunner) {
testRunner.dumpChildFramesAsText();
}
+function getExpectedLastModified(lastModified) {
+ var date = new Date(lastModified);
+ var month = ('0' + (date.getMonth() + 1)).slice(-2);
+ var day = ('0' + date.getDate()).slice(-2);
+ var hour = ('0' + date.getHours()).slice(-2);
+ var minute = ('0' + date.getMinutes()).slice(-2);
+ var second = ('0' + date.getSeconds()).slice(-2);
+ var result = month + '/' + day + '/' + date.getFullYear() + ' ' + hour + ':' + minute + ':' + second;
+ return result;
+}
+
function test(text) {
- document.write('<iframe src="../resources/last-modified.php?date=' + escape(text) + '"></iframe>');
+ var url = '../resources/last-modified.php?date=' + escape(text) + '&expected=' + escape(getExpectedLastModified(text));
+ document.write('<iframe id="test" src="' + url + '"></iframe>');
}
test('Mon, 21 Nov 2008 01:03:33 GMT');
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/last-modified-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698