| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual void NavigateAndCommit(const GURL& url) = 0; | 71 virtual void NavigateAndCommit(const GURL& url) = 0; |
| 72 | 72 |
| 73 // Sets the loading state to the given value. | 73 // Sets the loading state to the given value. |
| 74 virtual void TestSetIsLoading(bool value) = 0; | 74 virtual void TestSetIsLoading(bool value) = 0; |
| 75 | 75 |
| 76 // Simulates the current RVH notifying that it has unloaded so that the | 76 // Simulates the current RVH notifying that it has unloaded so that the |
| 77 // pending RVH navigation can proceed. | 77 // pending RVH navigation can proceed. |
| 78 // Does nothing if no cross-navigation is pending. | 78 // Does nothing if no cross-navigation is pending. |
| 79 virtual void ProceedWithCrossSiteNavigation() = 0; | 79 virtual void ProceedWithCrossSiteNavigation() = 0; |
| 80 | 80 |
| 81 // Simulates a navigation with the given information. | |
| 82 // | |
| 83 // Guidance for calling these: | |
| 84 // - nav_entry_id should be 0 if simulating a renderer-initiated navigation; | |
| 85 // if simulating a browser-initiated one, pass the GetUniqueID() value of | |
| 86 // the NavigationController's PendingEntry. | |
| 87 // - did_create_new_entry should be true if simulating a navigation that | |
| 88 // created a new navigation entry; false for history navigations, reloads, | |
| 89 // and other navigations that don't affect the history list. | |
| 90 virtual void TestDidNavigate(RenderFrameHost* render_frame_host, | 81 virtual void TestDidNavigate(RenderFrameHost* render_frame_host, |
| 91 int page_id, | 82 int page_id, |
| 92 int nav_entry_id, | |
| 93 bool did_create_new_entry, | |
| 94 const GURL& url, | 83 const GURL& url, |
| 95 ui::PageTransition transition) = 0; | 84 ui::PageTransition transition) = 0; |
| 96 virtual void TestDidNavigateWithReferrer(RenderFrameHost* render_frame_host, | 85 |
| 97 int page_id, | 86 virtual void TestDidNavigateWithReferrer( |
| 98 int nav_entry_id, | 87 RenderFrameHost* render_frame_host, |
| 99 bool did_create_new_entry, | 88 int page_id, |
| 100 const GURL& url, | 89 const GURL& url, |
| 101 const Referrer& referrer, | 90 const Referrer& referrer, |
| 102 ui::PageTransition transition) = 0; | 91 ui::PageTransition transition) = 0; |
| 103 }; | 92 }; |
| 104 | 93 |
| 105 } // namespace content | 94 } // namespace content |
| 106 | 95 |
| 107 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 96 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
| OLD | NEW |