From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/omnavigator.c | 6 ++++-- dlls/mshtml/tests/dom.c | 10 ++++++++++ dlls/mshtml/tests/es5.js | 1 + 3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index ccbd9c95538..eb4b78001cc 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -1587,8 +1587,10 @@ static HRESULT WINAPI HTMLPerformanceNavigation_toString(IHTMLPerformanceNavigat static HRESULT WINAPI HTMLPerformanceNavigation_toJSON(IHTMLPerformanceNavigation *iface, VARIANT *p) { HTMLPerformanceNavigation *This = impl_from_IHTMLPerformanceNavigation(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return dispex_builtin_props_to_json(&This->dispex, p); }
static const IHTMLPerformanceNavigationVtbl HTMLPerformanceNavigationVtbl = { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 65b9e3aa21c..06cd1bd10bd 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -11229,6 +11229,7 @@ static void test_quirks_mode_offsetHeight(IHTMLDocument2 *doc)
static void test_quirks_mode_perf_toJSON(IHTMLDocument2 *doc) { + IHTMLPerformanceNavigation *nav; IHTMLPerformanceTiming *timing; IHTMLPerformance *perf; DISPPARAMS dp = { 0 }; @@ -11263,6 +11264,15 @@ static void test_quirks_mode_perf_toJSON(IHTMLDocument2 *doc) ok(perf != NULL, "performance is NULL\n"); VariantClear(&var);
+ hres = IHTMLPerformance_get_navigation(perf, &nav); + ok(hres == S_OK, "get_navigation failed: %08lx\n", hres); + ok(nav != NULL, "performance.navigation is NULL\n"); + + hres = IHTMLPerformanceNavigation_toJSON(nav, &var); + ok(hres == E_UNEXPECTED, "navigation.toJSON() failed: %08lx\n", hres); + ok(V_VT(&var) == VT_EMPTY, "V_VT(navigation.toJSON()) = %d\n", V_VT(&var)); + IHTMLPerformanceNavigation_Release(nav); + hres = IHTMLPerformance_get_timing(perf, &timing); ok(hres == S_OK, "get_timing failed: %08lx\n", hres); ok(timing != NULL, "performance.timing is NULL\n"); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index b8a5198718b..0df246933dd 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2435,6 +2435,7 @@ sync_test("functions scope", function() {
sync_test("perf toJSON", function() { var tests = [ + [ "performance.navigation", "redirectCount", "type" ], [ "performance.timing", "connectEnd", "connectStart", "domComplete", "domContentLoadedEventEnd", "domContentLoadedEventStart", "domInteractive", "domLoading", "domainLookupEnd", "domainLookupStart", "fetchStart", "loadEventEnd", "loadEventStart", "msFirstPaint", "navigationStart", "redirectEnd",