Fixing sandbox TestWindows test

This change fixes the TestWindows test by checking that the job object
restrictions enforced in the sandbox, do protect the shell window from
sandboxed processes. The desktop window is not ideal for this test
because this is a special window that every process should be able to
access. The desktop window by default is mapped to the shared memory
in user mode and should be accessible regardless of job object
restrictions. There is a bug in Windows that allows the job object
restrictions to extend to the desktop window in some cases, which is
why this test appears flaky in the chromium bots, but the test should
always fail when testing against the desktop window. Note that the job
object restrictions should protect any window other than the desktop
window however, and failing to do so would be a bug. This bug is being
looked at in the Windows team to ensure that the desktop window remains
accessible to all processes in the future.

Bug: 829999
Change-Id: Iaaef3377020aeb5fff4dbdaee57e04bd8b975801
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1757170
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687762}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3c1a434b4e858dcb25e1fc9cdeba079fbd8862db
1 file changed