| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 // You can instantiate only one class like this at a time. During its | 104 // You can instantiate only one class like this at a time. During its |
| 105 // lifetime, RenderViewHost objects created may be used via | 105 // lifetime, RenderViewHost objects created may be used via |
| 106 // RenderViewHostTester. | 106 // RenderViewHostTester. |
| 107 class RenderViewHostTestEnabler { | 107 class RenderViewHostTestEnabler { |
| 108 public: | 108 public: |
| 109 RenderViewHostTestEnabler(); | 109 RenderViewHostTestEnabler(); |
| 110 ~RenderViewHostTestEnabler(); | 110 ~RenderViewHostTestEnabler(); |
| 111 | 111 |
| 112 MockRenderProcessHostFactory* rph_factory() { |
| 113 return rph_factory_.get(); |
| 114 } |
| 115 |
| 112 private: | 116 private: |
| 113 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestEnabler); | 117 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestEnabler); |
| 114 friend class RenderViewHostTestHarness; | 118 friend class RenderViewHostTestHarness; |
| 115 | 119 |
| 116 scoped_ptr<MockRenderProcessHostFactory> rph_factory_; | 120 scoped_ptr<MockRenderProcessHostFactory> rph_factory_; |
| 117 scoped_ptr<TestRenderViewHostFactory> rvh_factory_; | 121 scoped_ptr<TestRenderViewHostFactory> rvh_factory_; |
| 118 }; | 122 }; |
| 119 | 123 |
| 120 // RenderViewHostTestHarness --------------------------------------------------- | 124 // RenderViewHostTestHarness --------------------------------------------------- |
| 121 class RenderViewHostTestHarness : public testing::Test { | 125 class RenderViewHostTestHarness : public testing::Test { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; | 186 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; |
| 183 #endif | 187 #endif |
| 184 RenderViewHostTestEnabler rvh_test_enabler_; | 188 RenderViewHostTestEnabler rvh_test_enabler_; |
| 185 | 189 |
| 186 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 190 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
| 187 }; | 191 }; |
| 188 | 192 |
| 189 } // namespace content | 193 } // namespace content |
| 190 | 194 |
| 191 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ | 195 #endif // CONTENT_PUBLIC_TEST_TEST_RENDERER_HOST_H_ |
| OLD | NEW |