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

Unified Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 2841263002: [VSync Queue] Flush input in CommitComplete() (Closed)
Patch Set: Test Patch: VsyncAlignedInput Enabled Created 3 years, 8 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: ui/events/blink/input_handler_proxy_unittest.cc
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index e30d729e3618c57ebcaffcc049a98b5caa21c336..8f6becce44008c78e70034011708c9494cc6f2a0 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -202,6 +202,10 @@ class MockInputHandler : public cc::InputHandler {
void BindToClient(cc::InputHandlerClient* client,
bool touchpad_and_wheel_scroll_latching_enabled) override {}
+ InputHandlerState GetInputHandlerState() const override {
+ return input_handler_state_;
+ }
+
void MouseDown() override {}
void MouseUp() override {}
void MouseLeave() override {}
@@ -227,9 +231,13 @@ class MockInputHandler : public cc::InputHandler {
return is_scrolling_root_;
}
void set_is_scrolling_root(bool is) { is_scrolling_root_ = is; }
+ void set_input_handler_state(InputHandlerState input_handler_state) {
+ input_handler_state_ = input_handler_state;
+ }
private:
bool is_scrolling_root_ = true;
+ InputHandlerState input_handler_state_ = InputHandlerState::IDLE;
DISALLOW_COPY_AND_ASSIGN(MockInputHandler);
};
@@ -527,6 +535,13 @@ class InputHandlerProxyEventQueueTest : public testing::TestWithParam<bool> {
if (input_handler_proxy_->compositor_event_queue_)
input_handler_proxy_->compositor_event_queue_ =
base::MakeUnique<CompositorThreadEventQueue>();
+ mock_input_handler_.set_input_handler_state(
+ cc::InputHandler::InputHandlerState::INSIDE_IMPL_FRAME);
+ }
+
+ void TearDown() override {
+ mock_input_handler_.set_input_handler_state(
+ cc::InputHandler::InputHandlerState::IDLE);
}
void StartTracing() {
« testing/variations/fieldtrial_testing_config.json ('K') | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698