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

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

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Improve MainThreadEventQueue unittests Created 3 years, 11 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) { 667 void AckLastSentInputEventIfNecessary(InputEventAckState ack_result) {
668 if (!sink_->message_count()) 668 if (!sink_->message_count())
669 return; 669 return;
670 670
671 InputMsg_HandleInputEvent::Param params; 671 InputMsg_HandleInputEvent::Param params;
672 if (!InputMsg_HandleInputEvent::Read( 672 if (!InputMsg_HandleInputEvent::Read(
673 sink_->GetMessageAt(sink_->message_count() - 1), &params)) { 673 sink_->GetMessageAt(sink_->message_count() - 1), &params)) {
674 return; 674 return;
675 } 675 }
676 676
677 InputEventDispatchType dispatch_type = std::get<2>(params); 677 InputEventDispatchType dispatch_type = std::get<3>(params);
678 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING) 678 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING)
679 return; 679 return;
680 680
681 const blink::WebInputEvent* event = std::get<0>(params); 681 const blink::WebInputEvent* event = std::get<0>(params);
682 SendTouchEventACK(event->type(), ack_result, 682 SendTouchEventACK(event->type(), ack_result,
683 WebInputEventTraits::GetUniqueTouchEventId(*event)); 683 WebInputEventTraits::GetUniqueTouchEventId(*event));
684 } 684 }
685 685
686 const ui::MotionEventAura& pointer_state() { 686 const ui::MotionEventAura& pointer_state() {
687 return view_->pointer_state_for_test(); 687 return view_->pointer_state_for_test();
(...skipping 4056 matching lines...) Expand 10 before | Expand all | Expand 10 after
4744 4744
4745 // Retrieve the selected text from clipboard and verify it is as expected. 4745 // Retrieve the selected text from clipboard and verify it is as expected.
4746 base::string16 result_text; 4746 base::string16 result_text;
4747 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); 4747 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text);
4748 EXPECT_EQ(expected_text, result_text); 4748 EXPECT_EQ(expected_text, result_text);
4749 } 4749 }
4750 } 4750 }
4751 #endif 4751 #endif
4752 4752
4753 } // namespace content 4753 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698