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

Unified Diff: chrome/browser/ui/exclusive_access/mouse_lock_controller.cc

Issue 1570443008: Fix FullscreenController tests with simplified-fullscreen-ui flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FullscreenControllerInteractiveTest: Further fixes for ChromeOS-only tests. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/exclusive_access/mouse_lock_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
index 1a46837ea7818a28d9cd928d7db44da222fa84d1..92e943a0a153fdb5eb1092afa57994cde2c4a3bf 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
@@ -23,8 +23,8 @@ using content::WebContents;
MouseLockController::MouseLockController(ExclusiveAccessManager* manager)
: ExclusiveAccessControllerBase(manager),
- mouse_lock_state_(MOUSELOCK_NOT_REQUESTED) {
-}
+ mouse_lock_state_(MOUSELOCK_NOT_REQUESTED),
+ fake_mouse_lock_for_test_(false) {}
MouseLockController::~MouseLockController() {
}
@@ -70,7 +70,8 @@ void MouseLockController::RequestToLockMouse(WebContents* web_contents,
mouse_lock_state_ = MOUSELOCK_REQUESTED;
} else {
// Lock mouse.
- if (web_contents->GotResponseToLockMouseRequest(true)) {
+ if (fake_mouse_lock_for_test_ ||
+ web_contents->GotResponseToLockMouseRequest(true)) {
if (last_unlocked_by_target) {
mouse_lock_state_ = MOUSELOCK_ACCEPTED_SILENTLY;
} else {
« no previous file with comments | « chrome/browser/ui/exclusive_access/mouse_lock_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698