OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 bool KeyPressEventCallback(const NativeWebKeyboardEvent& /* event */) { | 424 bool KeyPressEventCallback(const NativeWebKeyboardEvent& /* event */) { |
425 return handle_key_press_event_; | 425 return handle_key_press_event_; |
426 } | 426 } |
427 bool MouseEventCallback(const blink::WebMouseEvent& /* event */) { | 427 bool MouseEventCallback(const blink::WebMouseEvent& /* event */) { |
428 return handle_mouse_event_; | 428 return handle_mouse_event_; |
429 } | 429 } |
430 | 430 |
431 protected: | 431 protected: |
432 // testing::Test | 432 // testing::Test |
433 virtual void SetUp() { | 433 virtual void SetUp() { |
434 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 434 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
435 command_line->AppendSwitch(switches::kValidateInputEventStream); | 435 command_line->AppendSwitch(switches::kValidateInputEventStream); |
436 | 436 |
437 browser_context_.reset(new TestBrowserContext()); | 437 browser_context_.reset(new TestBrowserContext()); |
438 delegate_.reset(new MockRenderWidgetHostDelegate()); | 438 delegate_.reset(new MockRenderWidgetHostDelegate()); |
439 process_ = new RenderWidgetHostProcess(browser_context_.get()); | 439 process_ = new RenderWidgetHostProcess(browser_context_.get()); |
440 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 440 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
441 if (IsDelegatedRendererEnabled()) { | 441 if (IsDelegatedRendererEnabled()) { |
442 ImageTransportFactory::InitializeForUnitTests( | 442 ImageTransportFactory::InitializeForUnitTests( |
443 scoped_ptr<ImageTransportFactory>( | 443 scoped_ptr<ImageTransportFactory>( |
444 new NoTransportImageTransportFactory)); | 444 new NoTransportImageTransportFactory)); |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) { | 1414 TEST_F(RenderWidgetHostTest, RendererExitedResetsInputRouter) { |
1415 // RendererExited will delete the view. | 1415 // RendererExited will delete the view. |
1416 host_->SetView(new TestView(host_.get())); | 1416 host_->SetView(new TestView(host_.get())); |
1417 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); | 1417 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); |
1418 | 1418 |
1419 // Make sure the input router is in a fresh state. | 1419 // Make sure the input router is in a fresh state. |
1420 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1420 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1421 } | 1421 } |
1422 | 1422 |
1423 } // namespace content | 1423 } // namespace content |
OLD | NEW |