| 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/gfx/canvas.h" | 5 #include "app/gfx/canvas.h" |
| 6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
| 7 #include "base/keyboard_codes.h" | 7 #include "base/keyboard_codes.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.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/test_render_view_host.h" | 12 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 13 #include "chrome/common/render_messages.h" | 13 #include "chrome/common/render_messages.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 using WebKit::WebInputEvent; | 16 using WebKit::WebInputEvent; |
| 17 | 17 |
| 18 // RenderWidgetHostProcess ----------------------------------------------------- | 18 // RenderWidgetHostProcess ----------------------------------------------------- |
| 19 | 19 |
| 20 class RenderWidgetHostProcess : public MockRenderProcessHost { | 20 class RenderWidgetHostProcess : public MockRenderProcessHost { |
| 21 public: | 21 public: |
| 22 explicit RenderWidgetHostProcess(Profile* profile) | 22 explicit RenderWidgetHostProcess(Profile* profile) |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 TEST_F(RenderWidgetHostTest, IgnoreKeyEventsWeDidntSend) { | 404 TEST_F(RenderWidgetHostTest, IgnoreKeyEventsWeDidntSend) { |
| 405 // Send a simulated, unrequested key response. We should ignore this. | 405 // Send a simulated, unrequested key response. We should ignore this. |
| 406 scoped_ptr<IPC::Message> response( | 406 scoped_ptr<IPC::Message> response( |
| 407 new ViewHostMsg_HandleInputEvent_ACK(0)); | 407 new ViewHostMsg_HandleInputEvent_ACK(0)); |
| 408 response->WriteInt(WebInputEvent::KeyDown); | 408 response->WriteInt(WebInputEvent::KeyDown); |
| 409 response->WriteBool(false); | 409 response->WriteBool(false); |
| 410 host_->OnMessageReceived(*response); | 410 host_->OnMessageReceived(*response); |
| 411 | 411 |
| 412 EXPECT_FALSE(host_->unhandled_keyboard_event_called()); | 412 EXPECT_FALSE(host_->unhandled_keyboard_event_called()); |
| 413 } | 413 } |
| OLD | NEW |