| Index: third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php b/third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php
|
| index 6465f77cd6133177b723e53ed6f3aa057d343161..8dded1c4e755e2163212b120076bcadb4957387a 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/resources/last-modified.php
|
| @@ -6,7 +6,13 @@
|
| <script>
|
| var expected = '<?=$expected?>';
|
| var lastModified = document.lastModified;
|
| -if (expected == lastModified) {
|
| +
|
| +// If expected is 'illformed-date', then the Last-Modified: header
|
| +// is assumed to contain an unparseable date. For which we're supposed
|
| +// to return the current time per spec. Simply verify that by checking
|
| +// that the |lastModified| parses.
|
| +if (expected === lastModified ||
|
| + (expected === "illformed-date" && !isNaN(Date.parse(lastModified)))) {
|
| document.write('PASS');
|
| } else {
|
| document.write('FAIL: expect ' + expected + ', but got ' + lastModified);
|
|
|