47
47
unity::XdndStartStopNotifierImp xdnd_start_stop_notifier;
50
TEST_F(TestXdndStartStopNotifierImp, UNSTABLE_TEST(SignalStarted))
50
TEST_F(TestXdndStartStopNotifierImp, SignalStarted)
52
52
bool signal_received = false;
53
53
xdnd_start_stop_notifier.started.connect([&](){
57
57
XSetSelectionOwner(display_, selection_, owner_, CurrentTime);
58
//XTestFakeButtonEvent(display_, 1, True, CurrentTime);
58
XTestFakeButtonEvent(display_, 1, True, CurrentTime);
59
59
auto& wm = unity::WindowManager::Default();
60
60
wm.window_mapped.emit(0);
62
62
Utils::WaitUntil(signal_received);
63
//XTestFakeButtonEvent(display_, 1, False, CurrentTime);
63
XTestFakeButtonEvent(display_, 1, False, CurrentTime);
66
TEST_F(TestXdndStartStopNotifierImp, UNSTABLE_TEST(SignalFinished))
66
TEST_F(TestXdndStartStopNotifierImp, SignalFinished)
68
68
bool signal_received = false;
69
69
xdnd_start_stop_notifier.finished.connect([&](){
73
73
XSetSelectionOwner(display_, selection_, owner_, CurrentTime);
74
//XTestFakeButtonEvent(display_, 1, True, CurrentTime);
74
XTestFakeButtonEvent(display_, 1, True, CurrentTime);
75
75
auto& wm = unity::WindowManager::Default();
76
76
wm.window_mapped.emit(0);
78
78
Utils::WaitForTimeoutMSec(500);
80
80
XSetSelectionOwner(display_, selection_, None, CurrentTime);
81
//XTestFakeButtonEvent(display_, 1, False, CurrentTime);
81
XTestFakeButtonEvent(display_, 1, False, CurrentTime);
82
82
wm.window_unmapped.emit(0);
84
84
Utils::WaitUntil(signal_received);
87
TEST_F(TestXdndStartStopNotifierImp, DISABLED_SignalFinished_QT)
87
TEST_F(TestXdndStartStopNotifierImp, SignalFinished_QT)
89
89
bool signal_received = false;
90
xdnd_start_stop_notifier.finished.connect([&](){
90
xdnd_start_stop_notifier.finished.connect([&signal_received] {
91
91
signal_received = true;
94
94
XSetSelectionOwner(display_, selection_, owner_, CurrentTime);
95
//XTestFakeButtonEvent(display_, 1, True, CurrentTime);
95
XTestFakeButtonEvent(display_, 1, True, CurrentTime);
96
96
auto& wm = unity::WindowManager::Default();
97
97
wm.window_mapped.emit(0);
99
99
Utils::WaitForTimeoutMSec(500);
101
//XTestFakeButtonEvent(display_, 1, False, CurrentTime);
101
XTestFakeButtonEvent(display_, 1, False, CurrentTime);
102
102
wm.window_unmapped.emit(0);
104
104
Utils::WaitUntil(signal_received);