| 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 "chrome/browser/browser_url_handler.h" | 5 #include "chrome/browser/browser_url_handler.h" |
| 6 #include "chrome/test/testing_profile.h" | 6 #include "chrome/test/testing_profile.h" |
| 7 #include "content/browser/renderer_host/test_backing_store.h" | 7 #include "content/browser/renderer_host/test_backing_store.h" |
| 8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
| 9 #include "content/browser/site_instance.h" | 9 #include "content/browser/site_instance.h" |
| 10 #include "content/browser/tab_contents/navigation_controller.h" | 10 #include "content/browser/tab_contents/navigation_controller.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 params.http_status_code = 0; | 101 params.http_status_code = 0; |
| 102 params.socket_address.set_host("2001:db8::1"); | 102 params.socket_address.set_host("2001:db8::1"); |
| 103 params.socket_address.set_port(80); | 103 params.socket_address.set_port(80); |
| 104 params.was_fetched_via_proxy = simulate_fetch_via_proxy_; | 104 params.was_fetched_via_proxy = simulate_fetch_via_proxy_; |
| 105 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); | 105 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url)); |
| 106 | 106 |
| 107 ViewHostMsg_FrameNavigate msg(1, params); | 107 ViewHostMsg_FrameNavigate msg(1, params); |
| 108 OnMsgNavigate(msg); | 108 OnMsgNavigate(msg); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void TestRenderViewHost::SendShouldCloseACK(bool proceed) { |
| 112 OnMsgShouldCloseACK(proceed); |
| 113 } |
| 114 |
| 111 void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) { | 115 void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) { |
| 112 simulate_fetch_via_proxy_ = proxy; | 116 simulate_fetch_via_proxy_ = proxy; |
| 113 } | 117 } |
| 114 | 118 |
| 115 void TestRenderViewHost::set_contents_mime_type(const std::string& mime_type) { | 119 void TestRenderViewHost::set_contents_mime_type(const std::string& mime_type) { |
| 116 contents_mime_type_ = mime_type; | 120 contents_mime_type_ = mime_type; |
| 117 } | 121 } |
| 118 | 122 |
| 119 TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh) | 123 TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh) |
| 120 : rwh_(rwh), | 124 : rwh_(rwh), |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 SetContents(NULL); | 357 SetContents(NULL); |
| 354 | 358 |
| 355 // Make sure that we flush any messages related to TabContents destruction | 359 // Make sure that we flush any messages related to TabContents destruction |
| 356 // before we destroy the profile. | 360 // before we destroy the profile. |
| 357 MessageLoop::current()->RunAllPending(); | 361 MessageLoop::current()->RunAllPending(); |
| 358 | 362 |
| 359 // Release the profile on the UI thread. | 363 // Release the profile on the UI thread. |
| 360 message_loop_.DeleteSoon(FROM_HERE, profile_.release()); | 364 message_loop_.DeleteSoon(FROM_HERE, profile_.release()); |
| 361 message_loop_.RunAllPending(); | 365 message_loop_.RunAllPending(); |
| 362 } | 366 } |
| OLD | NEW |