Closed Bug 1280454 Opened 8 years ago Closed 8 years ago

[XHR2] Not passing the responseXML.lastmodified test.

Categories

(Core :: DOM: Core & HTML, defect)

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: wisniewskit, Unassigned)

References

()

Details

Attachments

(1 file, 2 obsolete files)

Firefox presently does not pass the web platform test checking the value of responseXML.lastModified (as in, this blocks bug 918688).

However, the test itself will change (or be removed), so I created this bug as a reminder to check and see what decision was made. See the comments in bug 918773 for more detail.
Blocks: xhr2pass
Summary: responsexml lastmodified → [XHR2] Not passing the responseXML.lastmodified test.
Component: General → DOM: Core & HTML
Product: Firefox → Core
Thomas, I think the actual issue here is that we attempt to compare it to the Last-Modified header which the server does not set. If we just compare it to Date.now() it seems like that should be fine and will match the specification.

I hadn't realized the test was actually trying to use the Last-Modified header.

(We might want to add a test where the Last-Modified header is set I suppose.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Then if I'm not misinterpreting you, this patch should do the trick.

If that's the case, then Firefox already passes both tests.
Flags: needinfo?(annevk)
Yeah, that looks reasonable to me.
Flags: needinfo?(annevk)
Alright. James, hallvors mentioned in another ticket that you're the one to nudge if a change to the web platform tests should be uplifted. If that's the case, then could you check out the patch in comment 2, and let me know if I can help out any further?
Flags: needinfo?(james)
Nothing is needed from me if annevk or someone r+'s the patch to land in general.

My main comment is that you are overusing assert_true. Please make better use of assert_equals and assert_greater_than[_equals]. Remember multiple asserts are like && i.e. the test will only pass if they all pass.
Flags: needinfo?(james)
Sure, here's a version that addresses that issue.
Attachment #8763274 - Attachment is obsolete: true
Alright, here's a final version of the patch that we can check in, but I don't have access, so could you check it in for me, James? Carrying over r=annevk.
Attachment #8763581 - Attachment is obsolete: true
Attachment #8765722 - Flags: checkin?(james)
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f6a7c43fb847
Correct XHR web platform test to verify that the last-modified time is set correctly on the response document if it is set in the HTTP headers (or not). r=annevk
Attachment #8765722 - Flags: checkin?(james) → checkin+
https://hg.mozilla.org/mozilla-central/rev/f6a7c43fb847
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: