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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 private: | 87 private: |
88 bool renderer_unresponsive_received_; | 88 bool renderer_unresponsive_received_; |
89 }; | 89 }; |
90 | 90 |
91 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient { | 91 class DevToolsManagerTestBrowserClient : public TestContentBrowserClient { |
92 public: | 92 public: |
93 DevToolsManagerTestBrowserClient() { | 93 DevToolsManagerTestBrowserClient() { |
94 } | 94 } |
95 | 95 |
96 virtual bool ShouldSwapProcessesForNavigation( | 96 virtual bool ShouldSwapBrowsingInstanceForNavigation( |
| 97 content::BrowserContext* browser_context, |
97 const GURL& current_url, | 98 const GURL& current_url, |
98 const GURL& new_url) OVERRIDE { | 99 const GURL& new_url) OVERRIDE { |
99 return true; | 100 return true; |
100 } | 101 } |
101 | 102 |
102 private: | 103 private: |
103 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); | 104 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerTestBrowserClient); |
104 }; | 105 }; |
105 | 106 |
106 } // namespace | 107 } // namespace |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 controller().LoadURL( | 235 controller().LoadURL( |
235 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); | 236 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); |
236 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); | 237 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); |
237 EXPECT_FALSE(contents()->cross_navigation_pending()); | 238 EXPECT_FALSE(contents()->cross_navigation_pending()); |
238 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( | 239 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( |
239 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); | 240 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); |
240 client_host.Close(DevToolsManager::GetInstance()); | 241 client_host.Close(DevToolsManager::GetInstance()); |
241 } | 242 } |
242 | 243 |
243 } // namespace content | 244 } // namespace content |
OLD | NEW |