| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 FAIL(); | 47 FAIL(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void SetInspectedTabUrl(const std::string& url) { | 50 virtual void SetInspectedTabUrl(const std::string& url) { |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual void DispatchOnInspectorFrontend(const std::string& message) { | 53 virtual void DispatchOnInspectorFrontend(const std::string& message) { |
| 54 last_sent_message = &message; | 54 last_sent_message = &message; |
| 55 } | 55 } |
| 56 | 56 |
| 57 virtual void TabReplaced(TabContents* new_tab) { | 57 virtual void TabReplaced(WebContents* new_tab) { |
| 58 } | 58 } |
| 59 | 59 |
| 60 static void ResetCounters() { | 60 static void ResetCounters() { |
| 61 close_counter = 0; | 61 close_counter = 0; |
| 62 } | 62 } |
| 63 | 63 |
| 64 static int close_counter; | 64 static int close_counter; |
| 65 | 65 |
| 66 const std::string* last_sent_message; | 66 const std::string* last_sent_message; |
| 67 | 67 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 // Interrupt pending navigation and navigate back to the original site. | 239 // Interrupt pending navigation and navigate back to the original site. |
| 240 controller().LoadURL( | 240 controller().LoadURL( |
| 241 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); | 241 url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); |
| 242 contents()->TestDidNavigate(rvh(), 1, url, content::PAGE_TRANSITION_TYPED); | 242 contents()->TestDidNavigate(rvh(), 1, url, content::PAGE_TRANSITION_TYPED); |
| 243 EXPECT_FALSE(contents()->cross_navigation_pending()); | 243 EXPECT_FALSE(contents()->cross_navigation_pending()); |
| 244 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( | 244 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( |
| 245 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); | 245 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); |
| 246 client_host.Close(DevToolsManager::GetInstance()); | 246 client_host.Close(DevToolsManager::GetInstance()); |
| 247 } | 247 } |
| OLD | NEW |