The current interface to JavaScriptDialogPresenter is not easily testable. JavaScriptDialogPresenterImpl, the legacy implementation, is only tested implicitly through EG tests that show JavaScript dialogs. After BrowserCoordinators are incorporated into ios/chrome, this will be replaced by JavaScriptDialogOverlayPresenter. This can be tested by updated the constructor of that class to take an OverlayService (rather than grabbing it from its Browser), then create a TestOverlayService that can be used to verify the state of the produced DialogCoordinators.
Comment 1 by olivierrobin@chromium.org
, Nov 17 2017