| 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/shared_memory.h" | 7 #include "base/shared_memory.h" |
| 8 #include "base/timer.h" | 8 #include "base/timer.h" |
| 9 #include "content/browser/renderer_host/backing_store.h" | 9 #include "content/browser/renderer_host/backing_store.h" |
| 10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
| 11 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
| 12 #include "content/public/browser/content_browser_client.h" | 12 #include "content/public/browser/content_browser_client.h" |
| 13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 #include "content/public/browser/notification_source.h" | 16 #include "content/public/browser/notification_source.h" |
| 17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 18 #include "content/test/test_browser_context.h" | 18 #include "content/test/test_browser_context.h" |
| 19 #include "content/test/test_browser_thread.h" | 19 #include "content/test/test_browser_thread.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "ui/base/keycodes/keyboard_codes.h" | 21 #include "ui/base/keycodes/keyboard_codes.h" |
| 22 #include "ui/gfx/canvas_skia.h" | 22 #include "ui/gfx/canvas_skia.h" |
| 23 | 23 |
| 24 using base::TimeDelta; | 24 using base::TimeDelta; |
| 25 using content::BrowserThread; |
| 25 | 26 |
| 26 using WebKit::WebInputEvent; | 27 using WebKit::WebInputEvent; |
| 27 using WebKit::WebMouseWheelEvent; | 28 using WebKit::WebMouseWheelEvent; |
| 28 | 29 |
| 29 namespace gfx { | 30 namespace gfx { |
| 30 class Size; | 31 class Size; |
| 31 } | 32 } |
| 32 | 33 |
| 33 // RenderWidgetHostProcess ----------------------------------------------------- | 34 // RenderWidgetHostProcess ----------------------------------------------------- |
| 34 | 35 |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // Start it again to ensure it still works. | 737 // Start it again to ensure it still works. |
| 737 EXPECT_FALSE(host_->unresponsive_timer_fired()); | 738 EXPECT_FALSE(host_->unresponsive_timer_fired()); |
| 738 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); | 739 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); |
| 739 | 740 |
| 740 // Wait long enough for first timeout and see if it fired. | 741 // Wait long enough for first timeout and see if it fired. |
| 741 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 742 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 742 new MessageLoop::QuitTask(), 10); | 743 new MessageLoop::QuitTask(), 10); |
| 743 MessageLoop::current()->Run(); | 744 MessageLoop::current()->Run(); |
| 744 EXPECT_TRUE(host_->unresponsive_timer_fired()); | 745 EXPECT_TRUE(host_->unresponsive_timer_fired()); |
| 745 } | 746 } |
| OLD | NEW |