| Index: content/public/test/test_navigation_observer.h
|
| diff --git a/content/public/test/test_navigation_observer.h b/content/public/test/test_navigation_observer.h
|
| index 438af744eb56c076d561664818243aa4be4aabe8..03b3da3ac3b0cd9e395402569e92918d16e415e6 100644
|
| --- a/content/public/test/test_navigation_observer.h
|
| +++ b/content/public/test/test_navigation_observer.h
|
| @@ -20,9 +20,18 @@ struct LoadCommittedDetails;
|
| // MessageLoop and quit when the navigation completes loading.
|
| class TestNavigationObserver {
|
| public:
|
| + enum FirstPaint {
|
| + FirstPaintRequired,
|
| + FirstPaintNotRequired
|
| + };
|
| +
|
| // Create and register a new TestNavigationObserver against the
|
| // |web_contents|.
|
| TestNavigationObserver(WebContents* web_contents,
|
| + int number_of_navigations,
|
| + FirstPaint first_paint);
|
| + // Like above but doesn't wait for the first paint after the navigations.
|
| + TestNavigationObserver(WebContents* web_contents,
|
| int number_of_navigations);
|
| // Like above but waits for one navigation.
|
| explicit TestNavigationObserver(WebContents* web_contents);
|
| @@ -33,6 +42,8 @@ class TestNavigationObserver {
|
| // navigations are complete.
|
| void Wait();
|
|
|
| + // Runs a nested message loop and blocks until the expected
|
| +
|
| // Start/stop watching newly created WebContents.
|
| void StartWatchingNewWebContents();
|
| void StopWatchingNewWebContents();
|
| @@ -55,6 +66,7 @@ class TestNavigationObserver {
|
| void OnDidAttachInterstitialPage(WebContents* web_contents);
|
| void OnDidStartLoading(WebContents* web_contents);
|
| void OnDidStopLoading(WebContents* web_contents);
|
| + void OnDidFirstVisuallyNonEmptyPaint(WebContents* web_contents);
|
|
|
| // If true the navigation has started.
|
| bool navigation_started_;
|
| @@ -65,6 +77,9 @@ class TestNavigationObserver {
|
| // The number of navigations to wait for.
|
| int number_of_navigations_;
|
|
|
| + // Whether we want to wait for first paint after navigations.
|
| + FirstPaint first_paint_;
|
| +
|
| // The MessageLoopRunner used to spin the message loop.
|
| scoped_refptr<MessageLoopRunner> message_loop_runner_;
|
|
|
|
|