~oif-packaging/grail/raring

« back to all changes in this revision

Viewing changes to test/x11/twodrag.cpp

  • Committer: Chase Douglas
  • Date: 2012-06-21 20:30:14 UTC
  • mto: This revision was merged to the branch mainline in revision 234.
  • Revision ID: chase.douglas@ubuntu.com-20120621203014-g2uhy6mg779aufop
Rename utouch-grail to grail

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 *
26
26
 * This test plays a two-touch drag and checks that the appropriate events come
27
27
 * out of grail. All the gesture slice properties are verified except for the
28
 
 * associated uTouch-Frame frame, which would be non-trivial to verify. The
29
 
 * first event, the first event recognized as a drag, and the last two events
30
 
 * are checked. The rest are skipped.
 
28
 * associated frame, which would be non-trivial to verify. The first event, the
 
29
 * first event recognized as a drag, and the last two events are checked. The
 
30
 * rest are skipped.
31
31
 */
32
32
 
33
33
#include <cmath>
41
41
#include "events.h"
42
42
#include "recording.h"
43
43
#include "x11/fixture.h"
44
 
#include "utouch/frame_x11.h"
 
44
#include "oif/frame_x11.h"
45
45
 
46
 
using namespace utouch::grail::x11::testing;
 
46
using namespace oif::grail::x11::testing;
47
47
 
48
48
class TwoDrag : public Test {
49
49
 public:
50
50
  TwoDrag() : device_(NULL), step_(0), subscription_(NULL) {}
51
51
 
52
52
 protected:
53
 
  static utouch::grail::testing::Events events_;
 
53
  static oif::grail::testing::Events events_;
54
54
 
55
55
  virtual void ProcessFrameEvents();
56
56
  virtual void ProcessGrailEvents();
191
191
}
192
192
 
193
193
TEST_F(TwoDrag, Recording) {
194
 
  utouch::evemu::Device device(TEST_ROOT_DIR "recordings/ntrig_dell_xt2/device.prop");
 
194
  oif::evemu::Device device(TEST_ROOT_DIR "recordings/ntrig_dell_xt2/device.prop");
195
195
 
196
196
  /* Pump once to ensure the X server has initialized the device */
197
197
  PumpEvents();
198
198
  ASSERT_NE(nullptr, device_) << "X server failed to initialize touchscreen";
199
199
 
200
 
  utouch::evemu::Recording recording(device,
 
200
  oif::evemu::Recording recording(device,
201
201
                                     TEST_ROOT_DIR "recordings/ntrig_dell_xt2/2_drag.record");
202
202
 
203
203
  recording.Play();
214
214
/* Construct the expected events */
215
215
namespace {
216
216
 
217
 
using namespace utouch::grail::testing;
 
217
using namespace oif::grail::testing;
218
218
 
219
219
const Events ConstructEvents() {
220
220
  Events events;
350
350
} // namespace
351
351
 
352
352
/* Now initialize the static test fixture member */
353
 
utouch::grail::testing::Events TwoDrag::events_(ConstructEvents());
 
353
oif::grail::testing::Events TwoDrag::events_(ConstructEvents());