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

Side by Side Diff: content/renderer/mus/compositor_mus_connection_unittest.cc

Issue 2482453002: Don't restart the hang renderer timeout on messages ack'd from the compositor thread. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/renderer/mus/compositor_mus_connection.h" 5 #include "content/renderer/mus/compositor_mus_connection.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 content::RenderWidget* render_widget) 199 content::RenderWidget* render_widget)
200 : content::RenderWidgetInputHandler(render_widget, render_widget), 200 : content::RenderWidgetInputHandler(render_widget, render_widget),
201 delegate_(nullptr), 201 delegate_(nullptr),
202 state_(content::InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN) {} 202 state_(content::InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN) {}
203 203
204 void TestRenderWidgetInputHandler::HandleInputEvent( 204 void TestRenderWidgetInputHandler::HandleInputEvent(
205 const blink::WebInputEvent& input_event, 205 const blink::WebInputEvent& input_event,
206 const ui::LatencyInfo& latency_info, 206 const ui::LatencyInfo& latency_info,
207 content::InputEventDispatchType dispatch_type) { 207 content::InputEventDispatchType dispatch_type) {
208 if (delegate_) { 208 if (delegate_) {
209 std::unique_ptr<content::InputEventAck> ack( 209 std::unique_ptr<content::InputEventAck> ack(new content::InputEventAck(
210 new content::InputEventAck(input_event.type, state_)); 210 content::InputEventAckLocation::
dcheng 2016/11/04 18:24:49 Nit: though it's not really changed by this CL, co
dtapuska 2016/11/04 20:14:16 Done.
211 INPUT_EVENT_ACK_LOCATION_COMPOSITOR_THREAD,
212 input_event.type, state_));
211 delegate_->OnInputEventAck(std::move(ack)); 213 delegate_->OnInputEventAck(std::move(ack));
212 } 214 }
213 } 215 }
214 216
215 } // namespace 217 } // namespace
216 218
217 namespace content { 219 namespace content {
218 220
219 // Test suite for CompositorMusConnection, this does not setup a full renderer 221 // Test suite for CompositorMusConnection, this does not setup a full renderer
220 // environment. This does not establish a connection to a mus server, nor does 222 // environment. This does not establish a connection to a mus server, nor does
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 EXPECT_FALSE(ack_callback.get()); 497 EXPECT_FALSE(ack_callback.get());
496 498
497 VerifyAndRunQueues(true, true); 499 VerifyAndRunQueues(true, true);
498 500
499 // The ack callback should have been called 501 // The ack callback should have been called
500 EXPECT_TRUE(test_callback->called()); 502 EXPECT_TRUE(test_callback->called());
501 EXPECT_EQ(EventResult::HANDLED, test_callback->result()); 503 EXPECT_EQ(EventResult::HANDLED, test_callback->result());
502 } 504 }
503 505
504 } // namespace content 506 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698