| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
| 6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
| 7 | 7 |
| 8 #include "ui/base/page_transition_types.h" | 8 #include "ui/base/page_transition_types.h" |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 static WebContents* CreateTestWebContents( | 55 static WebContents* CreateTestWebContents( |
| 56 BrowserContext* browser_context, | 56 BrowserContext* browser_context, |
| 57 SiteInstance* instance); | 57 SiteInstance* instance); |
| 58 | 58 |
| 59 // Simulates the appropriate RenderView (pending if any, current otherwise) | 59 // Simulates the appropriate RenderView (pending if any, current otherwise) |
| 60 // sending a navigate notification for the NavigationController pending entry. | 60 // sending a navigate notification for the NavigationController pending entry. |
| 61 virtual void CommitPendingNavigation() = 0; | 61 virtual void CommitPendingNavigation() = 0; |
| 62 | 62 |
| 63 // Gets the pending RenderFrameHost, if any, for the main frame. For the | 63 // Gets the pending RenderFrameHost, if any, for the main frame. For the |
| 64 // current RenderFrameHost of the main frame, use WebContents::GetMainFrame(). | 64 // current RenderFrameHost of the main frame, use WebContents::GetMainFrame(). |
| 65 // PlzNavigate: When browser side navigation is enabled it returns the |
| 66 // speculative RenderFrameHost for the main frame if one exists. |
| 65 virtual RenderFrameHost* GetPendingMainFrame() const = 0; | 67 virtual RenderFrameHost* GetPendingMainFrame() const = 0; |
| 66 | 68 |
| 67 // Creates a pending navigation to the given URL with the default parameters | 69 // Creates a pending navigation to the given URL with the default parameters |
| 68 // and then commits the load with a page ID one larger than any seen. This | 70 // and then commits the load with a page ID one larger than any seen. This |
| 69 // emulates what happens on a new navigation. | 71 // emulates what happens on a new navigation. |
| 70 virtual void NavigateAndCommit(const GURL& url) = 0; | 72 virtual void NavigateAndCommit(const GURL& url) = 0; |
| 71 | 73 |
| 72 // Sets the loading state to the given value. | 74 // Sets the loading state to the given value. |
| 73 virtual void TestSetIsLoading(bool value) = 0; | 75 virtual void TestSetIsLoading(bool value) = 0; |
| 74 | 76 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 89 const Referrer& referrer, | 91 const Referrer& referrer, |
| 90 ui::PageTransition transition) = 0; | 92 ui::PageTransition transition) = 0; |
| 91 | 93 |
| 92 // Promote ComputeWebkitPrefs to public. | 94 // Promote ComputeWebkitPrefs to public. |
| 93 virtual WebPreferences TestComputeWebkitPrefs() = 0; | 95 virtual WebPreferences TestComputeWebkitPrefs() = 0; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 } // namespace content | 98 } // namespace content |
| 97 | 99 |
| 98 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 100 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
| OLD | NEW |