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 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 virtual ~RenderFrameHostTester() {} | 67 virtual ~RenderFrameHostTester() {} |
| 68 | 68 |
| 69 // Gives tests access to RenderFrameHostImpl::OnCreateChild. The returned | 69 // Gives tests access to RenderFrameHostImpl::OnCreateChild. The returned |
| 70 // RenderFrameHost is owned by the parent RenderFrameHost. | 70 // RenderFrameHost is owned by the parent RenderFrameHost. |
| 71 virtual RenderFrameHost* AppendChild(const std::string& frame_name) = 0; | 71 virtual RenderFrameHost* AppendChild(const std::string& frame_name) = 0; |
| 72 | 72 |
| 73 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given | 73 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given |
| 74 // information. Sets the rest of the parameters in the message to the | 74 // information. Sets the rest of the parameters in the message to the |
| 75 // "typical" values. This is a helper function for simulating the most common | 75 // "typical" values. This is a helper function for simulating the most common |
| 76 // types of loads. | 76 // types of loads. |
| 77 virtual void SendNavigate(int page_id, const GURL& url) = 0; | 77 virtual void SendNavigate(int page_id, |
| 78 virtual void SendFailedNavigate(int page_id, const GURL& url) = 0; | 78 int nav_entry_id, |
|
Charlie Reis
2015/04/10 23:54:21
Would it help to give some tips for what nav_entry
Avi (use Gerrit)
2015/04/13 22:42:48
I'm not sure. There's no documentation on how to f
| |
| 79 bool did_create_new_entry, | |
| 80 const GURL& url) = 0; | |
| 81 virtual void SendFailedNavigate(int page_id, | |
| 82 int nav_entry_id, | |
| 83 bool did_create_new_entry, | |
| 84 const GURL& url) = 0; | |
| 79 | 85 |
| 80 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given | 86 // Calls OnDidCommitProvisionalLoad on the RenderFrameHost with the given |
| 81 // information, including a custom PageTransition. Sets the rest of the | 87 // information, including a custom PageTransition. Sets the rest of the |
| 82 // parameters in the message to the "typical" values. This is a helper | 88 // parameters in the message to the "typical" values. This is a helper |
| 83 // function for simulating the most common types of loads. | 89 // function for simulating the most common types of loads. |
| 84 virtual void SendNavigateWithTransition(int page_id, | 90 virtual void SendNavigateWithTransition(int page_id, |
| 91 int nav_entry_id, | |
| 92 bool did_create_new_entry, | |
| 85 const GURL& url, | 93 const GURL& url, |
| 86 ui::PageTransition transition) = 0; | 94 ui::PageTransition transition) = 0; |
| 87 | 95 |
| 88 // If set, future loads will have |mime_type| set as the mime type. | 96 // If set, future loads will have |mime_type| set as the mime type. |
| 89 // If not set, the mime type will default to "text/html". | 97 // If not set, the mime type will default to "text/html". |
| 90 virtual void SetContentsMimeType(const std::string& mime_type) = 0; | 98 virtual void SetContentsMimeType(const std::string& mime_type) = 0; |
| 91 | 99 |
| 92 // Calls OnBeforeUnloadACK on this RenderFrameHost with the given parameter. | 100 // Calls OnBeforeUnloadACK on this RenderFrameHost with the given parameter. |
| 93 virtual void SendBeforeUnloadACK(bool proceed) = 0; | 101 virtual void SendBeforeUnloadACK(bool proceed) = 0; |
| 94 | 102 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 246 | 254 |
| 247 int thread_bundle_options_; | 255 int thread_bundle_options_; |
| 248 scoped_ptr<TestBrowserThreadBundle> thread_bundle_; | 256 scoped_ptr<TestBrowserThreadBundle> thread_bundle_; |
| 249 | 257 |
| 250 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 258 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
| 251 }; | 259 }; |
| 252 | 260 |
| 253 } // namespace content | 261 } // namespace content |
| 254 | 262 |
| 255 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 263 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| OLD | NEW |