From 3ea7ef409821ebbc015e33e3dcd420e1822d295f Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 1 Jul 2019 15:30:49 +0200 Subject: [PATCH] mshtml: Include URL pathname and query in test traces. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/tests/script.c | 22 +++++++++++----------- dlls/mshtml/tests/winetest.js | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index b2a9746865d..3704d391b6f 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -3405,7 +3405,7 @@ static void run_from_path(const char *path, const char *opt) strcat(buf, path); if(opt) - strcat(buf, opt); + sprintf(buf + strlen(buf), "?%s", opt); url = a2bstr(buf); hres = CreateURLMoniker(NULL, url, &mon); SysFreeString(url); @@ -3437,7 +3437,7 @@ static void run_script_as_http_with_mode(const char *script, const char *opt, co document_mode ? "\">" : "", script); - run_from_path("/index.html", opt); + run_from_path("/index.html", opt ? opt : script); } static void init_protocol_handler(void) @@ -3481,15 +3481,15 @@ static void run_js_tests(void) run_script_as_http_with_mode("navigation.js", NULL, NULL); run_script_as_http_with_mode("navigation.js", NULL, "11"); - run_script_as_http_with_mode("documentmode.js", "?0", NULL); - run_script_as_http_with_mode("documentmode.js", "?5", "5"); - run_script_as_http_with_mode("documentmode.js", "?5", "6"); - run_script_as_http_with_mode("documentmode.js", "?7", "7"); - run_script_as_http_with_mode("documentmode.js", "?8", "8"); - run_script_as_http_with_mode("documentmode.js", "?9", "9"); - run_script_as_http_with_mode("documentmode.js", "?10", "10"); - run_script_as_http_with_mode("documentmode.js", "?11", "11"); - run_script_as_http_with_mode("documentmode.js", "?11", "edge"); + run_script_as_http_with_mode("documentmode.js", "0", NULL); + run_script_as_http_with_mode("documentmode.js", "5", "5"); + run_script_as_http_with_mode("documentmode.js", "5", "6"); + run_script_as_http_with_mode("documentmode.js", "7", "7"); + run_script_as_http_with_mode("documentmode.js", "8", "8"); + run_script_as_http_with_mode("documentmode.js", "9", "9"); + run_script_as_http_with_mode("documentmode.js", "10", "10"); + run_script_as_http_with_mode("documentmode.js", "11", "11"); + run_script_as_http_with_mode("documentmode.js", "11", "edge"); run_script_as_http_with_mode("asyncscriptload.js", NULL, "9"); } diff --git a/dlls/mshtml/tests/winetest.js b/dlls/mshtml/tests/winetest.js index 0d4e6e4ecff..2af1b33414a 100644 --- a/dlls/mshtml/tests/winetest.js +++ b/dlls/mshtml/tests/winetest.js @@ -42,11 +42,11 @@ function run_tests() { } function ok(b,m) { - return external.ok(b, m); + return external.ok(b, format_message(m)); } function trace(m) { - external.trace(m); + external.trace(format_message(m)); } function win_skip(m) { @@ -59,10 +59,19 @@ function reportSuccess() { var todo_wine = { ok: function(b,m) { - return external.todo_wine_ok(b,m); + return external.todo_wine_ok(b, format_message(m)); } }; function todo_wine_if(expr) { return expr ? todo_wine : { ok: ok }; } + +var file_prefix = document.location.pathname; +if(document.location.search) + file_prefix += document.location.search; +file_prefix += ": "; + +function format_message(msg) { + return file_prefix + msg; +}