Currently we have two ways to change the behavior of event handling when unit testing:
1: Implementing MockEventDispatcher
2: Overriding EmbeddedWorkerTestHelper (e.g. OnFetchEvent)
Method 2 has been used when we used the legacy IPC for event dispatching, but it's no longer needed.
The benefit of method 1 is we can decompose logics into small chunks (it's very clear to understand MockEventDispatcher only cares the renderer's behavior related to Mojo messages) compared to overriding EWTestHelper.
For simplicity, I think it's better to unify them into method 1.
Comment 1 by sheriffbot@chromium.org
, Sep 19Status: Untriaged (was: Available)