Chromium Code Reviews| 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..9200b9b465cf8d536f0ff4ea01db692936b047c0 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); |
|
tkent
2014/07/28 00:40:26
nit: quotation mark is inconsistent. Other lines
kangil_
2014/07/31 00:45:45
Done.
|
| + 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'); |