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

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

Issue 9645003: Introduce abstractions to allow embedders to test RenderViewHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 years, 9 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) 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/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/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
11 #include "content/browser/renderer_host/mock_render_process_host.h"
11 #include "content/browser/renderer_host/test_render_view_host.h" 12 #include "content/browser/renderer_host/test_render_view_host.h"
12 #include "content/common/view_messages.h" 13 #include "content/common/view_messages.h"
13 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
14 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
16 #include "content/public/browser/notification_source.h" 17 #include "content/public/browser/notification_source.h"
17 #include "content/public/browser/notification_types.h" 18 #include "content/public/browser/notification_types.h"
18 #include "content/port/browser/render_widget_host_view_port.h" 19 #include "content/port/browser/render_widget_host_view_port.h"
19 #include "content/test/test_browser_context.h" 20 #include "content/test/test_browser_context.h"
20 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); 774 SimulateKeyboardEvent(WebInputEvent::RawKeyDown);
774 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); 775 SimulateKeyboardEvent(WebInputEvent::RawKeyDown);
775 SendInputEventACK(WebInputEvent::RawKeyDown, true); 776 SendInputEventACK(WebInputEvent::RawKeyDown, true);
776 777
777 // Wait long enough for first timeout and see if it fired. 778 // Wait long enough for first timeout and see if it fired.
778 MessageLoop::current()->PostDelayedTask( 779 MessageLoop::current()->PostDelayedTask(
779 FROM_HERE, MessageLoop::QuitClosure(), TimeDelta::FromMilliseconds(40)); 780 FROM_HERE, MessageLoop::QuitClosure(), TimeDelta::FromMilliseconds(40));
780 MessageLoop::current()->Run(); 781 MessageLoop::current()->Run();
781 EXPECT_TRUE(host_->unresponsive_timer_fired()); 782 EXPECT_TRUE(host_->unresponsive_timer_fired());
782 } 783 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698