| 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/devtools/devtools_manager_impl.h" | 7 #include "content/browser/devtools/devtools_manager_impl.h" |
| 8 #include "content/browser/devtools/render_view_devtools_agent_host.h" | 8 #include "content/browser/devtools/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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 private: | 83 private: |
| 84 bool renderer_unresponsive_received_; | 84 bool renderer_unresponsive_received_; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient { | 87 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient { |
| 88 public: | 88 public: |
| 89 DevToolsManagerTestBrowserClient() { | 89 DevToolsManagerTestBrowserClient() { |
| 90 } | 90 } |
| 91 | 91 |
| 92 virtual bool ShouldSwapProcessesForNavigation( | 92 virtual bool ShouldSwapProcessesForNavigation( |
| 93 SiteInstance* site_instance, |
| 93 const GURL& current_url, | 94 const GURL& current_url, |
| 94 const GURL& new_url) OVERRIDE { | 95 const GURL& new_url) OVERRIDE { |
| 95 return true; | 96 return true; |
| 96 } | 97 } |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); | 100 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace | 103 } // namespace |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 controller().LoadURL( | 229 controller().LoadURL( |
| 229 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); | 230 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); |
| 230 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); | 231 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); |
| 231 EXPECT_FALSE(contents()->cross_navigation_pending()); | 232 EXPECT_FALSE(contents()->cross_navigation_pending()); |
| 232 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( | 233 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( |
| 233 DevToolsAgentHost::GetFor(rvh()))); | 234 DevToolsAgentHost::GetFor(rvh()))); |
| 234 client_host.Close(DevToolsManager::GetInstance()); | 235 client_host.Close(DevToolsManager::GetInstance()); |
| 235 } | 236 } |
| 236 | 237 |
| 237 } // namespace content | 238 } // namespace content |
| OLD | NEW |