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.h" | 9 #include "base/message_loop.h" |
10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual void SendShouldCloseACK(bool proceed) = 0; | 90 virtual void SendShouldCloseACK(bool proceed) = 0; |
91 | 91 |
92 // If set, future loads will have |mime_type| set as the mime type. | 92 // If set, future loads will have |mime_type| set as the mime type. |
93 // If not set, the mime type will default to "text/html". | 93 // If not set, the mime type will default to "text/html". |
94 virtual void SetContentsMimeType(const std::string& mime_type) = 0; | 94 virtual void SetContentsMimeType(const std::string& mime_type) = 0; |
95 | 95 |
96 // Simulates the SwapOut_ACK that fires if you commit a cross-site | 96 // Simulates the SwapOut_ACK that fires if you commit a cross-site |
97 // navigation without making any network requests. | 97 // navigation without making any network requests. |
98 virtual void SimulateSwapOutACK() = 0; | 98 virtual void SimulateSwapOutACK() = 0; |
99 | 99 |
100 // Makes the WasHidden/WasRestored calls to the RenderWidget that | 100 // Makes the WasHidden/WasShown calls to the RenderWidget that |
101 // tell it it has been hidden or restored from having been hidden. | 101 // tell it it has been hidden or restored from having been hidden. |
102 virtual void SimulateWasHidden() = 0; | 102 virtual void SimulateWasHidden() = 0; |
103 virtual void SimulateWasRestored() = 0; | 103 virtual void SimulateWasShown() = 0; |
104 }; | 104 }; |
105 | 105 |
106 // You can instantiate only one class like this at a time. During its | 106 // You can instantiate only one class like this at a time. During its |
107 // lifetime, RenderViewHost objects created may be used via | 107 // lifetime, RenderViewHost objects created may be used via |
108 // RenderViewHostTester. | 108 // RenderViewHostTester. |
109 class RenderViewHostTestEnabler { | 109 class RenderViewHostTestEnabler { |
110 public: | 110 public: |
111 RenderViewHostTestEnabler(); | 111 RenderViewHostTestEnabler(); |
112 ~RenderViewHostTestEnabler(); | 112 ~RenderViewHostTestEnabler(); |
113 | 113 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; | 180 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; |
181 #endif | 181 #endif |
182 RenderViewHostTestEnabler rvh_test_enabler_; | 182 RenderViewHostTestEnabler rvh_test_enabler_; |
183 | 183 |
184 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 184 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
185 }; | 185 }; |
186 | 186 |
187 } // namespace content | 187 } // namespace content |
188 | 188 |
189 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 189 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
OLD | NEW |