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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 FAIL(); | 42 FAIL(); |
43 } | 43 } |
44 | 44 |
45 virtual void DispatchOnInspectorFrontend(const std::string& message) { | 45 virtual void DispatchOnInspectorFrontend(const std::string& message) { |
46 last_sent_message = &message; | 46 last_sent_message = &message; |
47 } | 47 } |
48 | 48 |
49 virtual void ContentsReplaced(WebContents* new_contents) { | 49 virtual void ContentsReplaced(WebContents* new_contents) { |
50 } | 50 } |
51 | 51 |
| 52 virtual void ReplacedWithAnotherClient() { |
| 53 } |
| 54 |
52 static void ResetCounters() { | 55 static void ResetCounters() { |
53 close_counter = 0; | 56 close_counter = 0; |
54 } | 57 } |
55 | 58 |
56 static int close_counter; | 59 static int close_counter; |
57 | 60 |
58 const std::string* last_sent_message; | 61 const std::string* last_sent_message; |
59 | 62 |
60 private: | 63 private: |
61 bool closed_; | 64 bool closed_; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 controller().LoadURL( | 234 controller().LoadURL( |
232 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); | 235 url, Referrer(), PAGE_TRANSITION_TYPED, std::string()); |
233 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); | 236 contents()->TestDidNavigate(rvh(), 1, url, PAGE_TRANSITION_TYPED); |
234 EXPECT_FALSE(contents()->cross_navigation_pending()); | 237 EXPECT_FALSE(contents()->cross_navigation_pending()); |
235 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( | 238 EXPECT_EQ(&client_host, devtools_manager->GetDevToolsClientHostFor( |
236 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); | 239 DevToolsAgentHostRegistry::GetDevToolsAgentHost(rvh()))); |
237 client_host.Close(DevToolsManager::GetInstance()); | 240 client_host.Close(DevToolsManager::GetInstance()); |
238 } | 241 } |
239 | 242 |
240 } // namespace content | 243 } // namespace content |
OLD | NEW |