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