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

Side by Side Diff: content/renderer/mouse_lock_dispatcher_browsertest.cc

Issue 2590273002: Move WebMouseEvent into its own header file. (Closed)
Patch Set: Fix android build 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 <string> 5 #include <string>
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "content/public/test/render_view_test.h" 8 #include "content/public/test/render_view_test.h"
9 #include "content/renderer/mouse_lock_dispatcher.h" 9 #include "content/renderer/mouse_lock_dispatcher.h"
10 #include "content/renderer/render_view_impl.h" 10 #include "content/renderer/render_view_impl.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/WebKit/public/platform/WebMouseEvent.h"
13 14
14 using ::testing::_; 15 using ::testing::_;
15 16
16 namespace content { 17 namespace content {
17 namespace { 18 namespace {
18 19
19 class MockLockTarget : public MouseLockDispatcher::LockTarget { 20 class MockLockTarget : public MouseLockDispatcher::LockTarget {
20 public: 21 public:
21 MOCK_METHOD1(OnLockMouseACK, void(bool)); 22 MOCK_METHOD1(OnLockMouseACK, void(bool));
22 MOCK_METHOD0(OnMouseLockLost, void()); 23 MOCK_METHOD0(OnMouseLockLost, void());
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 EXPECT_FALSE(dispatcher()->IsMouseLockedTo(alternate_target_)); 226 EXPECT_FALSE(dispatcher()->IsMouseLockedTo(alternate_target_));
226 227
227 // Though the call to UnlockMouse should not unlock any target, we will 228 // Though the call to UnlockMouse should not unlock any target, we will
228 // cause an unlock (as if e.g. user escaped mouse lock) and verify the 229 // cause an unlock (as if e.g. user escaped mouse lock) and verify the
229 // correct target is unlocked. 230 // correct target is unlocked.
230 widget()->OnMessageReceived(ViewMsg_MouseLockLost(route_id_)); 231 widget()->OnMessageReceived(ViewMsg_MouseLockLost(route_id_));
231 EXPECT_FALSE(dispatcher()->IsMouseLockedTo(target_)); 232 EXPECT_FALSE(dispatcher()->IsMouseLockedTo(target_));
232 } 233 }
233 234
234 } // namespace content 235 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698