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

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

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 7 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
« no previous file with comments | « content/test/test_render_frame_host.cc ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "content/browser/web_contents/web_contents_impl.h" 12 #include "content/browser/web_contents/web_contents_impl.h"
13 #include "content/public/test/web_contents_tester.h" 13 #include "content/public/test/web_contents_tester.h"
14 #include "content/test/test_render_frame_host.h" 14 #include "content/test/test_render_frame_host.h"
15 #include "content/test/test_render_view_host.h" 15 #include "content/test/test_render_view_host.h"
16 #include "ui/base/page_transition_types.h" 16 #include "ui/base/page_transition_types.h"
17 17
18 class GURL; 18 class GURL;
19 class Referrer; 19 class Referrer;
20 class SiteInstanceImpl; 20 class SiteInstanceImpl;
21 21
22 namespace content { 22 namespace content {
23 23
24 class NavigationData;
25 class NavigationHandle;
24 class RenderViewHost; 26 class RenderViewHost;
25 class TestRenderViewHost; 27 class TestRenderViewHost;
26 class WebContentsTester; 28 class WebContentsTester;
27 29
28 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts 30 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts
29 // and does not do anything involving views. 31 // and does not do anything involving views.
30 class TestWebContents : public WebContentsImpl, public WebContentsTester { 32 class TestWebContents : public WebContentsImpl, public WebContentsTester {
31 public: 33 public:
32 ~TestWebContents() override; 34 ~TestWebContents() override;
33 35
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // to |ExpectSetHistoryOffsetAndLength()|. 106 // to |ExpectSetHistoryOffsetAndLength()|.
105 void SetHistoryOffsetAndLength(int history_offset, 107 void SetHistoryOffsetAndLength(int history_offset,
106 int history_length) override; 108 int history_length) override;
107 109
108 void TestDidFinishLoad(const GURL& url); 110 void TestDidFinishLoad(const GURL& url);
109 void TestDidFailLoadWithError(const GURL& url, 111 void TestDidFailLoadWithError(const GURL& url,
110 int error_code, 112 int error_code,
111 const base::string16& error_description, 113 const base::string16& error_description,
112 bool was_ignored_by_handler); 114 bool was_ignored_by_handler);
113 115
116 void SetNavigationData(
117 NavigationHandle* navigation_handle,
118 std::unique_ptr<NavigationData> navigation_data) override;
119
114 protected: 120 protected:
115 // The deprecated WebContentsTester still needs to subclass this. 121 // The deprecated WebContentsTester still needs to subclass this.
116 explicit TestWebContents(BrowserContext* browser_context); 122 explicit TestWebContents(BrowserContext* browser_context);
117 123
118 private: 124 private:
119 // WebContentsImpl overrides 125 // WebContentsImpl overrides
120 void CreateNewWindow( 126 void CreateNewWindow(
121 SiteInstance* source_site_instance, 127 SiteInstance* source_site_instance,
122 int32_t route_id, 128 int32_t route_id,
123 int32_t main_frame_route_id, 129 int32_t main_frame_route_id,
(...skipping 20 matching lines...) Expand all
144 // Expectations for arguments of |SetHistoryOffsetAndLength()|. 150 // Expectations for arguments of |SetHistoryOffsetAndLength()|.
145 bool expect_set_history_offset_and_length_; 151 bool expect_set_history_offset_and_length_;
146 int expect_set_history_offset_and_length_history_offset_; 152 int expect_set_history_offset_and_length_history_offset_;
147 int expect_set_history_offset_and_length_history_length_; 153 int expect_set_history_offset_and_length_history_length_;
148 std::string save_frame_headers_; 154 std::string save_frame_headers_;
149 }; 155 };
150 156
151 } // namespace content 157 } // namespace content
152 158
153 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ 159 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.cc ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698