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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html

Issue 2698773005: document.lastModified: treat invalid dates like unknown ones. (Closed)
Patch Set: Created 3 years, 10 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 | third_party/WebKit/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: third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html b/third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html
index db6bdc0c158b11930de90b12633943ecbfcfe574..dc66316bb22121be9942b6b56541353b1bf62cf9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing.html
@@ -6,6 +6,8 @@ if (window.testRunner) {
function getExpectedLastModified(lastModified) {
var date = new Date(lastModified);
+ if (isNaN(date.getTime()))
+ return "illformed-date";
var month = ('0' + (date.getMonth() + 1)).slice(-2);
var day = ('0' + date.getDate()).slice(-2);
var hour = ('0' + date.getHours()).slice(-2);
@@ -27,4 +29,5 @@ test('Mon, 21-Nov-2008 01:03:33 GMT');
test('Mon, 21-Feb-2008 01:03:33 GMT');
test('Mon, 03-Feb-2008 01:03:33 GMT');
test('Mon, 3-Mar-2008 01:03:33 GMT');
+test('Something ill-formed');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/misc/last-modified-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698