mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-25 01:01:45 +01:00
tests: Fix flaky FrameHandlerTest.Order* tests (fixes #3817)
The OnFrameAttached callback relies on a round-trip to the renderer process and may not be synchronized with OnLoadStart/ OnLoadEnd/OnMainFrameChanged callbacks.
This commit is contained in:
parent
e513077eac
commit
c166b4abc9
@ -392,10 +392,22 @@ struct FrameStatus {
|
||||
|
||||
for (int i = 0; i <= CALLBACK_LAST; ++i) {
|
||||
if (i < current_callback && IsExpectedCallback(i)) {
|
||||
if (i == FRAME_ATTACHED &&
|
||||
(current_callback == MAIN_FRAME_CHANGED_ASSIGNED ||
|
||||
current_callback == LOAD_START || current_callback == LOAD_END)) {
|
||||
// Timing of OnFrameAttached is flaky. See issue #3817.
|
||||
continue;
|
||||
}
|
||||
EXPECT_TRUE(got_callback_[i])
|
||||
<< "inside " << func << " should already have gotten "
|
||||
<< GetCallbackName(i);
|
||||
} else {
|
||||
if (current_callback == FRAME_ATTACHED &&
|
||||
(i == MAIN_FRAME_CHANGED_ASSIGNED || i == LOAD_START ||
|
||||
i == LOAD_END)) {
|
||||
// Timing of OnFrameAttached is flaky. See issue #3817.
|
||||
continue;
|
||||
}
|
||||
EXPECT_FALSE(got_callback_[i])
|
||||
<< "inside " << func << " should not already have gotten "
|
||||
<< GetCallbackName(i);
|
||||
|
Loading…
Reference in New Issue
Block a user