Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: content/test/test_web_contents.h

Issue 701953006: PlzNavigate: Speculatively spawns a renderer process for navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments, mostly -- but not all -- nits. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Returns the same result as a call to GetPendingMainFrame.
98 // PlzNavigate: when browser side navigation is enabled it returns the
99 // speculative RenderFrameHost for the main frame if one exists. Otherwise
100 // returns nullptr.
101 TestRenderFrameHost* GetFutureMainFrame() const;
102
97 protected: 103 protected:
98 // The deprecated WebContentsTester still needs to subclass this. 104 // The deprecated WebContentsTester still needs to subclass this.
99 explicit TestWebContents(BrowserContext* browser_context); 105 explicit TestWebContents(BrowserContext* browser_context);
100 106
101 private: 107 private:
102 // WebContentsImpl overrides 108 // WebContentsImpl overrides
103 void CreateNewWindow( 109 void CreateNewWindow(
104 int render_process_id, 110 int render_process_id,
105 int route_id, 111 int route_id,
106 int main_frame_route_id, 112 int main_frame_route_id,
(...skipping 14 matching lines...) Expand all
121 127
122 // Expectations for arguments of |SetHistoryOffsetAndLength()|. 128 // Expectations for arguments of |SetHistoryOffsetAndLength()|.
123 bool expect_set_history_offset_and_length_; 129 bool expect_set_history_offset_and_length_;
124 int expect_set_history_offset_and_length_history_offset_; 130 int expect_set_history_offset_and_length_history_offset_;
125 int expect_set_history_offset_and_length_history_length_; 131 int expect_set_history_offset_and_length_history_length_;
126 }; 132 };
127 133
128 } // namespace content 134 } // namespace content
129 135
130 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ 136 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698