Francois Gouget (@fgouget) commented about dlls/ieframe/tests/webbrowser.c:
init_count = pSetQueryNetSessionCount(SESSION_QUERY); trace("init_count %ld\n", init_count);
- count = pSetQueryNetSessionCount(SESSION_INCREMENT); - ok(count == init_count + 1, "count = %ld\n", count); + inc_count = pSetQueryNetSessionCount(SESSION_INCREMENT); + ok(inc_count > init_count, "count = %ld\n", inc_count);
count = pSetQueryNetSessionCount(SESSION_QUERY); - ok(count == init_count + 1, "count = %ld\n", count); + ok(count == inc_count, "count = %ld\n", count);
- count = pSetQueryNetSessionCount(SESSION_DECREMENT); - ok(count == init_count, "count = %ld\n", count); + dec_count = pSetQueryNetSessionCount(SESSION_DECREMENT); + ok(dec_count < inc_count, "count = %ld\n", dec_count);
If IE creates its own net session between the SESSION_INCREMENT call and the SESSION_DECREMENT one, this ok() call will fail. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3577#note_42467