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

Commit 8fa23393 authored by Yu Shan Emily Lau's avatar Yu Shan Emily Lau Committed by Android (Google) Code Review
Browse files

Merge "Insert the 2 seconds before test start to workaround the race conditon...

Merge "Insert the 2 seconds before test start to workaround the race conditon for requesting the surface."
parents cde8aae9 a79edb72
Loading
Loading
Loading
Loading
+19 −16
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import com.android.mediaframeworktest.MediaProfileReader;
import com.android.mediaframeworktest.functional.CodecTest;

import android.content.Context;
import android.test.ActivityInstrumentationTestCase;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
@@ -33,7 +33,7 @@ import java.io.File;
/**
 * Junit / Instrumentation test case for the media player api
 */
public class MediaPlayerApiTest extends ActivityInstrumentationTestCase<MediaFrameworkTest> {
public class MediaPlayerApiTest extends  ActivityInstrumentationTestCase2<MediaFrameworkTest> {
    private boolean duratoinWithinTolerence = false;
    private String TAG = "MediaPlayerApiTest";
    private boolean isWMAEnable = false;
@@ -48,8 +48,11 @@ public class MediaPlayerApiTest extends ActivityInstrumentationTestCase<MediaFra
    }

    protected void setUp() throws Exception {
       //Insert a 2 second before launching the test activity. This is
       //the workaround for the race condition of requesting the updated surface.
       Thread.sleep(2000);
       getActivity();
       super.setUp();
   
    }

    public boolean verifyDuration(int duration, int expectedDuration){