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

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

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Fix MSAN Use-of-uninitialized-value: Initialize GestureEventDetails Created 3 years, 6 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 bool should_capture_; 327 bool should_capture_;
328 base::UnguessableToken source_id_for_copy_request_; 328 base::UnguessableToken source_id_for_copy_request_;
329 }; 329 };
330 330
331 class FakeWindowEventDispatcher : public aura::WindowEventDispatcher { 331 class FakeWindowEventDispatcher : public aura::WindowEventDispatcher {
332 public: 332 public:
333 FakeWindowEventDispatcher(aura::WindowTreeHost* host) 333 FakeWindowEventDispatcher(aura::WindowTreeHost* host)
334 : WindowEventDispatcher(host), 334 : WindowEventDispatcher(host),
335 processed_touch_event_count_(0) {} 335 processed_touch_event_count_(0) {}
336 336
337 void ProcessedTouchEvent(uint32_t unique_event_id, 337 void ProcessedTouchEvent(
338 aura::Window* window, 338 uint32_t unique_event_id,
339 ui::EventResult result) override { 339 aura::Window* window,
340 WindowEventDispatcher::ProcessedTouchEvent(unique_event_id, window, result); 340 ui::EventResult result,
341 bool is_source_touch_event_set_non_blocking) override {
342 WindowEventDispatcher::ProcessedTouchEvent(
343 unique_event_id, window, result,
344 is_source_touch_event_set_non_blocking);
341 processed_touch_event_count_++; 345 processed_touch_event_count_++;
342 } 346 }
343 347
344 size_t GetAndResetProcessedTouchEventCount() { 348 size_t GetAndResetProcessedTouchEventCount() {
345 size_t count = processed_touch_event_count_; 349 size_t count = processed_touch_event_count_;
346 processed_touch_event_count_ = 0; 350 processed_touch_event_count_ = 0;
347 return count; 351 return count;
348 } 352 }
349 353
350 private: 354 private:
(...skipping 5481 matching lines...) Expand 10 before | Expand all | Expand 10 after
5832 // There is no composition in the beginning. 5836 // There is no composition in the beginning.
5833 EXPECT_FALSE(has_composition_text()); 5837 EXPECT_FALSE(has_composition_text());
5834 SetHasCompositionTextToTrue(); 5838 SetHasCompositionTextToTrue();
5835 view->ImeCancelComposition(); 5839 view->ImeCancelComposition();
5836 // The composition must have been canceled. 5840 // The composition must have been canceled.
5837 EXPECT_FALSE(has_composition_text()); 5841 EXPECT_FALSE(has_composition_text());
5838 } 5842 }
5839 } 5843 }
5840 5844
5841 } // namespace content 5845 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698