Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0171d3e authored by Basavapatna Dattaguru's avatar Basavapatna Dattaguru
Browse files

VideoEditor: IssueID:3396697:Added TN,MP,Exp,API test codes

Updated with review comments: code cleaning in MP.

Change-Id: Ide5ee82b24806a52b4e612db4bc3c34f75e4465a
parent b27a1ca5
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -33,8 +33,10 @@ import com.android.mediaframeworktest.functional.MediaPresetReverbTest;
import com.android.mediaframeworktest.functional.MediaVirtualizerTest;
import com.android.mediaframeworktest.functional.MediaVirtualizerTest;
import com.android.mediaframeworktest.functional.MediaVisualizerTest;
import com.android.mediaframeworktest.functional.MediaVisualizerTest;
/*import for VideoEditor Test cases*/
/*import for VideoEditor Test cases*/
import com.android.mediaframeworktest.functional.MediaItemThumbnailTest;
import com.android.mediaframeworktest.functional.MediaPropertiesTest;
import com.android.mediaframeworktest.functional.VideoEditorAPITest;
import com.android.mediaframeworktest.functional.VideoEditorAPITest;

import com.android.mediaframeworktest.functional.VideoEditorExportTest;
import junit.framework.TestSuite;
import junit.framework.TestSuite;


import android.test.InstrumentationTestRunner;
import android.test.InstrumentationTestRunner;
@@ -73,7 +75,10 @@ public class MediaFrameworkTestRunner extends InstrumentationTestRunner {
        suite.addTestSuite(MediaVirtualizerTest.class);
        suite.addTestSuite(MediaVirtualizerTest.class);
        suite.addTestSuite(MediaVisualizerTest.class);
        suite.addTestSuite(MediaVisualizerTest.class);
        /*Test for Video Editor*/
        /*Test for Video Editor*/
        suite.addTestSuite(MediaItemThumbnailTest.class);
        suite.addTestSuite(MediaPropertiesTest.class);
        suite.addTestSuite(VideoEditorAPITest.class);
        suite.addTestSuite(VideoEditorAPITest.class);
        suite.addTestSuite(VideoEditorExportTest.class);
        return suite;
        return suite;
    }
    }


+954 −0

File added.

Preview size limit exceeded, changes collapsed.

+734 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −17
Original line number Original line Diff line number Diff line
@@ -89,7 +89,6 @@ public class VideoEditorAPITest extends
     * To Test Creation of Media Video Item.
     * To Test Creation of Media Video Item.
     */
     */
    // TODO : remove TC_API_001
    // TODO : remove TC_API_001
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItem() throws Exception {
    public void testMediaVideoItem() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -132,7 +131,6 @@ public class VideoEditorAPITest extends
     * the Begin and End Time.
     * the Begin and End Time.
     */
     */
    // TODO : remove TC_API_002
    // TODO : remove TC_API_002
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemExtractBoundaries() throws Exception {
    public void testMediaVideoItemExtractBoundaries() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -202,7 +200,6 @@ public class VideoEditorAPITest extends
     * To test creation of Media Video Item with Set and Get rendering Mode
     * To test creation of Media Video Item with Set and Get rendering Mode
     */
     */
    // TODO : remove TC_API_003
    // TODO : remove TC_API_003
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemRenderingModes() throws Exception {
    public void testMediaVideoItemRenderingModes() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -247,7 +244,6 @@ public class VideoEditorAPITest extends
     * To Test the Media Video API : Set Audio Volume, Get Audio Volume and Mute
     * To Test the Media Video API : Set Audio Volume, Get Audio Volume and Mute
     */
     */
    // TODO : remove TC_API_005
    // TODO : remove TC_API_005
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemAudioFeatures() throws Exception {
    public void testMediaVideoItemAudioFeatures() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -306,7 +302,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_006
    // TODO : remove TC_API_006
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemGetWaveformData() throws Exception {
    public void testMediaVideoItemGetWaveformData() throws Exception {


@@ -349,7 +344,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_007
    // TODO : remove TC_API_007
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemEffect() throws Exception {
    public void testMediaVideoItemEffect() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -391,7 +385,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_008
    // TODO : remove TC_API_008
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemTransitions() throws Exception {
    public void testMediaVideoItemTransitions() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -439,7 +432,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_009
    // TODO : remove TC_API_009
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testMediaVideoItemOverlays() throws Exception {
    public void testMediaVideoItemOverlays() throws Exception {
        final String videoItemFileName = INPUT_FILE_PATH
        final String videoItemFileName = INPUT_FILE_PATH
@@ -1404,8 +1396,6 @@ public class VideoEditorAPITest extends
        final Rect endRect1 = new Rect(10, 10, mediaImageItem.getWidth() / 4,
        final Rect endRect1 = new Rect(10, 10, mediaImageItem.getWidth() / 4,
            mediaImageItem.getHeight() / 4);
            mediaImageItem.getHeight() / 4);


        //kbEffectOnMediaItem.setStartRect(startRect1);
        //kbEffectOnMediaItem.setEndRect(endRect1);
        /* Added newly to take care of removal set APIs */
        /* Added newly to take care of removal set APIs */
        kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_changed",
        kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_changed",
            startRect1, endRect1, 500, 3000);
            startRect1, endRect1, 500, 3000);
@@ -1417,7 +1407,6 @@ public class VideoEditorAPITest extends


        final Rect zeroRect = new Rect(0, 0, 0, 0);
        final Rect zeroRect = new Rect(0, 0, 0, 0);
        try {
        try {
            //kbEffectOnMediaItem.setStartRect(zeroRect);
            kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_zeroStart",
            kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_zeroStart",
                zeroRect, endRect, 500, 3000);
                zeroRect, endRect, 500, 3000);


@@ -1428,7 +1417,6 @@ public class VideoEditorAPITest extends


        flagForException = false;
        flagForException = false;
        try {
        try {
            //kbEffectOnMediaItem.setEndRect(zeroRect);
            kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_zeroEnd",
            kbEffectOnMediaItem = new EffectKenBurns(mediaImageItem, "KBOnM2_zeroEnd",
                startRect, zeroRect, 500, 3000);
                startRect, zeroRect, 500, 3000);
        } catch (IllegalArgumentException e) {
        } catch (IllegalArgumentException e) {
@@ -1443,7 +1431,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_037
    // TODO : remove TC_API_037
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testTransitionFadeBlack() throws Exception {
    public void testTransitionFadeBlack() throws Exception {


@@ -1592,7 +1579,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_038
    // TODO : remove TC_API_038
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testTransitionCrossFade() throws Exception {
    public void testTransitionCrossFade() throws Exception {


@@ -1744,7 +1730,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_039
    // TODO : remove TC_API_039
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testTransitionSliding() throws Exception {
    public void testTransitionSliding() throws Exception {
        final String videoItemFilename1 = INPUT_FILE_PATH +
        final String videoItemFilename1 = INPUT_FILE_PATH +
@@ -1935,7 +1920,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_040
    // TODO : remove TC_API_040
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testTransitionAlpha() throws Exception {
    public void testTransitionAlpha() throws Exception {


@@ -2115,7 +2099,6 @@ public class VideoEditorAPITest extends
     */
     */


    // TODO : remove TC_API_041
    // TODO : remove TC_API_041
    @SuppressWarnings("unused")
    @LargeTest
    @LargeTest
    public void testFrameOverlayVideoItem() throws Exception {
    public void testFrameOverlayVideoItem() throws Exception {
        final String videoItemFilename1 = INPUT_FILE_PATH +
        final String videoItemFilename1 = INPUT_FILE_PATH +
+818 −0

File added.

Preview size limit exceeded, changes collapsed.