summaryrefslogtreecommitdiff
path: root/tests/server/barriers-devices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/server/barriers-devices.cpp')
-rw-r--r--tests/server/barriers-devices.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/server/barriers-devices.cpp b/tests/server/barriers-devices.cpp
index 55ebc3a..3f3464a 100644
--- a/tests/server/barriers-devices.cpp
+++ b/tests/server/barriers-devices.cpp
@@ -14,68 +14,6 @@
using namespace xorg::testing::evemu;
-/* BarrierTest doesn't give us anything useful, so don't
- * bother using it. */
-class BarrierDevices : public XITServerInputTest {
-public:
- std::auto_ptr<xorg::testing::evemu::Device> dev1;
- std::auto_ptr<xorg::testing::evemu::Device> dev2;
-
- int master_id_1;
- int master_id_2;
-
- virtual void SetUp() {
- dev1 = std::auto_ptr<Device>(new Device(RECORDINGS_DIR "mice/PIXART-USB-OPTICAL-MOUSE-HWHEEL.desc"));
- dev2 = std::auto_ptr<Device>(new Device(RECORDINGS_DIR "mice/PIXART-USB-OPTICAL-MOUSE-HWHEEL.desc"));
- XITServerInputTest::SetUp();
- ConfigureDevices();
- }
-
- void ConfigureDevices() {
- ::Display *dpy = Display();
- int device_id_2;
-
- XIAnyHierarchyChangeInfo change;
- change.add = (XIAddMasterInfo) {
- .type = XIAddMaster,
- .name = (char *) "New Master",
- .send_core = False,
- .enable = True
- };
-
- master_id_1 = VIRTUAL_CORE_POINTER_ID;
-
- ASSERT_EQ(XIChangeHierarchy(dpy, &change, 1), Success) << "Couldn't add the new master device.";
- ASSERT_TRUE(xorg::testing::XServer::WaitForDevice(dpy, "New Master pointer")) << "Didn't get the new master pointer device.";
- ASSERT_TRUE(FindInputDeviceByName(dpy, "New Master pointer", &master_id_2)) << "Failed to find the new master pointer.";
- ASSERT_TRUE(FindInputDeviceByName(dpy, "--device2--", &device_id_2)) << "Failed to find device2.";
-
- change.attach = (XIAttachSlaveInfo) {
- .type = XIAttachSlave,
- .deviceid = device_id_2,
- .new_master = master_id_2,
- };
- ASSERT_EQ(XIChangeHierarchy(dpy, &change, 1), Success) << "Couldn't attach device2 to the new master pointer.";
- }
-
- virtual void SetUpConfigAndLog() {
- config.AddDefaultScreenWithDriver();
- config.AddInputSection("evdev", "--device1--",
- "Option \"CorePointer\" \"on\""
- "Option \"AccelerationProfile\" \"-1\""
- "Option \"Device\" \"" + dev1->GetDeviceNode() + "\"");
-
- config.AddInputSection("evdev", "--device2--",
- "Option \"CorePointer\" \"on\""
- "Option \"AccelerationProfile\" \"-1\""
- "Option \"Device\" \"" + dev2->GetDeviceNode() + "\"");
-
- config.AddInputSection("kbd", "kbd-device",
- "Option \"CoreKeyboard\" \"on\"\n");
- config.WriteConfig();
- }
-};
-
static Bool
QueryPointerPosition(Display *dpy, int device_id,
double *root_x, double *root_y)