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_TEST_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
7 | 7 |
8 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
9 #include "content/public/common/web_preferences.h" | 9 #include "content/public/common/web_preferences.h" |
10 #include "content/public/test/web_contents_tester.h" | 10 #include "content/public/test/web_contents_tester.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Compares the arguments passed in with the expected arguments passed in | 87 // Compares the arguments passed in with the expected arguments passed in |
88 // to |ExpectSetHistoryOffsetAndLength()|. | 88 // to |ExpectSetHistoryOffsetAndLength()|. |
89 void SetHistoryOffsetAndLength(int history_offset, | 89 void SetHistoryOffsetAndLength(int history_offset, |
90 int history_length) override; | 90 int history_length) override; |
91 | 91 |
92 void TestDidFinishLoad(const GURL& url); | 92 void TestDidFinishLoad(const GURL& url); |
93 void TestDidFailLoadWithError(const GURL& url, | 93 void TestDidFailLoadWithError(const GURL& url, |
94 int error_code, | 94 int error_code, |
95 const base::string16& error_description); | 95 const base::string16& error_description); |
96 | 96 |
| 97 // PlzNavigate |
| 98 // When running in regular mode returns the same result as a call to |
| 99 // GetPendingMainFrame. When browser side navigation is enabled it returns the |
| 100 // speculative RenderFrameHost for the main frame if one exists. Otherwise |
| 101 // returns nullptr. |
| 102 TestRenderFrameHost* GetNextMainFrameCandidate() const; |
| 103 |
97 protected: | 104 protected: |
98 // The deprecated WebContentsTester still needs to subclass this. | 105 // The deprecated WebContentsTester still needs to subclass this. |
99 explicit TestWebContents(BrowserContext* browser_context); | 106 explicit TestWebContents(BrowserContext* browser_context); |
100 | 107 |
101 private: | 108 private: |
102 // WebContentsImpl overrides | 109 // WebContentsImpl overrides |
103 void CreateNewWindow( | 110 void CreateNewWindow( |
104 int render_process_id, | 111 int render_process_id, |
105 int route_id, | 112 int route_id, |
106 int main_frame_route_id, | 113 int main_frame_route_id, |
(...skipping 14 matching lines...) Expand all Loading... |
121 | 128 |
122 // Expectations for arguments of |SetHistoryOffsetAndLength()|. | 129 // Expectations for arguments of |SetHistoryOffsetAndLength()|. |
123 bool expect_set_history_offset_and_length_; | 130 bool expect_set_history_offset_and_length_; |
124 int expect_set_history_offset_and_length_history_offset_; | 131 int expect_set_history_offset_and_length_history_offset_; |
125 int expect_set_history_offset_and_length_history_length_; | 132 int expect_set_history_offset_and_length_history_length_; |
126 }; | 133 }; |
127 | 134 |
128 } // namespace content | 135 } // namespace content |
129 | 136 |
130 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 137 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
OLD | NEW |