content/test: Add new functionality to TestNavigationObserver

Adds three features to TestNavigationObserver:

1. A new constructor that takes a |target_url|. When
   TestNavigationObserver is instantiated with this constructor
   Wait/WaitForNavigationFinished will quit when a navigation to
   target_url has loaded or finished.
2. WaitForNavigationFinished. TestNavigationObserver will wait for
   navigations to finish rather than waiting for loading to stop.
3. WatchExistingWebContents. Adds TestNavigationObserver as an observer
   of all previously created WebContents.

Change-Id: Ic11098dd77dcdca9e3f144c9afea9eff90727348
Reviewed-on: https://chromium-review.googlesource.com/706741
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507872}
3 files changed