| 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 #include "base/path_service.h" | 5 #include "base/path_service.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class RenderViewHostTest : public ContentBrowserTest { | 27 class RenderViewHostTest : public ContentBrowserTest { |
| 28 public: | 28 public: |
| 29 RenderViewHostTest() {} | 29 RenderViewHostTest() {} |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 class RenderViewHostTestWebContentsObserver : public WebContentsObserver { | 32 class RenderViewHostTestWebContentsObserver : public WebContentsObserver { |
| 33 public: | 33 public: |
| 34 explicit RenderViewHostTestWebContentsObserver(WebContents* web_contents) | 34 explicit RenderViewHostTestWebContentsObserver(WebContents* web_contents) |
| 35 : WebContentsObserver(web_contents), | 35 : WebContentsObserver(web_contents), |
| 36 navigation_count_(0) {} | 36 navigation_count_(0) {} |
| 37 virtual ~RenderViewHostTestWebContentsObserver() {} | 37 ~RenderViewHostTestWebContentsObserver() override {} |
| 38 | 38 |
| 39 virtual void DidNavigateMainFrame( | 39 void DidNavigateMainFrame(const LoadCommittedDetails& details, |
| 40 const LoadCommittedDetails& details, | 40 const FrameNavigateParams& params) override { |
| 41 const FrameNavigateParams& params) override { | |
| 42 observed_socket_address_ = params.socket_address; | 41 observed_socket_address_ = params.socket_address; |
| 43 base_url_ = params.base_url; | 42 base_url_ = params.base_url; |
| 44 ++navigation_count_; | 43 ++navigation_count_; |
| 45 } | 44 } |
| 46 | 45 |
| 47 const net::HostPortPair& observed_socket_address() const { | 46 const net::HostPortPair& observed_socket_address() const { |
| 48 return observed_socket_address_; | 47 return observed_socket_address_; |
| 49 } | 48 } |
| 50 | 49 |
| 51 GURL base_url() const { | 50 GURL base_url() const { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 154 |
| 156 // Do something that causes ipc queues to flush and tasks in | 155 // Do something that causes ipc queues to flush and tasks in |
| 157 // flight to complete such that we should have received the ACK. | 156 // flight to complete such that we should have received the ACK. |
| 158 NavigateToURL(shell(), test_url); | 157 NavigateToURL(shell(), test_url); |
| 159 | 158 |
| 160 // Verify we have the only remaining reference to the namespace. | 159 // Verify we have the only remaining reference to the namespace. |
| 161 EXPECT_TRUE(session_namespace->HasOneRef()); | 160 EXPECT_TRUE(session_namespace->HasOneRef()); |
| 162 } | 161 } |
| 163 | 162 |
| 164 } // namespace content | 163 } // namespace content |
| OLD | NEW |