mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
mshtml: Implement document.lastModified.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
5113e55139
commit
1571c12129
2 changed files with 14 additions and 2 deletions
|
@ -1086,8 +1086,14 @@ static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLoca
|
|||
static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p)
|
||||
{
|
||||
HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
nsAString nsstr;
|
||||
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)
|
||||
|
|
|
@ -339,6 +339,12 @@ sync_test("rects", function() {
|
|||
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() {
|
||||
var node;
|
||||
|
||||
|
|
Loading…
Reference in a new issue