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_TEST_WEB_CONTENTS_TESTER_H_ | 5 #ifndef CONTENT_TEST_WEB_CONTENTS_TESTER_H_ |
6 #define CONTENT_TEST_WEB_CONTENTS_TESTER_H_ | 6 #define CONTENT_TEST_WEB_CONTENTS_TESTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "content/public/common/page_transition_types.h" | 9 #include "content/public/common/page_transition_types.h" |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // in question have been made. | 84 // in question have been made. |
85 virtual int GetNumberOfFocusCalls() = 0; | 85 virtual int GetNumberOfFocusCalls() = 0; |
86 | 86 |
87 virtual content::RenderViewHost* GetPendingRenderViewHost() const = 0; | 87 virtual content::RenderViewHost* GetPendingRenderViewHost() const = 0; |
88 | 88 |
89 // Creates a pending navigation to the given URL with the default parameters | 89 // Creates a pending navigation to the given URL with the default parameters |
90 // and then commits the load with a page ID one larger than any seen. This | 90 // and then commits the load with a page ID one larger than any seen. This |
91 // emulates what happens on a new navigation. | 91 // emulates what happens on a new navigation. |
92 virtual void NavigateAndCommit(const GURL& url) = 0; | 92 virtual void NavigateAndCommit(const GURL& url) = 0; |
93 | 93 |
| 94 // Sets the loading state to the given value. |
| 95 virtual void TestSetIsLoading(bool value) = 0; |
| 96 |
94 // Simulates the current RVH notifying that it has unloaded so that the | 97 // Simulates the current RVH notifying that it has unloaded so that the |
95 // pending RVH navigation can proceed. | 98 // pending RVH navigation can proceed. |
96 // Does nothing if no cross-navigation is pending. | 99 // Does nothing if no cross-navigation is pending. |
97 virtual void ProceedWithCrossSiteNavigation() = 0; | 100 virtual void ProceedWithCrossSiteNavigation() = 0; |
98 | 101 |
99 virtual void TestDidNavigate(content::RenderViewHost* render_view_host, | 102 virtual void TestDidNavigate(content::RenderViewHost* render_view_host, |
100 int page_id, | 103 int page_id, |
101 const GURL& url, | 104 const GURL& url, |
102 content::PageTransition transition) = 0; | 105 content::PageTransition transition) = 0; |
103 | 106 |
104 virtual void TestDidNavigateWithReferrer( | 107 virtual void TestDidNavigateWithReferrer( |
105 content::RenderViewHost* render_view_host, | 108 content::RenderViewHost* render_view_host, |
106 int page_id, | 109 int page_id, |
107 const GURL& url, | 110 const GURL& url, |
108 const content::Referrer& referrer, | 111 const content::Referrer& referrer, |
109 content::PageTransition transition) = 0; | 112 content::PageTransition transition) = 0; |
110 | 113 |
111 // Promote GetWebkitPrefs to public. | 114 // Promote GetWebkitPrefs to public. |
112 virtual WebPreferences TestGetWebkitPrefs() = 0; | 115 virtual WebPreferences TestGetWebkitPrefs() = 0; |
113 }; | 116 }; |
114 | 117 |
115 } // namespace content | 118 } // namespace content |
116 | 119 |
117 #endif // CONTENT_TEST_WEB_CONTENTS_TESTER_H_ | 120 #endif // CONTENT_TEST_WEB_CONTENTS_TESTER_H_ |
OLD | NEW |