Commit 1571c121 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Implement document.lastModified.

parent 5113e551
...@@ -1086,8 +1086,14 @@ static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLoca ...@@ -1086,8 +1086,14 @@ static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLoca
static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p) static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
{ {
HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface); HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface);
FIXME("(%p)->(%p)\n", This, p); nsAString nsstr;
return E_NOTIMPL; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&nsstr, NULL);
nsres = nsIDOMDocument_GetLastModified(This->dom_document, &nsstr);
return return_nsstr(nsres, &nsstr, p);
} }
static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v) static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v)
......
...@@ -339,6 +339,12 @@ sync_test("rects", function() { ...@@ -339,6 +339,12 @@ sync_test("rects", function() {
ok(rects.length === 0, "rect.length = " + rects.length); ok(rects.length === 0, "rect.length = " + rects.length);
}); });
sync_test("document_lastModified", function() {
// actually it seems to be rounded up from about ~250ms above a sec, but be more conservative with the check
var diff = Date.parse(document.lastModified) - performance.timing.navigationStart;
ok(diff > -1000 && diff < 1000, "lastModified too far from navigationStart: " + diff);
});
sync_test("document_owner", function() { sync_test("document_owner", function() {
var node; var node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment