chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.37k stars 467 forks source link

tests: Fix flaky ViewsTextfieldTest.TextfieldKeyEvent #2774

Open magreenblatt opened 5 years ago

magreenblatt commented 5 years ago

Original report by me.


What steps will reproduce the problem?

Run ceftests.exe --gtest_filter=Views*.

What is the expected output? What do you see instead?

All tests should pass. Instead, ViewsTextfieldTest.TextfieldKeyEvent reliably fails with:

[ RUN      ] ViewsTextfieldTest.TextfieldKeyEvent
[1004/155404.075:ERROR:textfield.cc(1795)] NOT IMPLEMENTED
../../cef/tests/ceftests/views/textfield_unittest.cc(229): error: Expected equality of these values:
  kTestInputMessage
    Which is: "Test Message"
  textfield->GetText().ToString().c_str()
    Which is: "test Message"
Stack trace:
Backtrace:
        base::debug::StackTrace::StackTrace [0x518D1FB2+34] (C:\code\chromium_git\chromium\src\base\debug\stack_trace.cc:203)

[  FAILED  ] ViewsTextfieldTest.TextfieldKeyEvent (180 ms)

The failure suggests that the EVENTFLAG_SHIFT_DOWN applied in TranslateKey (textfield_unittest.cc) for the first character is somehow getting ignored.

The test usually passes when run by itself or as part of ViewsText*.

The NOT IMPLEMENTED appears harmless.

What version of the product are you using? On what operating system?

M78 and master on Windows 10. It does not appear to be a new failure.

magreenblatt commented 5 days ago

Marked as flaky because running --gtest_filter=ViewsTextfieldTest.TextfieldKeyEvent directly succeeds (at M131).

magreenblatt commented 3 days ago

Also failing consistently on MacOS (M132) with:

../../cef/tests/ceftests/views/textfield_unittest.cc:235: Failure
Expected equality of these values:
  modifiers
    Which is: 2
  event.modifiers
    Which is: 0
magreenblatt commented 3 days ago

Also failing on Linux (M132) with a timeout.