Commit 57f7f642 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Cleanup] Use WebContentsConsoleObserver in WebBundle browsertests

Update content/browser/web_package/web_bundle_browsertest.cc to use
WebContentsConsoleObserver instead of ConsoleObserverDelegate.
- This allows us to avoid overriding the existing WebContentsDelegate,
  if any (which can mask behavior unintentional changes).
- Avoids the need for a filter of "*"

Bonus cleanups:
Extract common functionality for awaiting a failed navigation and
extracting the console message; cuts down ~50 lines of duplicate code.

Bug: 1034150
Change-Id: I6b78a46ee8bb02f529ea44980f2aa97efa80d0d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980896Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727462}
parent 9accff7b
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment