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

Unified Diff: content/browser/browser_plugin/test_browser_plugin_guest.cc

Issue 11094080: Browser Plugin: More robust recovery from guest crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed part of test that is no longer valid Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_plugin/test_browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/test_browser_plugin_guest.cc b/content/browser/browser_plugin/test_browser_plugin_guest.cc
index e71deea73c0ef11975378d700e90ca3cc88d357a..db94fe1969cf4981a59d8f2356bc268f44eedfe9 100644
--- a/content/browser/browser_plugin/test_browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/test_browser_plugin_guest.cc
@@ -27,6 +27,8 @@ TestBrowserPluginGuest::TestBrowserPluginGuest(
was_hidden_observed_(false),
stop_observed_(false),
reload_observed_(false),
+ set_damage_buffer_observed_(false),
+ input_observed_(false),
waiting_for_damage_buffer_with_size_(false),
last_damage_buffer_size_(gfx::Size()) {
// Listen to visibility changes so that a test can wait for these changes.
@@ -100,6 +102,20 @@ void TestBrowserPluginGuest::RenderViewGone(base::TerminationStatus status) {
BrowserPluginGuest::RenderViewGone(status);
}
+void TestBrowserPluginGuest::HandleInputEvent(
+ RenderViewHost* render_view_host,
+ const gfx::Rect& guest_rect,
+ const WebKit::WebInputEvent& event,
+ IPC::Message* reply_message) {
+ BrowserPluginGuest::HandleInputEvent(render_view_host,
+ guest_rect,
+ event,
+ reply_message);
+ input_observed_ = true;
+ if (input_message_loop_runner_)
+ input_message_loop_runner_->Quit();
+}
+
void TestBrowserPluginGuest::WaitForCrashed() {
// Check if we already observed a guest crash, return immediately if so.
if (crash_observed_)
@@ -155,6 +171,17 @@ void TestBrowserPluginGuest::WaitForStop() {
stop_observed_ = false;
}
+void TestBrowserPluginGuest::WaitForInput() {
+ if (input_observed_) {
+ input_observed_ = false;
+ return;
+ }
+
+ input_message_loop_runner_ = new MessageLoopRunner();
+ input_message_loop_runner_->Run();
+ input_observed_ = false;
+}
+
void TestBrowserPluginGuest::SetFocus(bool focused) {
focus_observed_ = true;
if (focus_message_loop_runner_)
« no previous file with comments | « content/browser/browser_plugin/test_browser_plugin_guest.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698