| 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 // RenderViewFakeResourcesTest can be used as a base class for tests that need | 5 // RenderViewFakeResourcesTest can be used as a base class for tests that need |
| 6 // to simulate loading network resources (such as http: urls) into a | 6 // to simulate loading network resources (such as http: urls) into a |
| 7 // RenderView. It does this by handling the relevant IPC messages that the | 7 // RenderView. It does this by handling the relevant IPC messages that the |
| 8 // renderer would normally send to the browser, and responding with static | 8 // renderer would normally send to the browser, and responding with static |
| 9 // content from an internal map. A request for a url that is not in the map | 9 // content from an internal map. A request for a url that is not in the map |
| 10 // will return a 404. Currently, content is always returned as text/html, and | 10 // will return a 404. Currently, content is always returned as text/html, and |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 #include "base/memory/scoped_ptr.h" | 48 #include "base/memory/scoped_ptr.h" |
| 49 #include "base/message_loop.h" | 49 #include "base/message_loop.h" |
| 50 #include "content/public/renderer/content_renderer_client.h" | 50 #include "content/public/renderer/content_renderer_client.h" |
| 51 #include "content/public/renderer/render_view_visitor.h" | 51 #include "content/public/renderer/render_view_visitor.h" |
| 52 #include "ipc/ipc_listener.h" | 52 #include "ipc/ipc_listener.h" |
| 53 #include "testing/gtest/include/gtest/gtest.h" | 53 #include "testing/gtest/include/gtest/gtest.h" |
| 54 | 54 |
| 55 struct ResourceHostMsg_Request; | 55 struct ResourceHostMsg_Request; |
| 56 | 56 |
| 57 namespace IPC { |
| 58 class Channel; |
| 59 } |
| 60 |
| 57 namespace WebKit { | 61 namespace WebKit { |
| 58 class WebFrame; | 62 class WebFrame; |
| 59 class WebHistoryItem; | 63 class WebHistoryItem; |
| 60 } | 64 } |
| 61 | 65 |
| 62 namespace content { | 66 namespace content { |
| 63 class MockRenderProcess; | 67 class MockRenderProcess; |
| 64 class RenderThreadImpl; | 68 class RenderThreadImpl; |
| 65 | 69 |
| 66 class RenderViewFakeResourcesTest : public ::testing::Test, | 70 class RenderViewFakeResourcesTest : public ::testing::Test, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // The previous state for whether sandbox support was enabled in | 147 // The previous state for whether sandbox support was enabled in |
| 144 // RenderViewWebKitPlatformSupportImpl. | 148 // RenderViewWebKitPlatformSupportImpl. |
| 145 bool sandbox_was_enabled_; | 149 bool sandbox_was_enabled_; |
| 146 | 150 |
| 147 DISALLOW_COPY_AND_ASSIGN(RenderViewFakeResourcesTest); | 151 DISALLOW_COPY_AND_ASSIGN(RenderViewFakeResourcesTest); |
| 148 }; | 152 }; |
| 149 | 153 |
| 150 } // namespace content | 154 } // namespace content |
| 151 | 155 |
| 152 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_FAKE_RESOURCES_TEST_H_ | 156 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_FAKE_RESOURCES_TEST_H_ |
| OLD | NEW |