camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.cpp
changeset 56 01e205c615b9
parent 48 42ba2d16bf40
child 55 0da2a5b56583
equal deleted inserted replaced
48:42ba2d16bf40 56:01e205c615b9
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    37 
    37 
    38 
    38 
    39 UnitTestCxeVideoCaptureControlSymbian::UnitTestCxeVideoCaptureControlSymbian()
    39 UnitTestCxeVideoCaptureControlSymbian::UnitTestCxeVideoCaptureControlSymbian()
    40     : mCxeVideoCaptureControlSymbian(0)
    40     : mCxeVideoCaptureControlSymbian(0)
    41 {
    41 {
       
    42     mSettings = new CxeFakeSettings();
    42     qRegisterMetaType<CxeError::Id>("CxeError::Id");
    43     qRegisterMetaType<CxeError::Id>("CxeError::Id");
    43     qRegisterMetaType<CxeVideoCaptureControl::State>("CxeVideoCaptureControl::State");
    44     qRegisterMetaType<CxeVideoCaptureControl::State>("CxeVideoCaptureControl::State");
    44 }
    45 }
    45 
    46 
    46 UnitTestCxeVideoCaptureControlSymbian::~UnitTestCxeVideoCaptureControlSymbian()
    47 UnitTestCxeVideoCaptureControlSymbian::~UnitTestCxeVideoCaptureControlSymbian()
   162     doPrepareStuff();
   163     doPrepareStuff();
   163     mCxeVideoCaptureControlSymbian->record();
   164     mCxeVideoCaptureControlSymbian->record();
   164     mCxeVideoCaptureControlSymbian->stop();
   165     mCxeVideoCaptureControlSymbian->stop();
   165     QVERIFY((mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Stopping)
   166     QVERIFY((mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Stopping)
   166         || (mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Initialized)
   167         || (mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Initialized)
   167         || (mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Idle));
   168         || (mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Idle)
       
   169         || (mCxeVideoCaptureControlSymbian->state() == CxeVideoCaptureControl::Ready));
   168 
   170 
   169     CX_DEBUG_EXIT_FUNCTION();
   171     CX_DEBUG_EXIT_FUNCTION();
   170 }
   172 }
   171 
   173 
   172 void UnitTestCxeVideoCaptureControlSymbian::testRemainingTime()
   174 void UnitTestCxeVideoCaptureControlSymbian::testRemainingTime()
   201     QTest::qWait(1000);
   203     QTest::qWait(1000);
   202     mCxeVideoCaptureControlSymbian->stop();
   204     mCxeVideoCaptureControlSymbian->stop();
   203     // just call to see if it doesn't crash
   205     // just call to see if it doesn't crash
   204     mCxeVideoCaptureControlSymbian->reset();
   206     mCxeVideoCaptureControlSymbian->reset();
   205     QVERIFY(mCxeVideoCaptureControlSymbian->snapshot().isNull());
   207     QVERIFY(mCxeVideoCaptureControlSymbian->snapshot().isNull());
       
   208     QVERIFY(mCxeVideoCaptureControlSymbian->filename().isEmpty());
   206 
   209 
   207     CX_DEBUG_EXIT_FUNCTION();
   210     CX_DEBUG_EXIT_FUNCTION();
   208 }
   211 }
   209 
   212 
   210 void UnitTestCxeVideoCaptureControlSymbian::testFilename()
   213 void UnitTestCxeVideoCaptureControlSymbian::testFilename()