| 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/content_browser_client.h" | |
| 8 #include "content/browser/debugger/devtools_client_host.h" | 7 #include "content/browser/debugger/devtools_client_host.h" |
| 9 #include "content/browser/debugger/devtools_manager.h" | 8 #include "content/browser/debugger/devtools_manager.h" |
| 10 #include "content/browser/debugger/render_view_devtools_agent_host.h" | 9 #include "content/browser/debugger/render_view_devtools_agent_host.h" |
| 11 #include "content/browser/mock_content_browser_client.h" | 10 #include "content/browser/mock_content_browser_client.h" |
| 12 #include "content/browser/renderer_host/test_render_view_host.h" | 11 #include "content/browser/renderer_host/test_render_view_host.h" |
| 13 #include "content/browser/tab_contents/tab_contents_delegate.h" | 12 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 14 #include "content/browser/tab_contents/test_tab_contents.h" | 13 #include "content/browser/tab_contents/test_tab_contents.h" |
| 14 #include "content/public/browser/content_browser_client.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 using base::TimeDelta; | 17 using base::TimeDelta; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class TestDevToolsClientHost : public DevToolsClientHost { | 21 class TestDevToolsClientHost : public DevToolsClientHost { |
| 22 public: | 22 public: |
| 23 TestDevToolsClientHost() | 23 TestDevToolsClientHost() |
| 24 : last_sent_message(NULL), | 24 : last_sent_message(NULL), |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Start with a short timeout. | 191 // Start with a short timeout. |
| 192 inspected_rvh->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); | 192 inspected_rvh->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); |
| 193 // Wait long enough for first timeout and see if it fired. | 193 // Wait long enough for first timeout and see if it fired. |
| 194 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 194 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 195 new MessageLoop::QuitTask(), 10); | 195 new MessageLoop::QuitTask(), 10); |
| 196 MessageLoop::current()->Run(); | 196 MessageLoop::current()->Run(); |
| 197 EXPECT_TRUE(delegate.renderer_unresponsive_received()); | 197 EXPECT_TRUE(delegate.renderer_unresponsive_received()); |
| 198 | 198 |
| 199 contents()->set_delegate(NULL); | 199 contents()->set_delegate(NULL); |
| 200 } | 200 } |
| OLD | NEW |