| OLD | NEW | 
|    1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2009 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 "app/keyboard_codes.h" | 
|    5 #include "base/basictypes.h" |    6 #include "base/basictypes.h" | 
|    6 #include "base/keyboard_codes.h" |  | 
|    7 #include "base/scoped_ptr.h" |    7 #include "base/scoped_ptr.h" | 
|    8 #include "base/shared_memory.h" |    8 #include "base/shared_memory.h" | 
|    9 #include "base/timer.h" |    9 #include "base/timer.h" | 
|   10 #include "build/build_config.h" |   10 #include "build/build_config.h" | 
|   11 #include "chrome/browser/renderer_host/backing_store.h" |   11 #include "chrome/browser/renderer_host/backing_store.h" | 
|   12 #include "chrome/browser/renderer_host/render_widget_host_painting_observer.h" |   12 #include "chrome/browser/renderer_host/render_widget_host_painting_observer.h" | 
|   13 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |   13 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 
|   14 #include "chrome/common/render_messages.h" |   14 #include "chrome/common/render_messages.h" | 
|   15 #include "chrome/common/render_messages_params.h" |   15 #include "chrome/common/render_messages_params.h" | 
|   16 #include "chrome/test/testing_profile.h" |   16 #include "chrome/test/testing_profile.h" | 
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  257     scoped_ptr<IPC::Message> response( |  257     scoped_ptr<IPC::Message> response( | 
|  258         new ViewHostMsg_HandleInputEvent_ACK(0)); |  258         new ViewHostMsg_HandleInputEvent_ACK(0)); | 
|  259     response->WriteInt(type); |  259     response->WriteInt(type); | 
|  260     response->WriteBool(processed); |  260     response->WriteBool(processed); | 
|  261     host_->OnMessageReceived(*response); |  261     host_->OnMessageReceived(*response); | 
|  262   } |  262   } | 
|  263  |  263  | 
|  264   void SimulateKeyboardEvent(WebInputEvent::Type type) { |  264   void SimulateKeyboardEvent(WebInputEvent::Type type) { | 
|  265     NativeWebKeyboardEvent key_event; |  265     NativeWebKeyboardEvent key_event; | 
|  266     key_event.type = type; |  266     key_event.type = type; | 
|  267     key_event.windowsKeyCode = base::VKEY_L;  // non-null made up value. |  267     key_event.windowsKeyCode = app::VKEY_L;  // non-null made up value. | 
|  268     host_->ForwardKeyboardEvent(key_event); |  268     host_->ForwardKeyboardEvent(key_event); | 
|  269   } |  269   } | 
|  270  |  270  | 
|  271   void SimulateWheelEvent(float dX, float dY, int modifiers) { |  271   void SimulateWheelEvent(float dX, float dY, int modifiers) { | 
|  272     WebMouseWheelEvent wheel_event; |  272     WebMouseWheelEvent wheel_event; | 
|  273     wheel_event.type = WebInputEvent::MouseWheel; |  273     wheel_event.type = WebInputEvent::MouseWheel; | 
|  274     wheel_event.deltaX = dX; |  274     wheel_event.deltaX = dX; | 
|  275     wheel_event.deltaY = dY; |  275     wheel_event.deltaY = dY; | 
|  276     wheel_event.modifiers = modifiers; |  276     wheel_event.modifiers = modifiers; | 
|  277     host_->ForwardWheelEvent(wheel_event); |  277     host_->ForwardWheelEvent(wheel_event); | 
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  699   // Start it again to ensure it still works. |  699   // Start it again to ensure it still works. | 
|  700   EXPECT_FALSE(host_->unresponsive_timer_fired()); |  700   EXPECT_FALSE(host_->unresponsive_timer_fired()); | 
|  701   host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); |  701   host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); | 
|  702  |  702  | 
|  703   // Wait long enough for first timeout and see if it fired. |  703   // Wait long enough for first timeout and see if it fired. | 
|  704   MessageLoop::current()->PostDelayedTask(FROM_HERE, |  704   MessageLoop::current()->PostDelayedTask(FROM_HERE, | 
|  705                                           new MessageLoop::QuitTask(), 10); |  705                                           new MessageLoop::QuitTask(), 10); | 
|  706   MessageLoop::current()->Run(); |  706   MessageLoop::current()->Run(); | 
|  707   EXPECT_TRUE(host_->unresponsive_timer_fired()); |  707   EXPECT_TRUE(host_->unresponsive_timer_fired()); | 
|  708 } |  708 } | 
| OLD | NEW |