~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/android/test_fb_device.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    mtd::MockEGL mock_egl;
61
61
};
62
62
 
63
 
TEST_F(FBDevice, render)
 
63
TEST_F(FBDevice, gpu_render_swaps_buffers)
64
64
{
65
65
    using namespace testing;
66
66
    int bad = 0xdfefefe;
80
80
    fbdev.gpu_render(dpy, surf);
81
81
}
82
82
 
83
 
TEST_F(FBDevice, commit_frame)
 
83
TEST_F(FBDevice, commits_frame_via_post)
84
84
{
85
85
    using namespace testing;
86
86
    EXPECT_CALL(*fb_hal_mock, post_interface(fb_hal_mock.get(), native_buffer->handle()))
97
97
    fbdev.post(*mock_buffer);
98
98
}
99
99
 
100
 
TEST_F(FBDevice, set_swapinterval)
 
100
TEST_F(FBDevice, sets_swapinterval_1_on_start)
101
101
{
102
102
    EXPECT_CALL(*fb_hal_mock, setSwapInterval_interface(fb_hal_mock.get(), 1))
103
103
        .Times(1);
105
105
}
106
106
 
107
107
//not all fb devices provide a swap interval hook. make sure we don't explode if thats the case
108
 
TEST_F(FBDevice, set_swapinterval_with_null_hook)
 
108
TEST_F(FBDevice, does_not_segfault_if_null_swapinterval_hook)
109
109
{
110
110
    fb_hal_mock->setSwapInterval = nullptr;
111
111
    mga::FBDevice fbdev(fb_hal_mock);
112
112
}
113
113
 
114
 
TEST_F(FBDevice, screen_on_off)
 
114
TEST_F(FBDevice, does_not_accept_orientation_changes)
 
115
{
 
116
    mga::FBDevice fbdev(fb_hal_mock);
 
117
    EXPECT_FALSE(fbdev.apply_orientation(mir_orientation_left));
 
118
}
 
119
 
 
120
TEST_F(FBDevice, can_screen_on_off)
115
121
{
116
122
    fb_hal_mock->setSwapInterval = nullptr;
117
123
    using namespace testing;