mshtml: Implement performance.timing.redirectStart.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2022-11-22 18:26:21 +02:00 committed by Alexandre Julliard
parent fe66c7240a
commit 5db7d0d0ea
4 changed files with 6 additions and 2 deletions

View file

@ -510,6 +510,7 @@ typedef struct {
LONG ref;
ULONGLONG navigation_start_time;
ULONGLONG redirect_time;
} HTMLPerformanceTiming;
typedef struct nsChannelBSC nsChannelBSC;

View file

@ -1717,6 +1717,8 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG progress, ULONG t
This->nschannel->content_type = heap_strdupWtoA(status_text);
break;
case BINDSTATUS_REDIRECTING:
if(This->is_doc_channel && !This->bsc.window->performance_timing->redirect_time)
This->bsc.window->performance_timing->redirect_time = get_time_stamp();
return handle_redirect(This, status_text);
case BINDSTATUS_BEGINDOWNLOADDATA: {
IWinInetHttpInfo *http_info;

View file

@ -1621,9 +1621,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_redirectStart(IHTMLPerformanceTi
{
HTMLPerformanceTiming *This = impl_from_IHTMLPerformanceTiming(iface);
FIXME("(%p)->(%p) returning fake value\n", This, p);
TRACE("(%p)->(%p)\n", This, p);
*p = TIMING_FAKE_TIMESTAMP;
*p = This->redirect_time;
return S_OK;
}

View file

@ -20,6 +20,7 @@ var compat_version;
var tests = [];
ok(performance.timing.navigationStart > 0, "navigationStart <= 0");
ok(performance.timing.redirectStart === 0, "redirectStart != 0");
var pageshow_fired = false, pagehide_fired = false;
document.doc_unload_events_called = false;