| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/test/render_view_fake_resources_test.h" | 5 #include "content/test/render_view_fake_resources_test.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 InitWebCoreSystemInterface(); | 73 InitWebCoreSystemInterface(); |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 // Tell the renderer to create a view, then wait until it's ready. | 76 // Tell the renderer to create a view, then wait until it's ready. |
| 77 // We can't call View::Create() directly here or else we won't get | 77 // We can't call View::Create() directly here or else we won't get |
| 78 // RenderProcess's lazy initialization of WebKit. | 78 // RenderProcess's lazy initialization of WebKit. |
| 79 view_ = NULL; | 79 view_ = NULL; |
| 80 ViewMsg_New_Params params; | 80 ViewMsg_New_Params params; |
| 81 params.parent_window = 0; | 81 params.parent_window = 0; |
| 82 params.view_id = kViewId; | 82 params.view_id = kViewId; |
| 83 params.opener_route_id = MSG_ROUTING_NONE; |
| 83 params.session_storage_namespace_id = kInvalidSessionStorageNamespaceId; | 84 params.session_storage_namespace_id = kInvalidSessionStorageNamespaceId; |
| 84 ASSERT_TRUE(channel_->Send(new ViewMsg_New(params))); | 85 ASSERT_TRUE(channel_->Send(new ViewMsg_New(params))); |
| 85 message_loop_.Run(); | 86 message_loop_.Run(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 void RenderViewFakeResourcesTest::TearDown() { | 89 void RenderViewFakeResourcesTest::TearDown() { |
| 89 // Try very hard to collect garbage before shutting down. | 90 // Try very hard to collect garbage before shutting down. |
| 90 GetMainFrame()->collectGarbage(); | 91 GetMainFrame()->collectGarbage(); |
| 91 GetMainFrame()->collectGarbage(); | 92 GetMainFrame()->collectGarbage(); |
| 92 | 93 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 params.current_history_list_length = (impl->historyBackListCount() + | 199 params.current_history_list_length = (impl->historyBackListCount() + |
| 199 impl->historyForwardListCount() + 1); | 200 impl->historyForwardListCount() + 1); |
| 200 params.url = GURL(history_item.urlString()); | 201 params.url = GURL(history_item.urlString()); |
| 201 params.transition = content::PAGE_TRANSITION_FORWARD_BACK; | 202 params.transition = content::PAGE_TRANSITION_FORWARD_BACK; |
| 202 params.state = webkit_glue::HistoryItemToString(history_item); | 203 params.state = webkit_glue::HistoryItemToString(history_item); |
| 203 params.navigation_type = ViewMsg_Navigate_Type::NORMAL; | 204 params.navigation_type = ViewMsg_Navigate_Type::NORMAL; |
| 204 params.request_time = base::Time::Now(); | 205 params.request_time = base::Time::Now(); |
| 205 channel_->Send(new ViewMsg_Navigate(impl->routing_id(), params)); | 206 channel_->Send(new ViewMsg_Navigate(impl->routing_id(), params)); |
| 206 message_loop_.Run(); | 207 message_loop_.Run(); |
| 207 } | 208 } |
| OLD | NEW |