Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // to |ExpectSetHistoryOffsetAndLength()|. | 104 // to |ExpectSetHistoryOffsetAndLength()|. |
| 105 void SetHistoryOffsetAndLength(int history_offset, | 105 void SetHistoryOffsetAndLength(int history_offset, |
| 106 int history_length) override; | 106 int history_length) override; |
| 107 | 107 |
| 108 void TestDidFinishLoad(const GURL& url); | 108 void TestDidFinishLoad(const GURL& url); |
| 109 void TestDidFailLoadWithError(const GURL& url, | 109 void TestDidFailLoadWithError(const GURL& url, |
| 110 int error_code, | 110 int error_code, |
| 111 const base::string16& error_description, | 111 const base::string16& error_description, |
| 112 bool was_ignored_by_handler); | 112 bool was_ignored_by_handler); |
| 113 | 113 |
| 114 void set_simulate_used_data_reduction_proxy(bool enabled) { | |
|
tbansal1
2016/03/07 18:05:05
s/set_simulate_used_data_reduction_proxy/set_simul
RyanSturm
2016/03/08 19:47:43
Done.
| |
| 115 simulate_fetch_via_data_reduction_proxy_ = enabled; | |
| 116 } | |
| 117 | |
| 114 protected: | 118 protected: |
| 115 // The deprecated WebContentsTester still needs to subclass this. | 119 // The deprecated WebContentsTester still needs to subclass this. |
| 116 explicit TestWebContents(BrowserContext* browser_context); | 120 explicit TestWebContents(BrowserContext* browser_context); |
| 117 | 121 |
| 118 private: | 122 private: |
| 119 // WebContentsImpl overrides | 123 // WebContentsImpl overrides |
| 120 void CreateNewWindow( | 124 void CreateNewWindow( |
| 121 SiteInstance* source_site_instance, | 125 SiteInstance* source_site_instance, |
| 122 int32_t route_id, | 126 int32_t route_id, |
| 123 int32_t main_frame_route_id, | 127 int32_t main_frame_route_id, |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 139 const Referrer& referrer, | 143 const Referrer& referrer, |
| 140 const std::string& headers) override; | 144 const std::string& headers) override; |
| 141 | 145 |
| 142 RenderViewHostDelegateView* delegate_view_override_; | 146 RenderViewHostDelegateView* delegate_view_override_; |
| 143 | 147 |
| 144 // Expectations for arguments of |SetHistoryOffsetAndLength()|. | 148 // Expectations for arguments of |SetHistoryOffsetAndLength()|. |
| 145 bool expect_set_history_offset_and_length_; | 149 bool expect_set_history_offset_and_length_; |
| 146 int expect_set_history_offset_and_length_history_offset_; | 150 int expect_set_history_offset_and_length_history_offset_; |
| 147 int expect_set_history_offset_and_length_history_length_; | 151 int expect_set_history_offset_and_length_history_length_; |
| 148 std::string save_frame_headers_; | 152 std::string save_frame_headers_; |
| 153 bool simulate_fetch_via_data_reduction_proxy_; | |
| 149 }; | 154 }; |
| 150 | 155 |
| 151 } // namespace content | 156 } // namespace content |
| 152 | 157 |
| 153 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ | 158 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_H_ |
| OLD | NEW |