• Cliff Smolinsky's avatar
    Add PinUser32() to content_browsertests's main method · f1006d00
    Cliff Smolinsky authored
    Calls to pin or load user32.dll cannot happen on the main thread loop
    because they are blocking calls. The test code always executes on the
    main thread loop, so if the test code hits anything that requires
    user32 then it will crash (with dchecks on). To avoid this, we simply
    call PinUser32() in main before we get to the main thread loop.
    This same thing is done in browser_tests_main.cc and shell_main.cc for
    other test binaries.
    
    It's worth noting that the crash from this bug only hits on touch
    devices where the IsDeviceUsedAsATablet method runs.
    
    Bug: 968500
    Change-Id: Ia3de38c7893b7143bde39aef3edc88ff0853caec
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637503
    Commit-Queue: Tommi <tommi@chromium.org>
    Reviewed-by: default avatarTommi <tommi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#665623}
    f1006d00
content_test_launcher.cc 2.94 KB