| | 119 | |
| | 120 | /// |
| | 121 | /// @brief Tests a cancelled open file. |
| | 122 | /// |
| | 123 | /// When the user cancels the open dialog, then nothing should change. |
| | 124 | /// |
| | 125 | void |
| | 126 | MainPterTest::loadCancelled () |
| | 127 | { |
| | 128 | // returning a NULL file name is what will happen when cancel. |
| | 129 | m_View->setOpenFileName (NULL); |
| | 130 | m_MainPter->openFileActivated (); |
| | 131 | CPPUNIT_ASSERT_EQUAL (0, |
| | 132 | g_ascii_strcasecmp ("PDF Viewer", m_View->getTitle ())); |
| | 133 | CPPUNIT_ASSERT (!m_View->isSensitiveGoToFirstPage ()); |
| | 134 | CPPUNIT_ASSERT (!m_View->isSensitiveGoToLastPage ()); |
| | 135 | CPPUNIT_ASSERT (!m_View->isSensitiveGoToNextPage ()); |
| | 136 | CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); |
| | 137 | CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); |
| | 138 | CPPUNIT_ASSERT (!m_View->isSensitiveZoomIn ()); |
| | 139 | CPPUNIT_ASSERT (!m_View->isSensitiveZoomOut ()); |
| | 140 | CPPUNIT_ASSERT (!m_View->isSensitiveZoomFit ()); |
| | 141 | CPPUNIT_ASSERT (!m_View->isSensitiveZoomWidth ()); |
| | 142 | CPPUNIT_ASSERT (!m_View->hasImagePageView ()); |
| | 143 | } |