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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/time.h" | 6 #include "base/time.h" |
7 #include "content/browser/debugger/devtools_manager_impl.h" | 7 #include "content/browser/debugger/devtools_manager_impl.h" |
8 #include "content/browser/debugger/render_view_devtools_agent_host.h" | 8 #include "content/browser/debugger/render_view_devtools_agent_host.h" |
9 #include "content/browser/mock_content_browser_client.h" | 9 #include "content/browser/mock_content_browser_client.h" |
10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 private: | 90 private: |
91 bool renderer_unresponsive_received_; | 91 bool renderer_unresponsive_received_; |
92 }; | 92 }; |
93 | 93 |
94 class DevToolsManagerTestBrowserClient | 94 class DevToolsManagerTestBrowserClient |
95 : public content::MockContentBrowserClient { | 95 : public content::MockContentBrowserClient { |
96 public: | 96 public: |
97 DevToolsManagerTestBrowserClient() { | 97 DevToolsManagerTestBrowserClient() { |
98 } | 98 } |
99 | 99 |
100 virtual bool ShouldSwapProcessesForNavigation( | 100 virtual bool ShouldSwapBrowsingInstanceForNavigation( |
| 101 content::BrowserContext* browser_context, |
101 const GURL& current_url, | 102 const GURL& current_url, |
102 const GURL& new_url) OVERRIDE { | 103 const GURL& new_url) OVERRIDE { |
103 return true; | 104 return true; |
104 } | 105 } |
105 | 106 |
106 private: | 107 private: |
107 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); | 108 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace | 111 } // namespace |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 237 |
237 // Interrupt pending navigation and navigate back to the original site. | 238 // Interrupt pending navigation and navigate back to the original site. |
238 controller().LoadURL( | 239 controller().LoadURL( |
239 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); | 240 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); |
240 contents()->TestDidNavigate(rvh(), 1, url, content::PAGE_TRANSITION_TYPED); | 241 contents()->TestDidNavigate(rvh(), 1, url, content::PAGE_TRANSITION_TYPED); |
241 EXPECT_FALSE(contents()->cross_navigation_pending()); | 242 EXPECT_FALSE(contents()->cross_navigation_pending()); |
242 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( | 243 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( |
243 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); | 244 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); |
244 client_host.Close(DevToolsManager::GetInstance()); | 245 client_host.Close(DevToolsManager::GetInstance()); |
245 } | 246 } |
OLD | NEW |