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 "content/public/common/page_transition_types.h" | 8 #include "content/public/common/page_transition_types.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 BrowserContext* browser_context, | 58 BrowserContext* browser_context, |
59 SiteInstance* instance); | 59 SiteInstance* instance); |
60 | 60 |
61 // Deprecated. Creates a WebContents enabled for testing, that | 61 // Deprecated. Creates a WebContents enabled for testing, that |
62 // counts the number of times SetFocusToLocationBar is called. | 62 // counts the number of times SetFocusToLocationBar is called. |
63 static WebContents* | 63 static WebContents* |
64 CreateTestWebContentsCountSetFocusToLocationBar( | 64 CreateTestWebContentsCountSetFocusToLocationBar( |
65 BrowserContext* browser_context, | 65 BrowserContext* browser_context, |
66 SiteInstance* instance); | 66 SiteInstance* instance); |
67 | 67 |
68 // Deprecated. Creates a WebContents enabled for testing, that | |
69 // counts the number of times Focus is called. | |
70 static WebContents* CreateTestWebContentsCountFocus( | |
71 BrowserContext* browser_context, | |
72 SiteInstance* instance); | |
73 | |
74 // Simulates the appropriate RenderView (pending if any, current otherwise) | 68 // Simulates the appropriate RenderView (pending if any, current otherwise) |
75 // sending a navigate notification for the NavigationController pending entry. | 69 // sending a navigate notification for the NavigationController pending entry. |
76 virtual void CommitPendingNavigation() = 0; | 70 virtual void CommitPendingNavigation() = 0; |
77 | 71 |
78 // Only implementations retrieved via the deprecated | 72 // Only implementations retrieved via the deprecated |
79 // CreateTestWebContentsFor... methods above will implement this | 73 // CreateTestWebContentsFor... methods above will implement this |
80 // method. It retrieves the number of times the focus-related calls | 74 // method. It retrieves the number of times the focus-related calls |
81 // in question have been made. | 75 // in question have been made. |
82 virtual int GetNumberOfFocusCalls() = 0; | 76 virtual int GetNumberOfFocusCalls() = 0; |
83 | 77 |
(...skipping 24 matching lines...) Expand all Loading... |
108 const Referrer& referrer, | 102 const Referrer& referrer, |
109 PageTransition transition) = 0; | 103 PageTransition transition) = 0; |
110 | 104 |
111 // Promote GetWebkitPrefs to public. | 105 // Promote GetWebkitPrefs to public. |
112 virtual webkit_glue::WebPreferences TestGetWebkitPrefs() = 0; | 106 virtual webkit_glue::WebPreferences TestGetWebkitPrefs() = 0; |
113 }; | 107 }; |
114 | 108 |
115 } // namespace content | 109 } // namespace content |
116 | 110 |
117 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 111 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
OLD | NEW |