-
Sigurd Schneider authored
This resolves an inconsistency in a test, which may cause the test to fail if a new event in the Page domain is added. The reasons is that only if devtools_client_->GetPage()->AddObserver() is called, we call Domain::RegisterEventHandlersIfNeeded. This method adds the Page's events to the HeadlessDevToolsClientImpl::event_handlers_ map. The test doesn't call devtools_client_->GetPage()->AddObserver() and hence Page events are not registered. Any events received during the test on the Page domain triggers the NOTREACHED in https://source.chromium.org/chromium/chromium/src/+/master:headless/lib/browser/headless_devtools_client_impl.cc;l=284;drc=8fb8160447dcb4e007b67be730b745a99570e1cb;bpv=1;bpt=1 Change-Id: Ie5fbf1e0cbf4658060c22ac6eee9d5fdacd38968 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585086 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#836994}
9b6b8c20