On Tue, 2017-04-04 at 23:39 +0000, Alistair Leslie-Hughes wrote:
> +static void test_multi_authentication(int port)
> +{
> + static const WCHAR multiauthW[] = {'/','m','u','l','t','i','a','u','t','h',0};
> + static const WCHAR getW[] = {'G','E','T',0};
> + HINTERNET ses, con, req;
> + DWORD supported, first, target = 8;
> + BOOL ret;
> +
> + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
> + ok(ses != NULL, "failed to open session %u\n", GetLastError());
> +
> + con = WinHttpConnect(ses, localhostW, port, 0);
> + ok(con != NULL, "failed to open a connection %u\n", GetLastError());
> +
> + req = WinHttpOpenRequest(con, getW, multiauthW, NULL, NULL, NULL, 0);
> + ok(req != NULL, "failed to open a request %u\n", GetLastError());
> +
> + ret = WinHttpSendRequest(req, WINHTTP_NO_ADDITIONAL_HEADERS, 0,
> + WINHTTP_NO_REQUEST_DATA,0, 0, 0 );
> + ok(ret, "expected success\n");
> +
> + ret = WinHttpReceiveResponse(req, NULL);
> + ok(ret, "expected success\n");
> +
> + ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
> + todo_wine ok(ret, "expected success\n");
> + todo_wine ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %x\n", supported);
> + todo_wine ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target);
You need to initialize 'supported'. Maybe test 'first' too?