Or maybe rephrase the test failure message emphasising a possible environment problem or adding a comment that this particular check might fail if the window manager is overly aggressive with focus prevention.
Anyway, I'll sign out of the discussion now. Since I'm not working on user32 much it is your choice. I just know I have a d3d focus test-that-can't-fail that's failing on AJ's machine that I need to fix :-( ...