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

Side by Side Diff: content/browser/pointer_lock_browsertest.cc

Issue 2969233002: Fixed failing content_browsertests when async wheel events is on. (Closed)
Patch Set: Fixed failing content_browsertests when async wheel events is on Created 3 years, 5 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
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/pointer_lock_browsertest.h" 5 #include "content/browser/pointer_lock_browsertest.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h" 8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 9 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 "function(e) {x = e.x; y = e.y; dX = e.deltaX; dY = e.deltaY;});")); 339 "function(e) {x = e.x; y = e.y; dX = e.deltaX; dY = e.deltaY;});"));
340 MainThreadFrameObserver root_observer(root_view->GetRenderWidgetHost()); 340 MainThreadFrameObserver root_observer(root_view->GetRenderWidgetHost());
341 root_observer.Wait(); 341 root_observer.Wait();
342 342
343 blink::WebMouseWheelEvent wheel_event( 343 blink::WebMouseWheelEvent wheel_event(
344 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers, 344 blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers,
345 blink::WebInputEvent::kTimeStampForTesting); 345 blink::WebInputEvent::kTimeStampForTesting);
346 wheel_event.SetPositionInWidget(10, 11); 346 wheel_event.SetPositionInWidget(10, 11);
347 wheel_event.delta_x = -12; 347 wheel_event.delta_x = -12;
348 wheel_event.delta_y = -13; 348 wheel_event.delta_y = -13;
349 wheel_event.phase = blink::WebMouseWheelEvent::kPhaseBegan;
349 router->RouteMouseWheelEvent(root_view, &wheel_event, ui::LatencyInfo()); 350 router->RouteMouseWheelEvent(root_view, &wheel_event, ui::LatencyInfo());
350 351
351 // Make sure that the renderer handled the input event. 352 // Make sure that the renderer handled the input event.
352 root_observer.Wait(); 353 root_observer.Wait();
353 354
354 int x, y, deltaX, deltaY; 355 int x, y, deltaX, deltaY;
355 EXPECT_TRUE(ExecuteScriptAndExtractInt( 356 EXPECT_TRUE(ExecuteScriptAndExtractInt(
356 root, "window.domAutomationController.send(x);", &x)); 357 root, "window.domAutomationController.send(x);", &x));
357 EXPECT_TRUE(ExecuteScriptAndExtractInt( 358 EXPECT_TRUE(ExecuteScriptAndExtractInt(
358 root, "window.domAutomationController.send(y);", &y)); 359 root, "window.domAutomationController.send(y);", &y));
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 child, "window.domAutomationController.send(dX);", &deltaX)); 411 child, "window.domAutomationController.send(dX);", &deltaX));
411 EXPECT_TRUE(ExecuteScriptAndExtractInt( 412 EXPECT_TRUE(ExecuteScriptAndExtractInt(
412 child, "window.domAutomationController.send(dY);", &deltaY)); 413 child, "window.domAutomationController.send(dY);", &deltaY));
413 EXPECT_EQ(14, x); 414 EXPECT_EQ(14, x);
414 EXPECT_EQ(15, y); 415 EXPECT_EQ(15, y);
415 EXPECT_EQ(16, deltaX); 416 EXPECT_EQ(16, deltaX);
416 EXPECT_EQ(17, deltaY); 417 EXPECT_EQ(17, deltaY);
417 } 418 }
418 419
419 } // namespace content 420 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698