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
3 // found in the LICENSE file.
5 #ifndef PPAPI_TESTS_TEST_MOUSE_LOCK_H_
6 #define PPAPI_TESTS_TEST_MOUSE_LOCK_H_
10 #include "ppapi/cpp/mouse_lock.h"
11 #include "ppapi/cpp/rect.h"
12 #include "ppapi/tests/test_case.h"
13 #include "ppapi/tests/test_utils.h"
15 class TestMouseLock
: public TestCase
, public pp::MouseLock
{
17 explicit TestMouseLock(TestingInstance
* instance
);
18 virtual ~TestMouseLock();
20 // TestCase implementation.
22 virtual void RunTests(const std::string
& filter
);
23 virtual void DidChangeView(const pp::View
& view
);
25 // pp::MouseLock implementation.
26 virtual void MouseLockLost();
29 std::string
TestSucceedWhenAllowed();
30 std::string
TestFailWhenBlocked();
32 void SimulateUserGesture();
36 NestedEvent nested_event_
;
39 #endif // PPAPI_TESTS_TEST_MOUSE_LOCK_H_