Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_unittest.cc

Issue 155071: Do some refactoring of renderer_host.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698