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_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 // This is a helper function for simulating the most common types of loads. | 80 // This is a helper function for simulating the most common types of loads. |
| 81 virtual void SendNavigate(int page_id, const GURL& url) = 0; | 81 virtual void SendNavigate(int page_id, const GURL& url) = 0; |
| 82 | 82 |
| 83 // Calls OnMsgNavigate on the RenderViewHost with the given information, | 83 // Calls OnMsgNavigate on the RenderViewHost with the given information, |
| 84 // including a custom PageTransition. Sets the rest of the | 84 // including a custom PageTransition. Sets the rest of the |
| 85 // parameters in the message to the "typical" values. This is a helper | 85 // parameters in the message to the "typical" values. This is a helper |
| 86 // function for simulating the most common types of loads. | 86 // function for simulating the most common types of loads. |
| 87 virtual void SendNavigateWithTransition(int page_id, const GURL& url, | 87 virtual void SendNavigateWithTransition(int page_id, const GURL& url, |
| 88 PageTransition transition) = 0; | 88 PageTransition transition) = 0; |
| 89 | 89 |
| 90 // Calls OnMsgNavigate on the RenderViewHost with the given information, | |
| 91 // including a custom original request URL. Sets the rest of the | |
| 92 // parameters in the message to the "typical" values. This is a helper | |
| 93 // function for simulating the most common types of loads. | |
| 94 virtual void SendNavigateWithOriginalRequestURL( | |
|
jam
2012/07/03 05:50:12
nit: only add methods to the public class if they'
gone
2012/07/03 18:24:39
Moved over
| |
| 95 int page_id, const GURL& url, const GURL& original_request_url) = 0; | |
| 96 | |
| 97 // Calls OnMsgNavigate on the RenderViewHost with the given information. | |
| 98 // Sets the rest of the parameters in the message to the "typical" values. | |
| 99 // This is a helper function for simulating the most common types of loads. | |
| 100 virtual void SendNavigateWithParameters( | |
| 101 int page_id, const GURL& url, PageTransition transition, | |
| 102 const GURL& original_request_url) = 0; | |
| 103 | |
| 90 // Calls OnMsgShouldCloseACK on the RenderViewHost with the given parameter. | 104 // Calls OnMsgShouldCloseACK on the RenderViewHost with the given parameter. |
| 91 virtual void SendShouldCloseACK(bool proceed) = 0; | 105 virtual void SendShouldCloseACK(bool proceed) = 0; |
| 92 | 106 |
| 93 // If set, future loads will have |mime_type| set as the mime type. | 107 // If set, future loads will have |mime_type| set as the mime type. |
| 94 // If not set, the mime type will default to "text/html". | 108 // If not set, the mime type will default to "text/html". |
| 95 virtual void SetContentsMimeType(const std::string& mime_type) = 0; | 109 virtual void SetContentsMimeType(const std::string& mime_type) = 0; |
| 96 | 110 |
| 97 // Simulates the SwapOut_ACK that fires if you commit a cross-site | 111 // Simulates the SwapOut_ACK that fires if you commit a cross-site |
| 98 // navigation without making any network requests. | 112 // navigation without making any network requests. |
| 99 virtual void SimulateSwapOutACK() = 0; | 113 virtual void SimulateSwapOutACK() = 0; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; | 195 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; |
| 182 #endif | 196 #endif |
| 183 RenderViewHostTestEnabler rvh_test_enabler_; | 197 RenderViewHostTestEnabler rvh_test_enabler_; |
| 184 | 198 |
| 185 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 199 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
| 186 }; | 200 }; |
| 187 | 201 |
| 188 } // namespace content | 202 } // namespace content |
| 189 | 203 |
| 190 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 204 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| OLD | NEW |