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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 2737553003: Remove ChildProcess.HangRendererType. (Closed)
Patch Set: rebase to tot Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 425709abe9181e77031fcf56929bbed9995bbbfa..5faee12a7de377acd0b7dce85422e886e3da19e9 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -413,8 +413,7 @@ class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
return handle_wheel_event_;
}
- void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
- RendererUnresponsiveType type) override {
+ void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) override {
unresponsive_timer_fired_ = true;
}
@@ -1120,15 +1119,13 @@ TEST_F(RenderWidgetHostTest, UnhandledGestureEvent) {
// while one is in progress (see crbug.com/11007).
TEST_F(RenderWidgetHostTest, DontPostponeHangMonitorTimeout) {
// Start with a short timeout.
- host_->StartHangMonitorTimeout(
- TimeDelta::FromMilliseconds(10), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
+ WebInputEvent::Undefined);
// Immediately try to add a long 30 second timeout.
EXPECT_FALSE(delegate_->unresponsive_timer_fired());
- host_->StartHangMonitorTimeout(
- TimeDelta::FromSeconds(30), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromSeconds(30),
+ WebInputEvent::Undefined);
// Wait long enough for first timeout and see if it fired.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -1142,16 +1139,14 @@ TEST_F(RenderWidgetHostTest, DontPostponeHangMonitorTimeout) {
// and then started again.
TEST_F(RenderWidgetHostTest, StopAndStartHangMonitorTimeout) {
// Start with a short timeout, then stop it.
- host_->StartHangMonitorTimeout(
- TimeDelta::FromMilliseconds(10), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
+ WebInputEvent::Undefined);
host_->StopHangMonitorTimeout();
// Start it again to ensure it still works.
EXPECT_FALSE(delegate_->unresponsive_timer_fired());
- host_->StartHangMonitorTimeout(
- TimeDelta::FromMilliseconds(10), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
+ WebInputEvent::Undefined);
// Wait long enough for first timeout and see if it fired.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -1165,15 +1160,13 @@ TEST_F(RenderWidgetHostTest, StopAndStartHangMonitorTimeout) {
// updated to a shorter duration.
TEST_F(RenderWidgetHostTest, ShorterDelayHangMonitorTimeout) {
// Start with a timeout.
- host_->StartHangMonitorTimeout(
- TimeDelta::FromMilliseconds(100), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(100),
+ WebInputEvent::Undefined);
// Start it again with shorter delay.
EXPECT_FALSE(delegate_->unresponsive_timer_fired());
- host_->StartHangMonitorTimeout(
- TimeDelta::FromMilliseconds(20), WebInputEvent::Undefined,
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN);
+ host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(20),
+ WebInputEvent::Undefined);
// Wait long enough for the second timeout and see if it fired.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698