• msw@chromium.org's avatar
    Re-land: Store and restore view focus in OnWindowFocused. · 49d02cd2
    msw@chromium.org authored
    r271281 reverted the first r271249 for Win XP test failures:
    
    http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/31239/steps/interactive_ui_tests/logs/stdio
    [ RUN      ] ConstrainedWindowViewTest.ClosesOnEscape
    [216:3316:0517/130516:ERROR:gpu_info_collector_win.cc(103)] Can't retrieve a valid WinSAT assessment.
    c:\b\build\slave\cr-win-rel\build\src\chrome\browser\ui\views\constrained_window_views_browsertest.cc(206): error: Value of: dialog->GetWidget()
      Actual: 08C1F9C0
    Expected: 0
    Which is: NULL
    
    This CL makes that test no-op on XP; I'll follow up in Issue 177482.
    
    ------------------------------------------------------------
    Mimic [Desktop]NativeWidgetAura::OnWindowActivated.
    Simplify OnNativeBlur calls and OnNative[Blur|Focus] impls.
    (View focus changes update the TextInputClient as needed)
    Rewrite and enable related ConstrainedWindowViewTests.
    
    Print GetLastError() in SendInput() error case for tests.
    (key presses get 5/ERROR_ACCESS_DENIED on locked desktops?)
    
    BUG=368691, 170331, 177482, 163931
    TEST=Automated tests; the focused Views change as expected between the browser, web contents, and web content modal dialogs (print preview, collected cookies, etc.).
    TBR=sky@chromium.org
    
    Review URL: https://codereview.chromium.org/285403003
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271312 0039d316-1c4b-4281-b951-d872f2087c98
    49d02cd2
native_widget_aura.cc 38.2 KB