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