phoneuis/bubblemanager2/tsrc/unit/ut_bubblecontainerwidget/ut_bubblecontainerwidget.cpp
equal
deleted
inserted
replaced
38 |
38 |
39 void testLeftMouseClick(); |
39 void testLeftMouseClick(); |
40 void testRightMouseClick(); |
40 void testRightMouseClick(); |
41 void testMouseMove(); |
41 void testMouseMove(); |
42 |
42 |
43 //void testInvalidStylePlugin(); |
|
44 |
|
45 private: |
43 private: |
46 BubbleContainerWidget* mContainer; |
44 BubbleContainerWidget* mContainer; |
47 HbMainWindow* mMainWindow; |
45 HbMainWindow* mMainWindow; |
48 int mStyleBaseId; |
46 int mStyleBaseId; |
49 }; |
47 }; |
50 |
48 |
51 void ut_BubbleContainerWidget::initTestCase() |
49 void ut_BubbleContainerWidget::initTestCase() |
52 { |
50 { |
53 mMainWindow = new HbMainWindow(); |
51 mMainWindow = new HbMainWindow(); |
54 mContainer = new BubbleContainerWidget(BUBBLE_STYLE_PLUGIN); |
52 mContainer = new BubbleContainerWidget(); |
55 mMainWindow->addView(mContainer); |
53 mMainWindow->addView(mContainer); |
56 mMainWindow->show(); |
54 mMainWindow->show(); |
57 } |
55 } |
58 |
56 |
59 void ut_BubbleContainerWidget::cleanupTestCase() |
57 void ut_BubbleContainerWidget::cleanupTestCase() |
97 // QTest::mouseMove() doesn't work |
95 // QTest::mouseMove() doesn't work |
98 QTest::mouseMove( mMainWindow->viewport(), windowPos2 ); |
96 QTest::mouseMove( mMainWindow->viewport(), windowPos2 ); |
99 QCOMPARE( spy.count(), 0 ); |
97 QCOMPARE( spy.count(), 0 ); |
100 } |
98 } |
101 |
99 |
102 /*void ut_BubbleContainerWidget::testInvalidStylePlugin() |
|
103 { |
|
104 // this just shouldn't crash |
|
105 BubbleContainerWidget *cnt = |
|
106 new BubbleContainerWidget("c:\foobar.dll"); |
|
107 HbView* view = mMainWindow->addView(cnt); |
|
108 mMainWindow->setCurrentView(view); |
|
109 }*/ |
|
110 |
|
111 BUBBLE_TEST_MAIN(ut_BubbleContainerWidget) |
100 BUBBLE_TEST_MAIN(ut_BubbleContainerWidget) |
112 #include "ut_bubblecontainerwidget.moc" |
101 #include "ut_bubblecontainerwidget.moc" |